]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Merge pull request #17079 from keszybz/late-exec-resolution
authorLennart Poettering <lennart@poettering.net>
Thu, 3 Dec 2020 13:58:20 +0000 (14:58 +0100)
committerGitHub <noreply@github.com>
Thu, 3 Dec 2020 13:58:20 +0000 (14:58 +0100)
Resolve executable paths before execution, use fexecve()

2741 files changed:
.clang-format
.github/workflows/build_test.yml
.github/workflows/ubuntu-build-check.sh
.mkosi/mkosi.arch
.mkosi/mkosi.debian
.mkosi/mkosi.fedora
.mkosi/mkosi.opensuse
.mkosi/mkosi.ubuntu
NEWS
TODO
catalog/meson.build
catalog/systemd.be.catalog.in
catalog/systemd.be@latin.catalog.in
catalog/systemd.bg.catalog.in
catalog/systemd.catalog.in
catalog/systemd.da.catalog.in
catalog/systemd.de.catalog.in
catalog/systemd.fr.catalog.in
catalog/systemd.hr.catalog.in
catalog/systemd.hu.catalog.in
catalog/systemd.it.catalog.in
catalog/systemd.ko.catalog.in
catalog/systemd.pl.catalog.in
catalog/systemd.pt_BR.catalog.in
catalog/systemd.ru.catalog.in
catalog/systemd.sr.catalog.in
catalog/systemd.zh_CN.catalog.in
catalog/systemd.zh_TW.catalog.in
coccinelle/errno.cocci
coccinelle/synthetic-errno.cocci
docs/BOOT_LOADER_SPECIFICATION.md
docs/CODING_STYLE.md
docs/CONTAINER_INTERFACE.md
docs/DISCOVERABLE_PARTITIONS.md
docs/ENVIRONMENT.md
docs/JOURNAL_FILE_FORMAT.md
docs/PORTABILITY_AND_STABILITY.md
docs/RELEASE.md
docs/RESOLVED-VPNS.md [new file with mode: 0644]
docs/TRANSIENT-SETTINGS.md
docs/sysvinit/meson.build
docs/var-log/meson.build
hwdb.d/20-OUI.hwdb
hwdb.d/20-acpi-vendor.hwdb
hwdb.d/20-acpi-vendor.hwdb.patch
hwdb.d/20-pci-classes.hwdb
hwdb.d/20-pci-vendor-model.hwdb
hwdb.d/60-autosuspend.hwdb
hwdb.d/60-evdev.hwdb
hwdb.d/60-input-id.hwdb
hwdb.d/60-keyboard.hwdb
hwdb.d/60-sensor.hwdb
hwdb.d/70-mouse.hwdb
hwdb.d/70-pointingstick.hwdb
hwdb.d/ma-large.txt
hwdb.d/ma-medium.txt
hwdb.d/ma-small.txt
hwdb.d/meson.build
hwdb.d/parse_hwdb.py
hwdb.d/pci.ids
hwdb.d/pnp_id_registry.html
man/binfmt.d.xml
man/bootctl.xml
man/bootup.xml
man/busctl.xml
man/coredump.conf.xml
man/coredumpctl.xml
man/crypttab.xml
man/custom-entities.ent.in
man/custom-html.xsl
man/custom-man.xsl
man/daemon.xml
man/directives-template.xml
man/dnssec-trust-anchors.d.xml
man/environment.d.xml
man/file-hierarchy.xml
man/halt.xml
man/homectl.xml
man/homed.conf.xml
man/hostname.xml
man/hostnamectl.xml
man/hwdb.xml
man/journal-remote.conf.xml
man/journal-upload.conf.xml
man/journalctl.xml
man/journald.conf.xml
man/kernel-command-line.xml
man/kernel-install.xml
man/less-variables.xml
man/libsystemd-pkgconfig.xml
man/libudev.xml
man/loader.conf.xml
man/locale.conf.xml
man/localectl.xml
man/localtime.xml
man/loginctl.xml
man/logind.conf.xml
man/machine-id.xml
man/machine-info.xml
man/machinectl.xml
man/meson.build
man/modules-load.d.xml
man/networkctl.xml
man/networkd.conf.xml
man/nss-myhostname.xml
man/nss-mymachines.xml
man/nss-resolve.xml
man/nss-systemd.xml
man/oomctl.xml [new file with mode: 0644]
man/oomd.conf.xml [new file with mode: 0644]
man/org.freedesktop.LogControl1.xml
man/org.freedesktop.home1.xml
man/org.freedesktop.hostname1.xml
man/org.freedesktop.import1.xml
man/org.freedesktop.locale1.xml
man/org.freedesktop.login1.xml
man/org.freedesktop.machine1.xml
man/org.freedesktop.oom1.xml [new file with mode: 0644]
man/org.freedesktop.resolve1.xml
man/org.freedesktop.systemd1.xml
man/org.freedesktop.timedate1.xml
man/os-release.xml
man/pam_systemd.xml
man/pam_systemd_home.xml
man/portablectl.xml
man/pstore.conf.xml
man/repart.d.xml
man/resolvectl.xml
man/resolved.conf.xml
man/rules/meson.build
man/runlevel.xml
man/sd-bus-errors.xml
man/sd-bus.xml
man/sd-daemon.xml
man/sd-event.xml
man/sd-hwdb.xml
man/sd-id128.xml
man/sd-journal.xml
man/sd-login.xml
man/sd_booted.xml
man/sd_bus_add_match.xml
man/sd_bus_add_node_enumerator.xml
man/sd_bus_add_object.xml
man/sd_bus_add_object_manager.xml
man/sd_bus_attach_event.xml
man/sd_bus_call.xml
man/sd_bus_call_method.xml
man/sd_bus_can_send.xml
man/sd_bus_close.xml
man/sd_bus_creds_get_pid.xml
man/sd_bus_creds_new_from_pid.xml
man/sd_bus_default.xml
man/sd_bus_emit_signal.xml
man/sd_bus_enqueue_for_read.xml
man/sd_bus_error.xml
man/sd_bus_error_add_map.xml
man/sd_bus_get_current_handler.xml
man/sd_bus_get_fd.xml
man/sd_bus_get_n_queued_read.xml
man/sd_bus_get_name_creds.xml
man/sd_bus_get_name_machine_id.xml
man/sd_bus_interface_name_is_valid.xml
man/sd_bus_is_open.xml
man/sd_bus_list_names.xml
man/sd_bus_message_append.xml
man/sd_bus_message_append_array.xml
man/sd_bus_message_append_basic.xml
man/sd_bus_message_append_string_memfd.xml
man/sd_bus_message_append_strv.xml
man/sd_bus_message_at_end.xml
man/sd_bus_message_copy.xml
man/sd_bus_message_dump.xml
man/sd_bus_message_get_cookie.xml
man/sd_bus_message_get_monotonic_usec.xml
man/sd_bus_message_get_signature.xml
man/sd_bus_message_get_type.xml
man/sd_bus_message_new.xml
man/sd_bus_message_new_method_call.xml
man/sd_bus_message_new_method_error.xml
man/sd_bus_message_new_signal.xml
man/sd_bus_message_open_container.xml
man/sd_bus_message_read.xml
man/sd_bus_message_read_array.xml
man/sd_bus_message_read_basic.xml
man/sd_bus_message_read_strv.xml
man/sd_bus_message_rewind.xml
man/sd_bus_message_seal.xml
man/sd_bus_message_sensitive.xml
man/sd_bus_message_set_destination.xml
man/sd_bus_message_set_expect_reply.xml
man/sd_bus_message_skip.xml
man/sd_bus_message_verify_type.xml
man/sd_bus_negotiate_fds.xml
man/sd_bus_new.xml
man/sd_bus_path_encode.xml
man/sd_bus_process.xml
man/sd_bus_query_sender_creds.xml
man/sd_bus_reply_method_error.xml
man/sd_bus_reply_method_return.xml
man/sd_bus_request_name.xml
man/sd_bus_send.xml
man/sd_bus_set_address.xml
man/sd_bus_set_close_on_exit.xml
man/sd_bus_set_connected_signal.xml
man/sd_bus_set_description.xml
man/sd_bus_set_exit_on_disconnect.xml
man/sd_bus_set_method_call_timeout.xml
man/sd_bus_set_property.xml
man/sd_bus_set_sender.xml
man/sd_bus_set_server.xml
man/sd_bus_set_watch_bind.xml
man/sd_bus_slot_get_bus.xml
man/sd_bus_slot_ref.xml
man/sd_bus_slot_set_description.xml
man/sd_bus_slot_set_destroy_callback.xml
man/sd_bus_slot_set_floating.xml
man/sd_bus_slot_set_userdata.xml
man/sd_bus_start.xml
man/sd_bus_track_add_name.xml
man/sd_bus_track_new.xml
man/sd_bus_wait.xml
man/sd_event_add_child.xml
man/sd_event_add_defer.xml
man/sd_event_add_inotify.xml
man/sd_event_add_io.xml
man/sd_event_add_signal.xml
man/sd_event_add_time.xml
man/sd_event_exit.xml
man/sd_event_get_fd.xml
man/sd_event_new.xml
man/sd_event_now.xml
man/sd_event_run.xml
man/sd_event_set_watchdog.xml
man/sd_event_source_get_event.xml
man/sd_event_source_get_pending.xml
man/sd_event_source_set_description.xml
man/sd_event_source_set_destroy_callback.xml
man/sd_event_source_set_enabled.xml
man/sd_event_source_set_exit_on_failure.xml
man/sd_event_source_set_floating.xml
man/sd_event_source_set_prepare.xml
man/sd_event_source_set_priority.xml
man/sd_event_source_set_ratelimit.xml [new file with mode: 0644]
man/sd_event_source_set_userdata.xml
man/sd_event_source_unref.xml
man/sd_event_wait.xml
man/sd_get_seats.xml
man/sd_hwdb_get.xml
man/sd_hwdb_new.xml
man/sd_id128_get_machine.xml
man/sd_id128_randomize.xml
man/sd_id128_to_string.xml
man/sd_is_fifo.xml
man/sd_journal_add_match.xml
man/sd_journal_enumerate_fields.xml
man/sd_journal_get_catalog.xml
man/sd_journal_get_cursor.xml
man/sd_journal_get_cutoff_realtime_usec.xml
man/sd_journal_get_data.xml
man/sd_journal_get_fd.xml
man/sd_journal_get_realtime_usec.xml
man/sd_journal_get_usage.xml
man/sd_journal_has_runtime_files.xml
man/sd_journal_next.xml
man/sd_journal_open.xml
man/sd_journal_print.xml
man/sd_journal_query_unique.xml
man/sd_journal_seek_head.xml
man/sd_journal_stream_fd.xml
man/sd_listen_fds.xml
man/sd_login_monitor_new.xml
man/sd_machine_get_class.xml
man/sd_notify.xml
man/sd_path_lookup.xml
man/sd_pid_get_owner_uid.xml
man/sd_seat_get_active.xml
man/sd_session_is_active.xml
man/sd_uid_get_state.xml
man/sd_watchdog_enabled.xml
man/shutdown.xml
man/standard-conf.xml
man/standard-options.xml
man/standard-specifiers.xml
man/supported-controllers.xml
man/sysctl.d.xml
man/system-only.xml
man/systemctl.xml
man/systemd-analyze.xml
man/systemd-ask-password-console.service.xml
man/systemd-ask-password.xml
man/systemd-backlight@.service.xml
man/systemd-binfmt.service.xml
man/systemd-bless-boot-generator.xml
man/systemd-bless-boot.service.xml
man/systemd-boot-check-no-failures.service.xml
man/systemd-boot-system-token.service.xml
man/systemd-boot.xml
man/systemd-cat.xml
man/systemd-cgls.xml
man/systemd-cgtop.xml
man/systemd-coredump.xml
man/systemd-cryptsetup-generator.xml
man/systemd-cryptsetup@.service.xml
man/systemd-debug-generator.xml
man/systemd-delta.xml
man/systemd-detect-virt.xml
man/systemd-dissect.xml
man/systemd-environment-d-generator.xml
man/systemd-escape.xml
man/systemd-firstboot.xml
man/systemd-fsck@.service.xml
man/systemd-fstab-generator.xml
man/systemd-getty-generator.xml
man/systemd-gpt-auto-generator.xml
man/systemd-halt.service.xml
man/systemd-hibernate-resume-generator.xml
man/systemd-hibernate-resume@.service.xml
man/systemd-homed.service.xml
man/systemd-hostnamed.service.xml
man/systemd-hwdb.xml
man/systemd-id128.xml
man/systemd-importd.service.xml
man/systemd-inhibit.xml
man/systemd-initctl.service.xml
man/systemd-journal-gatewayd.service.xml
man/systemd-journal-remote.service.xml
man/systemd-journal-upload.service.xml
man/systemd-journald.service.xml
man/systemd-localed.service.xml
man/systemd-logind.service.xml
man/systemd-machine-id-commit.service.xml
man/systemd-machine-id-setup.xml
man/systemd-machined.service.xml
man/systemd-makefs@.service.xml
man/systemd-modules-load.service.xml
man/systemd-mount.xml
man/systemd-network-generator.service.xml
man/systemd-networkd-wait-online.service.xml
man/systemd-networkd.service.xml
man/systemd-notify.xml
man/systemd-nspawn.xml
man/systemd-oomd.service.xml [new file with mode: 0644]
man/systemd-path.xml
man/systemd-portabled.service.xml
man/systemd-pstore.service.xml
man/systemd-quotacheck.service.xml
man/systemd-random-seed.service.xml
man/systemd-rc-local-generator.xml
man/systemd-remount-fs.service.xml
man/systemd-repart.xml
man/systemd-resolved.service.xml
man/systemd-rfkill.service.xml
man/systemd-run-generator.xml
man/systemd-run.xml
man/systemd-sleep.conf.xml
man/systemd-socket-activate.xml
man/systemd-socket-proxyd.xml
man/systemd-suspend.service.xml
man/systemd-sysctl.service.xml
man/systemd-system-update-generator.xml
man/systemd-system.conf.xml
man/systemd-sysusers.xml
man/systemd-sysv-generator.xml
man/systemd-time-wait-sync.service.xml
man/systemd-timedated.service.xml
man/systemd-timesyncd.service.xml
man/systemd-tmpfiles.xml
man/systemd-tty-ask-password-agent.xml
man/systemd-udev-settle.service.xml
man/systemd-udevd.service.xml
man/systemd-update-done.service.xml
man/systemd-update-utmp.service.xml
man/systemd-user-sessions.service.xml
man/systemd-userdbd.service.xml
man/systemd-vconsole-setup.service.xml
man/systemd-veritysetup-generator.xml
man/systemd-veritysetup@.service.xml
man/systemd-volatile-root.service.xml
man/systemd-xdg-autostart-generator.xml
man/systemd.automount.xml
man/systemd.device.xml
man/systemd.dnssd.xml
man/systemd.environment-generator.xml
man/systemd.exec.xml
man/systemd.generator.xml
man/systemd.journal-fields.xml
man/systemd.kill.xml
man/systemd.link.xml
man/systemd.mount.xml
man/systemd.net-naming-scheme.xml
man/systemd.netdev.xml
man/systemd.network.xml
man/systemd.nspawn.xml
man/systemd.offline-updates.xml
man/systemd.path.xml
man/systemd.preset.xml
man/systemd.resource-control.xml
man/systemd.scope.xml
man/systemd.service.xml
man/systemd.slice.xml
man/systemd.socket.xml
man/systemd.special.xml
man/systemd.swap.xml
man/systemd.syntax.xml
man/systemd.target.xml
man/systemd.time.xml
man/systemd.timer.xml
man/systemd.unit.xml
man/systemd.xml
man/sysusers.d.xml
man/tc.xml
man/telinit.xml
man/threads-aware.xml
man/timedatectl.xml
man/timesyncd.conf.xml
man/tmpfiles.d.xml
man/udev.conf.xml
man/udev.xml
man/udev_device_get_syspath.xml
man/udev_device_has_tag.xml
man/udev_device_new_from_syspath.xml
man/udev_enumerate_add_match_subsystem.xml
man/udev_enumerate_new.xml
man/udev_enumerate_scan_devices.xml
man/udev_list_entry.xml
man/udev_monitor_filter_update.xml
man/udev_monitor_new_from_netlink.xml
man/udev_monitor_receive_device.xml
man/udev_new.xml
man/udevadm.xml
man/user-system-options.xml
man/user@.service.xml
man/userdbctl.xml
man/vconsole.conf.xml
meson.build
meson_options.txt
modprobe.d/systemd.conf
network/80-container-host0.network
network/80-container-ve.network
network/80-container-vz.network
network/80-vm-vt.network
network/99-default.link
network/meson.build
po/POTFILES.skip
po/be.po
po/be@latin.po
po/bg.po
po/ca.po
po/cs.po
po/da.po
po/de.po
po/el.po
po/es.po
po/fr.po
po/gl.po
po/hr.po
po/hu.po
po/id.po
po/it.po
po/ja.po
po/ko.po
po/meson.build
po/pl.po
po/pt_BR.po
po/ro.po
po/ru.po
po/sk.po
po/sr.po
po/sv.po
po/tr.po
po/uk.po
po/zh_CN.po
po/zh_TW.po
presets/90-systemd.preset
presets/meson.build
presets/user/90-systemd.preset
rules.d/99-systemd.rules.in
rules.d/meson.build
semaphoreci/semaphore-runner.sh
shell-completion/bash/bootctl
shell-completion/bash/busctl
shell-completion/bash/coredumpctl
shell-completion/bash/homectl
shell-completion/bash/hostnamectl
shell-completion/bash/journalctl
shell-completion/bash/kernel-install
shell-completion/bash/localectl
shell-completion/bash/loginctl
shell-completion/bash/machinectl
shell-completion/bash/meson.build
shell-completion/bash/networkctl
shell-completion/bash/portablectl
shell-completion/bash/resolvectl
shell-completion/bash/systemctl.in
shell-completion/bash/systemd-analyze
shell-completion/bash/systemd-cat
shell-completion/bash/systemd-cgls
shell-completion/bash/systemd-cgtop
shell-completion/bash/systemd-delta
shell-completion/bash/systemd-detect-virt
shell-completion/bash/systemd-id128
shell-completion/bash/systemd-nspawn
shell-completion/bash/systemd-path
shell-completion/bash/systemd-resolve
shell-completion/bash/systemd-run
shell-completion/bash/timedatectl
shell-completion/bash/udevadm
shell-completion/zsh/_bootctl
shell-completion/zsh/_busctl
shell-completion/zsh/_coredumpctl
shell-completion/zsh/_hostnamectl
shell-completion/zsh/_journalctl
shell-completion/zsh/_kernel-install
shell-completion/zsh/_localectl
shell-completion/zsh/_loginctl
shell-completion/zsh/_machinectl
shell-completion/zsh/_networkctl
shell-completion/zsh/_resolvectl
shell-completion/zsh/_sd_hosts_or_user_at_host
shell-completion/zsh/_sd_machines
shell-completion/zsh/_sd_outputmodes
shell-completion/zsh/_sd_unit_files
shell-completion/zsh/_systemctl.in
shell-completion/zsh/_systemd
shell-completion/zsh/_systemd-analyze
shell-completion/zsh/_systemd-delta
shell-completion/zsh/_systemd-inhibit
shell-completion/zsh/_systemd-nspawn
shell-completion/zsh/_systemd-run
shell-completion/zsh/_systemd-tmpfiles
shell-completion/zsh/_timedatectl
shell-completion/zsh/_udevadm
shell-completion/zsh/meson.build
src/ac-power/ac-power.c
src/activate/activate.c
src/analyze/analyze-condition.c
src/analyze/analyze-condition.h
src/analyze/analyze-security.c
src/analyze/analyze-security.h
src/analyze/analyze-verify.c
src/analyze/analyze-verify.h
src/analyze/analyze.c
src/analyze/meson.build
src/analyze/test-verify.c
src/ask-password/ask-password.c
src/backlight/backlight.c
src/basic/MurmurHash2.c
src/basic/MurmurHash2.h
src/basic/af-list.c
src/basic/af-list.h
src/basic/alloc-util.c
src/basic/alloc-util.h
src/basic/architecture.c
src/basic/architecture.h
src/basic/arphrd-list.c
src/basic/arphrd-list.h
src/basic/async.c
src/basic/async.h
src/basic/audit-util.c
src/basic/audit-util.h
src/basic/blockdev-util.c
src/basic/blockdev-util.h
src/basic/btrfs-util.c
src/basic/btrfs-util.h
src/basic/build.c [new file with mode: 0644]
src/basic/build.h
src/basic/bus-label.c
src/basic/bus-label.h
src/basic/cap-list.c
src/basic/cap-list.h
src/basic/capability-util.c
src/basic/capability-util.h
src/basic/cgroup-util.c
src/basic/cgroup-util.h
src/basic/chattr-util.c
src/basic/chattr-util.h
src/basic/conf-files.c
src/basic/conf-files.h
src/basic/copy.c
src/basic/copy.h
src/basic/def.h
src/basic/device-nodes.c
src/basic/device-nodes.h
src/basic/dirent-util.c
src/basic/dirent-util.h
src/basic/dlfcn-util.c
src/basic/dlfcn-util.h
src/basic/efivars.c
src/basic/efivars.h
src/basic/env-file.c
src/basic/env-file.h
src/basic/env-util.c
src/basic/env-util.h
src/basic/errno-list.c
src/basic/errno-list.h
src/basic/errno-util.h
src/basic/escape.c
src/basic/escape.h
src/basic/ether-addr-util.c
src/basic/ether-addr-util.h
src/basic/extract-word.c
src/basic/extract-word.h
src/basic/fd-util.c
src/basic/fd-util.h
src/basic/fileio.c
src/basic/fileio.h
src/basic/format-util.c
src/basic/format-util.h
src/basic/fs-util.c
src/basic/fs-util.h
src/basic/gcrypt-util.c
src/basic/gcrypt-util.h
src/basic/glob-util.c
src/basic/glob-util.h
src/basic/gunicode.c
src/basic/gunicode.h
src/basic/hash-funcs.c
src/basic/hash-funcs.h
src/basic/hashmap.c
src/basic/hashmap.h
src/basic/hexdecoct.c
src/basic/hexdecoct.h
src/basic/hostname-util.c
src/basic/hostname-util.h
src/basic/in-addr-util.c
src/basic/in-addr-util.h
src/basic/io-util.c
src/basic/io-util.h
src/basic/kbd-util.c
src/basic/kbd-util.h
src/basic/khash.c
src/basic/khash.h
src/basic/label.c
src/basic/label.h
src/basic/limits-util.c
src/basic/limits-util.h
src/basic/linux/btrfs_tree.h
src/basic/linux/if_bridge.h
src/basic/linux/if_link.h
src/basic/linux/l2tp.h
src/basic/linux/loadavg.h [new file with mode: 0644]
src/basic/linux/netlink.h
src/basic/linux/update.sh
src/basic/list.h
src/basic/locale-util.c
src/basic/locale-util.h
src/basic/log.c
src/basic/log.h
src/basic/login-util.c
src/basic/login-util.h
src/basic/macro.h
src/basic/memfd-util.c
src/basic/memfd-util.h
src/basic/memory-util.c
src/basic/memory-util.h
src/basic/mempool.c
src/basic/mempool.h
src/basic/meson.build
src/basic/missing_audit.h
src/basic/missing_capability.h
src/basic/missing_drm.h
src/basic/missing_fcntl.h
src/basic/missing_fs.h
src/basic/missing_input.h
src/basic/missing_keyctl.h
src/basic/missing_loop.h
src/basic/missing_magic.h
src/basic/missing_mman.h
src/basic/missing_network.h
src/basic/missing_prctl.h
src/basic/missing_random.h
src/basic/missing_resource.h
src/basic/missing_sched.h
src/basic/missing_socket.h
src/basic/missing_stat.h
src/basic/missing_stdlib.h
src/basic/missing_syscall.h
src/basic/missing_timerfd.h
src/basic/missing_type.h
src/basic/missing_xfs.h
src/basic/mkdir-label.c
src/basic/mkdir.c
src/basic/mkdir.h
src/basic/mountpoint-util.c
src/basic/mountpoint-util.h
src/basic/namespace-util.c
src/basic/namespace-util.h
src/basic/nss-util.h
src/basic/nulstr-util.c
src/basic/nulstr-util.h
src/basic/ordered-set.c
src/basic/ordered-set.h
src/basic/parse-util.c
src/basic/parse-util.h
src/basic/path-lookup.c
src/basic/path-lookup.h
src/basic/path-util.c
src/basic/path-util.h
src/basic/prioq.c
src/basic/prioq.h
src/basic/proc-cmdline.c
src/basic/proc-cmdline.h
src/basic/process-util.c
src/basic/process-util.h
src/basic/procfs-util.c
src/basic/procfs-util.h
src/basic/pthread-util.h
src/basic/quota-util.c
src/basic/quota-util.h
src/basic/random-util.c
src/basic/random-util.h
src/basic/ratelimit.c
src/basic/ratelimit.h
src/basic/raw-clone.h
src/basic/raw-reboot.h
src/basic/replace-var.c
src/basic/replace-var.h
src/basic/rlimit-util.c
src/basic/rlimit-util.h
src/basic/rm-rf.c
src/basic/rm-rf.h
src/basic/selinux-util.c
src/basic/selinux-util.h
src/basic/set.h
src/basic/sigbus.c
src/basic/sigbus.h
src/basic/signal-util.c
src/basic/signal-util.h
src/basic/siphash24.c
src/basic/siphash24.h
src/basic/smack-util.c
src/basic/smack-util.h
src/basic/socket-label.c
src/basic/socket-util.c
src/basic/socket-util.h
src/basic/sort-util.c
src/basic/sort-util.h
src/basic/special.h
src/basic/stat-util.c
src/basic/stat-util.h
src/basic/static-destruct.h
src/basic/stdio-util.h
src/basic/strbuf.c
src/basic/strbuf.h
src/basic/string-table.c
src/basic/string-table.h
src/basic/string-util.c
src/basic/string-util.h
src/basic/strv.c
src/basic/strv.h
src/basic/strxcpyx.c
src/basic/strxcpyx.h
src/basic/syslog-util.c
src/basic/syslog-util.h
src/basic/terminal-util.c
src/basic/terminal-util.h
src/basic/time-util.c
src/basic/time-util.h
src/basic/tmpfile-util.c
src/basic/tmpfile-util.h
src/basic/umask-util.h
src/basic/unaligned.h
src/basic/unit-def.c
src/basic/unit-def.h
src/basic/unit-name.c
src/basic/unit-name.h
src/basic/user-util.c
src/basic/user-util.h
src/basic/utf8.c
src/basic/utf8.h
src/basic/util.c
src/basic/util.h
src/basic/virt.c
src/basic/virt.h
src/basic/xattr-util.c
src/basic/xattr-util.h
src/binfmt/binfmt.c
src/boot/bless-boot-generator.c
src/boot/bless-boot.c
src/boot/boot-check-no-failures.c
src/boot/bootctl.c
src/boot/efi/boot.c
src/boot/efi/console.c
src/boot/efi/console.h
src/boot/efi/crc32.c
src/boot/efi/crc32.h
src/boot/efi/disk.c
src/boot/efi/disk.h
src/boot/efi/graphics.c
src/boot/efi/graphics.h
src/boot/efi/linux.c
src/boot/efi/linux.h
src/boot/efi/loader-features.h
src/boot/efi/measure.c
src/boot/efi/measure.h
src/boot/efi/meson.build
src/boot/efi/missing_efi.h
src/boot/efi/pe.c
src/boot/efi/pe.h
src/boot/efi/random-seed.c
src/boot/efi/random-seed.h
src/boot/efi/sha256.c
src/boot/efi/sha256.h
src/boot/efi/shim.c
src/boot/efi/shim.h
src/boot/efi/splash.c
src/boot/efi/splash.h
src/boot/efi/stub.c
src/boot/efi/util.c
src/boot/efi/util.h
src/busctl/busctl-introspect.c
src/busctl/busctl-introspect.h
src/busctl/busctl.c
src/cgls/cgls.c
src/cgroups-agent/cgroups-agent.c
src/cgtop/cgtop.c
src/core/all-units.h
src/core/apparmor-setup.c
src/core/apparmor-setup.h
src/core/audit-fd.c
src/core/audit-fd.h
src/core/automount.c
src/core/automount.h
src/core/bpf-devices.c
src/core/bpf-devices.h
src/core/bpf-firewall.c
src/core/bpf-firewall.h
src/core/cgroup.c
src/core/cgroup.h
src/core/core-varlink.c
src/core/core-varlink.h
src/core/dbus-automount.c
src/core/dbus-automount.h
src/core/dbus-cgroup.c
src/core/dbus-cgroup.h
src/core/dbus-device.c
src/core/dbus-device.h
src/core/dbus-execute.c
src/core/dbus-execute.h
src/core/dbus-job.c
src/core/dbus-job.h
src/core/dbus-kill.c
src/core/dbus-kill.h
src/core/dbus-manager.c
src/core/dbus-manager.h
src/core/dbus-mount.c
src/core/dbus-mount.h
src/core/dbus-path.c
src/core/dbus-path.h
src/core/dbus-scope.c
src/core/dbus-scope.h
src/core/dbus-service.c
src/core/dbus-service.h
src/core/dbus-slice.c
src/core/dbus-slice.h
src/core/dbus-socket.c
src/core/dbus-socket.h
src/core/dbus-swap.c
src/core/dbus-swap.h
src/core/dbus-target.c
src/core/dbus-target.h
src/core/dbus-timer.c
src/core/dbus-timer.h
src/core/dbus-unit.c
src/core/dbus-unit.h
src/core/dbus-util.c
src/core/dbus-util.h
src/core/dbus.c
src/core/dbus.h
src/core/device.c
src/core/device.h
src/core/dynamic-user.c
src/core/dynamic-user.h
src/core/efi-random.c
src/core/efi-random.h
src/core/emergency-action.c
src/core/emergency-action.h
src/core/execute.c
src/core/execute.h
src/core/generator-setup.c
src/core/generator-setup.h
src/core/hostname-setup.c
src/core/hostname-setup.h
src/core/ima-setup.c
src/core/ima-setup.h
src/core/ip-address-access.c
src/core/ip-address-access.h
src/core/job.c
src/core/job.h
src/core/kill.c
src/core/kill.h
src/core/killall.c
src/core/killall.h
src/core/kmod-setup.c
src/core/kmod-setup.h
src/core/load-dropin.c
src/core/load-dropin.h
src/core/load-fragment-gperf.gperf.m4
src/core/load-fragment.c
src/core/load-fragment.h
src/core/locale-setup.c
src/core/locale-setup.h
src/core/loopback-setup.c
src/core/loopback-setup.h
src/core/machine-id-setup.c
src/core/machine-id-setup.h
src/core/macros.systemd.in
src/core/main.c
src/core/manager.c
src/core/manager.h
src/core/meson.build
src/core/mount-setup.c
src/core/mount-setup.h
src/core/mount.c
src/core/mount.h
src/core/namespace.c
src/core/namespace.h
src/core/org.freedesktop.systemd1.conf
src/core/org.freedesktop.systemd1.policy.in
src/core/org.freedesktop.systemd1.service
src/core/path.c
src/core/path.h
src/core/scope.c
src/core/scope.h
src/core/selinux-access.c
src/core/selinux-access.h
src/core/selinux-setup.c
src/core/selinux-setup.h
src/core/service.c
src/core/service.h
src/core/show-status.c
src/core/show-status.h
src/core/slice.c
src/core/slice.h
src/core/smack-setup.c
src/core/smack-setup.h
src/core/socket.c
src/core/socket.h
src/core/swap.c
src/core/swap.h
src/core/systemd.pc.in
src/core/target.c
src/core/target.h
src/core/timer.c
src/core/timer.h
src/core/transaction.c
src/core/transaction.h
src/core/triggers.systemd.in
src/core/unit-printf.c
src/core/unit-printf.h
src/core/unit.c
src/core/unit.h
src/coredump/coredump-vacuum.c
src/coredump/coredump-vacuum.h
src/coredump/coredump.c
src/coredump/coredumpctl.c
src/coredump/meson.build
src/coredump/stacktrace.c
src/coredump/stacktrace.h
src/coredump/test-coredump-vacuum.c
src/cryptsetup/cryptsetup-generator.c
src/cryptsetup/cryptsetup-keyfile.c
src/cryptsetup/cryptsetup-keyfile.h
src/cryptsetup/cryptsetup-pkcs11.c
src/cryptsetup/cryptsetup-pkcs11.h
src/cryptsetup/cryptsetup.c
src/debug-generator/debug-generator.c
src/delta/delta.c
src/detect-virt/detect-virt.c
src/dissect/dissect.c
src/environment-d-generator/environment-d-generator.c
src/escape/escape.c
src/firstboot/firstboot.c
src/fsck/fsck.c
src/fstab-generator/fstab-generator.c
src/fuzz/fuzz-bus-label.c
src/fuzz/fuzz-bus-message.c
src/fuzz/fuzz-calendarspec.c
src/fuzz/fuzz-catalog.c
src/fuzz/fuzz-compress.c
src/fuzz/fuzz-dhcp-server.c
src/fuzz/fuzz-dhcp6-client.c
src/fuzz/fuzz-dns-packet.c
src/fuzz/fuzz-env-file.c
src/fuzz/fuzz-hostname-util.c
src/fuzz/fuzz-journal-remote.c
src/fuzz/fuzz-journald-audit.c
src/fuzz/fuzz-journald-kmsg.c
src/fuzz/fuzz-journald-native-fd.c
src/fuzz/fuzz-journald-native.c
src/fuzz/fuzz-journald-stream.c
src/fuzz/fuzz-journald-syslog.c
src/fuzz/fuzz-journald.c
src/fuzz/fuzz-journald.h
src/fuzz/fuzz-json.c
src/fuzz/fuzz-lldp.c
src/fuzz/fuzz-main.c
src/fuzz/fuzz-ndisc-rs.c
src/fuzz/fuzz-nspawn-oci.c
src/fuzz/fuzz-nspawn-settings.c
src/fuzz/fuzz-time-util.c
src/fuzz/fuzz-udev-database.c
src/fuzz/fuzz-udev-rule-parse-value.c [new file with mode: 0644]
src/fuzz/fuzz-udev-rules.c
src/fuzz/fuzz-unit-file.c
src/fuzz/fuzz-varlink.c
src/fuzz/fuzz-xdg-desktop.c
src/fuzz/fuzz.h
src/fuzz/meson.build
src/getty-generator/getty-generator.c
src/gpt-auto-generator/gpt-auto-generator.c
src/hibernate-resume/hibernate-resume-generator.c
src/hibernate-resume/hibernate-resume.c
src/home/home-util.c
src/home/home-util.h
src/home/homectl-fido2.c
src/home/homectl-fido2.h
src/home/homectl-pkcs11.c
src/home/homectl-pkcs11.h
src/home/homectl-recovery-key.c
src/home/homectl-recovery-key.h
src/home/homectl.c
src/home/homed-bus.c
src/home/homed-bus.h
src/home/homed-conf.c
src/home/homed-conf.h
src/home/homed-home-bus.c
src/home/homed-home-bus.h
src/home/homed-home.c
src/home/homed-home.h
src/home/homed-manager-bus.c
src/home/homed-manager-bus.h
src/home/homed-manager.c
src/home/homed-manager.h
src/home/homed-operation.c
src/home/homed-operation.h
src/home/homed-varlink.c
src/home/homed-varlink.h
src/home/homed.c
src/home/homework-cifs.c
src/home/homework-cifs.h
src/home/homework-directory.c
src/home/homework-directory.h
src/home/homework-fido2.c
src/home/homework-fido2.h
src/home/homework-fscrypt.c
src/home/homework-fscrypt.h
src/home/homework-luks.c
src/home/homework-luks.h
src/home/homework-mount.c
src/home/homework-mount.h
src/home/homework-pkcs11.c
src/home/homework-pkcs11.h
src/home/homework-quota.c
src/home/homework-quota.h
src/home/homework.c
src/home/homework.h
src/home/meson.build
src/home/modhex.c
src/home/modhex.h
src/home/org.freedesktop.home1.conf
src/home/org.freedesktop.home1.policy
src/home/org.freedesktop.home1.service
src/home/pam_systemd_home.c
src/home/pam_systemd_home.sym
src/home/test-modhex.c
src/home/user-record-pwquality.c
src/home/user-record-pwquality.h
src/home/user-record-sign.c
src/home/user-record-sign.h
src/home/user-record-util.c
src/home/user-record-util.h
src/hostname/hostnamectl.c
src/hostname/hostnamed.c
src/hostname/meson.build
src/hostname/org.freedesktop.hostname1.conf
src/hostname/org.freedesktop.hostname1.policy
src/hostname/org.freedesktop.hostname1.service
src/hwdb/hwdb.c
src/id128/id128.c
src/import/curl-util.c
src/import/curl-util.h
src/import/export-raw.c
src/import/export-raw.h
src/import/export-tar.c
src/import/export-tar.h
src/import/export.c
src/import/import-common.c
src/import/import-common.h
src/import/import-compress.c
src/import/import-compress.h
src/import/import-fs.c
src/import/import-raw.c
src/import/import-raw.h
src/import/import-tar.c
src/import/import-tar.h
src/import/import.c
src/import/importd.c
src/import/meson.build
src/import/org.freedesktop.import1.conf
src/import/org.freedesktop.import1.policy
src/import/org.freedesktop.import1.service
src/import/pull-common.c
src/import/pull-common.h
src/import/pull-job.c
src/import/pull-job.h
src/import/pull-raw.c
src/import/pull-raw.h
src/import/pull-tar.c
src/import/pull-tar.h
src/import/pull.c
src/import/qcow2-util.c
src/import/qcow2-util.h
src/import/test-qcow2.c
src/initctl/initctl.c
src/journal-remote/journal-gatewayd.c
src/journal-remote/journal-remote-main.c
src/journal-remote/journal-remote-parse.c
src/journal-remote/journal-remote-parse.h
src/journal-remote/journal-remote-write.c
src/journal-remote/journal-remote-write.h
src/journal-remote/journal-remote.c
src/journal-remote/journal-remote.h
src/journal-remote/journal-upload-journal.c
src/journal-remote/journal-upload.c
src/journal-remote/journal-upload.h
src/journal-remote/meson.build
src/journal-remote/microhttpd-util.c
src/journal-remote/microhttpd-util.h
src/journal/audit-type.c
src/journal/audit-type.h
src/journal/cat.c
src/journal/catalog.c
src/journal/catalog.h
src/journal/compress.c
src/journal/compress.h
src/journal/fsprg.c
src/journal/fsprg.h
src/journal/journal-authenticate.c
src/journal/journal-authenticate.h
src/journal/journal-def.h
src/journal/journal-file.c
src/journal/journal-file.h
src/journal/journal-internal.h
src/journal/journal-qrcode.c [deleted file]
src/journal/journal-qrcode.h [deleted file]
src/journal/journal-send.c
src/journal/journal-vacuum.c
src/journal/journal-vacuum.h
src/journal/journal-verify.c
src/journal/journal-verify.h
src/journal/journalctl.c
src/journal/journald-audit.c
src/journal/journald-audit.h
src/journal/journald-console.c
src/journal/journald-console.h
src/journal/journald-context.c
src/journal/journald-context.h
src/journal/journald-kmsg.c
src/journal/journald-kmsg.h
src/journal/journald-native.c
src/journal/journald-native.h
src/journal/journald-rate-limit.c
src/journal/journald-rate-limit.h
src/journal/journald-server.c
src/journal/journald-server.h
src/journal/journald-stream.c
src/journal/journald-stream.h
src/journal/journald-syslog.c
src/journal/journald-syslog.h
src/journal/journald-wall.c
src/journal/journald-wall.h
src/journal/journald.c
src/journal/lookup3.c
src/journal/lookup3.h
src/journal/meson.build
src/journal/mmap-cache.c
src/journal/mmap-cache.h
src/journal/pcre2-dlopen.c
src/journal/pcre2-dlopen.h
src/journal/sd-journal.c
src/journal/test-audit-type.c
src/journal/test-catalog.c
src/journal/test-compress-benchmark.c
src/journal/test-compress.c
src/journal/test-journal-config.c
src/journal/test-journal-enum.c
src/journal/test-journal-flush.c
src/journal/test-journal-init.c
src/journal/test-journal-interleaving.c
src/journal/test-journal-match.c
src/journal/test-journal-send.c
src/journal/test-journal-stream.c
src/journal/test-journal-syslog.c
src/journal/test-journal-verify.c
src/journal/test-journal.c
src/journal/test-mmap-cache.c
src/kernel-install/90-loaderentry.install
src/kernel-install/kernel-install
src/kernel-install/meson.build
src/libsystemd-network/arp-util.c
src/libsystemd-network/arp-util.h
src/libsystemd-network/dhcp-client-internal.h
src/libsystemd-network/dhcp-identifier.c
src/libsystemd-network/dhcp-identifier.h
src/libsystemd-network/dhcp-internal.h
src/libsystemd-network/dhcp-lease-internal.h
src/libsystemd-network/dhcp-network.c
src/libsystemd-network/dhcp-option.c
src/libsystemd-network/dhcp-packet.c
src/libsystemd-network/dhcp-protocol.h
src/libsystemd-network/dhcp-server-internal.h
src/libsystemd-network/dhcp6-internal.h
src/libsystemd-network/dhcp6-lease-internal.h
src/libsystemd-network/dhcp6-network.c
src/libsystemd-network/dhcp6-option.c
src/libsystemd-network/dhcp6-protocol.h
src/libsystemd-network/icmp6-util.c
src/libsystemd-network/icmp6-util.h
src/libsystemd-network/lldp-internal.h
src/libsystemd-network/lldp-neighbor.c
src/libsystemd-network/lldp-neighbor.h
src/libsystemd-network/lldp-network.c
src/libsystemd-network/lldp-network.h
src/libsystemd-network/meson.build
src/libsystemd-network/ndisc-internal.h
src/libsystemd-network/ndisc-router.c
src/libsystemd-network/ndisc-router.h
src/libsystemd-network/network-internal.c
src/libsystemd-network/network-internal.h
src/libsystemd-network/radv-internal.h
src/libsystemd-network/sd-dhcp-client.c
src/libsystemd-network/sd-dhcp-lease.c
src/libsystemd-network/sd-dhcp-server.c
src/libsystemd-network/sd-dhcp6-client.c
src/libsystemd-network/sd-dhcp6-lease.c
src/libsystemd-network/sd-ipv4acd.c
src/libsystemd-network/sd-ipv4ll.c
src/libsystemd-network/sd-lldp.c
src/libsystemd-network/sd-ndisc.c
src/libsystemd-network/sd-radv.c
src/libsystemd-network/test-acd.c
src/libsystemd-network/test-dhcp-client.c
src/libsystemd-network/test-dhcp-option.c
src/libsystemd-network/test-dhcp-server.c
src/libsystemd-network/test-dhcp6-client.c
src/libsystemd-network/test-ipv4ll-manual.c
src/libsystemd-network/test-ipv4ll.c
src/libsystemd-network/test-lldp.c
src/libsystemd-network/test-ndisc-ra.c
src/libsystemd-network/test-ndisc-rs.c
src/libsystemd-network/test-sd-dhcp-lease.c
src/libsystemd/disable-mempool.c
src/libsystemd/libsystemd.pc.in
src/libsystemd/libsystemd.sym
src/libsystemd/meson.build
src/libsystemd/sd-bus/bus-common-errors.c
src/libsystemd/sd-bus/bus-common-errors.h
src/libsystemd/sd-bus/bus-container.c
src/libsystemd/sd-bus/bus-container.h
src/libsystemd/sd-bus/bus-control.c
src/libsystemd/sd-bus/bus-control.h
src/libsystemd/sd-bus/bus-convenience.c
src/libsystemd/sd-bus/bus-creds.c
src/libsystemd/sd-bus/bus-creds.h
src/libsystemd/sd-bus/bus-dump.c
src/libsystemd/sd-bus/bus-dump.h
src/libsystemd/sd-bus/bus-error.c
src/libsystemd/sd-bus/bus-error.h
src/libsystemd/sd-bus/bus-gvariant.c
src/libsystemd/sd-bus/bus-gvariant.h
src/libsystemd/sd-bus/bus-internal.c
src/libsystemd/sd-bus/bus-internal.h
src/libsystemd/sd-bus/bus-introspect.c
src/libsystemd/sd-bus/bus-introspect.h
src/libsystemd/sd-bus/bus-kernel.c
src/libsystemd/sd-bus/bus-kernel.h
src/libsystemd/sd-bus/bus-match.c
src/libsystemd/sd-bus/bus-match.h
src/libsystemd/sd-bus/bus-message.c
src/libsystemd/sd-bus/bus-message.h
src/libsystemd/sd-bus/bus-objects.c
src/libsystemd/sd-bus/bus-objects.h
src/libsystemd/sd-bus/bus-protocol.h
src/libsystemd/sd-bus/bus-signature.c
src/libsystemd/sd-bus/bus-signature.h
src/libsystemd/sd-bus/bus-slot.c
src/libsystemd/sd-bus/bus-slot.h
src/libsystemd/sd-bus/bus-socket.c
src/libsystemd/sd-bus/bus-socket.h
src/libsystemd/sd-bus/bus-track.c
src/libsystemd/sd-bus/bus-track.h
src/libsystemd/sd-bus/bus-type.c
src/libsystemd/sd-bus/bus-type.h
src/libsystemd/sd-bus/sd-bus.c
src/libsystemd/sd-bus/test-bus-address.c
src/libsystemd/sd-bus/test-bus-benchmark.c
src/libsystemd/sd-bus/test-bus-chat.c
src/libsystemd/sd-bus/test-bus-cleanup.c
src/libsystemd/sd-bus/test-bus-creds.c
src/libsystemd/sd-bus/test-bus-error.c
src/libsystemd/sd-bus/test-bus-gvariant.c
src/libsystemd/sd-bus/test-bus-introspect.c
src/libsystemd/sd-bus/test-bus-marshal.c
src/libsystemd/sd-bus/test-bus-match.c
src/libsystemd/sd-bus/test-bus-objects.c
src/libsystemd/sd-bus/test-bus-queue-ref-cycle.c
src/libsystemd/sd-bus/test-bus-server.c
src/libsystemd/sd-bus/test-bus-signature.c
src/libsystemd/sd-bus/test-bus-track.c
src/libsystemd/sd-bus/test-bus-vtable.c
src/libsystemd/sd-bus/test-bus-watch-bind.c
src/libsystemd/sd-bus/test-vtable-data.h
src/libsystemd/sd-daemon/sd-daemon.c
src/libsystemd/sd-device/device-enumerator-private.h
src/libsystemd/sd-device/device-enumerator.c
src/libsystemd/sd-device/device-internal.h
src/libsystemd/sd-device/device-monitor-private.h
src/libsystemd/sd-device/device-monitor.c
src/libsystemd/sd-device/device-private.c
src/libsystemd/sd-device/device-private.h
src/libsystemd/sd-device/device-util.h
src/libsystemd/sd-device/sd-device.c
src/libsystemd/sd-device/test-sd-device-monitor.c
src/libsystemd/sd-device/test-sd-device-thread.c
src/libsystemd/sd-device/test-sd-device.c
src/libsystemd/sd-device/test-udev-device-thread.c
src/libsystemd/sd-event/event-source.h
src/libsystemd/sd-event/event-util.c
src/libsystemd/sd-event/event-util.h
src/libsystemd/sd-event/sd-event.c
src/libsystemd/sd-event/test-event.c
src/libsystemd/sd-hwdb/hwdb-internal.h
src/libsystemd/sd-hwdb/hwdb-util.c
src/libsystemd/sd-hwdb/hwdb-util.h
src/libsystemd/sd-hwdb/sd-hwdb.c
src/libsystemd/sd-id128/id128-util.c
src/libsystemd/sd-id128/id128-util.h
src/libsystemd/sd-id128/sd-id128.c
src/libsystemd/sd-login/sd-login.c
src/libsystemd/sd-login/test-login.c
src/libsystemd/sd-netlink/generic-netlink.c
src/libsystemd/sd-netlink/generic-netlink.h
src/libsystemd/sd-netlink/netlink-internal.h
src/libsystemd/sd-netlink/netlink-message.c
src/libsystemd/sd-netlink/netlink-slot.c
src/libsystemd/sd-netlink/netlink-slot.h
src/libsystemd/sd-netlink/netlink-socket.c
src/libsystemd/sd-netlink/netlink-types.c
src/libsystemd/sd-netlink/netlink-types.h
src/libsystemd/sd-netlink/netlink-util.c
src/libsystemd/sd-netlink/netlink-util.h
src/libsystemd/sd-netlink/rtnl-message.c
src/libsystemd/sd-netlink/sd-netlink.c
src/libsystemd/sd-netlink/test-netlink.c
src/libsystemd/sd-network/network-util.c
src/libsystemd/sd-network/network-util.h
src/libsystemd/sd-network/sd-network.c
src/libsystemd/sd-path/sd-path.c
src/libsystemd/sd-resolve/resolve-private.h
src/libsystemd/sd-resolve/sd-resolve.c
src/libsystemd/sd-resolve/test-resolve.c
src/libsystemd/sd-utf8/sd-utf8.c
src/libudev/libudev-device-internal.h
src/libudev/libudev-device.c
src/libudev/libudev-enumerate.c
src/libudev/libudev-hwdb.c
src/libudev/libudev-list-internal.h
src/libudev/libudev-list.c
src/libudev/libudev-monitor.c
src/libudev/libudev-queue.c
src/libudev/libudev-util.c
src/libudev/libudev-util.h
src/libudev/libudev.c
src/libudev/libudev.h
src/libudev/libudev.pc.in
src/libudev/libudev.sym
src/libudev/meson.build
src/locale/keymap-util.c
src/locale/keymap-util.h
src/locale/localectl.c
src/locale/localed.c
src/locale/meson.build
src/locale/org.freedesktop.locale1.conf
src/locale/org.freedesktop.locale1.policy
src/locale/org.freedesktop.locale1.service
src/locale/test-keymap-util.c
src/login/70-power-switch.rules
src/login/70-uaccess.rules.m4
src/login/71-seat.rules.in
src/login/73-seat-late.rules.m4
src/login/inhibit.c
src/login/loginctl.c
src/login/logind-acl.c
src/login/logind-acl.h
src/login/logind-action.c
src/login/logind-action.h
src/login/logind-brightness.c
src/login/logind-brightness.h
src/login/logind-button.c
src/login/logind-button.h
src/login/logind-core.c
src/login/logind-dbus.c
src/login/logind-dbus.h
src/login/logind-device.c
src/login/logind-device.h
src/login/logind-inhibit.c
src/login/logind-inhibit.h
src/login/logind-seat-dbus.c
src/login/logind-seat-dbus.h
src/login/logind-seat.c
src/login/logind-seat.h
src/login/logind-session-dbus.c
src/login/logind-session-dbus.h
src/login/logind-session-device.c
src/login/logind-session-device.h
src/login/logind-session.c
src/login/logind-session.h
src/login/logind-user-dbus.c
src/login/logind-user-dbus.h
src/login/logind-user.c
src/login/logind-user.h
src/login/logind-utmp.c
src/login/logind.c
src/login/logind.h
src/login/meson.build
src/login/org.freedesktop.login1.conf
src/login/org.freedesktop.login1.policy
src/login/org.freedesktop.login1.service
src/login/pam_systemd.c
src/login/pam_systemd.sym
src/login/sysfs-show.c
src/login/sysfs-show.h
src/login/test-inhibit.c
src/login/test-login-shared.c
src/login/test-login-tables.c
src/login/user-runtime-dir.c
src/machine-id-setup/machine-id-setup-main.c
src/machine/image-dbus.c
src/machine/image-dbus.h
src/machine/machine-dbus.c
src/machine/machine-dbus.h
src/machine/machine.c
src/machine/machine.h
src/machine/machinectl.c
src/machine/machined-core.c
src/machine/machined-dbus.c
src/machine/machined-varlink.c
src/machine/machined-varlink.h
src/machine/machined.c
src/machine/machined.h
src/machine/meson.build
src/machine/operation.c
src/machine/operation.h
src/machine/org.freedesktop.machine1.policy
src/machine/org.freedesktop.machine1.service
src/machine/test-machine-tables.c
src/modules-load/modules-load.c
src/mount/mount-tool.c
src/network/fuzz-netdev-parser.c
src/network/fuzz-network-parser.c
src/network/generator/main.c
src/network/generator/network-generator.c
src/network/generator/network-generator.h
src/network/generator/test-network-generator.c
src/network/meson.build
src/network/netdev/bareudp.c
src/network/netdev/bareudp.h
src/network/netdev/bond.c
src/network/netdev/bond.h
src/network/netdev/bridge.c
src/network/netdev/bridge.h
src/network/netdev/dummy.c
src/network/netdev/dummy.h
src/network/netdev/fou-tunnel.c
src/network/netdev/fou-tunnel.h
src/network/netdev/geneve.c
src/network/netdev/geneve.h
src/network/netdev/ifb.c
src/network/netdev/ifb.h
src/network/netdev/ipvlan.c
src/network/netdev/ipvlan.h
src/network/netdev/l2tp-tunnel.c
src/network/netdev/l2tp-tunnel.h
src/network/netdev/macsec.c
src/network/netdev/macsec.h
src/network/netdev/macvlan.c
src/network/netdev/macvlan.h
src/network/netdev/netdev-gperf.gperf
src/network/netdev/netdev.c
src/network/netdev/netdev.h
src/network/netdev/netdevsim.c
src/network/netdev/netdevsim.h
src/network/netdev/nlmon.c
src/network/netdev/nlmon.h
src/network/netdev/tunnel.c
src/network/netdev/tunnel.h
src/network/netdev/tuntap.c
src/network/netdev/tuntap.h
src/network/netdev/vcan.c
src/network/netdev/vcan.h
src/network/netdev/veth.c
src/network/netdev/veth.h
src/network/netdev/vlan.c
src/network/netdev/vlan.h
src/network/netdev/vrf.c
src/network/netdev/vrf.h
src/network/netdev/vxcan.c
src/network/netdev/vxcan.h
src/network/netdev/vxlan.c
src/network/netdev/vxlan.h
src/network/netdev/wireguard.c
src/network/netdev/wireguard.h
src/network/netdev/xfrm.c
src/network/netdev/xfrm.h
src/network/networkctl.c
src/network/networkd-address-label.c
src/network/networkd-address-label.h
src/network/networkd-address-pool.c
src/network/networkd-address-pool.h
src/network/networkd-address.c
src/network/networkd-address.h
src/network/networkd-brvlan.c
src/network/networkd-brvlan.h
src/network/networkd-can.c
src/network/networkd-can.h
src/network/networkd-conf.c
src/network/networkd-conf.h
src/network/networkd-dhcp-common.c
src/network/networkd-dhcp-common.h
src/network/networkd-dhcp-server-bus.c
src/network/networkd-dhcp-server-bus.h
src/network/networkd-dhcp-server.c
src/network/networkd-dhcp-server.h
src/network/networkd-dhcp4.c
src/network/networkd-dhcp4.h
src/network/networkd-dhcp6.c
src/network/networkd-dhcp6.h
src/network/networkd-fdb.c
src/network/networkd-fdb.h
src/network/networkd-ipv4ll.c
src/network/networkd-ipv4ll.h
src/network/networkd-ipv6-proxy-ndp.c
src/network/networkd-ipv6-proxy-ndp.h
src/network/networkd-link-bus.c
src/network/networkd-link-bus.h
src/network/networkd-link.c
src/network/networkd-link.h
src/network/networkd-lldp-rx.c
src/network/networkd-lldp-rx.h
src/network/networkd-lldp-tx.c
src/network/networkd-lldp-tx.h
src/network/networkd-manager-bus.c
src/network/networkd-manager-bus.h
src/network/networkd-manager.c
src/network/networkd-manager.h
src/network/networkd-mdb.c
src/network/networkd-mdb.h
src/network/networkd-ndisc.c
src/network/networkd-ndisc.h
src/network/networkd-neighbor.c
src/network/networkd-neighbor.h
src/network/networkd-network-bus.c
src/network/networkd-network-bus.h
src/network/networkd-network-gperf.gperf
src/network/networkd-network.c
src/network/networkd-network.h
src/network/networkd-nexthop.c
src/network/networkd-nexthop.h
src/network/networkd-radv.c
src/network/networkd-radv.h
src/network/networkd-route.c
src/network/networkd-route.h
src/network/networkd-routing-policy-rule.c
src/network/networkd-routing-policy-rule.h
src/network/networkd-speed-meter.c
src/network/networkd-speed-meter.h
src/network/networkd-sriov.c
src/network/networkd-sriov.h
src/network/networkd-sysctl.c
src/network/networkd-sysctl.h
src/network/networkd-util.c
src/network/networkd-util.h
src/network/networkd-wifi.c
src/network/networkd-wifi.h
src/network/networkd.c
src/network/org.freedesktop.network1.policy
src/network/org.freedesktop.network1.service
src/network/tc/cake.c
src/network/tc/cake.h
src/network/tc/codel.c
src/network/tc/codel.h
src/network/tc/drr.c
src/network/tc/drr.h
src/network/tc/ets.c
src/network/tc/ets.h
src/network/tc/fifo.c
src/network/tc/fifo.h
src/network/tc/fq-codel.c
src/network/tc/fq-codel.h
src/network/tc/fq-pie.c
src/network/tc/fq-pie.h
src/network/tc/fq.c
src/network/tc/fq.h
src/network/tc/gred.c
src/network/tc/gred.h
src/network/tc/hhf.c
src/network/tc/hhf.h
src/network/tc/htb.c
src/network/tc/htb.h
src/network/tc/netem.c
src/network/tc/netem.h
src/network/tc/pie.c
src/network/tc/pie.h
src/network/tc/qdisc.c
src/network/tc/qdisc.h
src/network/tc/qfq.c
src/network/tc/qfq.h
src/network/tc/sfb.c
src/network/tc/sfb.h
src/network/tc/sfq.c
src/network/tc/sfq.h
src/network/tc/tbf.c
src/network/tc/tbf.h
src/network/tc/tc-util.c
src/network/tc/tc-util.h
src/network/tc/tc.c
src/network/tc/tc.h
src/network/tc/tclass.c
src/network/tc/tclass.h
src/network/tc/teql.c
src/network/tc/teql.h
src/network/test-network-tables.c
src/network/test-network.c
src/network/test-networkd-conf.c
src/network/test-routing-policy-rule.c
src/network/wait-online/link.c
src/network/wait-online/link.h
src/network/wait-online/manager.c
src/network/wait-online/manager.h
src/network/wait-online/wait-online.c
src/notify/notify.c
src/nspawn/meson.build
src/nspawn/nspawn-cgroup.c
src/nspawn/nspawn-cgroup.h
src/nspawn/nspawn-creds.c
src/nspawn/nspawn-creds.h
src/nspawn/nspawn-def.h
src/nspawn/nspawn-expose-ports.c
src/nspawn/nspawn-expose-ports.h
src/nspawn/nspawn-mount.c
src/nspawn/nspawn-mount.h
src/nspawn/nspawn-network.c
src/nspawn/nspawn-network.h
src/nspawn/nspawn-oci.c
src/nspawn/nspawn-oci.h
src/nspawn/nspawn-patch-uid.c
src/nspawn/nspawn-patch-uid.h
src/nspawn/nspawn-register.c
src/nspawn/nspawn-register.h
src/nspawn/nspawn-seccomp.c
src/nspawn/nspawn-seccomp.h
src/nspawn/nspawn-settings.c
src/nspawn/nspawn-settings.h
src/nspawn/nspawn-setuid.c
src/nspawn/nspawn-setuid.h
src/nspawn/nspawn-stub-pid1.c
src/nspawn/nspawn-stub-pid1.h
src/nspawn/nspawn.c
src/nspawn/test-nspawn-tables.c
src/nspawn/test-patch-uid.c
src/nss-myhostname/nss-myhostname.c
src/nss-myhostname/nss-myhostname.sym
src/nss-mymachines/nss-mymachines.c
src/nss-mymachines/nss-mymachines.sym
src/nss-resolve/nss-resolve.c
src/nss-resolve/nss-resolve.sym
src/nss-systemd/nss-systemd.c
src/nss-systemd/nss-systemd.h
src/nss-systemd/nss-systemd.sym
src/nss-systemd/userdb-glue.c
src/nss-systemd/userdb-glue.h
src/oom/meson.build [new file with mode: 0644]
src/oom/oomctl.c [new file with mode: 0644]
src/oom/oomd-manager-bus.c [new file with mode: 0644]
src/oom/oomd-manager-bus.h [new file with mode: 0644]
src/oom/oomd-manager.c [new file with mode: 0644]
src/oom/oomd-manager.h [new file with mode: 0644]
src/oom/oomd-util.c [new file with mode: 0644]
src/oom/oomd-util.h [new file with mode: 0644]
src/oom/oomd.c [new file with mode: 0644]
src/oom/oomd.conf [new file with mode: 0644]
src/oom/org.freedesktop.oom1.conf [new file with mode: 0644]
src/oom/org.freedesktop.oom1.service [new file with mode: 0644]
src/oom/test-oomd-util.c [new file with mode: 0644]
src/partition/growfs.c
src/partition/makefs.c
src/partition/meson.build
src/partition/repart.c
src/path/path.c
src/portable/meson.build
src/portable/org.freedesktop.portable1.conf
src/portable/org.freedesktop.portable1.policy
src/portable/org.freedesktop.portable1.service
src/portable/portable.c
src/portable/portable.h
src/portable/portablectl.c
src/portable/portabled-bus.c
src/portable/portabled-bus.h
src/portable/portabled-image-bus.c
src/portable/portabled-image-bus.h
src/portable/portabled-image.c
src/portable/portabled-image.h
src/portable/portabled-operation.c
src/portable/portabled-operation.h
src/portable/portabled.c
src/portable/portabled.h
src/pstore/meson.build
src/pstore/pstore.c
src/quotacheck/quotacheck.c
src/random-seed/random-seed.c
src/rc-local-generator/rc-local-generator.c
src/remount-fs/remount-fs.c
src/reply-password/reply-password.c
src/resolve/dns-type.c
src/resolve/dns-type.h
src/resolve/meson.build
src/resolve/org.freedesktop.resolve1.policy
src/resolve/org.freedesktop.resolve1.service
src/resolve/resolvconf-compat.c
src/resolve/resolvconf-compat.h
src/resolve/resolvectl.c
src/resolve/resolvectl.h
src/resolve/resolved-bus.c
src/resolve/resolved-bus.h
src/resolve/resolved-conf.c
src/resolve/resolved-conf.h
src/resolve/resolved-def.h
src/resolve/resolved-dns-answer.c
src/resolve/resolved-dns-answer.h
src/resolve/resolved-dns-cache.c
src/resolve/resolved-dns-cache.h
src/resolve/resolved-dns-dnssec.c
src/resolve/resolved-dns-dnssec.h
src/resolve/resolved-dns-packet.c
src/resolve/resolved-dns-packet.h
src/resolve/resolved-dns-query.c
src/resolve/resolved-dns-query.h
src/resolve/resolved-dns-question.c
src/resolve/resolved-dns-question.h
src/resolve/resolved-dns-rr.c
src/resolve/resolved-dns-rr.h
src/resolve/resolved-dns-scope.c
src/resolve/resolved-dns-scope.h
src/resolve/resolved-dns-search-domain.c
src/resolve/resolved-dns-search-domain.h
src/resolve/resolved-dns-server.c
src/resolve/resolved-dns-server.h
src/resolve/resolved-dns-stream.c
src/resolve/resolved-dns-stream.h
src/resolve/resolved-dns-stub.c
src/resolve/resolved-dns-stub.h
src/resolve/resolved-dns-synthesize.c
src/resolve/resolved-dns-synthesize.h
src/resolve/resolved-dns-transaction.c
src/resolve/resolved-dns-transaction.h
src/resolve/resolved-dns-trust-anchor.c
src/resolve/resolved-dns-trust-anchor.h
src/resolve/resolved-dns-zone.c
src/resolve/resolved-dns-zone.h
src/resolve/resolved-dnssd-bus.c
src/resolve/resolved-dnssd-bus.h
src/resolve/resolved-dnssd.c
src/resolve/resolved-dnssd.h
src/resolve/resolved-dnstls-gnutls.c
src/resolve/resolved-dnstls-gnutls.h
src/resolve/resolved-dnstls-openssl.c
src/resolve/resolved-dnstls-openssl.h
src/resolve/resolved-dnstls.h
src/resolve/resolved-etc-hosts.c
src/resolve/resolved-etc-hosts.h
src/resolve/resolved-gperf.gperf
src/resolve/resolved-link-bus.c
src/resolve/resolved-link-bus.h
src/resolve/resolved-link.c
src/resolve/resolved-link.h
src/resolve/resolved-llmnr.c
src/resolve/resolved-llmnr.h
src/resolve/resolved-manager.c
src/resolve/resolved-manager.h
src/resolve/resolved-mdns.c
src/resolve/resolved-mdns.h
src/resolve/resolved-resolv-conf.c
src/resolve/resolved-resolv-conf.h
src/resolve/resolved-varlink.c
src/resolve/resolved-varlink.h
src/resolve/resolved.c
src/resolve/resolved.conf.in
src/resolve/test-dns-packet.c
src/resolve/test-dnssec-complex.c
src/resolve/test-dnssec.c
src/resolve/test-resolve-tables.c
src/resolve/test-resolved-etc-hosts.c
src/resolve/test-resolved-packet.c
src/rfkill/rfkill.c
src/run-generator/run-generator.c
src/run/run.c
src/shared/acl-util.c
src/shared/acl-util.h
src/shared/acpi-fpdt.c
src/shared/acpi-fpdt.h
src/shared/apparmor-util.c
src/shared/apparmor-util.h
src/shared/ask-password-api.c
src/shared/ask-password-api.h
src/shared/barrier.c
src/shared/barrier.h
src/shared/base-filesystem.c
src/shared/base-filesystem.h
src/shared/binfmt-util.c
src/shared/binfmt-util.h
src/shared/bitmap.c
src/shared/bitmap.h
src/shared/blkid-util.h
src/shared/bond-util.c
src/shared/bond-util.h
src/shared/boot-timestamps.c
src/shared/boot-timestamps.h
src/shared/bootspec.c
src/shared/bootspec.h
src/shared/bpf-program.c
src/shared/bpf-program.h
src/shared/bridge-util.c
src/shared/bridge-util.h
src/shared/bus-get-properties.c
src/shared/bus-get-properties.h
src/shared/bus-locator.c
src/shared/bus-locator.h
src/shared/bus-log-control-api.c
src/shared/bus-log-control-api.h
src/shared/bus-map-properties.c
src/shared/bus-map-properties.h
src/shared/bus-message-util.c
src/shared/bus-message-util.h
src/shared/bus-object.c
src/shared/bus-object.h
src/shared/bus-polkit.c
src/shared/bus-polkit.h
src/shared/bus-print-properties.c
src/shared/bus-print-properties.h
src/shared/bus-unit-procs.c
src/shared/bus-unit-procs.h
src/shared/bus-unit-util.c
src/shared/bus-unit-util.h
src/shared/bus-util.c
src/shared/bus-util.h
src/shared/bus-wait-for-jobs.c
src/shared/bus-wait-for-jobs.h
src/shared/bus-wait-for-units.c
src/shared/bus-wait-for-units.h
src/shared/calendarspec.c
src/shared/calendarspec.h
src/shared/cgroup-setup.c
src/shared/cgroup-setup.h
src/shared/cgroup-show.c
src/shared/cgroup-show.h
src/shared/chown-recursive.c
src/shared/chown-recursive.h
src/shared/clean-ipc.c
src/shared/clean-ipc.h
src/shared/clock-util.c
src/shared/clock-util.h
src/shared/condition.c
src/shared/condition.h
src/shared/conf-parser.c
src/shared/conf-parser.h
src/shared/coredump-util.c
src/shared/coredump-util.h
src/shared/cpu-set-util.c
src/shared/cpu-set-util.h
src/shared/cryptsetup-util.c
src/shared/cryptsetup-util.h
src/shared/daemon-util.h
src/shared/dev-setup.c
src/shared/dev-setup.h
src/shared/dissect-image.c
src/shared/dissect-image.h
src/shared/dm-util.c
src/shared/dm-util.h
src/shared/dns-domain.c
src/shared/dns-domain.h
src/shared/dropin.c
src/shared/dropin.h
src/shared/efi-loader.c
src/shared/efi-loader.h
src/shared/enable-mempool.c
src/shared/env-file-label.c
src/shared/env-file-label.h
src/shared/ethtool-util.c
src/shared/ethtool-util.h
src/shared/exec-util.c
src/shared/exec-util.h
src/shared/exit-status.c
src/shared/exit-status.h
src/shared/fdset.c
src/shared/fdset.h
src/shared/fileio-label.c
src/shared/fileio-label.h
src/shared/firewall-util.c
src/shared/firewall-util.h
src/shared/format-table.c
src/shared/format-table.h
src/shared/fsck-util.h
src/shared/fstab-util.c
src/shared/fstab-util.h
src/shared/generator.c
src/shared/generator.h
src/shared/geneve-util.c
src/shared/geneve-util.h
src/shared/gpt.c
src/shared/gpt.h
src/shared/group-record.c
src/shared/group-record.h
src/shared/id128-print.c
src/shared/id128-print.h
src/shared/idn-util.c
src/shared/idn-util.h
src/shared/ima-util.c
src/shared/ima-util.h
src/shared/import-util.c
src/shared/import-util.h
src/shared/initreq.h
src/shared/install-printf.c
src/shared/install-printf.h
src/shared/install.c
src/shared/install.h
src/shared/ip-protocol-list.c
src/shared/ip-protocol-list.h
src/shared/ipvlan-util.c
src/shared/ipvlan-util.h
src/shared/journal-importer.c
src/shared/journal-importer.h
src/shared/journal-util.c
src/shared/journal-util.h
src/shared/json-internal.h
src/shared/json.c
src/shared/json.h
src/shared/libcrypt-util.c
src/shared/libcrypt-util.h
src/shared/libmount-util.h
src/shared/linux/auto_dev-ioctl.h
src/shared/linux/bpf.h
src/shared/linux/dm-ioctl.h
src/shared/linux/ethtool.h
src/shared/linux/nl80211.h
src/shared/local-addresses.c
src/shared/local-addresses.h
src/shared/lockfile-util.c
src/shared/lockfile-util.h
src/shared/log-link.h
src/shared/logs-show.c
src/shared/logs-show.h
src/shared/loop-util.c
src/shared/loop-util.h
src/shared/machine-image.c
src/shared/machine-image.h
src/shared/machine-pool.c
src/shared/machine-pool.h
src/shared/macvlan-util.c
src/shared/macvlan-util.h
src/shared/main-func.h
src/shared/meson.build
src/shared/mkfs-util.c
src/shared/mkfs-util.h
src/shared/module-util.c
src/shared/module-util.h
src/shared/mount-util.c
src/shared/mount-util.h
src/shared/net-condition.c [new file with mode: 0644]
src/shared/net-condition.h [new file with mode: 0644]
src/shared/netif-naming-scheme.c
src/shared/netif-naming-scheme.h
src/shared/nscd-flush.c
src/shared/nscd-flush.h
src/shared/nsflags.c
src/shared/nsflags.h
src/shared/numa-util.c
src/shared/numa-util.h
src/shared/offline-passwd.c
src/shared/offline-passwd.h
src/shared/openssl-util.h
src/shared/os-util.c
src/shared/os-util.h
src/shared/output-mode.c
src/shared/output-mode.h
src/shared/pager.c
src/shared/pager.h
src/shared/pam-util.c
src/shared/pam-util.h
src/shared/pe-header.h
src/shared/pkcs11-util.c
src/shared/pkcs11-util.h
src/shared/pretty-print.c
src/shared/pretty-print.h
src/shared/psi-util.c [new file with mode: 0644]
src/shared/psi-util.h [new file with mode: 0644]
src/shared/ptyfwd.c
src/shared/ptyfwd.h
src/shared/pwquality-util.c
src/shared/pwquality-util.h
src/shared/qrcode-util.c
src/shared/qrcode-util.h
src/shared/reboot-util.c
src/shared/reboot-util.h
src/shared/resize-fs.c
src/shared/resize-fs.h
src/shared/resolve-util.c
src/shared/resolve-util.h
src/shared/seccomp-util.c
src/shared/seccomp-util.h
src/shared/securebits-util.c
src/shared/securebits-util.h
src/shared/serialize.c
src/shared/serialize.h
src/shared/service-util.c
src/shared/service-util.h
src/shared/sleep-config.c
src/shared/sleep-config.h
src/shared/socket-netlink.c
src/shared/socket-netlink.h
src/shared/spawn-ask-password-agent.c
src/shared/spawn-ask-password-agent.h
src/shared/spawn-polkit-agent.c
src/shared/spawn-polkit-agent.h
src/shared/specifier.c
src/shared/specifier.h
src/shared/switch-root.c
src/shared/switch-root.h
src/shared/syscall-names.text
src/shared/sysctl-util.c
src/shared/sysctl-util.h
src/shared/test-tables.h
src/shared/tests.c
src/shared/tests.h
src/shared/tmpfile-util-label.c
src/shared/tmpfile-util-label.h
src/shared/tomoyo-util.c
src/shared/tomoyo-util.h
src/shared/udev-util.c
src/shared/udev-util.h
src/shared/uid-range.c
src/shared/uid-range.h
src/shared/unit-file.c
src/shared/unit-file.h
src/shared/user-record-nss.c
src/shared/user-record-nss.h
src/shared/user-record-show.c
src/shared/user-record-show.h
src/shared/user-record.c
src/shared/user-record.h
src/shared/userdb.c
src/shared/userdb.h
src/shared/utmp-wtmp.c
src/shared/utmp-wtmp.h
src/shared/varlink.c
src/shared/varlink.h
src/shared/verbs.c
src/shared/verbs.h
src/shared/vlan-util.c
src/shared/vlan-util.h
src/shared/volatile-util.c
src/shared/volatile-util.h
src/shared/watchdog.c
src/shared/watchdog.h
src/shared/web-util.c
src/shared/web-util.h
src/shared/wifi-util.c
src/shared/wifi-util.h
src/shared/xml.c
src/shared/xml.h
src/shutdown/shutdown.c
src/shutdown/umount.c
src/shutdown/umount.h
src/sleep/sleep.c
src/socket-proxy/socket-proxyd.c
src/stdio-bridge/stdio-bridge.c
src/sulogin-shell/sulogin-shell.c
src/sysctl/sysctl.c
src/system-update-generator/system-update-generator.c
src/systemctl/systemctl-add-dependency.c
src/systemctl/systemctl-add-dependency.h
src/systemctl/systemctl-cancel-job.c
src/systemctl/systemctl-cancel-job.h
src/systemctl/systemctl-clean-or-freeze.c
src/systemctl/systemctl-clean-or-freeze.h
src/systemctl/systemctl-compat-halt.c
src/systemctl/systemctl-compat-halt.h
src/systemctl/systemctl-compat-runlevel.c
src/systemctl/systemctl-compat-runlevel.h
src/systemctl/systemctl-compat-shutdown.c
src/systemctl/systemctl-compat-shutdown.h
src/systemctl/systemctl-compat-telinit.c
src/systemctl/systemctl-compat-telinit.h
src/systemctl/systemctl-daemon-reload.c
src/systemctl/systemctl-daemon-reload.h
src/systemctl/systemctl-edit.c
src/systemctl/systemctl-edit.h
src/systemctl/systemctl-enable.c
src/systemctl/systemctl-enable.h
src/systemctl/systemctl-is-active.c
src/systemctl/systemctl-is-active.h
src/systemctl/systemctl-is-enabled.c
src/systemctl/systemctl-is-enabled.h
src/systemctl/systemctl-is-system-running.c
src/systemctl/systemctl-is-system-running.h
src/systemctl/systemctl-kill.c
src/systemctl/systemctl-kill.h
src/systemctl/systemctl-list-dependencies.c
src/systemctl/systemctl-list-dependencies.h
src/systemctl/systemctl-list-jobs.c
src/systemctl/systemctl-list-jobs.h
src/systemctl/systemctl-list-machines.c
src/systemctl/systemctl-list-machines.h
src/systemctl/systemctl-list-unit-files.c
src/systemctl/systemctl-list-unit-files.h
src/systemctl/systemctl-list-units.c
src/systemctl/systemctl-list-units.h
src/systemctl/systemctl-log-setting.c
src/systemctl/systemctl-log-setting.h
src/systemctl/systemctl-logind.c
src/systemctl/systemctl-logind.h
src/systemctl/systemctl-preset-all.c
src/systemctl/systemctl-preset-all.h
src/systemctl/systemctl-reset-failed.c
src/systemctl/systemctl-reset-failed.h
src/systemctl/systemctl-service-watchdogs.c
src/systemctl/systemctl-service-watchdogs.h
src/systemctl/systemctl-set-default.c
src/systemctl/systemctl-set-default.h
src/systemctl/systemctl-set-environment.c
src/systemctl/systemctl-set-environment.h
src/systemctl/systemctl-set-property.c
src/systemctl/systemctl-set-property.h
src/systemctl/systemctl-show.c
src/systemctl/systemctl-show.h
src/systemctl/systemctl-start-special.c
src/systemctl/systemctl-start-special.h
src/systemctl/systemctl-start-unit.c
src/systemctl/systemctl-start-unit.h
src/systemctl/systemctl-switch-root.c
src/systemctl/systemctl-switch-root.h
src/systemctl/systemctl-sysv-compat.c
src/systemctl/systemctl-sysv-compat.h
src/systemctl/systemctl-trivial-method.c
src/systemctl/systemctl-trivial-method.h
src/systemctl/systemctl-util.c
src/systemctl/systemctl-util.h
src/systemctl/systemctl.c
src/systemctl/systemctl.h
src/systemd/_sd-common.h
src/systemd/meson.build
src/systemd/sd-bus-protocol.h
src/systemd/sd-bus-vtable.h
src/systemd/sd-bus.h
src/systemd/sd-daemon.h
src/systemd/sd-device.h
src/systemd/sd-dhcp-client.h
src/systemd/sd-dhcp-lease.h
src/systemd/sd-dhcp-option.h
src/systemd/sd-dhcp-server.h
src/systemd/sd-dhcp6-client.h
src/systemd/sd-dhcp6-lease.h
src/systemd/sd-dhcp6-option.h
src/systemd/sd-event.h
src/systemd/sd-hwdb.h
src/systemd/sd-id128.h
src/systemd/sd-ipv4acd.h
src/systemd/sd-ipv4ll.h
src/systemd/sd-journal.h
src/systemd/sd-lldp.h
src/systemd/sd-login.h
src/systemd/sd-messages.h
src/systemd/sd-ndisc.h
src/systemd/sd-netlink.h
src/systemd/sd-network.h
src/systemd/sd-path.h
src/systemd/sd-radv.h
src/systemd/sd-resolve.h
src/systemd/sd-utf8.h
src/sysusers/sysusers.c
src/sysv-generator/sysv-generator.c
src/test/meson.build
src/test/test-acl-util.c
src/test/test-af-list.c
src/test/test-alloc-util.c
src/test/test-architecture.c
src/test/test-arphrd-list.c
src/test/test-ask-password-api.c
src/test/test-async.c
src/test/test-barrier.c
src/test/test-bitmap.c
src/test/test-boot-timestamps.c
src/test/test-bpf-devices.c
src/test/test-bpf-firewall.c
src/test/test-btrfs.c
src/test/test-bus-util.c
src/test/test-calendarspec.c
src/test/test-cap-list.c
src/test/test-capability.c
src/test/test-cgroup-cpu.c
src/test/test-cgroup-mask.c
src/test/test-cgroup-setup.c
src/test/test-cgroup-unit-default.c
src/test/test-cgroup-util.c
src/test/test-cgroup.c
src/test/test-chase-symlinks.c
src/test/test-chown-rec.c
src/test/test-clock.c
src/test/test-condition.c
src/test/test-conf-files.c
src/test/test-conf-parser.c
src/test/test-copy.c
src/test/test-coredump-util.c
src/test/test-cpu-set-util.c
src/test/test-daemon.c
src/test/test-date.c
src/test/test-dev-setup.c
src/test/test-device-nodes.c
src/test/test-dlopen.c
src/test/test-dns-domain.c
src/test/test-ellipsize.c
src/test/test-emergency-action.c
src/test/test-engine.c
src/test/test-env-file.c
src/test/test-env-util.c
src/test/test-escape.c
src/test/test-exec-util.c
src/test/test-execute.c
src/test/test-exit-status.c
src/test/test-extract-word.c
src/test/test-fd-util.c
src/test/test-fdset.c
src/test/test-fileio.c
src/test/test-firewall-util.c
src/test/test-format-table.c
src/test/test-format-util.c
src/test/test-fs-util.c
src/test/test-fstab-util.c
src/test/test-gcrypt-util.c
src/test/test-glob-util.c
src/test/test-hash.c
src/test/test-hashmap-plain.c
src/test/test-hashmap.c
src/test/test-hexdecoct.c
src/test/test-hostname-util.c
src/test/test-hostname.c
src/test/test-id128.c
src/test/test-in-addr-util.c
src/test/test-install-root.c
src/test/test-install.c
src/test/test-io-util.c
src/test/test-ip-protocol-list.c
src/test/test-ipcrm.c
src/test/test-job-type.c
src/test/test-journal-importer.c
src/test/test-json.c
src/test/test-libcrypt-util.c
src/test/test-libmount.c
src/test/test-libudev.c
src/test/test-list.c
src/test/test-load-fragment.c
src/test/test-local-addresses.c
src/test/test-locale-util.c
src/test/test-log.c
src/test/test-loop-block.c [new file with mode: 0644]
src/test/test-loopback.c
src/test/test-mount-util.c
src/test/test-mountpoint-util.c
src/test/test-namespace.c
src/test/test-netlink-manual.c
src/test/test-ns.c
src/test/test-nscd-flush.c
src/test/test-nss.c
src/test/test-offline-passwd.c
src/test/test-ordered-set.c
src/test/test-os-util.c
src/test/test-parse-util.c
src/test/test-path-lookup.c
src/test/test-path-util.c
src/test/test-path.c
src/test/test-pretty-print.c
src/test/test-prioq.c
src/test/test-proc-cmdline.c
src/test/test-process-util.c
src/test/test-procfs-util.c
src/test/test-psi-util.c [new file with mode: 0644]
src/test/test-qrcode-util.c [new file with mode: 0644]
src/test/test-random-util.c
src/test/test-ratelimit.c
src/test/test-replace-var.c
src/test/test-rlimit-util.c
src/test/test-rm-rf.c
src/test/test-sched-prio.c
src/test/test-sd-hwdb.c
src/test/test-sd-path.c
src/test/test-seccomp.c
src/test/test-selinux.c
src/test/test-serialize.c
src/test/test-set-disable-mempool.c
src/test/test-set.c
src/test/test-sigbus.c
src/test/test-signal-util.c
src/test/test-siphash24.c
src/test/test-sizeof.c
src/test/test-sleep.c
src/test/test-socket-netlink.c
src/test/test-socket-util.c
src/test/test-specifier.c
src/test/test-stat-util.c
src/test/test-static-destruct.c
src/test/test-strbuf.c
src/test/test-string-util.c
src/test/test-strip-tab-ansi.c
src/test/test-strv.c
src/test/test-strxcpyx.c
src/test/test-sysctl-util.c
src/test/test-systemd-tmpfiles.py
src/test/test-tables.c
src/test/test-terminal-util.c
src/test/test-time-util.c
src/test/test-tmpfiles.c
src/test/test-udev-util.c [new file with mode: 0644]
src/test/test-udev.c
src/test/test-uid-range.c
src/test/test-umask-util.c
src/test/test-umount.c
src/test/test-unaligned.c
src/test/test-unit-file.c
src/test/test-unit-name.c
src/test/test-user-record.c
src/test/test-user-util.c
src/test/test-utf8.c
src/test/test-util.c
src/test/test-varlink.c
src/test/test-verbs.c
src/test/test-watch-pid.c
src/test/test-watchdog.c
src/test/test-web-util.c
src/test/test-xattr-util.c
src/test/test-xdg-autostart.c
src/test/test-xml.c
src/time-wait-sync/time-wait-sync.c
src/timedate/meson.build
src/timedate/org.freedesktop.timedate1.conf
src/timedate/org.freedesktop.timedate1.policy
src/timedate/org.freedesktop.timedate1.service
src/timedate/timedatectl.c
src/timedate/timedated.c
src/timesync/meson.build
src/timesync/org.freedesktop.timesync1.service
src/timesync/test-timesync.c
src/timesync/timesyncd-bus.c
src/timesync/timesyncd-bus.h
src/timesync/timesyncd-conf.c
src/timesync/timesyncd-conf.h
src/timesync/timesyncd-manager.c
src/timesync/timesyncd-manager.h
src/timesync/timesyncd-ntp-message.h
src/timesync/timesyncd-server.c
src/timesync/timesyncd-server.h
src/timesync/timesyncd.c
src/tmpfiles/meson.build
src/tmpfiles/tmpfiles.c
src/tty-ask-password-agent/tty-ask-password-agent.c
src/udev/ata_id/ata_id.c
src/udev/cdrom_id/cdrom_id.c
src/udev/fido_id/fido_id.c
src/udev/fido_id/fido_id_desc.c
src/udev/fido_id/fido_id_desc.h
src/udev/fido_id/fuzz-fido-id-desc.c
src/udev/fido_id/test-fido-id-desc.c
src/udev/meson.build
src/udev/mtd_probe/mtd_probe.c
src/udev/mtd_probe/mtd_probe.h
src/udev/mtd_probe/probe_smartmedia.c
src/udev/net/fuzz-link-parser.c
src/udev/net/link-config-gperf.gperf
src/udev/net/link-config.c
src/udev/net/link-config.h
src/udev/scsi_id/scsi.h
src/udev/scsi_id/scsi_id.c
src/udev/scsi_id/scsi_id.h
src/udev/scsi_id/scsi_serial.c
src/udev/udev-builtin-blkid.c
src/udev/udev-builtin-btrfs.c
src/udev/udev-builtin-hwdb.c
src/udev/udev-builtin-input_id.c
src/udev/udev-builtin-keyboard.c
src/udev/udev-builtin-kmod.c
src/udev/udev-builtin-net_id.c
src/udev/udev-builtin-net_setup_link.c
src/udev/udev-builtin-path_id.c
src/udev/udev-builtin-uaccess.c
src/udev/udev-builtin-usb_id.c
src/udev/udev-builtin.c
src/udev/udev-builtin.h
src/udev/udev-ctrl.c
src/udev/udev-ctrl.h
src/udev/udev-event.c
src/udev/udev-event.h
src/udev/udev-node.c
src/udev/udev-node.h
src/udev/udev-rules.c
src/udev/udev-rules.h
src/udev/udev-watch.c
src/udev/udev-watch.h
src/udev/udevadm-control.c
src/udev/udevadm-hwdb.c
src/udev/udevadm-info.c
src/udev/udevadm-monitor.c
src/udev/udevadm-settle.c
src/udev/udevadm-test-builtin.c
src/udev/udevadm-test.c
src/udev/udevadm-trigger.c
src/udev/udevadm-util.c
src/udev/udevadm-util.h
src/udev/udevadm.c
src/udev/udevadm.h
src/udev/udevd.c
src/udev/udevd.h
src/udev/v4l_id/v4l_id.c
src/update-done/update-done.c
src/update-utmp/update-utmp.c
src/user-sessions/user-sessions.c
src/userdb/meson.build
src/userdb/userdbctl.c
src/userdb/userdbd-manager.c
src/userdb/userdbd-manager.h
src/userdb/userdbd.c
src/userdb/userwork.c
src/vconsole/90-vconsole.rules.in
src/vconsole/meson.build
src/vconsole/vconsole-setup.c
src/veritysetup/veritysetup-generator.c
src/veritysetup/veritysetup.c
src/volatile-root/volatile-root.c
src/xdg-autostart-generator/xdg-autostart-condition.c
src/xdg-autostart-generator/xdg-autostart-generator.c
src/xdg-autostart-generator/xdg-autostart-service.c
src/xdg-autostart-generator/xdg-autostart-service.h
sysctl.d/meson.build
sysusers.d/meson.build
sysusers.d/systemd.conf.m4
test/README.testsuite
test/TEST-50-DISSECT/test.sh
test/TEST-56-OOMD/Makefile [new symlink]
test/TEST-56-OOMD/test.sh [new file with mode: 0755]
test/create-sys-script.py
test/fuzz/fuzz-catalog/systemd.pl.catalog
test/fuzz/fuzz-link-parser/99-default.link
test/fuzz/fuzz-netdev-parser/directives.netdev
test/fuzz/fuzz-network-parser/directives.network
test/fuzz/fuzz-udev-rules/99-systemd.rules
test/fuzz/fuzz-unit-file/directives.service
test/fuzz/fuzz-unit-file/machine.slice
test/fuzz/fuzz-unit-file/proc-sys-fs-binfmt_misc.automount
test/fuzz/fuzz-unit-file/syslog.socket
test/fuzz/fuzz-unit-file/systemd-ask-password-console.path
test/fuzz/fuzz-unit-file/systemd-machined.service
test/fuzz/fuzz-unit-file/systemd-resolved.service
test/fuzz/fuzz-unit-file/systemd-tmpfiles-clean.timer
test/fuzz/fuzz-unit-file/timers.target
test/fuzz/fuzz-unit-file/var-lib-machines.mount
test/fuzz/meson.build
test/hwdb-test.sh
test/meson.build
test/mkosi.default.networkd-test
test/networkd-test.py
test/rule-syntax-check.py
test/sd-script.py [new file with mode: 0644]
test/sys-script.py
test/sysv-generator-test.py
test/test-exec-deserialization.py
test/test-functions
test/test-network/conf/dhcp-client-gateway-ipv4.network
test/test-network/conf/dhcp-client-gateway-ipv6.network
test/test-network/conf/dhcp-client-vrf.network
test/test-network/conf/dhcp-client-with-ipv4ll-fallback-without-dhcp-server.network [deleted file]
test/test-network/conf/dhcp-client-with-ipv4ll.network [moved from test/test-network/conf/dhcp-client-with-ipv4ll-fallback-with-dhcp-server.network with 66% similarity]
test/test-network/conf/ipv6-prefix-veth.network
test/test-network/conf/ipv6-prefix.network
test/test-network/conf/ipv6ra-prefix.network
test/test-network/systemd-networkd-tests.py
test/test-path/basic.target
test/test-path/path-changed.service
test/test-path/path-directorynotempty.service
test/test-path/path-exists.service
test/test-path/path-existsglob.service
test/test-path/path-makedirectory.service
test/test-path/path-modified.service
test/test-path/path-mycustomunit.service
test/test-path/path-service.service [deleted file]
test/test-path/paths.target
test/test-path/sysinit.target
test/testsuite-04.units/forever-print-hola.service
test/testsuite-11.units/fail-on-restart.service
test/udev-test.pl
test/units/basic.target
test/units/shutdown.target
test/units/sockets.target
test/units/sysinit.target
test/units/testsuite-16.service
test/units/testsuite-16.sh
test/units/testsuite-50.sh
test/units/testsuite-56-slowgrowth.sh [new file with mode: 0755]
test/units/testsuite-56-testbloat.service [new file with mode: 0644]
test/units/testsuite-56-testchill.service [new file with mode: 0644]
test/units/testsuite-56-workload.slice [new file with mode: 0644]
test/units/testsuite-56.service [new file with mode: 0644]
test/units/testsuite-56.sh [new file with mode: 0755]
test/units/timers.target
tmpfiles.d/meson.build
tmpfiles.d/portables.conf
tmpfiles.d/systemd-pstore.conf
tools/chromiumos/gen_autosuspend_rules.py
tools/find-double-newline.sh
tools/find-tabs.sh
tools/gdb-sd_dump_hashmaps.py
tools/generate-gperfs.py
tools/git-contrib.sh
tools/make-autosuspend-rules.py
tools/make-directive-index.py
tools/make-man-index.py
tools/oss-fuzz.sh
tools/update-dbus-docs.py
tools/update-man-rules.py
tools/xml_helper.py
travis-ci/managers/debian.sh
travis-ci/managers/fedora.sh
units/basic.target
units/blockdev@.target
units/bluetooth.target
units/boot-complete.target
units/console-getty.service.m4
units/container-getty@.service.m4
units/cryptsetup-pre.target
units/cryptsetup.target
units/debug-shell.service.in
units/dev-hugepages.mount
units/dev-mqueue.mount
units/emergency.service.in
units/emergency.target
units/exit.target
units/final.target
units/first-boot-complete.target [new file with mode: 0644]
units/getty-pre.target
units/getty.target
units/getty@.service.m4
units/graphical.target
units/halt.target
units/hibernate.target
units/hybrid-sleep.target
units/initrd-cleanup.service
units/initrd-fs.target
units/initrd-parse-etc.service
units/initrd-root-device.target
units/initrd-root-fs.target
units/initrd-switch-root.service
units/initrd-switch-root.target
units/initrd-udevadm-cleanup-db.service
units/initrd.target
units/kexec.target
units/kmod-static-nodes.service.in
units/ldconfig.service
units/local-fs-pre.target
units/local-fs.target
units/machine.slice
units/machines.target
units/meson.build
units/modprobe@.service
units/multi-user.target
units/network-online.target
units/network-pre.target
units/network.target
units/nss-lookup.target
units/nss-user-lookup.target
units/paths.target
units/poweroff.target
units/printer.target
units/proc-sys-fs-binfmt_misc.automount
units/proc-sys-fs-binfmt_misc.mount
units/quotaon.service.in
units/rc-local.service.in
units/reboot.target
units/remote-cryptsetup.target
units/remote-fs-pre.target
units/remote-fs.target
units/rescue.service.in
units/rescue.target
units/rpcbind.target
units/serial-getty@.service.m4
units/shutdown.target
units/sigpwr.target
units/sleep.target
units/slices.target
units/smartcard.target
units/sockets.target
units/sound.target
units/suspend-then-hibernate.target
units/suspend.target
units/swap.target
units/sys-fs-fuse-connections.mount
units/sys-kernel-config.mount
units/sys-kernel-debug.mount
units/sys-kernel-tracing.mount
units/sysinit.target
units/syslog.socket
units/system-systemd\x2dcryptsetup.slice
units/system-update-cleanup.service
units/system-update-pre.target
units/system-update.target
units/systemd-ask-password-console.path
units/systemd-ask-password-console.service
units/systemd-ask-password-wall.path
units/systemd-ask-password-wall.service
units/systemd-backlight@.service.in
units/systemd-binfmt.service.in
units/systemd-bless-boot.service.in
units/systemd-boot-check-no-failures.service.in
units/systemd-boot-system-token.service
units/systemd-coredump.socket
units/systemd-coredump@.service.in
units/systemd-exit.service
units/systemd-firstboot.service
units/systemd-fsck-root.service.in
units/systemd-fsck@.service.in
units/systemd-halt.service
units/systemd-hibernate-resume@.service.in
units/systemd-hibernate.service.in
units/systemd-homed-activate.service
units/systemd-homed.service.in
units/systemd-hostnamed.service.in
units/systemd-hwdb-update.service.in
units/systemd-hybrid-sleep.service.in
units/systemd-importd.service.in
units/systemd-initctl.service.in
units/systemd-initctl.socket
units/systemd-journal-catalog-update.service
units/systemd-journal-flush.service
units/systemd-journal-gatewayd.service.in
units/systemd-journal-gatewayd.socket
units/systemd-journal-remote.service.in
units/systemd-journal-remote.socket
units/systemd-journal-upload.service.in
units/systemd-journald-audit.socket
units/systemd-journald-dev-log.socket
units/systemd-journald-varlink@.socket
units/systemd-journald.service.in
units/systemd-journald.socket
units/systemd-journald@.service.in
units/systemd-journald@.socket
units/systemd-kexec.service
units/systemd-localed.service.in
units/systemd-logind.service.in
units/systemd-machine-id-commit.service
units/systemd-machined.service.in
units/systemd-modules-load.service.in
units/systemd-network-generator.service.in
units/systemd-networkd-wait-online.service.in
units/systemd-networkd.service.in
units/systemd-networkd.socket
units/systemd-nspawn@.service.in
units/systemd-oomd.service.in [new file with mode: 0644]
units/systemd-portabled.service.in
units/systemd-poweroff.service
units/systemd-pstore.service.in
units/systemd-quotacheck.service.in
units/systemd-random-seed.service.in
units/systemd-reboot.service
units/systemd-remount-fs.service.in
units/systemd-repart.service.in
units/systemd-resolved.service.in
units/systemd-rfkill.service.in
units/systemd-rfkill.socket
units/systemd-suspend-then-hibernate.service.in
units/systemd-suspend.service.in
units/systemd-sysctl.service.in
units/systemd-sysusers.service
units/systemd-time-wait-sync.service.in
units/systemd-timedated.service.in
units/systemd-timesyncd.service.in
units/systemd-tmpfiles-clean.service
units/systemd-tmpfiles-clean.timer
units/systemd-tmpfiles-setup-dev.service
units/systemd-tmpfiles-setup.service
units/systemd-udev-settle.service
units/systemd-udev-trigger.service
units/systemd-udevd-control.socket
units/systemd-udevd-kernel.socket
units/systemd-udevd.service.in
units/systemd-update-done.service.in
units/systemd-update-utmp-runlevel.service.in
units/systemd-update-utmp.service.in
units/systemd-user-sessions.service.in
units/systemd-userdbd.service.in
units/systemd-userdbd.socket
units/systemd-vconsole-setup.service.in
units/systemd-volatile-root.service.in
units/time-set.target
units/time-sync.target
units/timers.target
units/tmp.mount
units/umount.target
units/usb-gadget.target
units/user-.slice.d/10-defaults.conf
units/user-runtime-dir@.service.in
units/user.slice
units/user/app.slice [new file with mode: 0644]
units/user/background.slice [new file with mode: 0644]
units/user/basic.target
units/user/bluetooth.target
units/user/default.target
units/user/exit.target
units/user/graphical-session-pre.target
units/user/graphical-session.target
units/user/meson.build
units/user/paths.target
units/user/printer.target
units/user/session.slice [new file with mode: 0644]
units/user/shutdown.target
units/user/smartcard.target
units/user/sockets.target
units/user/sound.target
units/user/systemd-exit.service
units/user/systemd-tmpfiles-clean.service
units/user/systemd-tmpfiles-clean.timer
units/user/systemd-tmpfiles-setup.service
units/user/timers.target
units/user/xdg-desktop-autostart.target
units/user@.service.in
units/var-lib-machines.mount

index 8e5cfca535ed67c400cfc3673e1a7a36c0f4c9ae..651249c701b4e63949034ed6aeabcb22faca3726 100644 (file)
@@ -118,6 +118,7 @@ PenaltyBreakString: 0
 PenaltyExcessCharacter: 10
 PenaltyReturnTypeOnItsOwnLine: 100
 SpaceAfterCStyleCast: true
+SpaceBeforeParens: ControlStatementsExceptForEachMacros
 SpacesInAngles:  true
 TabWidth:        8
 UseCRLF:         false
index 3b86689d27c02c6993524127377160e793cb6cfa..c9aec779c8b5608de73e94b1ace1893ce7a443ea 100644 (file)
@@ -13,13 +13,14 @@ on:
 
 jobs:
   build:
-    runs-on: ubuntu-18.04
+    runs-on: ubuntu-20.04
     strategy:
       fail-fast: false
       matrix:
         env:
           - { COMPILER: "gcc",   COMPILER_VERSION: "10" }
           - { COMPILER: "clang", COMPILER_VERSION: "10" }
+          - { COMPILER: "clang", COMPILER_VERSION: "11" }
     env: ${{ matrix.env }}
     steps:
       - name: Repository checkout
index 75fc36fffb10fcf1b5664e509d294a4bfa3bdcf3..d4f1106538125ae431c6ef801db32b8874614aa8 100755 (executable)
@@ -19,7 +19,6 @@ PACKAGES=(
     expect
     fdisk
     gettext
-    iptables-dev
     iputils-ping
     isc-dhcp-client
     itstool
@@ -28,6 +27,7 @@ PACKAGES=(
     libcap-dev
     libcurl4-gnutls-dev
     libfdisk-dev
+    libfido2-dev
     libgpg-error-dev
     liblz4-dev
     liblzma-dev
@@ -38,6 +38,7 @@ PACKAGES=(
     libqrencode-dev
     libssl-dev
     libxkbcommon-dev
+    libxtables-dev
     libzstd-dev
     mount
     net-tools
@@ -102,7 +103,7 @@ for args in "${ARGS[@]}"; do
     SECONDS=0
 
     info "Checking build with $args"
-    if ! AR="$AR" CC="$CC" CXX="$CXX" CFLAGS="-Werror" CXXFLAGS="-Werror" meson -Dtests=unsafe -Dslow-tests=true --werror $args build; then
+    if ! AR="$AR" CC="$CC" CXX="$CXX" CFLAGS="-Werror" CXXFLAGS="-Werror" meson -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true --werror $args build; then
         fatal "meson failed with $args"
     fi
 
index 3ac3d55e4a547b8197081d2d09ee2b9878d01c62..c50ee4923c2b466137394504c8f03cf75c2abc29 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Copyright © 2016 Zeal Jagannatha
 
index cf2e3dfa0d5862f82f5e4987e38e0c7fa89073dd..b5ed5768cbde79d00d4531a637b3874a7548c3b3 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 # This is a settings file for OS image generation using mkosi (https://github.com/systemd/mkosi).
 # Symlink this file to mkosi.default in the project root directory and invoke "mkosi" to build an OS image.
index e7edb6dbbc32d645cbe877ac6b278eaab1cb4e87..568e63651ab5084958be867917641ddf66b38c2f 100644 (file)
@@ -1,11 +1,11 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 # This is a settings file for OS image generation using mkosi (https://github.com/systemd/mkosi).
 # Symlink this file to mkosi.default in the project root directory and invoke "mkosi" to build an OS image.
 
 [Distribution]
 Distribution=fedora
-Release=32
+Release=33
 
 [Output]
 Format=gpt_ext4
@@ -58,6 +58,8 @@ BuildPackages=
         p11-kit-devel
         pam-devel
         pcre2-devel
+        perl(IPC::SysV)
+        perl(Time::HiRes)
         pkgconfig
         python3-devel
         python3-lxml
index 53837b6be8fb83c0969fdd28ed8c318a80d13807..9f3abbc74b2df72b6194db905261d987862176c2 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 # This is a settings file for OS image generation using mkosi (https://github.com/systemd/mkosi).
 # Symlink this file to mkosi.default in the project root directory and invoke "mkosi" to build an OS image.
index 3e97beebafb515b1e64cb5e8d14f21ed9ba9a5f6..ff81536956153f7ee0a733a6d87e4717c47fafe2 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 # This is a settings file for OS image generation using mkosi (https://github.com/systemd/mkosi).
 # Symlink this file to mkosi.default in the project root directory and invoke "mkosi" to build an OS image.
@@ -10,7 +10,7 @@ Repositories=main,universe
 
 [Output]
 Format=raw_btrfs
-Bootable=no
+Bootable=yes
 
 [Partitions]
 RootSize=2G
diff --git a/NEWS b/NEWS
index d4afd85cf978d3a3c43b53b3dddbb38910a01e9b..49e19cec22daadbe0365bacf788a08470ac8dc2e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,8 @@
 systemd System and Service Manager
 
-CHANGES WITH 247 in spe:
+CHANGES WITH 247:
 
-        * KERNEL API INCOMPATIBILITY: Linux 4.12 introduced two new uevents
+        * KERNEL API INCOMPATIBILITY: Linux 4.14 introduced two new uevents
           "bind" and "unbind" to the Linux device model. When this kernel
           change was made, systemd-udevd was only minimally updated to handle
           and propagate these new event types. The introduction of these new
@@ -15,8 +15,8 @@ CHANGES WITH 247 in spe:
           programs that monitor or enumerate devices with libudev or sd-device,
           or otherwise process uevents. Please note that this incompatibility
           is not fault of systemd or udev, but caused by an incompatible kernel
-          change that happened back in Linux 4.12, but is becoming more and
-          more visible as the new uvents are generated by more kernel drivers.
+          change that happened back in Linux 4.14, but is becoming more and
+          more visible as the new uevents are generated by more kernel drivers.
 
           To minimize issues resulting from this kernel change (but not avoid
           them entirely) starting with systemd-udevd 247 the udev "tags"
@@ -45,7 +45,7 @@ CHANGES WITH 247 in spe:
           new functions to enumerate these 'current' tags, in addition to the
           existing APIs that now enumerate the 'sticky' ones.
 
-          To properly handle "bind"/"unbind" on Linux 4.12 and newer it is
+          To properly handle "bind"/"unbind" on Linux 4.14 and newer it is
           essential that all udev rules files and applications are updated to
           handle the new events. Specifically:
 
@@ -86,6 +86,33 @@ CHANGES WITH 247 in spe:
           this is not caused by systemd/udev changes, but result of a kernel
           behaviour change.
 
+        * UPCOMING INCOMPATIBILITY: So far most downstream distribution
+          packages have not retriggered devices once the udev package (or any
+          auxiliary package installing additional udev rules) is updated. We
+          intend to work with major distributions to change this, so that
+          "udevadm trigger -a change" is issued on such upgrades, ensuring that
+          the updated ruleset is applied to the devices already discovered, so
+          that (asynchronously) after the upgrade completed the udev database
+          is consistent with the updated rule set. This means udev rules must
+          be ready to be retriggered with a "change" action any time, and
+          result in correct and complete udev database entries. While the
+          majority of udev rule files known to us currently get this right,
+          some don't. Specifically, there are udev rules files included in
+          various packages that only set udev properties on the "add" action,
+          but do not handle the "change" action. If a device matching those
+          rules is retriggered with the "change" action (as is intended here)
+          it would suddenly lose the relevant properties. This always has been
+          problematic, but as soon as all udev devices are triggered on relevant
+          package upgrades this will become particularly so. It is strongly
+          recommended to fix offending rules so that they can handle a "change"
+          action at any time, and acquire all necessary udev properties even
+          then. Or in other words: the header guard mentioned above
+          (ACTION=="remove",GOTO="xyz_end") is the correct approach to handle
+          this, as it makes sure rules are rerun on "change" correctly, and
+          accumulate the correct and complete set of udev properties. udev rule
+          definitions that cannot handle "change" events being triggered at
+          arbitrary times should be considered buggy.
+
         * The MountAPIVFS= service file setting now defaults to on if
           RootImage= and RootDirectory= are used, which means that with those
           two settings /proc/, /sys/ and /dev/ are automatically properly set
@@ -106,29 +133,50 @@ CHANGES WITH 247 in spe:
           desired the location to which systemd installs its PAM stack
           configuration may be changed via the -Dpamconfdir Meson option.
 
-        * The runtime dependencies on libqrencode, libpcre2, libpwquality and
-          libcryptsetup have been changed to be based on dlopen(): instead of
-          regular dynamic library dependencies declared in the binary ELF
-          headers, these libraries are now loaded on demand only, if they are
-          available. If the libraries cannot be found the relevant operations
-          will fail gracefully, or a suitable fallback logic is chosen. This is
-          supposed to be useful for general purpose distributions, as it allows
-          minimizing the list of dependencies the systemd packages pull in,
-          permitting building of more minimal OS images, while still making use
-          of these "weak" dependencies should they be installed. Since many
-          package managers automatically synthesize package dependencies from
-          ELF shared library dependencies, some additional manual packaging
-          work has to be done now to replace those (slightly downgraded from
-          "required" to "recommended" or whatever is conceptually suitable for
-          the package manager). Note that this change does not alter build-time
-          behaviour: as before the build-time dependencies have to be installed
-          during build, even if they now are optional during runtime.
+        * The runtime dependencies on libqrencode, libpcre2, libidn/libidn2,
+          libpwquality and libcryptsetup have been changed to be based on
+          dlopen(): instead of regular dynamic library dependencies declared in
+          the binary ELF headers, these libraries are now loaded on demand
+          only, if they are available. If the libraries cannot be found the
+          relevant operations will fail gracefully, or a suitable fallback
+          logic is chosen. This is supposed to be useful for general purpose
+          distributions, as it allows minimizing the list of dependencies the
+          systemd packages pull in, permitting building of more minimal OS
+          images, while still making use of these "weak" dependencies should
+          they be installed. Since many package managers automatically
+          synthesize package dependencies from ELF shared library dependencies,
+          some additional manual packaging work has to be done now to replace
+          those (slightly downgraded from "required" to "recommended" or
+          whatever is conceptually suitable for the package manager). Note that
+          this change does not alter build-time behaviour: as before the
+          build-time dependencies have to be installed during build, even if
+          they now are optional during runtime.
 
         * sd-event.h gained a new call sd_event_add_time_relative() for
           installing timers relative to the current time. This is mostly a
           convenience wrapper around the pre-existing sd_event_add_time() call
           which installs absolute timers.
 
+        * sd-event event sources may now be placed in a new "exit-on-failure"
+          mode, which may be controlled via the new
+          sd_event_source_get_exit_on_failure() and
+          sd_event_source_set_exit_on_failure() functions. If enabled, any
+          failure returned by the event source handler functions will result in
+          exiting the event loop (unlike the default behaviour of just
+          disabling the event source but continuing with the event loop). This
+          feature is useful to set for all event sources that define "primary"
+          program behaviour (where failure should be fatal) in contrast to
+          "auxiliary" behaviour (where failure should remain local).
+
+        * Most event source types sd-event supports now accept a NULL handler
+          function, in which case the event loop is exited once the event
+          source is to be dispatched, using the userdata pointer — converted to
+          a signed integer — as exit code of the event loop. Previously this
+          was supported for IO and signal event sources already. Exit event
+          sources still do not support this (simply because it makes little
+          sense there, as the event loop is already exiting when they are
+          dispatched).
+
         * A new per-unit setting RootImageOptions= has been added which allows
           tweaking the mount options for any file system mounted as effect of
           the RootImage= setting.
@@ -137,6 +185,15 @@ CHANGES WITH 247 in spe:
           mounting additional disk images into the file system tree accessible
           to the service.
 
+        * Timer units gained a new FixedRandomDelay= boolean setting. If
+          enabled, the random delay configured with RandomizedDelaySec= is
+          selected in a way that is stable on a given system (though still
+          different for different units).
+
+        * Socket units gained a new setting Timestamping= that takes "us", "ns"
+          or "off". This controls the SO_TIMESTAMP/SO_TIMESTAMPNS socket
+          options.
+
         * systemd-repart now generates JSON output when requested with the new
           --json= switch.
 
@@ -223,7 +280,9 @@ CHANGES WITH 247 in spe:
           them in local timezone or UTC, or whether to show µs granularity.
 
         * Alibaba's "pouch" container manager is now detected by
-          systemd-detect-virt, ConditionVirtualization= and similar constructs.
+          systemd-detect-virt, ConditionVirtualization= and similar
+          constructs. Similar, they now also recognize IBM PowerVM machine
+          virtualization.
 
         * systemd-nspawn has been reworked to use the /run/host/incoming/ as
           place to use for propagating external mounts into the
@@ -247,12 +306,6 @@ CHANGES WITH 247 in spe:
           deprecated and undocumented for 6 years. systemd started to warn
           about its use 1.5 years ago. It has now been removed entirely.
 
-        * If the $SYSTEMD_LOG_SECCOMP=1 environment variable is set for
-          systemd-nspawn all system call filter violations will be logged by
-          the kernel (audit). This is useful for tracking down system calls
-          invoked by container payloads that are prohibited by the container's
-          system call filter policy.
-
         * sd-bus.h gained a new API call sd_bus_error_has_names(), which takes
           a sd_bus_error struct and a list of error names, and checks if the
           error matches one of these names. It's a convenience wrapper that is
@@ -264,12 +317,28 @@ CHANGES WITH 247 in spe:
         * Behaviour of system call filter allow lists has changed slightly:
           system calls that are contained in @known will result in a EPERM by
           default, while those not contained in it result in ENOSYS. This
-          should improve compatibility because known syscalls will thus be
+          should improve compatibility because known system calls will thus be
           communicated as prohibited, while unknown (and thus newer ones) will
           be communicated as not implemented, which hopefully has the greatest
           chance of triggering the right fallback code paths in client
           applications.
 
+        * "systemd-analyze syscall-filter" will now show two separate sections
+          at the bottom of the output: system calls known during systemd build
+          time but not included in any of the filter groups shown above, and
+          system calls defined on the local kernel but known during systemd
+          build time.
+
+        * If the $SYSTEMD_LOG_SECCOMP=1 environment variable is set for
+          systemd-nspawn all system call filter violations will be logged by
+          the kernel (audit). This is useful for tracking down system calls
+          invoked by container payloads that are prohibited by the container's
+          system call filter policy.
+
+        * If the $SYSTEMD_SECCOMP=0 environment variable is set for
+          systemd-nspawn (and other programs that use seccomp) all seccomp
+          filtering is turned off.
+
         * Two new unit file settings ProtectProc= and ProcSubset= have been
           added that expose the hidepid= and subset= mount options of procfs.
           All processes of the unit will only see processes in /proc that are
@@ -415,9 +484,31 @@ CHANGES WITH 247 in spe:
           discipline in the [FlowQueuePIE] sections.
 
         * systemd-networkd's .netdev files may now be used to create "BareUDP"
-          tunnels, configured in the new [BareUDP] setting. VXLAN tunnels may
-          now be marked to be independent of any underlying network interface
-          via the new Independent= boolean setting.
+          tunnels, configured in the new [BareUDP] setting.
+
+        * systemd-networkd's Gateway= setting in .network files now accepts the
+          special values "_dhcp4" and "_ipv6ra" to configure additional,
+          locally defined, explicit routes to the gateway acquired via DHCP or
+          IPv6 Router Advertisements. The old setting "_dhcp" is deprecated,
+          but still accepted for backwards compatibility.
+
+        * systemd-networkd's [IPv6PrefixDelegation] section and
+          IPv6PrefixDelegation= options have been renamed as [IPv6SendRA] and
+          IPv6SendRA= (the old names are still accepted for backwards
+          compatibility).
+
+        * systemd-networkd's .network files gained the DHCPv6PrefixDelegation=
+          boolean setting in [Network] section. If enabled, the delegated prefix
+          gained by another link will be configured, and an address within the
+          prefix will be assigned.
+
+        * systemd-networkd's .network files gained the Announce= boolean setting
+          in [DHCPv6PrefixDelegation] section. When enabled, the delegated
+          prefix will be announced through IPv6 router advertisement (IPv6 RA).
+          The setting is enabled by default.
+
+        * VXLAN tunnels may now be marked as independent of any underlying
+          network interface via the new Independent= boolean setting.
 
         * systemctl gained support for two new verbs: "service-log-level" and
           "service-log-target" may be used on services that implement the
@@ -429,11 +520,11 @@ CHANGES WITH 247 in spe:
 
         * The SystemCallErrorNumber= unit file setting now accepts the new
           "kill" and "log" actions, in addition to arbitrary error number
-          specifications as before. If "kill" the the processes are killed on
-          the event, if "log" the offending syscall is audit logged.
+          specifications as before. If "kill" the processes are killed on the
+          event, if "log" the offending system call is audit logged.
 
         * A new SystemCallLog= unit file setting has been added that accepts a
-          list of syscalls that shall be logged about (audit).
+          list of system calls that shall be logged about (audit).
 
         * The OS image dissection logic (as used by RootImage= in unit files or
           systemd-nspawn's --image= switch) has gained support for identifying
@@ -456,22 +547,145 @@ CHANGES WITH 247 in spe:
           will now log the thread ID in their log output. This is useful when
           working with heavily threaded programs.
 
-        * If the SYSTEMD_RDRAND enviroment variable is set to "0", systemd will
+        * If the SYSTEMD_RDRAND environment variable is set to "0", systemd will
           not use the RDRAND CPU instruction. This is useful in environments
           such as replay debuggers where non-deterministic behaviour is not
           desirable.
 
-        * When building systemd the Meson option
-          -Dcompat-mutable-uid-boundaries may now be specified. If enabled,
-          systemd reads the system UID boundaries from /etc/login.defs, instead
-          of using the built-in values selected during build-time. This is an
-          option to improve compatibility for upgrades from old systems. It's
-          strongly recommended not to make use of this functionality on new
-          systems (or even enable it during build), as it makes something
-          runtime-configurable that is mostly an implementation detail of the
-          OS, and permits avoidable differences in deployments that create all
-          kinds of problems in the long run.
-
+        * The autopaging logic in systemd's various tools (such as systemctl)
+          has been updated to turn on "secure" mode in "less"
+          (i.e. $LESSECURE=1) if execution in a "sudo" environment is
+          detected. This disables invoking external programs from the pager,
+          via the pipe logic. This behaviour may be overridden via the new
+          $SYSTEMD_PAGERSECURE environment variable.
+
+        * Units which have resource limits (.service, .mount, .swap, .slice,
+          .socket, and .slice) gained new configuration settings
+          ManagedOOMSwap=, ManagedOOMMemoryPressure=, and
+          ManagedOOMMemoryPressureLimitPercent= that specify resource pressure
+          limits and optional action taken by systemd-oomd.
+
+        * A new service systemd-oomd has been added. It monitors resource
+          contention for selected parts of the unit hierarchy using the PSI
+          information reported by the kernel, and kills processes when memory
+          or swap pressure is above configured limits. This service is only
+          enabled by default in developer mode (see below) and should be
+          considered a preview in this release. Behaviour details and option
+          names are subject to change without the usual backwards-compatibility
+          promises.
+
+        * A new helper oomctl has been added to introspect systemd-oomd state.
+          It is only enabled by default in developer mode and should be
+          considered a preview without the usual backwards-compatibility
+          promises.
+
+        * New meson option -Dcompat-mutable-uid-boundaries= has been added. If
+          enabled, systemd reads the system UID boundaries from /etc/login.defs
+          at runtime, instead of using the built-in values selected during
+          build. This is an option to improve compatibility for upgrades from
+          old systems. It's strongly recommended not to make use of this
+          functionality on new systems (or even enable it during build), as it
+          makes something runtime-configurable that is mostly an implementation
+          detail of the OS, and permits avoidable differences in deployments
+          that create all kinds of problems in the long run.
+
+        * New meson option '-Dmode=developer|release' has been added. When
+          'developer', additional checks and features are enabled that are
+          relevant during upstream development, e.g. verification that
+          semi-automatically-generated documentation has been properly updated
+          following API changes. Those checks are considered hints for
+          developers and are not actionable in downstream builds. In addition,
+          extra features that are not ready for general consumption may be
+          enabled in developer mode. It is thus recommended to set
+          '-Dmode=release' in end-user and distro builds.
+
+        * systemd-cryptsetup gained support for processing detached LUKS
+          headers specified on the kernel command line via the header=
+          parameter of the luks.options= kernel command line option. The same
+          device/path syntax as for key files is supported for header files
+          like this.
+
+        * The "net_id" built-in of udev has been updated to ignore ACPI _SUN
+          slot index data for devices that are connected through a PCI bridge
+          where the _SUN index is associated with the bridge instead of the
+          network device itself. Previously this would create ambiguous device
+          naming if multiple network interfaces were connected to the same PCI
+          bridge. Since this is a naming scheme incompatibility on systems that
+          possess hardware like this it has been introduced as new naming
+          scheme "v247". The previous scheme can be selected via the
+          "net.naming-scheme=v245" kernel command line parameter.
+
+        * ConditionFirstBoot= semantics have been modified to be safe towards
+          abnormal system power-off during first boot. Specifically, the
+          "systemd-machine-id-commit.service" service now acts as boot
+          milestone indicating when the first boot process is sufficiently
+          complete in order to not consider the next following boot also a
+          first boot. If the system is reset before this unit is reached the
+          first time, the next boot will still be considered a first boot; once
+          it has been reached, no further boots will be considered a first
+          boot. The "first-boot-complete.target" unit now acts as official hook
+          point to order against this. If a service shall be run on every boot
+          until the first boot fully succeeds it may thus be ordered before
+          this target unit (and pull it in) and carry ConditionFirstBoot=
+          appropriately.
+
+        * bootctl's set-default and set-oneshot commands now accept the three
+          special strings "@default", "@oneshot", "@current" in place of a boot
+          entry id. These strings are resolved to the current default and
+          oneshot boot loader entry, as well as the currently booted one. Thus
+          a command "bootctl set-default @current" may be used to make the
+          currently boot menu item the new default for all subsequent boots.
+
+        * "systemctl edit" has been updated to show the original effective unit
+          contents in commented form in the text editor.
+
+        * Units in user mode are now segregated into three new slices:
+          session.slice (units that form the core of graphical session),
+          app.slice ("normal" user applications), and background.slice
+          (low-priority tasks). Unless otherwise configured, user units are
+          placed in app.slice. The plan is to add resource limits and
+          protections for the different slices in the future.
+
+        * New GPT partition types for RISCV32/64 for the root and /usr
+          partitions, and their associated Verity partitions have been defined,
+          and are now understood by systemd-gpt-auto-generator, and the OS
+          image dissection logic.
+
+        Contributions from: Adolfo Jayme Barrientos, afg, Alec Moskvin, Alyssa
+        Ross, Amitanand Chikorde, Andrew Hangsleben, Anita Zhang, Ansgar
+        Burchardt, Arian van Putten, Aurelien Jarno, Axel Rasmussen, bauen1,
+        Beniamino Galvani, Benjamin Berg, Bjørn Mork, brainrom, Chandradeep
+        Dey, Charles Lee, Chris Down, Christian Göttsche, Christof Efkemann,
+        Christoph Ruegge, Clemens Gruber, Daan De Meyer, Daniele Medri, Daniel
+        Mack, Daniel Rusek, Dan Streetman, David Tardon, Dimitri John Ledkov,
+        Dmitry Borodaenko, Elias Probst, Elisei Roca, ErrantSpore, Etienne
+        Doms, Fabrice Fontaine, fangxiuning, Felix Riemann, Florian Klink,
+        Franck Bui, Frantisek Sumsal, fwSmit, George Rawlinson, germanztz,
+        Gibeom Gwon, Glen Whitney, Gogo Gogsi, Göran Uddeborg, Grant Mathews,
+        Hans de Goede, Hans Ulrich Niedermann, Haochen Tong, Harald Seiler,
+        huangyong, Hubert Kario, igo95862, Ikey Doherty, Insun Pyo, Jan Chren,
+        Jan Schlüter, Jérémy Nouhaud, Jian-Hong Pan, Joerg Behrmann, Jonathan
+        Lebon, Jörg Thalheim, Josh Brobst, Juergen Hoetzel, Julien Humbert,
+        Kai-Chuan Hsieh, Kairui Song, Kamil Dudka, Kir Kolyshkin, Kristijan
+        Gjoshev, Kyle Huey, Kyle Russell, Lee Whalen, Lennart Poettering,
+        lichangze, Luca Boccassi, Lucas Werkmeister, Luca Weiss, Marc
+        Kleine-Budde, Marco Wang, Martin Wilck, Marti Raudsepp, masmullin2000,
+        Máté Pozsgay, Matt Fenwick, Michael Biebl, Michael Scherer, Michal
+        Koutný, Michal Sekletár, Michal Suchanek, Mikael Szreder, Milo
+        Casagrande, mirabilos, Mitsuha_QuQ, mog422, Muhammet Kara, Nazar
+        Vinnichuk, Nicholas Narsing, Nicolas Fella, Njibhu, nl6720, Oğuz Ersen,
+        Olivier Le Moal, Ondrej Kozina, onlybugreports, Pass Automated Testing
+        Suite, Pat Coulthard, Pavel Sapezhko, Pedro Ruiz, perry_yuan, Peter
+        Hutterer, Phaedrus Leeds, PhoenixDiscord, Piotr Drąg, Plan C,
+        Purushottam choudhary, Rasmus Villemoes, Renaud Métrich, Robert Marko,
+        Roman Beranek, Ronan Pigott, Roy Chen (陳彥廷), RussianNeuroMancer,
+        Samanta Navarro, Samuel BF, scootergrisen, Sorin Ionescu, Steve Dodd,
+        Susant Sahani, Timo Rothenpieler, Tobias Hunger, Tobias Kaufmann, Topi
+        Miettinen, vanou, Vito Caputo, Weblate, Wen Yang, Whired Planck,
+        williamvds, Yu, Li-Yu, Yuri Chornoivan, Yu Watanabe, Zbigniew
+        Jędrzejewski-Szmek, Zmicer Turok, Дамјан Георгиевски
+
+        – Warsaw, 2020-11-26
 
 CHANGES WITH 246:
 
@@ -1109,7 +1323,7 @@ CHANGES WITH 245:
           configuration drop-ins are present, no action is taken.
 
         * A new component "userdb" has been added, along with a small daemon
-          "systemd-userdb.service" and a client tool "userdbctl". The framework
+          "systemd-userdbd.service" and a client tool "userdbctl". The framework
           allows defining rich user and group records in a JSON format,
           extending on the classic "struct passwd" and "struct group"
           structures. Various components in systemd have been updated to
diff --git a/TODO b/TODO
index b509ee2594da71bcf039007d4882479a3b34afbb..bd5bdda744ae8eca877ef126e0dac5f846a0dce7 100644 (file)
--- a/TODO
+++ b/TODO
@@ -20,9 +20,33 @@ Janitorial Clean-ups:
 
 Features:
 
-* port selinux code from mallinfo() to mallinfo2() once added to glibc
+* cryptsetup: optionally, when run during boot-up and password is never
+  entered, and we are on AC power (or so), power off machine again
+
+* when configuring loopback netif, and it fails due to EPERM, eat up error if
+  it happens to be set up alright already.
+
+* at boot: check if battery above some threshold, if not power off again after explanation
+
+* userdb: add field for ambient caps, so that a user can have CAP_WAKE_ALARM
+  for example. And add code that resets ambient caps for all services by
+  default.
+
+* homed: try to unmount in regular intervals when home dir was busy when we
+  tried because idle.
+
+* sd-bus: when connecting to some dbus server socker, set originating AF_UNIX
+  socket name in abstract namespace to include "description" string, and pick
+  it up from there in sd_bus_creds logic. i.e. we can use the socket peer
+  address as conduit for some minimal connection metainfo, and use it to
+  restore the "description" logic that kdbus used to have.
 
-* in fd_get_path() if we see (deleted) then do stat and check for st_nlink
+* teach LoadCredential= the ability to load all files from a specified dir as
+  individual creds
+
+* systemd-analyze netif that explains predictable interface (or networkctl)
+
+* port selinux code from mallinfo() to mallinfo2() once added to glibc
 
 * Add service setting to run a service within the specified VRF. i.e. do the
   equivalent of "ip vrf exec".
@@ -46,15 +70,12 @@ Features:
   that the kernel does what we otherwise do.
 
 * homed: keep an fd to the homedir open at all times, to keep the fs pinned
-  (autofs and such) while user is loged in.
+  (autofs and such) while user is logged in.
 
 * nss-systemd: also synthesize shadow records for users/groups
 
 * make use of new glibc 2.32 APIs sigabbrev_np() and strerrorname_np().
 
-* cryptsetup: if keyfile specified in crypttab is AF_UNIX socket, connect to it
-  and read from it (like we do elsewhere with READ_FULL_FILE_CONNECT_SOCKET)
-
 * when main nspawn supervisor process gets suspended due to SIGSTOP/SIGTTOU or
   so, freeze the payload too.
 
@@ -622,7 +643,7 @@ Features:
   parameters
 
 * maybe hook of xfs/ext4 quotactl() with services? i.e. automatically manage
-  the quota of the user indicated in User= via unit file settings, like the
+  the quota of the user indicated in User= via unit file settings, like the
   other resource management concepts. Would mix nicely with DynamicUser=1. Or
   alternatively, do this with projids, so that we can also cover services
   running as root. Quota should probably cover all the special dirs such as
@@ -813,9 +834,6 @@ Features:
 
 * systemctl: if some operation fails, show log output?
 
-* systemctl edit: use equivalent of cat() to insert existing config as a comment, prepended with #.
-  Upon editor exit, lines with one # are removed, lines with two # are left with one #, etc.
-
 * exponential backoff in timesyncd when we cannot reach a server
 
 * timesyncd: add ugly bus calls to set NTP servers per-interface, for usage by NM
index 3db8e390f2a631fde7531de301f4dcd5cbf19efb..d61fc2cbf6ee95a8233b824246dce6203b364cc1 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 in_files = '''
         systemd.bg.catalog
index c5786c4012d4ae2c71cc7794f19b99f77dfdbc8a..89c82c2e9c456ffc76e9fb6faadae417cad5a1ed 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Message catalog for systemd's own messages
 # Belarusian translation
@@ -78,7 +78,7 @@ Documentation: man:core(5)
 Subject: Новая сесія № @SESSION_ID@ створана для карыстальніка @USER_ID@
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Новая сесія з № @SESSION_ID@ створана для карыстальніка @USER_ID@.
 
@@ -88,7 +88,7 @@ Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Subject: Сесія № @SESSION_ID@ спынена
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Сесія № @SESSION_ID@ спынена.
 
@@ -96,7 +96,7 @@ Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Subject: Даступна новае працоўнае месца № @SEAT_ID@
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Новае працоўнае месца № @SEAT_ID@ наладжана і даступна для выкарыстання.
 
@@ -104,7 +104,7 @@ Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Subject: Працоўнае месца № @SEAT_ID@ выдалена
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Працоўнае месца № @SEAT_ID@ выдалена і больш не даступна.
 
index bec5c6f0487a491331d15caa1fb2dad98cf26e73..9b6d346b0d48b3299d8ba6a768bf488727485f57 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Message catalog for systemd's own messages
 # Belarusian Latin translation
@@ -79,7 +79,7 @@ Rekamiendujecca paviedamić ab hetym raspracoŭnikam.
 Subject: Novaja siesija № @SESSION_ID@ stvorana dlia karystaĺnika @USER_ID@
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Novaja siesija z № @SESSION_ID@ stvorana dlia karystaĺnika @USER_ID@.
 
@@ -89,7 +89,7 @@ Lidar hetaj siesii pad № @LEADER@.
 Subject: Siesija № @SESSION_ID@ spyniena
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Siesija № @SESSION_ID@ spyniena.
 
@@ -97,7 +97,7 @@ Siesija № @SESSION_ID@ spyniena.
 Subject: Dastupna novaje pracoŭnaje miesca № @SEAT_ID@
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Novaje pracoŭnaje miesca № @SEAT_ID@ naladžana i dastupna dlia
 vykarystannia.
@@ -106,7 +106,7 @@ vykarystannia.
 Subject: Pracoŭnaje miesca № @SEAT_ID@ vydaliena
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Pracoŭnaje miesca № @SEAT_ID@ vydaliena i boĺš nie dastupna.
 
index 41f7b21bce26a412ba75524610fd75b8f71c4b8e..65e0833970ccacfeee54053ad5c913c36955cbdc 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  Copyright © 2016 Alexander Shopov <ash@kambanaria.org>
 
@@ -81,7 +81,7 @@ Documentation: man:core(5)
 Subject: Създадена е нова сесия № @SESSION_ID@ за потребителя „@USER_ID@“
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 За потребителя „@USER_ID@“ е създадена нова сесия № @SESSION_ID@.
 
@@ -91,7 +91,7 @@ Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Subject: Сесия № @SESSION_ID@ приключи
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Сесия № @SESSION_ID@ приключи работа.
 
@@ -99,7 +99,7 @@ Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Subject: Налично е ново работно място № @SEAT_ID@
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Новото работно място № @SEAT_ID@ е настроено и готово за работа.
 
@@ -107,7 +107,7 @@ Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Subject: Работното място № @SEAT_ID@ е премахнато
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Работното място № @SEAT_ID@ вече не е налично.
 
index 056df00de8fb8e938de7bb674521c8f33abea625..3e08f564a64069200babc5fe76e18bb711bb7c8a 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 # Message catalog for systemd's own messages
 
@@ -89,7 +89,7 @@ about the file being truncated.
 Subject: A new session @SESSION_ID@ has been created for user @USER_ID@
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 A new session with the ID @SESSION_ID@ has been created for the user @USER_ID@.
 
@@ -99,7 +99,7 @@ The leading process of the session is @LEADER@.
 Subject: Session @SESSION_ID@ has been terminated
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 A session with the ID @SESSION_ID@ has been terminated.
 
@@ -107,7 +107,7 @@ A session with the ID @SESSION_ID@ has been terminated.
 Subject: A new seat @SEAT_ID@ is now available
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 A new seat @SEAT_ID@ has been configured and is now available.
 
@@ -115,7 +115,7 @@ A new seat @SEAT_ID@ has been configured and is now available.
 Subject: Seat @SEAT_ID@ has now been removed
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 A seat @SEAT_ID@ has been removed and is no longer available.
 
index aecfafa05f156a865241d2cf8af8038562dfed27..656fb0509bdc77fbe256ca1109c5cf7328bc5b9e 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 # Message catalog for systemd's own messages
 # Danish translation
@@ -64,7 +64,7 @@ og burde blive reporteret som en bug til folkene bag
 Subject: En ny session @SESSION_ID@ er blevet lavet for bruger @USER_ID@
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 En ny session med ID @SESSION_ID@ er blevet lavet for brugeren @USER_ID@.
 
@@ -74,7 +74,7 @@ Den ledende process for sessionen er @LEADER@.
 Subject: Session @SESSION_ID@ er blevet lukket ned
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 En session med ID @SESSION_ID@ er blevet lukket ned.
 
@@ -82,7 +82,7 @@ En session med ID @SESSION_ID@ er blevet lukket ned.
 Subject: En ny arbejdsstation $SEAT_ID@ er nu tilgængelig
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 En ny arbejdsstation @SEAT_ID@ er blevet konfigureret og er nu tilgængelig.
 
@@ -90,7 +90,7 @@ En ny arbejdsstation @SEAT_ID@ er blevet konfigureret og er nu tilgængelig.
 Subject: Arbejdsstation @SEAT_ID@ er nu blevet fjernet
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 En arbejdsstation @SEAT_ID@ er blevet fjernet og er ikke længere tilgængelig.
 
index 5f63a2d6b54f634258354adea518f9d01c9c8ec2..97b16d0767ae35fb663d8207317f35e24f754679 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 -- fc2e22bc6ee647b6b90729ab34a250b1
 Subject: Speicherabbild für Prozess @COREDUMP_PID@ (@COREDUMP_COMM@) generiert
index 13edd083cbacfb83c083826d4a6eed47aafaa8b6..32156bf8a1139a31600fab90a8c55e81485720fa 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  Copyright © 2013-2016 Sylvain Plantefève
 
@@ -82,7 +82,7 @@ incriminé, et cela devrait être notifié à son concepteur comme un défaut (b
 Subject: Une nouvelle session @SESSION_ID@ a été créée pour l'utilisateur @USER_ID@
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Une nouvelle session a été créée pour l'utilisateur @USER_ID@ avec
 l'identifiant (ID) @SESSION_ID@.
@@ -93,7 +93,7 @@ Le processus maître de la session est @LEADER@.
 Subject: La session @SESSION_ID@ s'est terminée
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 La session d'identifiant (ID) @SESSION_ID@ s'est terminée.
 
@@ -101,7 +101,7 @@ La session d'identifiant (ID) @SESSION_ID@ s'est terminée.
 Subject: Un nouveau poste (seat) @SEAT_ID@ est disponible
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Un nouveau poste (seat) @SEAT_ID@ a été configuré et est maintenant
 disponible.
@@ -110,7 +110,7 @@ disponible.
 Subject: Le poste (seat) @SEAT_ID@ a été retiré
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Le poste (seat) @SEAT_ID@ a été retiré et n'est plus disponible.
 
index 40727abaf54a3b05da47314c144049116f6d1297..20a71a38cb4013f039ee6719be5f8f9a27bb0988 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 # Message catalog for systemd's own messages
 # Croatian translation
@@ -78,7 +78,7 @@ trebalo bi se prijaviti razvijatelju kao greška.
 Subject: Nova sesija @SESSION_ID@ je stvorena za korisnika @USER_ID@
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Nova sesija sa ID @SESSION_ID@ je stvorena za korisnika @USER_ID@.
 
@@ -88,7 +88,7 @@ Glavni proces sesije je @LEADER@.
 Subject: Sesija @SESSION_ID@ je prekinuta
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Sesija sa ID @SESSION_ID@ je prekinuta.
 
@@ -96,7 +96,7 @@ Sesija sa ID @SESSION_ID@ je prekinuta.
 Subject: Novo sjedište @SEAT_ID@ je sada dostupno
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Novo sjedište @SEAT_ID@ je podešeno i sada je dostupno.
 
@@ -104,7 +104,7 @@ Novo sjedište @SEAT_ID@ je podešeno i sada je dostupno.
 Subject: Sjedište @SEAT_ID@ je sada uklonjeno
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Sjedište @SEAT_ID@ je uklonjeno i više nije dostupno.
 
index 5565b80b2a10197a7dffd3be77cd1211d1b7b6f0..d60200b6c48fce8f5a0b729c0ac238de65d69d58 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  Copyright © 2016 Gabor Kelemen
 
@@ -64,7 +64,7 @@ a szállítója felé kell bejelenteni.
 Subject: Új munkamenet (@SESSION_ID@) létrehozva, felhasználója: @USER_ID@
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Létrejött egy új munkamenet @SESSION_ID@ azonosítóval ezen felhasználóhoz:
 @USER_ID@.
@@ -75,7 +75,7 @@ A munkamenet vezető folyamata: @LEADER@.
 Subject: Munkamenet (@SESSION_ID@) befejezve
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 A következő azonosítójú munkamenet befejeződött: @SESSION_ID@.
 
@@ -83,7 +83,7 @@ A következő azonosítójú munkamenet befejeződött: @SESSION_ID@.
 Subject: Elérhető egy új munkaállomás: @SEAT_ID@
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Beállításra kerül és használható egy új munkaállomás: @SEAT_ID@.
 
@@ -91,7 +91,7 @@ Beállításra kerül és használható egy új munkaállomás: @SEAT_ID@.
 Subject: A munkaállomás eltávolítva: @SEAT_ID@
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 A munkaállomás el lett távolítva, és már nem érhető el: @SEAT_ID@
 
index c1375cca3ef228049c32f83244bf4364315c5768..88e118fced4faf1b31e88659439862aebf45fabb 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  Copyright © 2013-2019 Daniele Medri
 
@@ -97,7 +97,7 @@ segnalare la troncatura.
 Subject: La nuova sessione @SESSION_ID@ è stata creata per l'utente @USER_ID@
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Una nuova sessione con ID @SESSION_ID@ è stata creata per l'utente @USER_ID@.
 
@@ -108,7 +108,7 @@ Il processo primario della sessione è @LEADER@.
 Subject: La sessione @SESSION_ID@ è terminata
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 La sessione con ID @SESSION_ID@ è terminata.
 
@@ -117,7 +117,7 @@ La sessione con ID @SESSION_ID@ è terminata.
 Subject: La nuova postazione @SEAT_ID@ è ora disponibile
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 La nuova postazione @SEAT_ID@ è stata configurata ed è ora disponibile.
 
@@ -126,7 +126,7 @@ La nuova postazione @SEAT_ID@ è stata configurata ed è ora disponibile.
 Subject: La postazione @SEAT_ID@ è stata rimossa
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 La postazione @SEAT_ID@ è stata rimossa e non è più disponibile.
 
index 59fbde8b624f29aff0523b27e3d98feed446ee45..5f8fda002f09f43f3321933834ed3d37c62b6f19 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 # Message catalog for systemd's own messages
 # Korean translation
@@ -86,7 +86,7 @@ Documentation: man:core(5)
 Subject: @USER_ID@ 사용자의 새 @SESSION_ID@ 세션 만듦
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 @USER_ID@ 사용자의 새 @SESSION_ID@ 세션을 만들었습니다.
 
@@ -96,7 +96,7 @@ Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Subject: @SESSION_ID@ 세션 마침
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 @SESSION_ID@ 세션을 끝냈습니다.
 
@@ -104,7 +104,7 @@ Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Subject: 새 @SEAT_ID@ 시트 사용할 수 있음
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 새 @SEAT_ID@ 시트를 설정했고 사용할 수 있습니다.
 
@@ -112,7 +112,7 @@ Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Subject: @SEAT_ID@ 시트 제거함
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 @SEAT_ID@ 시트를 제거했으며 더이상 사용할 수 없습니다.
 
index f82bab8fc34eb40b5b536c1bf0e3edccebbd0d22..58706f55d23250346ed36347e752b0ab286c86eb 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 # Message catalog for systemd's own messages
 # Polish translation
@@ -92,7 +92,7 @@ gdb(1) będą ostrzegały o skróceniu pliku.
 Subject: Utworzono nową sesję @SESSION_ID@ dla użytkownika @USER_ID@
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Nowa sesja o identyfikatorze @SESSION_ID@ została utworzona dla użytkownika
 @USER_ID@.
@@ -103,7 +103,7 @@ Proces prowadzący sesji: @LEADER@.
 Subject: Zakończono sesję @SESSION_ID@
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Sesja o identyfikatorze @SESSION_ID@ została zakończona.
 
@@ -111,7 +111,7 @@ Sesja o identyfikatorze @SESSION_ID@ została zakończona.
 Subject: Dostępne jest nowe stanowisko @SEAT_ID@
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Nowe stanowisko @SEAT_ID@ zostało skonfigurowane i jest teraz dostępne.
 
@@ -119,7 +119,7 @@ Nowe stanowisko @SEAT_ID@ zostało skonfigurowane i jest teraz dostępne.
 Subject: Usunięto stanowisko @SEAT_ID@
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Stanowisko @SEAT_ID@ zostało usunięte i nie jest już dostępne.
 
index edaefb71648142998e2d4f73c5679a7a32d970c5..d44c6884dbc6286edab705f58d01843949c8048a 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  Copyright © 2015 Rafael Ferreira (translation)
 
@@ -65,7 +65,7 @@ deveria ser relatado para seu fabricante como um erro.
 Subject: A nova sessão @SESSION_ID@ foi criada para usuário o @USER_ID@
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Uma nova sessão com o ID @SESSION_ID@ foi criada para o usuário @USER_ID@.
 
@@ -75,7 +75,7 @@ O processo originador da sessão é @LEADER@.
 Subject: Sessão @SESSION_ID@ foi terminada
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Um sessão com o ID @SESSION_ID@ foi terminada.
 
@@ -83,7 +83,7 @@ Um sessão com o ID @SESSION_ID@ foi terminada.
 Subject: Um novo seat @SEAT_ID@ está disponível
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Um novo seat @SEAT_ID@ foi configurado e está disponível.
 
@@ -91,7 +91,7 @@ Um novo seat @SEAT_ID@ foi configurado e está disponível.
 Subject: Seat @SEAT_ID@ foi removido agora
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Um seat @SEAT_ID@ foi removido e não está mais disponível.
 
index ccdc685037962e89a3414154d2e413bb58f20997..728a5435cba68e55aed217aa3199432b6c57aaa6 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  Copyright © 2013-2017 Sergey Ptashnick
 
@@ -105,7 +105,7 @@ Documentation: man:coredump.conf(5)
 Subject: Для пользователя @USER_ID@ создан новый сеанс @SESSION_ID@
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Для пользователя @USER_ID@ создан новый сеанс с идентификатором @SESSION_ID@.
 
@@ -116,7 +116,7 @@ Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Subject: Сеанс @SESSION_ID@ завершен
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Сеанс с идентификатором @SESSION_ID@ завершился.
 
@@ -125,7 +125,7 @@ Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Subject: Добавлено новое рабочее место @SEAT_ID@
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Новое рабочее место (seat) @SEAT_ID@ полностью настроено и готово к
 использованию.
@@ -135,7 +135,7 @@ Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Subject: Рабочее место @SEAT_ID@ отключено
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Рабочее место (seat) @SEAT_ID@ было отключено.
 
index 7cb6546d432316a06abb7169f02231217b2d9207..cbceab8d0dd23d1315dc8d09efc4b4976a8a6b72 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 # Message catalog for systemd's own messages
 # Serbian translation
@@ -63,7 +63,7 @@ Documentation: man:core(5)
 Subject: Нова сесија @SESSION_ID@ је направљена за корисника @USER_ID@
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Нова сесија са ИБ-ом @SESSION_ID@ је направљена за корисника @USER_ID@.
 
@@ -73,7 +73,7 @@ Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Subject: Сесија @SESSION_ID@ је окончана
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Сесија са ИБ-ом @SESSION_ID@ је окончана.
 
@@ -81,7 +81,7 @@ Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Subject: Ново седиште @SEAT_ID@ је сада доступно
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Ново седиште @SEAT_ID@ је исподешавано и сада је доступно.
 
@@ -89,7 +89,7 @@ Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Subject: Седиште @SEAT_ID@ је сада уклоњено
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Седиште @SEAT_ID@ је сада уклоњено и више није доступно.
 
index d6ac2592b8d7116a738d3e70f8b6e13d705db277..cc6a5197102826693409668ab9ac6047d6a0a9a5 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  Copyright © 2015 Boyuan Yang
 
@@ -62,7 +62,7 @@ Documentation: man:core(5)
 Subject: 一个新会话 @SESSION_ID@ 已为用户 @USER_ID@ 建立
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 一个 ID 为 @SESSION_ID@ 的新会话已为用户 @USER_ID@ 建立。
 
@@ -72,7 +72,7 @@ Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Subject: 会话 @SESSION_ID@ 已终止
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 一个 ID 为 @SESSION_ID@ 的会话已终止。
 
@@ -80,7 +80,7 @@ Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Subject: 一个新的座位 @SEAT_ID@ 可用
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 一个新的座位 @SEAT_ID@ 已被配置并已可用。
 
@@ -88,7 +88,7 @@ Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Subject: 座位 @SEAT_ID@ 已被移除
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 座位 @SEAT_ID@ 已被移除并不再可用。
 
index a468c2f6bf34852ab09862731ef8ac27b1830c04..47208782184a2750185c4f6839b2dc334a1cad8e 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  Copyright © 2015 Jeff Huang
 
@@ -65,7 +65,7 @@ Documentation: man:core(5)
 Subject: 新的工作階段 @SESSION_ID@ 已為使用者 @USER_ID@ 建立
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 一個新的工作階段,ID @SESSION_ID@ 已為使用者 @USER_ID@ 建立。
 
@@ -75,7 +75,7 @@ Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Subject: 工作階段 @SESSION_ID@ 已結束
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 一個工作階段,ID @SESSION_ID@ 已結束。
 
@@ -83,7 +83,7 @@ Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Subject: 新的座位 @SEAT_ID@ 可用
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 一個新的座位 @SEAT_ID@ 已被設定且現在可用。
 
@@ -91,7 +91,7 @@ Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Subject: 座位 @SEAT_ID@ 已被移除
 Defined-By: systemd
 Support: %SUPPORT_URL%
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 座位 @SEAT_ID@ 已被移除且不再可用。
 
index ed74c0a98af0eb27b1f624073bb39eb58ccfc6a8..4e594e7826cccaaf11f74c63009ec0e2673ff6a4 100644 (file)
@@ -25,8 +25,78 @@ expression e;
 - return r;
 @@
 identifier log_LEVEL_errno =~ "^log_(debug|info|notice|warning|error|emergency)_errno$";
+local idexpression r;
+@@
++ return
+  log_LEVEL_errno(r, ...);
+- return r;
+@@
+identifier log_LEVEL_errno =~ "^log_(debug|info|notice|warning|error|emergency)_errno$";
 expression e;
 @@
 + return
   log_LEVEL_errno(e, ...);
 - return -e;
+@@
+identifier log_LEVEL_errno =~ "^log_(debug|info|notice|warning|error|emergency)_errno$";
+expression list args;
+expression e;
+local idexpression r;
+@@
+- log_LEVEL_errno(e, args);
+- r = e;
++ r = log_LEVEL_errno(e, args);
+@@
+identifier log_UNIT_LEVEL_errno =~ "^log_(unit|link|netdev|device|token)_(debug|info|notice|warning|error|emergency)_errno$";
+local idexpression r;
+expression e;
+expression u;
+@@
+- r = -e;
++ r =
+  log_UNIT_LEVEL_errno(u, e, ...);
+@@
+identifier log_UNIT_LEVEL_errno =~ "^log_(unit|link|netdev|device|token)_(debug|info|notice|warning|error|emergency)_errno$";
+local idexpression r;
+expression e;
+expression u;
+@@
++ r =
+  log_UNIT_LEVEL_errno(u, e, ...);
+- r = -e;
+@@
+identifier log_UNIT_LEVEL_errno =~ "^log_(unit|link|netdev|device|token)_(debug|info|notice|warning|error|emergency)_errno$";
+local idexpression r;
+expression e;
+expression u;
+@@
+- r =
++ return
+  log_UNIT_LEVEL_errno(u, e, ...);
+- return r;
+@@
+identifier log_UNIT_LEVEL_errno =~ "^log_(unit|link|netdev|device|token)_(debug|info|notice|warning|error|emergency)_errno$";
+local idexpression r;
+expression u;
+@@
++ return
+  log_UNIT_LEVEL_errno(u, r, ...);
+- return r;
+@@
+identifier log_UNIT_LEVEL_errno =~ "^log_(unit|link|netdev|device|token)_(debug|info|notice|warning|error|emergency)_errno$";
+expression e;
+expression u;
+@@
++ return
+  log_UNIT_LEVEL_errno(u, e, ...);
+- return -e;
+@@
+identifier log_UNIT_LEVEL_errno =~ "^log_(unit|link|netdev|device|token)_(debug|info|notice|warning|error|emergency)_errno$";
+expression list args;
+expression e;
+expression u;
+local idexpression r;
+@@
+- log_UNIT_LEVEL_errno(u, e, args);
+- r = e;
++ r = log_UNIT_LEVEL_errno(u, e, args);
index 3ddb69cb4cff498ab310f6ffd9eba2504eef6192..dcae069f748664fffaaa930562c7ebf00ee97c4a 100644 (file)
@@ -15,9 +15,15 @@ log_debug("Found no default boot entry :(");
 expression e;
 expression list args;
 @@
+(
+/* Ignore specific cases in src/import/{export,import,pull}.c where we want to return positive value on success. */
+log_info("Exiting.");
+return -r;
+|
 - log_info(args);
 - return -e;
 + return log_info_errno(SYNTHETIC_ERRNO(e), args);
+)
 @@
 expression e;
 expression list args;
@@ -44,5 +50,213 @@ identifier log_LEVEL_errno =~ "^log_(debug|info|notice|warning|error|emergency)_
 identifier ERRNO =~ "^E[A-Z]+$";
 expression list args;
 @@
-- return log_LEVEL_errno(ERRNO, args);
-+ return log_LEVEL_errno(SYNTHETIC_ERRNO(ERRNO), args);
+- log_LEVEL_errno(ERRNO, args);
++ log_LEVEL_errno(SYNTHETIC_ERRNO(ERRNO), args);
+@@
+identifier log_UNIT_LEVEL_errno =~ "^log_(unit|link|device|token)_(debug|info|notice|warning|error|emergency)_errno$";
+identifier ERRNO =~ "^E[A-Z]+$";
+expression u;
+expression list args;
+@@
+- log_UNIT_LEVEL_errno(u, ERRNO, args);
++ log_UNIT_LEVEL_errno(u, SYNTHETIC_ERRNO(ERRNO), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_unit_debug(u, args);
+- return -e;
++ return log_unit_debug_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_unit_info(u, args);
+- return -e;
++ return log_unit_info_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_unit_notice(u, args);
+- return -e;
++ return log_unit_notice_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_unit_error(u, args);
+- return -e;
++ return log_unit_error_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_unit_emergency(u, args);
+- return -e;
++ return log_unit_emergency_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_link_debug(u, args);
+- return -e;
++ return log_link_debug_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_link_info(u, args);
+- return -e;
++ return log_link_info_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_link_notice(u, args);
+- return -e;
++ return log_link_notice_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_link_error(u, args);
+- return -e;
++ return log_link_error_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_link_emergency(u, args);
+- return -e;
++ return log_link_emergency_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_netdev_debug(u, args);
+- return -e;
++ return log_netdev_debug_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_netdev_info(u, args);
+- return -e;
++ return log_netdev_info_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_netdev_notice(u, args);
+- return -e;
++ return log_netdev_notice_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_netdev_error(u, args);
+- return -e;
++ return log_netdev_error_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_netdev_emergency(u, args);
+- return -e;
++ return log_netdev_emergency_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_device_debug(u, args);
+- return -e;
++ return log_device_debug_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_device_info(u, args);
+- return -e;
++ return log_device_info_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_device_notice(u, args);
+- return -e;
++ return log_device_notice_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_device_error(u, args);
+- return -e;
++ return log_device_error_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_device_emergency(u, args);
+- return -e;
++ return log_device_emergency_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_token_debug(u, args);
+- return -e;
++ return log_token_debug_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_token_info(u, args);
+- return -e;
++ return log_token_info_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_token_notice(u, args);
+- return -e;
++ return log_token_notice_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_token_error(u, args);
+- return -e;
++ return log_token_error_errno(u, SYNTHETIC_ERRNO(e), args);
+@@
+expression e;
+expression u;
+expression list args;
+@@
+- log_token_emergency(u, args);
+- return -e;
++ return log_token_emergency_errno(u, SYNTHETIC_ERRNO(e), args);
index 803ba5440faffc6a3a76120fa9222dcd5e161505..290977142cc6055acb47a0e83f577e926bf7c362 100644 (file)
@@ -114,7 +114,23 @@ We define two directories below `$BOOT`:
 
 **Note:** _In all cases the `/loader/` directory should be located directly in the root of the file system. Specifically, if `$BOOT` is the ESP, then `/loader/` directory should be located directly in the root directory of the ESP, and not in the `/EFI/` subdirectory._
 
-Inside the `$BOOT/loader/entries/` directory each OS vendor may drop one or more configuration snippets with the suffix ".conf", one for each boot menu item. The file name of the file is used for identification of the boot item but shall never be presented to the user in the UI. The file name may be chosen freely but should be unique enough to avoid clashes between OS installations. More specifically it is suggested to include the machine ID (`/etc/machine-id` or the D-Bus machine ID for OSes that lack `/etc/machine-id`), the kernel version (as returned by `uname -r`) and an OS identifier (The ID field of `/etc/os-release`). Example: `$BOOT/loader/entries/6a9857a393724b7a981ebb5b8495b9ea-3.8.0-2.fc19.x86_64.conf`.
+Inside the `$BOOT/loader/entries/` directory each OS vendor may drop one or
+more configuration snippets with the suffix ".conf", one for each boot menu
+item. The file name of the file is used for identification of the boot item but
+shall never be presented to the user in the UI. The file name may be chosen
+freely but should be unique enough to avoid clashes between OS
+installations. More specifically it is suggested to include the machine ID
+(`/etc/machine-id` or the D-Bus machine ID for OSes that lack
+`/etc/machine-id`), the kernel version (as returned by `uname -r`) and an OS
+identifier (The ID field of `/etc/os-release`). Example:
+`$BOOT/loader/entries/6a9857a393724b7a981ebb5b8495b9ea-3.8.0-2.fc19.x86_64.conf`.
+
+In order to maximize compatibility with file system implementations and
+restricted boot loader environments, and to minimize conflicting character use
+with other programs, file names shall be chosen from a restricted character set:
+ASCII upper and lower case characters, digits, "+", "-", "_" and ".". Also, the
+file names should have a length of at least one and at most 255 characters
+(including file name suffix).
 
 These configuration snippets shall be Unix-style text files (i.e. line separation with a single newline character), in the UTF-8 encoding. The configuration snippets are loosely inspired on Grub1's configuration syntax. Lines beginning with '#' shall be ignored and used for commenting. The first word of a line is used as key and shall be separated by one or more spaces from its value. The following keys are known:
 
@@ -171,6 +187,10 @@ extension `.efi`. Support for images of this type is of course specific to
 systems with EFI firmware. Ignore this section if you work on systems not
 supporting EFI.
 
+Type #2 file names should be chosen from the same restricted character set as
+Type #1 described above (but use a different file name suffix of `.efi` instead
+of `.conf`).
+
 Images of this type have the advantage that all metadata and payload that makes
 up the boot entry is monopolized in a single PE file that can be signed
 cryptographically as one for the purpose of EFI SecureBoot.
index 11cc6222e358046efaf5c3cbae371d6167973c62..851676bc2bda1bdcb0d16083cc0968d41f0daf83 100644 (file)
@@ -36,6 +36,8 @@ layout: default
           int a, b, c;
   ```
 
+  (i.e. use double indentation — 16 spaces — for the parameter list.)
+
 - Try to write this:
 
   ```c
@@ -84,7 +86,27 @@ layout: default
 
 - Do not write functions that clobber call-by-reference variables on
   failure. Use temporary variables for these cases and change the passed in
-  variables only on success.
+  variables only on success. The rule is: never clobber return parameters on
+  failure, always initialize return parameters on success.
+
+- Typically, function parameters fit into three categories: input parameters,
+  mutable objects, and call-by-reference return parameters. Input parameters
+  should always carry suitable "const" declarators if they are pointers, to
+  indicate they are input-only and not changed by the function. Return
+  parameters are best prefixed with "ret_", to clarify they are return
+  parameters. (Conversely, please do not prefix parameters that aren't
+  output-only with "ret_", in particular not mutable parameters that are both
+  input as well as output). Example:
+
+  ```c
+  static int foobar_frobnicate(
+                  Foobar* object,            /* the associated mutable object */
+                  const char *input,         /* immutable input parameter */
+                  char **ret_frobnicated) {  /* return parameter */
+          …
+          return 0;
+  }
+  ```
 
 - The order in which header files are included doesn't matter too
   much. systemd-internal headers must not rely on an include order, so it is
@@ -296,6 +318,14 @@ layout: default
   unlink("/foo/bar/baz");
   ```
 
+  When returning from a `void` function, you may also want to shorten the error
+  path boilerplate by returning a function invocation cast to `(void)` like so:
+
+  ```c
+  if (condition_not_met)
+          return (void) log_tests_skipped("Cannot run ...");
+  ```
+
   Don't cast function calls to `(void)` that return no error
   conditions. Specifically, the various `xyz_unref()` calls that return a
   `NULL` object shouldn't be cast to `(void)`, since not using the return value
@@ -307,13 +337,16 @@ layout: default
 ## Logging
 
 - For every function you add, think about whether it is a "logging" function or
-  a "non-logging" function. "Logging" functions do logging on their own,
-  "non-logging" function never log on their own and expect their callers to
-  log. All functions in "library" code, i.e. in `src/shared/` and suchlike must
-  be "non-logging". Every time a "logging" function calls a "non-logging"
-  function, it should log about the resulting errors. If a "logging" function
-  calls another "logging" function, then it should not generate log messages,
-  so that log messages are not generated twice for the same errors.
+  a "non-logging" function. "Logging" functions do (non-debug) logging on their
+  own, "non-logging" function never log on their own (except at debug level)
+  and expect their callers to log. All functions in "library" code, i.e. in
+  `src/shared/` and suchlike must be "non-logging". Every time a "logging"
+  function calls a "non-logging" function, it should log about the resulting
+  errors. If a "logging" function calls another "logging" function, then it
+  should not generate log messages, so that log messages are not generated
+  twice for the same errors. (Note that debug level logging — at syslog level
+  `LOG_DEBUG` — is not considered logging in this context, debug logging is
+  generally always fine and welcome.)
 
 - If possible, do a combined log & return operation:
 
index 40b153359533641b63f20b51c972b57b311bc4c5..980fce3968942f16056d6c49482cf8c92caeb7b5 100644 (file)
@@ -77,7 +77,7 @@ manager, please consider supporting the following interfaces.
    container instance) or creating one scope unit for each container instance
    via systemd's transient unit API (in case you have one container manager
    that manages all instances. Either way, make sure to set `Delegate=yes` in
-   it. This ensures that that the unit you created will be part of all cgroup
+   it. This ensures that the unit you created will be part of all cgroup
    controllers (or at least the ones systemd understands). The latter may also
    be done via `systemd-machined`'s `CreateMachine()` API. Make sure to use the
    cgroup path systemd put your process in for all operations of the container.
@@ -364,7 +364,7 @@ If you write software that wants to detect whether it is run in a container,
 please check `/proc/1/environ` and look for the `container=` environment
 variable. Do not assume the environment variable is inherited down the process
 tree. It generally is not. Hence check the environment block of PID 1, not your
-own. Note though that that file is only accessible to root. systemd hence early
+own. Note though that this file is only accessible to root. systemd hence early
 on also copies the value into `/run/systemd/container`, which is readable for
 everybody. However, that's a systemd-specific interface and other init systems
 are unlikely to do the same.
index 0e021e064c4026effa0b719c3529511d49059e56..fd8e92781890429536f1750620a8b0903fc5d611 100644 (file)
@@ -46,21 +46,29 @@ Interface](https://systemd.io/BOOT_LOADER_INTERFACE).
 | `69dad710-2ce4-4e3c-b16c-21a1d49abed3` | _Root Partition (32-bit ARM)_ | ditto | ditto |
 | `b921b045-1df0-41c3-af44-4c6f280d3fae` | _Root Partition (64-bit ARM/AArch64)_ | ditto | ditto |
 | `993d8d3d-f80e-4225-855a-9daf8ed7ea97` | _Root Partition (Itanium/IA-64)_ | ditto | ditto |
+| `60d5a7fe-8e7d-435c-b714-3dd8162144e1` | _Root Partition (RISC-V 32-bit)_ | ditto | ditto |
+| `72ec70a6-cf74-40e6-bd49-4bda08e8f224` | _Root Partition (RISC-V 64-bit)_ | ditto | ditto |
 | `d13c5d3b-b5d1-422a-b29f-9454fdc89d76` | _Root Verity Partition (x86)_ | A dm-verity superblock followed by hash data | On systems with matching architecture, contains dm-verity integrity hash data for the matching root partition. If this feature is used the partition UUID of the root partition should be the first 128bit of the root hash of the dm-verity hash data, and the partition UUID of this dm-verity partition should be the final 128bit of it, so that the root partition and its verity partition can be discovered easily, simply by specifying the root hash. |
 | `2c7357ed-ebd2-46d9-aec1-23d437ec2bf5` | _Root Verity Partition (x86-64)_ | ditto | ditto |
 | `7386cdf2-203c-47a9-a498-f2ecce45a2d6` | _Root Verity Partition (32-bit ARM)_ | ditto | ditto |
 | `df3300ce-d69f-4c92-978c-9bfb0f38d820` | _Root Verity Partition (64-bit ARM/AArch64)_ | ditto | ditto |
 | `86ed10d5-b607-45bb-8957-d350f23d0571` | _Root Verity Partition (Itanium/IA-64)_  | ditto | ditto |
+| `ae0253be-1167-4007-ac68-43926c14c5de` | _Root Verity Partition (RISC-V 32-bit)_  | ditto | ditto |
+| `b6ed5582-440b-4209-b8da-5ff7c419ea3d` | _Root Verity Partition (RISC-V 64-bit)_  | ditto | ditto |
 | `75250d76-8cc6-458e-bd66-bd47cc81a812` | _`/usr/` Partition (x86)_ | Any native, optionally in LUKS | Similar semantics to root partition, but just the `/usr/` partition. |
 | `8484680c-9521-48c6-9c11-b0720656f69e` | _`/usr/` Partition (x86-64)_ | ditto | ditto |
 | `7d0359a3-02b3-4f0a-865c-654403e70625` | _`/usr/` Partition (32-bit ARM)_ | ditto | ditto |
 | `b0e01050-ee5f-4390-949a-9101b17104e9` | _`/usr/` Partition (64-bit ARM/AArch64)_ | ditto | ditto |
 | `4301d2a6-4e3b-4b2a-bb94-9e0b2c4225ea` | _`/usr/` Partition (Itanium/IA-64)_ | ditto | ditto |
+| `b933fb22-5c3f-4f91-af90-e2bb0fa50702` | _`/usr/` Partition (RISC-V 32-bit)_ | ditto | ditto |
+| `beaec34b-8442-439b-a40b-984381ed097d` | _`/usr/` Partition (RISC-V 64-bit)_ | ditto | ditto |
 | `8f461b0d-14ee-4e81-9aa9-049b6fb97abd` | _`/usr/` Verity Partition (x86)_ | Any native, optionally in LUKS | Similar semantics to root Verity partition, but just for the `/usr/` partition. |
 | `77ff5f63-e7b6-4633-acf4-1565b864c0e6` | _`/usr/` Verity Partition (x86-64)_ | ditto | ditto |
 | `c215d751-7bcd-4649-be90-6627490a4c05` | _`/usr/` Verity Partition (32-bit ARM)_ | ditto | ditto |
 | `6e11a4e7-fbca-4ded-b9e9-e1a512bb664e` | _`/usr/` Verity Partition (64-bit ARM/AArch64)_ | ditto | ditto |
 | `6a491e03-3be7-4545-8e38-83320e0ea880` | _`/usr/` Verity Partition (Itanium/IA-64)_ | ditto | ditto |
+| `cb1ee4e3-8cd0-4136-a0a4-aa61a32e8730` | _`/usr/` Verity Partition (RISC-V 32-bit)_ | ditto | ditto |
+| `8f1056be-9b05-47c4-81d6-be53128e5b54` | _`/usr/` Verity Partition (RISC-V 64-bit)_ | ditto | ditto |
 | `933ac7e1-2eb4-4f13-b844-0e14e2aef915` | _Home Partition_ | Any native, optionally in LUKS | The first partition with this type UUID on the disk containing the root partition is automatically mounted to `/home/`.  If the partition is encrypted with LUKS, the device mapper file will be named `/dev/mapper/home`. |
 | `3b8f8425-20e0-4f3b-907f-1a25a76f98e8` | _Server Data Partition_ | Any native, optionally in LUKS | The first partition with this type UUID on the disk containing the root partition is automatically mounted to `/srv/`.  If the partition is encrypted with LUKS, the device mapper file will be named `/dev/mapper/srv`. |
 | `4d21b016-b534-45c2-a9fb-5c16e091fd2d` | _Variable Data Partition_ | Any native, optionally in LUKS | The first partition with this type UUID on the disk containing the root partition is automatically mounted to `/var/` — under the condition that its partition UUID matches the first 128 bit of `HMAC-SHA256(machine-id, 0x4d21b016b53445c2a9fb5c16e091fd2d)` (i.e. the SHA256 HMAC hash of the binary type UUID keyed by the machine ID as read from [`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/machine-id.html). This special requirement is made because `/var/` (unlike the other partition types listed here) is inherently private to a specific installation and cannot possibly be shared between multiple OS installations on the same disk, and thus should be bound to a specific instance of the OS, identified by its machine ID. If the partition is encrypted with LUKS, the device mapper file will be named `/dev/mapper/var`. |
index 38752c916948690838c47e655d86508f50c50d44..74a71bba9371bdcebe135cab433675cd671adc87 100644 (file)
@@ -83,6 +83,13 @@ All tools:
 * `$SYSTEMD_RDRAND=0` — if set, the RDRAND instruction will never be used,
   even if the CPU supports it.
 
+* `$SYSTEMD_SECCOMP=0` – if set, seccomp filters will not be enforced, even if
+  support for it is compiled in and available in the kernel.
+
+* `$SYSTEMD_LOG_SECCOMP=1` — if set, system calls blocked by seccomp filtering,
+  for example in systemd-nspawn, will be logged to the audit log, if the current
+  kernel version supports this.
+
 systemctl:
 
 * `$SYSTEMCTL_FORCE_BUS=1` — if set, do not connect to PID1's private D-Bus
@@ -93,10 +100,6 @@ systemctl:
 
 * `$SYSTEMCTL_SKIP_SYSV=1` — if set, do not call out to SysV compatibility hooks.
 
-* `$SYSTEMD_LOG_SECCOMP=1` — if set, system calls blocked by seccomp filtering,
-  for example in systemd-nspawn, will be logged to the audit log, if the current
-  kernel version supports this.
-
 systemd-nspawn:
 
 * `$SYSTEMD_NSPAWN_UNIFIED_HIERARCHY=1` — if set, force nspawn into unified
index e87a7580260947dae607853fceb4bb5bf59e8d2b..3910669899fff0c3bbbdbda1c395331e59a6204a 100644 (file)
@@ -517,7 +517,7 @@ _packed_ struct HashTableObject {
 ```
 
 The structure of both DATA_HASH_TABLE and FIELD_HASH_TABLE objects are
-identical. They implement a simple hash table, which each cell containing
+identical. They implement a simple hash table, with each cell containing
 offsets to the head and tail of the singly linked list of the DATA and FIELD
 objects, respectively. DATA's and FIELD's next_hash_offset field are used to
 chain up the objects. Empty cells have both offsets set to 0.
@@ -651,15 +651,15 @@ look up the FIELD object and follow the chain of links to all DATA it includes.
 
 ### Writing
 
-When an entry is appended to the journal for each of its data fields the data
-hash table should be checked. If the data field does not yet exist in the file
-it should be appended and added to the data hash table. When a field data
-object is added the field hash table should be checked for the field name of
+When an entry is appended to the journal, for each of its data fields the data
+hash table should be checked. If the data field does not yet exist in the file,
+it should be appended and added to the data hash table. When a data field's data
+object is added, the field hash table should be checked for the field name of
 the data field, and a field object be added if necessary. After all data fields
 (and recursively all field names) of the new entry are appended and linked up
-in the hashtables the entry object should be appended and linked up too.
+in the hashtables, the entry object should be appended and linked up too.
 
-In regular intervals a tag object should be written if sealing is enabled (see
+At regular intervals a tag object should be written if sealing is enabled (see
 above). Before the file is closed a tag should be written too, to seal it off.
 
 Before writing an object, time and disk space limits should be checked and
index d15bfe117c811cb63d8a00a61bf43b0ee6bcd7cc..0caa5cc04846c47618b595e279a3b25c502772ab 100644 (file)
@@ -102,7 +102,7 @@ And now, here's the list of (hopefully) all APIs that we have introduced with sy
 | [Journal Export Format](https://www.freedesktop.org/wiki/Software/systemd/export) | File format | yes | yes | - | yes | - | no |
 | [Cooperation in cgroup tree](https://www.freedesktop.org/wiki/Software/systemd/PaxControlGroups) | Treaty | yes | yes | libvirt | yes | libvirt | no |
 | [Password Agents](https://systemd.io/PASSWORD_AGENTS/) | Socket+Files | yes | yes | - | yes | - | no |
-| [udev multi-seat properties](https://www.freedesktop.org/wiki/Software/systemd/multiseat) | udev Property | yes | yes | X11, gdm | no | - | no |
+| [udev multi-seat properties](https://www.freedesktop.org/software/systemd/man/sd-login.html) | udev Property | yes | yes | X11, gdm | no | - | no |
 | udev session switch ACL properties | udev Property | no | no | - | no | - | no |
 | [CLI of systemctl,...](https://www.freedesktop.org/software/systemd/man/systemctl.html) | CLI | yes | yes | numerous | no | - | no |
 | [tmpfiles.d](https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html) | File format | yes | yes | numerous | yes | ArchLinux | partially |
index b9bf196ccb123924bec42f0a10a53f81f022b377..a93c0c6418951f90ac60476bd52002d794ed4ebc 100644 (file)
@@ -9,14 +9,14 @@ layout: default
 1. Add all items to NEWS
 2. Update the contributors list in NEWS (`ninja -C build git-contrib`)
 3. Update the time and place in NEWS
-4. Update version and library numbers in `meson.build`
+4. [RC1] Update version and library numbers in `meson.build`
 5. Check dbus docs with `ninja -C build man/update-dbus-docs`
 6. Tag the release: `version=vXXX-rcY && git tag -s "${version}" -m "systemd ${version}"`
 7. Do `ninja -C build`
 8. Make sure that the version string and package string match: `build/systemctl --version`
 9. Upload the documentation: `ninja -C build doc-sync`
-10. [After final release] Close the github milestone and open a new one (https://github.com/systemd/systemd/milestones)
+10. [FINAL] Close the github milestone and open a new one (https://github.com/systemd/systemd/milestones)
 11. "Draft" a new release on github (https://github.com/systemd/systemd/releases/new), mark "This is a pre-release" if appropriate.
 12. Check that announcement to systemd-devel, with a copy&paste from NEWS, was sent. This should happen automatically.
 13. Update IRC topic (`/msg chanserv TOPIC #systemd Version NNN released`)
-14. [After final release] Also push commits to stable, create an empty -stable branch: `git push systemd-stable origin/master:master origin/master:refs/heads/${version}-stable`, and change the default branch to latest release (https://github.com/systemd/systemd-stable/settings/branches).
+14. [FINAL] Push commits to stable, create an empty -stable branch: `git push systemd-stable origin/master:master origin/master:refs/heads/${version}-stable`, and change the default branch to latest release (https://github.com/systemd/systemd-stable/settings/branches).
diff --git a/docs/RESOLVED-VPNS.md b/docs/RESOLVED-VPNS.md
new file mode 100644 (file)
index 0000000..1010bed
--- /dev/null
@@ -0,0 +1,267 @@
+---
+title: systemd-resolved and VPNs
+category: Networking
+layout: default
+---
+
+# `systemd-resolved.service` and VPNs
+
+`systemd-resolved.service` supports routing lookups for specific domains to specific
+interfaces. This is useful for hooking up VPN software with systemd-resolved
+and making sure the exact right lookups end up on the VPN and on the other
+interfaces.
+
+For a verbose explanation of `systemd-resolved.service`'s domain routing logic,
+see its [man
+page](https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html). This
+document is supposed to provide examples to use the concepts for the specific
+purpose of managing VPN DNS configuration.
+
+Let's first define two distinct VPN use-cases:
+
+1. *Corporate* VPNs, i.e. VPNs that open access to a specific set of additional
+   hosts. Only specific domains should be resolved via the VPN's DNS servers,
+   and everything that is not related to the company's domain names should go
+   to regular, non-VPN DNS instead.
+
+2. *Privacy* VPNs, i.e. VPNs that should be used for basically all DNS traffic,
+   once they are up. If this type of VPN is used, any regular, non-VPN DNS
+   servers should not get any traffic anymore.
+
+Then, let's briefly introduce three DNS routing concepts that software managing
+a network interface may configure.
+
+1. Search domains: these are traditional DNS configuration parameters and are
+   used to suffix non-qualified domain names (i.e. single-label ones), to turn
+   them into fully qualified domain names. Traditionally (before
+   `systemd-resolved.service`), search domain names are attached to a system's
+   IP configuration as a whole, in `systemd-resolved.service` they are
+   associated to individual interfaces instead, since they are typically
+   acquired through some network associated concept, such as a DHCP, IPv6RA or
+   PPP lease. Most importantly though: in `systemd-resolved.service` they are
+   not just used to suffix single-label domain names, but also for routing
+   domain name lookups: if a network interface has a search domain `foo.com`
+   configured on it, then any lookups for names ending in `.foo.com` (or for
+   `foo.com` itself) are preferably routed to the DNS servers configured on the
+   same network interface.
+
+2. Routing domains: these are very similar to search domains, but are purely
+   about DNS domain name lookup routing — they are not used for qualifying
+   single-label domain names. When it comes to routing assigning a routing
+   domain to a network interface is identical to assigning a search domain to
+   it.
+
+   Why the need to have both concepts, i.e. search *and* routing domains?
+   Mostly because in many cases the qualifying of single-label names is not
+   desirable (since security-sensitive), but needs to be supported for specific
+   use-cases. Routing domains are a concept `systemd-resolved.service`
+   introduced, while search domains are traditionally available and are part of
+   DHCP/IPv6RA/PPP leases and thus universally supported. In many cases routing
+   domains are probably the more appropriate concept, but not easily available,
+   since not part of DHCP/IPv6RA/PPP.
+
+   Routing domains for `systemd-resolved.service` are usually presented along
+   with search domains in mostly the same way, but prefixed with `~` to
+   differentiate them. i.e. `~foo.com` is a configured routing domain, while
+   `foo.com` would be a configured search domain.
+
+   One routing domain is particular interesting: `~.` — the catch-all routing
+   domain. (The *dot* domain `.` is how DNS denotes the "root" domain, i.e. the
+   parent domain of all domains, but itself.) When used on an interface any DNS
+   traffic is preferably routed to its DNS servers. (A search domain – i.e. `.`
+   instead of `~.` — would have the same effect, but given that it's mostly
+   pointless to suffix an unqualified domain with `.`, we generally declare it
+   as a routing domain, not a search domain).
+
+   Routing domains also have particular relevance when it comes to the reverse
+   lookup DNS domains `.in-addr.arpa` and `.ip6.arpa`. An interface that has
+   these (or sub-domains thereof) defined as routing domains, will be preferably
+   used for doing reverse IP to domain name lookups. e.g. declaring
+   `~168.192.in-addr.arpa` on an interface means that all lookups to find the
+   domain names for IPv4 addresses 192.168.x.y are preferable routed to it.
+
+3. The `default-route` boolean. This is a simple boolean value that may be set
+   on an interface. If true (the default), any DNS lookups for which no
+   matching routing or search domains are defined are routed to interfaces
+   marked like this. If false then the DNS servers on this interface are not
+   considered for routing lookups to except for the ones listed in the
+   search/routing domain list. An interface that has no search/routing domain
+   associated and also has this boolean off is not considered for *any*
+   lookups.
+
+One more thing to mention: in `systemd-resolved.service` if lookups match the
+search/routing domains of multiple interfaces at once, then they are sent to
+all of them in parallel, and the first positive reply used. If all lookups fail
+the last negative reply is used. This means the DNS zones on the relevant
+interfaces are "merged": domains existing on one but not the other will "just
+work" and vice versa.
+
+And one more note: the domain routing logic implemented is a tiny bit more
+complex that what described above: if there two interfaces have search domains
+that are suffix of each other, and a name is looked up that matches both, the
+interface with the longer match will win and get the lookup routed to is DNS
+servers. Only if the match has the same length, then both will be used in
+parallel. Example: one interface has `~foo.example.com` as routing domain, and
+another one `example.com` has search domain. A lookup for
+`waldo.foo.example.com` is the exclusively routed to the first interface's DNS
+server, since it matches by three suffix labels instead of just two. The fact
+that the matching length is taken into consideration for the routing decision
+is particularly relevant if you have one interface with the `~.` routing domain
+and another one with `~corp.company.example` — both suffixes match a lookup for
+`foo.corp.company.example`, but the latter interface wins, since the match is
+for four labels, while the other is for zero labels.
+
+# Putting it Together
+
+Let's discuss how the three DNS routing concepts above are best used for a
+reasonably complex scenario consisting of:
+
+1. One VPN interface of the *corporate* kind, maybe called `company0`. It makes
+   available a bunch of servers, all in the domain `corp.company.example`.
+
+2. One VPN interface of the *privacy* kind, maybe called `privacy0`. When it is
+   up all DNS traffic shall preferably routed to its DNS servers.
+
+3. One regular WiFi interface, maybe called `wifi0`. It has a regular DNS
+   server on it.
+
+Here's how to best configure this for `systemd-resolved.service`:
+
+1. `company0` should get a routing domain `~corp.company.example`
+   configured. (A search domain `corp.company.example` would work too, if
+   qualifying of single-label names is desired or the VPN lease information
+   does not provide for the concept of routing domains, but does support search
+   domains.) This interface should also set `default-route` to false, to ensure
+   that really only the DNS lookups for the company's servers are routed there
+   and nothing else. Finally, it might make sense to also configure a routing
+   domain `~2.0.192.in-addr.arpa` on the interface, ensuring that all IPv4
+   addresses from the 192.0.2.x range are preferably resolved via the DNS
+   server on this interface (assuming that that's the IPv4 address range the
+   company uses internally).
+
+2. `privacy0` should get a routing domain `~.` configured. The setting of
+   `default-route` for this interface is then irrelevant. This means: once the
+   interface is up, all DNS traffic is preferably routed there.
+
+3. `wifi0` should not get any special settings, except possibly whatever the
+   local WiFi router considers suitable as search domain, for example
+   `fritz.box`. The default `true` setting for `default-route` is good too.
+
+With this configuration if only `wifi0` is up, all DNS traffic goes to its DNS
+server, since there are no other interfaces with better matching DNS
+configuration. If `privacy0` is then upped, all DNS traffic will exclusively go
+to this interface now — with the exception of names below the `fritz.box`
+domain, which will continue to go directly to `wifi0`, as the search domain
+there says so. Now, if `company0` is also upped, it will receive DNS traffic
+for the company's internal domain and internal IP subnet range, but nothing
+else.  If `privacy0` is then downed again, `wifi0` will get the regular DNS
+traffic again, and `company0` will still get the company's internal domain and
+IP subnet traffic and nothing else. Everything hence works as intended.
+
+# How to Implement this in Your VPN Software
+
+Most likely you want to expose a boolean in some way that declares whether a
+specific VPN is of the *corporate* or the *privacy* kind:
+
+1. If managing a *corporate* VPN, you configure any search domains the user or
+   the VPN contact point provided. And you set `default-route` to false. If you
+   have IP subnet information for the VPN, it might make sense to insert
+   `~….in-addr.arpa` and `~….ip6.arpa` reverse lookup routing domains for it.
+
+2. If managing a *privacy* VPN, you include `~.` in the routing domains, the
+   value for `default-route` is actually irrelevant, but I'd set it to true. No
+   need to configure any reverse lookup routing domains for it.
+
+(If you also manage regular WiFi/Ethernet devices, just configure them as
+traditional, i.e. with any search domains as acquired, do not set `~.` though,
+and do not disable `default-route`.)
+
+# The APIs
+
+Now we determined how we want to configure things, but how do you actually get
+the configuration to `systemd-resolved.service`? There are three relevant
+interfaces:
+
+1. Ideally, you use D-Bus and talk to [`systemd-resolved.service`'s D-Bus
+   API](https://www.freedesktop.org/software/systemd/man/org.freedesktop.resolve1.html)
+   directly. Use `SetLinkDomains()` to set the per-interface search and routing
+   domains on the interfaces you manage, and `SetLinkDefaultRoute()` to manage
+   the `default-route` boolean, all on the `org.freedesktop.resolve1.Manager`
+   interface of the `/org/freedesktop/resolve1` object.
+
+2. If that's not in the cards, you may shell out to
+   [`resolvectl`](https://www.freedesktop.org/software/systemd/man/resolvectl.html),
+   which is a thin wrapper around the D-Bus interface mentioned above. Use
+   `resolvectl domain <iface> …` to set the search/routing domains and
+   `resolvectl default-route <iface> …` to set the `default-route` boolean.
+
+   Example use from a shell callout of your VPN software for a *corporate* VPN:
+
+        resolvectl domain corporate0 '~corp-company.example' '~2.0.192.in-addr.arpa'
+        resolvectl default-route corporate0 false
+        resolvectl dns corporate0 192.0.2.1
+
+   Example use from a shell callout of your VPN software for a *privacy* VPN:
+
+        resolvectl domain privacy0 '~.'
+        resolvectl default-route privacy0 true
+        resolvectl dns privacy0 8.8.8.8
+
+3. If you don't want to use any `systemd-resolved` commands, you may use the
+   `resolvconf` wrapper we provide. `resolvectl` is actually a multi-call
+   binary and may be symlinked to `resolvconf`, and when invoked like that
+   behaves in a way that is largely compatible with FreeBSD's and
+   Ubuntu's/Debian's
+   [`resolvconf(8)`](https://manpages.ubuntu.com/manpages/trusty/man8/resolvconf.8.html)
+   tool. When the `-x` switch is specified, the `~.` routing domain is
+   automatically appended to the domain list configured, as appropriate for a
+   *privacy* VPN. Note that the `resolvconf` interface only covers *privacy*
+   VPNs and regular network interfaces (such as WiFi or Ethernet) well. The
+   *corporate* kind of VPN is not well covered, since the interface cannot
+   propagate the `default-route` boolean, nor can be used to configure the
+   `~….in-addr.arpa` or `~.ip6.arpa` routing domains.
+
+# Ordering
+
+When configuring per-interface DNS configuration settings it is wise to
+configure everything *before* actually upping the interface. Once the interface
+is up `systemd-resolved.service` might start using it, and hence it's important
+to have everything configured properly (this is particularly relevant when
+LLMNR or MulticastDNS is enabled, since that works without any explicitly
+configured DNS configuration). It is also wise to configure search/routing
+domains and the `default-route` boolean *before* configuring the DNS servers,
+as the former without the latter has no effect, but the latter without the
+former will result in DNS traffic possibly being generated, in a non-desirable
+way given that the routing information is not set yet.
+
+# Downgrading Search Domains to Routing Domains
+
+Many VPN implementations provide a way how VPN servers can inform VPN clients
+about search domains to use. In some cases it might make sense to install those
+as routing domains instead of search domains. Unqualified domain names usually
+imply a context of locality: the same unqualified name typically is expected to
+resolve to one system in one local network, and to another one in a different
+network.  Search domains thus generally come with security implications: they
+might cause that unqualified domains are resolved in a different (possibly
+remote) context, contradicting user expectations. Thus it might be wise to
+downgrade *search domains* provided by VPN servers to *routing domains*, so
+that local unqualified name resolution remains untouched and strictly maintains
+its local focus — in particular in the aforementioned less trusted *corporate*
+VPN scenario.
+
+To illustrate this further, here's an example for an attack scenario using
+search domains: a user assumes the printer system they daily contact under the
+unqualified name "printer" is the network printer in their basement (with the
+fully qualified domain name "printer.home"). Sometimes the user joins the
+corporate VPN of their employer, which comes with a search domain
+"foocorp.example", so that the user's confidential documents (maybe a job
+application to a competing company) might end up being printed on
+"printer.foocorp.example" instead of "printer.home". If the local VPN software
+had downgraded the VPN's search domain to a routing domain "~foocorp.example",
+this mismapping would not have happened.
+
+When connecting to untrusted WiFi networks it might be wise to go one step
+further even: suppress installation of search/routing domains by the network
+entirely, to ensure that the local DNS information is only used for name
+resolution of qualified names and only when no better DNS configuration is
+available.
index f8ff413d28f4f8aecae9edde484b7ebafef1e124..50b9a42fa11d00d7a426debf53d9d0a7778c4509 100644 (file)
@@ -270,6 +270,9 @@ All cgroup/resource control settings are available for transient units
 ✓ IPAccounting=
 ✓ IPAddressAllow=
 ✓ IPAddressDeny=
+✓ ManagedOOMSwap=
+✓ ManagedOOMMemoryPressure=
+✓ ManagedOOMMemoryPressureLimitPercent=
 ```
 
 ## Process Killing Settings
@@ -371,6 +374,7 @@ Most timer unit settings are available to transient units.
 ✓ RemainAfterElapse=
 ✓ AccuracySec=
 ✓ RandomizedDelaySec=
+✓ FixedRandomDelay=
   Unit=
 ```
 
index fbac59ae498cfe50702ce73d433c3cf858725567..261bd68ca39a764e18b3c777571767cd49e7a943 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 file = configure_file(
         input : 'README.in',
index 81b786543885955d5f46811f64de374b6dc9d4af..ba7957711dd6d955332a9f775756d7283a76affb 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 if conf.get('HAVE_SYSV_COMPAT') == 1 and get_option('create-log-dirs')
         install_data('README',
index ba8f4c215e3db370321c02a5bccf21569077c72c..dba1cc6f894a716eec940944a59b54ffb16e1f6a 100644 (file)
@@ -6597,7 +6597,7 @@ OUI:0008AF*
  ID_OUI_FROM_DATABASE=Novatec Corporation
 
 OUI:0008B0*
- ID_OUI_FROM_DATABASE=BKtel communications GmbH
+ ID_OUI_FROM_DATABASE=HUBER+SUHNER BKtel GmbH
 
 OUI:0008B1*
  ID_OUI_FROM_DATABASE=ProQuent Systems
@@ -14187,7 +14187,7 @@ OUI:001292*
  ID_OUI_FROM_DATABASE=Griffin Technology
 
 OUI:001293*
- ID_OUI_FROM_DATABASE=GE Energy
+ ID_OUI_FROM_DATABASE=ABB Power Protection (CH)
 
 OUI:001294*
  ID_OUI_FROM_DATABASE=SUMITOMO ELECTRIC DEVICE INNOVATIONS, INC
@@ -14265,7 +14265,7 @@ OUI:0012AC*
  ID_OUI_FROM_DATABASE=ONTIMETEK INC.
 
 OUI:0012AD*
- ID_OUI_FROM_DATABASE=IDS GmbH
+ ID_OUI_FROM_DATABASE=VIVAVIS AG
 
 OUI:0012AE*
  ID_OUI_FROM_DATABASE=HLS HARD-LINE Solutions Inc.
@@ -21390,7 +21390,7 @@ OUI:001BC502F*
  ID_OUI_FROM_DATABASE=Fibrain Co. Ltd.
 
 OUI:001BC5030*
- ID_OUI_FROM_DATABASE=OctoGate it Security Systems GmbH
+ ID_OUI_FROM_DATABASE=OctoGate IT Security Systems GmbH
 
 OUI:001BC5031*
  ID_OUI_FROM_DATABASE=ADIXEIN LIMITED
@@ -26052,7 +26052,7 @@ OUI:00213D*
  ID_OUI_FROM_DATABASE=Cermetek Microelectronics, Inc.
 
 OUI:00213E*
- ID_OUI_FROM_DATABASE=TomTom
+ ID_OUI_FROM_DATABASE=TomTom International BV
 
 OUI:00213F*
  ID_OUI_FROM_DATABASE=A-Team Technology Ltd.
@@ -29592,7 +29592,7 @@ OUI:0025DE*
  ID_OUI_FROM_DATABASE=Probits Co., LTD.
 
 OUI:0025DF*
- ID_OUI_FROM_DATABASE=Private
+ ID_OUI_FROM_DATABASE=Taser International Inc.
 
 OUI:0025E0*
  ID_OUI_FROM_DATABASE=CeedTec Sdn Bhd
@@ -31412,6 +31412,9 @@ OUI:0035FF*
 OUI:003676*
  ID_OUI_FROM_DATABASE=ARRIS Group, Inc.
 
+OUI:0036BE*
+ ID_OUI_FROM_DATABASE=Northwest Towers
+
 OUI:0036F8*
  ID_OUI_FROM_DATABASE=Conti Temic microelectronic GmbH
 
@@ -31460,6 +31463,9 @@ OUI:003CC5*
 OUI:003D41*
  ID_OUI_FROM_DATABASE=Hatteland Computer AS
 
+OUI:003DE1*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:003DE8*
  ID_OUI_FROM_DATABASE=LG Electronics (Mobile Communications)
 
@@ -33128,6 +33134,9 @@ OUI:005D73*
 OUI:005E0C*
  ID_OUI_FROM_DATABASE=HMD Global Oy
 
+OUI:005F67*
+ ID_OUI_FROM_DATABASE=TP-Link Corporation Limited
+
 OUI:005F86*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
@@ -33977,6 +33986,9 @@ OUI:006967D*
 OUI:006967E*
  ID_OUI_FROM_DATABASE=Tianjin Lianwu Technology Co., Ltd.
 
+OUI:006B6F*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:006B8E*
  ID_OUI_FROM_DATABASE=Shanghai Feixun Communication Co.,Ltd.
 
@@ -34065,7 +34077,7 @@ OUI:00778D*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
 OUI:0077E4*
- ID_OUI_FROM_DATABASE=Nokia
+ ID_OUI_FROM_DATABASE=Nokia Solutions and Networks GmbH & Co. KG
 
 OUI:007888*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
@@ -36501,7 +36513,7 @@ OUI:00A0FA*
  ID_OUI_FROM_DATABASE=Marconi Communication GmbH
 
 OUI:00A0FB*
- ID_OUI_FROM_DATABASE=TORAY ENGINEERING CO., LTD.
+ ID_OUI_FROM_DATABASE=Toray Engineering D Solutions Co., Ltd.
 
 OUI:00A0FC*
  ID_OUI_FROM_DATABASE=IMAGE SCIENCES, INC.
@@ -38468,6 +38480,9 @@ OUI:00DB70*
 OUI:00DBDF*
  ID_OUI_FROM_DATABASE=Intel Corporate
 
+OUI:00DCB2*
+ ID_OUI_FROM_DATABASE=Extreme Networks, Inc.
+
 OUI:00DD00*
  ID_OUI_FROM_DATABASE=UNGERMANN-BASS INC.
 
@@ -39359,6 +39374,9 @@ OUI:00F22C*
 OUI:00F28B*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
+OUI:00F361*
+ ID_OUI_FROM_DATABASE=Amazon Technologies Inc.
+
 OUI:00F3DB*
  ID_OUI_FROM_DATABASE=WOO Sports
 
@@ -39638,6 +39656,9 @@ OUI:0446CF*
 OUI:04489A*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
+OUI:04495D*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:044A50*
  ID_OUI_FROM_DATABASE=Ramaxel Technology (Shenzhen) limited company
 
@@ -39845,9 +39866,15 @@ OUI:047863*
 OUI:047970*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
+OUI:047975*
+ ID_OUI_FROM_DATABASE=Honor Device Co., Ltd.
+
 OUI:0479B7*
  ID_OUI_FROM_DATABASE=Texas Instruments
 
+OUI:047A0B*
+ ID_OUI_FROM_DATABASE=Beijing Xiaomi Electronics Co., Ltd.
+
 OUI:047D50*
  ID_OUI_FROM_DATABASE=Shenzhen Kang Ying Technology Co.Ltd.
 
@@ -40301,6 +40328,9 @@ OUI:04EE91*
 OUI:04F021*
  ID_OUI_FROM_DATABASE=Compex Systems Pte Ltd
 
+OUI:04F03E*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:04F128*
  ID_OUI_FROM_DATABASE=HMD Global Oy
 
@@ -40334,6 +40364,9 @@ OUI:04F8F8*
 OUI:04F938*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
+OUI:04F993*
+ ID_OUI_FROM_DATABASE=Infinix mobility limited
+
 OUI:04F9D9*
  ID_OUI_FROM_DATABASE=Speaker Electronic(Jiashan) Co.,Ltd
 
@@ -41135,6 +41168,9 @@ OUI:0876FF*
 OUI:087808*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
+OUI:08798C*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:087999*
  ID_OUI_FROM_DATABASE=AIM GmbH
 
@@ -41222,11 +41258,14 @@ OUI:089758*
 OUI:089798*
  ID_OUI_FROM_DATABASE=COMPAL INFORMATION (KUNSHAN) CO., LTD.
 
+OUI:089AC7*
+ ID_OUI_FROM_DATABASE=zte corporation
+
 OUI:089B4B*
  ID_OUI_FROM_DATABASE=iKuai Networks
 
 OUI:089BB9*
- ID_OUI_FROM_DATABASE=Nokia
+ ID_OUI_FROM_DATABASE=Nokia Solutions and Networks GmbH & Co. KG
 
 OUI:089C86*
  ID_OUI_FROM_DATABASE=Nokia Shanghai Bell Co., Ltd.
@@ -41285,6 +41324,9 @@ OUI:08B2A3*
 OUI:08B3AF*
  ID_OUI_FROM_DATABASE=vivo Mobile Communication Co., Ltd.
 
+OUI:08B4B1*
+ ID_OUI_FROM_DATABASE=Google, Inc.
+
 OUI:08B4CF*
  ID_OUI_FROM_DATABASE=Abicom International
 
@@ -41537,6 +41579,9 @@ OUI:08FC88*
 OUI:08FD0E*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
+OUI:08FF24*
+ ID_OUI_FROM_DATABASE=Shenzhen Skyworth  Digital  Technology  CO., Ltd
+
 OUI:0C01DB*
  ID_OUI_FROM_DATABASE=Infinix mobility limited
 
@@ -41585,6 +41630,9 @@ OUI:0C17F1*
 OUI:0C191F*
  ID_OUI_FROM_DATABASE=Inform Electronik
 
+OUI:0C19F8*
+ ID_OUI_FROM_DATABASE=Apple, Inc.
+
 OUI:0C1A10*
  ID_OUI_FROM_DATABASE=Acoustic Stream
 
@@ -41735,6 +41783,9 @@ OUI:0C4F5A*
 OUI:0C5101*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
+OUI:0C51D0*
+ ID_OUI_FROM_DATABASE=Altice Labs S.A.
+
 OUI:0C51F7*
  ID_OUI_FROM_DATABASE=CHAUVIN ARNOUX
 
@@ -41825,6 +41876,9 @@ OUI:0C722C*
 OUI:0C72D9*
  ID_OUI_FROM_DATABASE=zte corporation
 
+OUI:0C7329*
+ ID_OUI_FROM_DATABASE=Sercomm Corporation.
+
 OUI:0C73BE*
  ID_OUI_FROM_DATABASE=Dongguan Haimai Electronie Technology Co.,Ltd
 
@@ -41895,7 +41949,7 @@ OUI:0C7A15*
  ID_OUI_FROM_DATABASE=Intel Corporate
 
 OUI:0C7C28*
- ID_OUI_FROM_DATABASE=Nokia
+ ID_OUI_FROM_DATABASE=Nokia Solutions and Networks GmbH & Co. KG
 
 OUI:0C7D7C*
  ID_OUI_FROM_DATABASE=Kexiang Information Technology Co, Ltd.
@@ -41987,6 +42041,9 @@ OUI:0C924E*
 OUI:0C9301*
  ID_OUI_FROM_DATABASE=PT. Prasimax Inovasi Teknologi
 
+OUI:0C938F*
+ ID_OUI_FROM_DATABASE=GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD
+
 OUI:0C93FB*
  ID_OUI_FROM_DATABASE=BNS Solutions
 
@@ -41996,6 +42053,9 @@ OUI:0C9541*
 OUI:0C96BF*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
+OUI:0C96CD*
+ ID_OUI_FROM_DATABASE=MERCURY CORPORATION
+
 OUI:0C96E6*
  ID_OUI_FROM_DATABASE=Cloud Network Technology (Samoa) Limited
 
@@ -42887,6 +42947,9 @@ OUI:108EBA*
 OUI:108EE0*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
+OUI:108FFE*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:109266*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
@@ -43082,6 +43145,9 @@ OUI:10CE45*
 OUI:10CEA9*
  ID_OUI_FROM_DATABASE=Texas Instruments
 
+OUI:10CEE9*
+ ID_OUI_FROM_DATABASE=Apple, Inc.
+
 OUI:10D07A*
  ID_OUI_FROM_DATABASE=AMPAK Technology, Inc.
 
@@ -43199,6 +43265,9 @@ OUI:10E953*
 OUI:10EA59*
  ID_OUI_FROM_DATABASE=Cisco SPVTG
 
+OUI:10EC81*
+ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
+
 OUI:10EED9*
  ID_OUI_FROM_DATABASE=Canoga Perkins Corporation
 
@@ -43337,6 +43406,9 @@ OUI:14169E*
 OUI:141877*
  ID_OUI_FROM_DATABASE=Dell Inc.
 
+OUI:1418C3*
+ ID_OUI_FROM_DATABASE=Intel Corporate
+
 OUI:141A51*
  ID_OUI_FROM_DATABASE=Treetech Sistemas Digitais
 
@@ -43412,6 +43484,9 @@ OUI:142233*
 OUI:1422DB*
  ID_OUI_FROM_DATABASE=eero inc.
 
+OUI:14230A*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:1423D7*
  ID_OUI_FROM_DATABASE=EUTRONIX CO., LTD.
 
@@ -43502,6 +43577,9 @@ OUI:143EBF*
 OUI:143F27*
  ID_OUI_FROM_DATABASE=Noccela Oy
 
+OUI:143FA6*
+ ID_OUI_FROM_DATABASE=Sony Home Entertainment&Sound Products Inc
+
 OUI:143FC3*
  ID_OUI_FROM_DATABASE=SnapAV
 
@@ -43520,6 +43598,9 @@ OUI:144319*
 OUI:14444A*
  ID_OUI_FROM_DATABASE=Apollo Seiko Ltd.
 
+OUI:144658*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:1446E4*
  ID_OUI_FROM_DATABASE=AVISTEL
 
@@ -43646,6 +43727,9 @@ OUI:145BE1*
 OUI:145E45*
  ID_OUI_FROM_DATABASE=Bamboo Systems Group
 
+OUI:145E69*
+ ID_OUI_FROM_DATABASE=GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD
+
 OUI:145F94*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
@@ -43766,6 +43850,9 @@ OUI:1495CE*
 OUI:1496E5*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
+OUI:149877*
+ ID_OUI_FROM_DATABASE=Apple, Inc.
+
 OUI:14987D*
  ID_OUI_FROM_DATABASE=Technicolor CH USA Inc.
 
@@ -43811,6 +43898,9 @@ OUI:14A32F*
 OUI:14A364*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
+OUI:14A3B4*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:14A51A*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
@@ -43901,6 +43991,9 @@ OUI:14B126*
 OUI:14B1C8*
  ID_OUI_FROM_DATABASE=InfiniWing, Inc.
 
+OUI:14B2E5*
+ ID_OUI_FROM_DATABASE=Shenzhen iComm Semiconductor CO.,LTD
+
 OUI:14B31F*
  ID_OUI_FROM_DATABASE=Dell Inc.
 
@@ -43991,6 +44084,9 @@ OUI:14D11F*
 OUI:14D169*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
+OUI:14D19E*
+ ID_OUI_FROM_DATABASE=Apple, Inc.
+
 OUI:14D4FE*
  ID_OUI_FROM_DATABASE=ARRIS Group, Inc.
 
@@ -44027,6 +44123,9 @@ OUI:14E7C8*
 OUI:14E9B2*
  ID_OUI_FROM_DATABASE=Fiberhome Telecommunication Technologies Co.,LTD
 
+OUI:14EB08*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:14EB33*
  ID_OUI_FROM_DATABASE=BSMediasoft Co., Ltd.
 
@@ -44144,6 +44243,9 @@ OUI:181420*
 OUI:181456*
  ID_OUI_FROM_DATABASE=Nokia Corporation
 
+OUI:18146C*
+ ID_OUI_FROM_DATABASE=Zhejiang Tmall Technology Co., Ltd.
+
 OUI:1816C9*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
@@ -44153,6 +44255,9 @@ OUI:181714*
 OUI:181725*
  ID_OUI_FROM_DATABASE=Cameo Communications, Inc.
 
+OUI:18188B*
+ ID_OUI_FROM_DATABASE=FUJITSU CONNECTED TECHNOLOGIES LIMITED
+
 OUI:18193F*
  ID_OUI_FROM_DATABASE=Tamtron Oy
 
@@ -44463,7 +44568,7 @@ OUI:1868CB*
  ID_OUI_FROM_DATABASE=Hangzhou Hikvision Digital Technology Co.,Ltd.
 
 OUI:1869D8*
- ID_OUI_FROM_DATABASE=HANGZHOU AIXIANGJI TECHNOLOGY CO., LTD
+ ID_OUI_FROM_DATABASE=Tuya Smart Inc.
 
 OUI:1869DA*
  ID_OUI_FROM_DATABASE=China Mobile Group Device Co.,Ltd.
@@ -44804,6 +44909,9 @@ OUI:18CC23*
 OUI:18CC88*
  ID_OUI_FROM_DATABASE=Hitachi Johnson Controls Air
 
+OUI:18CE94*
+ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
+
 OUI:18CF24*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
@@ -45209,6 +45317,9 @@ OUI:1C36BB*
 OUI:1C37BF*
  ID_OUI_FROM_DATABASE=Cloudium Systems Ltd.
 
+OUI:1C3929*
+ ID_OUI_FROM_DATABASE=OHSUNG
+
 OUI:1C3947*
  ID_OUI_FROM_DATABASE=COMPAL INFORMATION (KUNSHAN) CO., LTD.
 
@@ -46034,6 +46145,9 @@ OUI:1CCCD6*
 OUI:1CCDE5*
  ID_OUI_FROM_DATABASE=Shanghai Wind Technologies Co.,Ltd
 
+OUI:1CD1BA*
+ ID_OUI_FROM_DATABASE=Fiberhome Telecommunication Technologies Co.,LTD
+
 OUI:1CD40C*
  ID_OUI_FROM_DATABASE=Kriwan Industrie-Elektronik GmbH
 
@@ -46250,6 +46364,9 @@ OUI:200A5E*
 OUI:200BC7*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
+OUI:200BCF*
+ ID_OUI_FROM_DATABASE=Nintendo Co.,Ltd
+
 OUI:200CC8*
  ID_OUI_FROM_DATABASE=NETGEAR
 
@@ -46569,7 +46686,7 @@ OUI:20780B*
  ID_OUI_FROM_DATABASE=Delta Faucet Company
 
 OUI:207852*
- ID_OUI_FROM_DATABASE=Nokia
+ ID_OUI_FROM_DATABASE=Nokia Solutions and Networks GmbH & Co. KG
 
 OUI:2078F0*
  ID_OUI_FROM_DATABASE=Apple, Inc.
@@ -46910,6 +47027,9 @@ OUI:20EE28*
 OUI:20EEC6*
  ID_OUI_FROM_DATABASE=Elefirst Science & Tech Co ., ltd
 
+OUI:20EFBD*
+ ID_OUI_FROM_DATABASE=Roku, Inc
+
 OUI:20F002*
  ID_OUI_FROM_DATABASE=MTData Developments Pty. Ltd.
 
@@ -46961,6 +47081,9 @@ OUI:20FECD*
 OUI:20FEDB*
  ID_OUI_FROM_DATABASE=M2M Solution S.A.S.
 
+OUI:20FF36*
+ ID_OUI_FROM_DATABASE=IFLYTEK CO.,LTD.
+
 OUI:2400BA*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
@@ -47009,6 +47132,9 @@ OUI:240B0A*
 OUI:240B2A*
  ID_OUI_FROM_DATABASE=Viettel Group
 
+OUI:240B88*
+ ID_OUI_FROM_DATABASE=Taicang T&W Electronics
+
 OUI:240BB1*
  ID_OUI_FROM_DATABASE=KOSTAL Industrie Elektrik GmbH
 
@@ -47288,6 +47414,9 @@ OUI:245A4C*
 OUI:245AB5*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
+OUI:245B83*
+ ID_OUI_FROM_DATABASE=Renesas Electronics (Penang) Sdn. Bhd.
+
 OUI:245BA7*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
@@ -47687,12 +47816,18 @@ OUI:24E314*
 OUI:24E43F*
  ID_OUI_FROM_DATABASE=Wenzhou Kunmei Communication Technology Co.,Ltd.
 
+OUI:24E4C8*
+ ID_OUI_FROM_DATABASE=Fiberhome Telecommunication Technologies Co.,LTD
+
 OUI:24E5AA*
  ID_OUI_FROM_DATABASE=Philips Oral Healthcare, Inc.
 
 OUI:24E6BA*
  ID_OUI_FROM_DATABASE=JSC Zavod im. Kozitsky
 
+OUI:24E927*
+ ID_OUI_FROM_DATABASE=TomTom International BV
+
 OUI:24E9B3*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
@@ -47714,6 +47849,9 @@ OUI:24EC99*
 OUI:24ECD6*
  ID_OUI_FROM_DATABASE=CSG Science & Technology Co.,Ltd.Hefei
 
+OUI:24EDFD*
+ ID_OUI_FROM_DATABASE=Siemens Canada Limited
+
 OUI:24EE3A*
  ID_OUI_FROM_DATABASE=Chengdu Yingji Electronic Hi-tech Co Ltd
 
@@ -47777,6 +47915,9 @@ OUI:2802D8*
 OUI:2804E0*
  ID_OUI_FROM_DATABASE=FERMAX ELECTRONICA S.A.U.
 
+OUI:28052E*
+ ID_OUI_FROM_DATABASE=Dematic Corp
+
 OUI:28061E*
  ID_OUI_FROM_DATABASE=NINGBO GLOBAL USEFUL ELECTRIC CO.,LTD
 
@@ -47840,6 +47981,9 @@ OUI:281878*
 OUI:2818FD*
  ID_OUI_FROM_DATABASE=Aditya Infotech Ltd.
 
+OUI:281B04*
+ ID_OUI_FROM_DATABASE=Zalliant LLC
+
 OUI:282246*
  ID_OUI_FROM_DATABASE=Beijing Sinoix Communication Co., LTD
 
@@ -49340,6 +49484,9 @@ OUI:2C768A*
 OUI:2C780E*
  ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
 
+OUI:2C793D*
+ ID_OUI_FROM_DATABASE=Boditech Med
+
 OUI:2C79D7*
  ID_OUI_FROM_DATABASE=Sagemcom Broadband SAS
 
@@ -49445,6 +49592,9 @@ OUI:2CA30E*
 OUI:2CA539*
  ID_OUI_FROM_DATABASE=Parallel Wireless, Inc
 
+OUI:2CA59C*
+ ID_OUI_FROM_DATABASE=Hangzhou Hikvision Digital Technology Co.,Ltd.
+
 OUI:2CA780*
  ID_OUI_FROM_DATABASE=True Technologies Inc.
 
@@ -49616,6 +49766,9 @@ OUI:2CD141F*
 OUI:2CD1DA*
  ID_OUI_FROM_DATABASE=Sanjole, Inc.
 
+OUI:2CD26B*
+ ID_OUI_FROM_DATABASE=FN-LINK TECHNOLOGY LIMITED
+
 OUI:2CD2E3*
  ID_OUI_FROM_DATABASE=Guangzhou Aoshi Electronic Co.,Ltd
 
@@ -50081,6 +50234,9 @@ OUI:304B07*
 OUI:304C7E*
  ID_OUI_FROM_DATABASE=Panasonic Electric Works Automation Controls Techno Co.,Ltd.
 
+OUI:304E1B*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:304EC3*
  ID_OUI_FROM_DATABASE=Tianjin Techua Technology Co., Ltd.
 
@@ -50858,6 +51014,9 @@ OUI:342FBD*
 OUI:343111*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
+OUI:34318F*
+ ID_OUI_FROM_DATABASE=Apple, Inc.
+
 OUI:3431C4*
  ID_OUI_FROM_DATABASE=AVM GmbH
 
@@ -50966,6 +51125,9 @@ OUI:345760*
 OUI:345840*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
+OUI:34587C*
+ ID_OUI_FROM_DATABASE=MIRAE INFORMATION TECHNOLOGY CO., LTD.
+
 OUI:345A06*
  ID_OUI_FROM_DATABASE=SHARP Corporation
 
@@ -51125,6 +51287,9 @@ OUI:34873D*
 OUI:34885D*
  ID_OUI_FROM_DATABASE=Logitech Far East
 
+OUI:348A12*
+ ID_OUI_FROM_DATABASE=Aruba, a Hewlett Packard Enterprise Company
+
 OUI:348A7B*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
@@ -51233,6 +51398,9 @@ OUI:34ADE4*
 OUI:34AF2C*
  ID_OUI_FROM_DATABASE=Nintendo Co., Ltd.
 
+OUI:34AFB3*
+ ID_OUI_FROM_DATABASE=Amazon Technologies Inc.
+
 OUI:34B1F7*
  ID_OUI_FROM_DATABASE=Texas Instruments
 
@@ -51293,6 +51461,9 @@ OUI:34C059*
 OUI:34C0F9*
  ID_OUI_FROM_DATABASE=Rockwell Automation
 
+OUI:34C103*
+ ID_OUI_FROM_DATABASE=Hangzhou Huamu Technology Co.,Ltd.
+
 OUI:34C3AC*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
@@ -51311,6 +51482,9 @@ OUI:34C731*
 OUI:34C803*
  ID_OUI_FROM_DATABASE=Nokia Corporation
 
+OUI:34C93D*
+ ID_OUI_FROM_DATABASE=Intel Corporate
+
 OUI:34C99D*
  ID_OUI_FROM_DATABASE=EIDOLON COMMUNICATIONS TECHNOLOGY CO. LTD.
 
@@ -51471,7 +51645,7 @@ OUI:34E1D18*
  ID_OUI_FROM_DATABASE=Hubitat Inc.
 
 OUI:34E1D19*
- ID_OUI_FROM_DATABASE=Apart Audio NV
+ ID_OUI_FROM_DATABASE=Biamp
 
 OUI:34E1D1A*
  ID_OUI_FROM_DATABASE=OrCam Technologies
@@ -51563,6 +51737,9 @@ OUI:34F64B*
 OUI:34F6D2*
  ID_OUI_FROM_DATABASE=Panasonic Taiwan Co.,Ltd.
 
+OUI:34F716*
+ ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD.
+
 OUI:34F8E7*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
@@ -51587,6 +51764,9 @@ OUI:34FCEF*
 OUI:34FD6A*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
+OUI:34FEC5*
+ ID_OUI_FROM_DATABASE=Shenzhen Sunwoda intelligent hardware Co.,Ltd
+
 OUI:380025*
  ID_OUI_FROM_DATABASE=Intel Corporate
 
@@ -51656,6 +51836,9 @@ OUI:380FE4*
 OUI:3810D5*
  ID_OUI_FROM_DATABASE=AVM Audiovisuelles Marketing und Computersysteme GmbH
 
+OUI:3810F0*
+ ID_OUI_FROM_DATABASE=Aruba, a Hewlett Packard Enterprise Company
+
 OUI:38144E*
  ID_OUI_FROM_DATABASE=Fiberhome Telecommunication Technologies Co.,LTD
 
@@ -51818,12 +52001,18 @@ OUI:383BC8*
 OUI:383C9C*
  ID_OUI_FROM_DATABASE=Fujian Newland Payment Technology Co.,Ltd.
 
+OUI:383D5B*
+ ID_OUI_FROM_DATABASE=Fiberhome Telecommunication Technologies Co.,LTD
+
 OUI:383F10*
  ID_OUI_FROM_DATABASE=DBL Technology Ltd.
 
 OUI:383FB3*
  ID_OUI_FROM_DATABASE=Technicolor CH USA Inc.
 
+OUI:38420B*
+ ID_OUI_FROM_DATABASE=Sonos, Inc.
+
 OUI:384233*
  ID_OUI_FROM_DATABASE=Wildeboer Bauteile GmbH
 
@@ -52067,6 +52256,9 @@ OUI:388E7A*
 OUI:388EE7*
  ID_OUI_FROM_DATABASE=Fanhattan LLC
 
+OUI:389052*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:3890A5*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
@@ -52217,6 +52409,9 @@ OUI:38B54D*
 OUI:38B5BD*
  ID_OUI_FROM_DATABASE=E.G.O. Elektro-Ger
 
+OUI:38B5D3*
+ ID_OUI_FROM_DATABASE=SecuWorks
+
 OUI:38B725*
  ID_OUI_FROM_DATABASE=Wistron Infocomm (Zhongshan) Corporation
 
@@ -52598,6 +52793,9 @@ OUI:3C0518*
 OUI:3C05AB*
  ID_OUI_FROM_DATABASE=Product Creation Studio
 
+OUI:3C06A7*
+ ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD.
+
 OUI:3C0754*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
@@ -52688,6 +52886,9 @@ OUI:3C1E04*
 OUI:3C1E13*
  ID_OUI_FROM_DATABASE=HANGZHOU SUNRISE TECHNOLOGY CO., LTD
 
+OUI:3C2093*
+ ID_OUI_FROM_DATABASE=GD Midea Air-Conditioning Equipment Co.,Ltd.
+
 OUI:3C20F6*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
@@ -52949,6 +53150,9 @@ OUI:3C5282*
 OUI:3C53D7*
  ID_OUI_FROM_DATABASE=CEDES AG
 
+OUI:3C5447*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:3C5731*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
@@ -53225,6 +53429,9 @@ OUI:3C99F7*
 OUI:3C9A77*
  ID_OUI_FROM_DATABASE=Technicolor CH USA Inc.
 
+OUI:3C9BC6*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:3C9BD6*
  ID_OUI_FROM_DATABASE=Vizio, Inc
 
@@ -54056,6 +54263,9 @@ OUI:40882F*
 OUI:4088E0*
  ID_OUI_FROM_DATABASE=Beijing Ereneben Information Technology Limited Shenzhen Branch
 
+OUI:4089A8*
+ ID_OUI_FROM_DATABASE=WiredIQ, LLC
+
 OUI:408A9A*
  ID_OUI_FROM_DATABASE=TITENG CO., Ltd.
 
@@ -54065,12 +54275,18 @@ OUI:408B07*
 OUI:408BF6*
  ID_OUI_FROM_DATABASE=Shenzhen TCL New Technology Co., Ltd
 
+OUI:408C1F*
+ ID_OUI_FROM_DATABASE=GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD
+
 OUI:408C4C*
  ID_OUI_FROM_DATABASE=Shenzhen MiaoMing  Intelligent Technology Co.,Ltd
 
 OUI:408D5C*
  ID_OUI_FROM_DATABASE=GIGA-BYTE TECHNOLOGY CO.,LTD.
 
+OUI:408F9D*
+ ID_OUI_FROM_DATABASE=Juniper Networks
+
 OUI:409505*
  ID_OUI_FROM_DATABASE=ACOINFO TECHNOLOGY CO.,LTD
 
@@ -54293,6 +54509,9 @@ OUI:40C4D6*
 OUI:40C62A*
  ID_OUI_FROM_DATABASE=Shanghai Jing Ren Electronic Technology Co., Ltd.
 
+OUI:40C711*
+ ID_OUI_FROM_DATABASE=Apple, Inc.
+
 OUI:40C729*
  ID_OUI_FROM_DATABASE=Sagemcom Broadband SAS
 
@@ -54359,6 +54578,9 @@ OUI:40DCA5*
 OUI:40DDD1*
  ID_OUI_FROM_DATABASE=Beautiful Card Corporation
 
+OUI:40DE17*
+ ID_OUI_FROM_DATABASE=Shenzhen Lanfeng Times Industrial Co.,Ltd.
+
 OUI:40DEAD*
  ID_OUI_FROM_DATABASE=Juniper Networks
 
@@ -54431,6 +54653,9 @@ OUI:40ED98D*
 OUI:40ED98E*
  ID_OUI_FROM_DATABASE=BORDA TECHNOLOGY
 
+OUI:40EE15*
+ ID_OUI_FROM_DATABASE=Zioncom Electronics (Shenzhen) Ltd.
+
 OUI:40EEDD*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
@@ -54920,6 +55145,30 @@ OUI:446D6C*
 OUI:446EE5*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
+OUI:446FD80*
+ ID_OUI_FROM_DATABASE=Sichuan subao network technology ltd.co.
+
+OUI:446FD81*
+ ID_OUI_FROM_DATABASE=Shenzhen Furuilian Electronic Co.,Ltd.
+
+OUI:446FD84*
+ ID_OUI_FROM_DATABASE=lb Lautsprecher gmbH
+
+OUI:446FD85*
+ ID_OUI_FROM_DATABASE=ZHEJIANG SHIP ELECTRONICS & TECHNOLOGY CO., LTD.
+
+OUI:446FD87*
+ ID_OUI_FROM_DATABASE=ITC
+
+OUI:446FD88*
+ ID_OUI_FROM_DATABASE=Global Telecom Engineering, Inc
+
+OUI:446FD8B*
+ ID_OUI_FROM_DATABASE=Beijing gpthink technology co.,LTD.
+
+OUI:446FD8D*
+ ID_OUI_FROM_DATABASE=SCAIME
+
 OUI:44700B*
  ID_OUI_FROM_DATABASE=IFFU
 
@@ -55097,6 +55346,9 @@ OUI:44ADB1*
 OUI:44ADD9*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
+OUI:44AE25*
+ ID_OUI_FROM_DATABASE=Cisco Systems, Inc
+
 OUI:44AEAB*
  ID_OUI_FROM_DATABASE=GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD
 
@@ -55121,6 +55373,9 @@ OUI:44B433*
 OUI:44B462*
  ID_OUI_FROM_DATABASE=Flextronics Tech.(Ind) Pvt Ltd
 
+OUI:44B6BE*
+ ID_OUI_FROM_DATABASE=Cisco Systems, Inc
+
 OUI:44B994*
  ID_OUI_FROM_DATABASE=Douglas Lighting Controls
 
@@ -55202,6 +55457,9 @@ OUI:44D3CA*
 OUI:44D437*
  ID_OUI_FROM_DATABASE=Inteno Broadband Technology AB
 
+OUI:44D453*
+ ID_OUI_FROM_DATABASE=Sagemcom Broadband SAS
+
 OUI:44D4E0*
  ID_OUI_FROM_DATABASE=Sony Mobile Communications Inc
 
@@ -55598,6 +55856,9 @@ OUI:484BAA*
 OUI:484BD4*
  ID_OUI_FROM_DATABASE=Technicolor CH USA Inc.
 
+OUI:484C29*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:484C86*
  ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
 
@@ -55616,6 +55877,9 @@ OUI:485169*
 OUI:4851B7*
  ID_OUI_FROM_DATABASE=Intel Corporate
 
+OUI:4851C5*
+ ID_OUI_FROM_DATABASE=Intel Corporate
+
 OUI:485261*
  ID_OUI_FROM_DATABASE=SOREEL
 
@@ -55823,6 +56087,9 @@ OUI:488AD2*
 OUI:488B0A*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
+OUI:488C63*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:488D36*
  ID_OUI_FROM_DATABASE=Arcadyan Corporation
 
@@ -56103,7 +56370,7 @@ OUI:48EB62*
  ID_OUI_FROM_DATABASE=Murata Manufacturing Co., Ltd.
 
 OUI:48EC5B*
- ID_OUI_FROM_DATABASE=Nokia
+ ID_OUI_FROM_DATABASE=Nokia Solutions and Networks GmbH & Co. KG
 
 OUI:48ED80*
  ID_OUI_FROM_DATABASE=daesung eltec
@@ -56219,6 +56486,9 @@ OUI:4C0F6E*
 OUI:4C0FC7*
  ID_OUI_FROM_DATABASE=Earda Technologies co Ltd
 
+OUI:4C1154*
+ ID_OUI_FROM_DATABASE=Mobiwire Mobiles (NingBo) Co., LTD
+
 OUI:4C1159*
  ID_OUI_FROM_DATABASE=Vision Information & Communications
 
@@ -56588,6 +56858,9 @@ OUI:4C7487*
 OUI:4C74BF*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
+OUI:4C7525*
+ ID_OUI_FROM_DATABASE=Espressif Inc.
+
 OUI:4C7625*
  ID_OUI_FROM_DATABASE=Dell Inc.
 
@@ -56724,7 +56997,7 @@ OUI:4C93A63*
  ID_OUI_FROM_DATABASE=Commsignia, Ltd.
 
 OUI:4C93A64*
- ID_OUI_FROM_DATABASE=4D Sistem Ticaret A.S.
+ ID_OUI_FROM_DATABASE=4TheWall - 4D Sistem A.S
 
 OUI:4C93A65*
  ID_OUI_FROM_DATABASE=Private
@@ -57287,6 +57560,9 @@ OUI:501D93*
 OUI:501E2D*
  ID_OUI_FROM_DATABASE=StreamUnlimited Engineering GmbH
 
+OUI:501FC6*
+ ID_OUI_FROM_DATABASE=Apple, Inc.
+
 OUI:50206B*
  ID_OUI_FROM_DATABASE=Emerson Climate Technologies Transportation Solutions
 
@@ -57341,6 +57617,9 @@ OUI:502DBB*
 OUI:502DF4*
  ID_OUI_FROM_DATABASE=Phytec Messtechnik GmbH
 
+OUI:502DFB*
+ ID_OUI_FROM_DATABASE=IGShare Co., Ltd.
+
 OUI:502E5C*
  ID_OUI_FROM_DATABASE=HTC Corporation
 
@@ -57389,6 +57668,9 @@ OUI:503CEA*
 OUI:503DA1*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
+OUI:503DC6*
+ ID_OUI_FROM_DATABASE=Xiaomi Communications Co Ltd
+
 OUI:503DE5*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
@@ -57458,12 +57740,18 @@ OUI:5050CE*
 OUI:5051A9*
  ID_OUI_FROM_DATABASE=Texas Instruments
 
+OUI:50523B*
+ ID_OUI_FROM_DATABASE=Nokia
+
 OUI:5052D2*
  ID_OUI_FROM_DATABASE=Hangzhou Telin Technologies Co., Limited
 
 OUI:505527*
  ID_OUI_FROM_DATABASE=LG Electronics (Mobile Communications)
 
+OUI:50558D*
+ ID_OUI_FROM_DATABASE=China Mobile IOT Company Limited
+
 OUI:505663*
  ID_OUI_FROM_DATABASE=Texas Instruments
 
@@ -57875,6 +58163,9 @@ OUI:50C006*
 OUI:50C271*
  ID_OUI_FROM_DATABASE=SECURETECH INC
 
+OUI:50C3A2*
+ ID_OUI_FROM_DATABASE=nFore Technology Co.,Ltd.
+
 OUI:50C4DD*
  ID_OUI_FROM_DATABASE=BUFFALO.INC
 
@@ -58043,6 +58334,9 @@ OUI:50EB71*
 OUI:50EC50*
  ID_OUI_FROM_DATABASE=Beijing Xiaomi Mobile Software Co., Ltd
 
+OUI:50ED3C*
+ ID_OUI_FROM_DATABASE=Apple, Inc.
+
 OUI:50ED78*
  ID_OUI_FROM_DATABASE=Changzhou Yongse Infotech Co.,Ltd
 
@@ -58178,6 +58472,12 @@ OUI:5405DB*
 OUI:54068B*
  ID_OUI_FROM_DATABASE=Ningbo Deli Kebei Technology Co.LTD
 
+OUI:540764*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
+OUI:540910*
+ ID_OUI_FROM_DATABASE=Apple, Inc.
+
 OUI:540955*
  ID_OUI_FROM_DATABASE=zte corporation
 
@@ -58235,6 +58535,9 @@ OUI:541FD5*
 OUI:542018*
  ID_OUI_FROM_DATABASE=Tely Labs
 
+OUI:54211D*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:542160*
  ID_OUI_FROM_DATABASE=Alula
 
@@ -58313,6 +58616,9 @@ OUI:543968*
 OUI:5439DF*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
+OUI:543AD6*
+ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
+
 OUI:543B30*
  ID_OUI_FROM_DATABASE=duagon AG
 
@@ -58331,6 +58637,9 @@ OUI:544249*
 OUI:544408*
  ID_OUI_FROM_DATABASE=Nokia Corporation
 
+OUI:544617*
+ ID_OUI_FROM_DATABASE=zte corporation
+
 OUI:54466B*
  ID_OUI_FROM_DATABASE=Shenzhen CZTIC Electronic Technology Co., Ltd
 
@@ -58421,6 +58730,9 @@ OUI:54666C*
 OUI:546751*
  ID_OUI_FROM_DATABASE=Compal Broadband Networks, Inc.
 
+OUI:5467E6*
+ ID_OUI_FROM_DATABASE=SHENZHEN MTC CO LTD
+
 OUI:546AD8*
  ID_OUI_FROM_DATABASE=Elster Water Metering
 
@@ -58685,6 +58997,9 @@ OUI:54A619*
 OUI:54A65C*
  ID_OUI_FROM_DATABASE=Technicolor CH USA Inc.
 
+OUI:54A6DB*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:54A703*
  ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD.
 
@@ -58793,6 +59108,9 @@ OUI:54D9C6*
 OUI:54D9E4*
  ID_OUI_FROM_DATABASE=BRILLIANTTS CO., LTD
 
+OUI:54DBA2*
+ ID_OUI_FROM_DATABASE=Fibrain
+
 OUI:54DC1D*
  ID_OUI_FROM_DATABASE=Yulong Computer Telecommunication Scientific (Shenzhen) Co.,Ltd
 
@@ -58886,6 +59204,9 @@ OUI:54F294*
 OUI:54F5B6*
  ID_OUI_FROM_DATABASE=ORIENTAL PACIFIC INTERNATIONAL LIMITED
 
+OUI:54F607*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:54F666*
  ID_OUI_FROM_DATABASE=Berthold Technologies GmbH and Co.KG
 
@@ -58899,7 +59220,7 @@ OUI:54FA3E*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
 OUI:54FA96*
- ID_OUI_FROM_DATABASE=Nokia
+ ID_OUI_FROM_DATABASE=Nokia Solutions and Networks GmbH & Co. KG
 
 OUI:54FB58*
  ID_OUI_FROM_DATABASE=WISEWARE, Lda
@@ -59096,6 +59417,9 @@ OUI:583F54*
 OUI:58404E*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
+OUI:584120*
+ ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD.
+
 OUI:5842E4*
  ID_OUI_FROM_DATABASE=Baxter International Inc
 
@@ -59405,6 +59729,9 @@ OUI:58A2B5*
 OUI:58A48E*
  ID_OUI_FROM_DATABASE=PixArt Imaging Inc.
 
+OUI:58A639*
+ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
+
 OUI:58A76F*
  ID_OUI_FROM_DATABASE=iD corporation
 
@@ -59417,12 +59744,21 @@ OUI:58A87B*
 OUI:58AC78*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
+OUI:58AE2B*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
+OUI:58AEA8*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:58B035*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
 OUI:58B0D4*
  ID_OUI_FROM_DATABASE=ZuniData Systems Inc.
 
+OUI:58B0FE*
+ ID_OUI_FROM_DATABASE=Team EPS GmbH
+
 OUI:58B10F*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
@@ -59462,6 +59798,9 @@ OUI:58BDA3*
 OUI:58BDF9*
  ID_OUI_FROM_DATABASE=Sigrand
 
+OUI:58BE72*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:58BFEA*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
@@ -59933,6 +60272,9 @@ OUI:5C546D*
 OUI:5C5578*
  ID_OUI_FROM_DATABASE=iryx corp
 
+OUI:5C56A4*
+ ID_OUI_FROM_DATABASE=Wanan Hongsheng Electronic Co.Ltd
+
 OUI:5C56ED*
  ID_OUI_FROM_DATABASE=3pleplay Electronics Private Limited
 
@@ -60011,6 +60353,12 @@ OUI:5C6D20*
 OUI:5C6F4F*
  ID_OUI_FROM_DATABASE=S.A. SISTEL
 
+OUI:5C6F69*
+ ID_OUI_FROM_DATABASE=Broadcom Limited
+
+OUI:5C7017*
+ ID_OUI_FROM_DATABASE=Apple, Inc.
+
 OUI:5C70A3*
  ID_OUI_FROM_DATABASE=LG Electronics (Mobile Communications)
 
@@ -60095,6 +60443,9 @@ OUI:5C857ED*
 OUI:5C857EE*
  ID_OUI_FROM_DATABASE=Guoyi Liangzi (Hefei) Technology Co., Ltd(CIQTEK)
 
+OUI:5C85F8*
+ ID_OUI_FROM_DATABASE=SHENZHEN KAIFA TECHNOLOGY CO.,LTD.
+
 OUI:5C8613*
  ID_OUI_FROM_DATABASE=Beijing Zhoenet Technology Co., Ltd
 
@@ -60170,6 +60521,9 @@ OUI:5C97F3*
 OUI:5C9960*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
+OUI:5C9AA1*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:5C9AD8*
  ID_OUI_FROM_DATABASE=FUJITSU LIMITED
 
@@ -60191,6 +60545,9 @@ OUI:5CA3EB*
 OUI:5CA48A*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
+OUI:5CA4A4*
+ ID_OUI_FROM_DATABASE=Fiberhome Telecommunication Technologies Co.,LTD
+
 OUI:5CA5BC*
  ID_OUI_FROM_DATABASE=eero inc.
 
@@ -60266,6 +60623,9 @@ OUI:5CBA37*
 OUI:5CBAEF*
  ID_OUI_FROM_DATABASE=CHONGQING FUGUI ELECTRONICS CO.,LTD.
 
+OUI:5CBD9A*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:5CBD9E*
  ID_OUI_FROM_DATABASE=HONGKONG MIRACLE EAGLE TECHNOLOGY(GROUP) LIMITED
 
@@ -60281,6 +60641,9 @@ OUI:5CC213*
 OUI:5CC307*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
+OUI:5CC336*
+ ID_OUI_FROM_DATABASE=ittim
+
 OUI:5CC5D4*
  ID_OUI_FROM_DATABASE=Intel Corporate
 
@@ -60368,6 +60731,9 @@ OUI:5CDC96*
 OUI:5CDD70*
  ID_OUI_FROM_DATABASE=Hangzhou H3C Technologies Co., Limited
 
+OUI:5CDE34*
+ ID_OUI_FROM_DATABASE=SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD.
+
 OUI:5CE0C5*
  ID_OUI_FROM_DATABASE=Intel Corporate
 
@@ -60401,6 +60767,9 @@ OUI:5CE3B6*
 OUI:5CE50C*
  ID_OUI_FROM_DATABASE=Beijing Xiaomi Mobile Software Co., Ltd
 
+OUI:5CE747*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:5CE7A0*
  ID_OUI_FROM_DATABASE=Nokia
 
@@ -60788,6 +61157,9 @@ OUI:605317*
 OUI:605464*
  ID_OUI_FROM_DATABASE=Eyedro Green Solutions Inc.
 
+OUI:6055F9*
+ ID_OUI_FROM_DATABASE=Espressif Inc.
+
 OUI:605661*
  ID_OUI_FROM_DATABASE=IXECLOUD Tech
 
@@ -60842,6 +61214,9 @@ OUI:606BBD*
 OUI:606BFF*
  ID_OUI_FROM_DATABASE=Nintendo Co.,Ltd
 
+OUI:606C63*
+ ID_OUI_FROM_DATABASE=Hitron Technologies. Inc
+
 OUI:606C66*
  ID_OUI_FROM_DATABASE=Intel Corporate
 
@@ -60944,6 +61319,9 @@ OUI:608CE6*
 OUI:608D17*
  ID_OUI_FROM_DATABASE=Sentrus Government Systems Division, Inc
 
+OUI:608D26*
+ ID_OUI_FROM_DATABASE=Arcadyan Corporation
+
 OUI:608E08*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
@@ -61065,7 +61443,7 @@ OUI:60A730*
  ID_OUI_FROM_DATABASE=Shenzhen Yipinfang Internet Technology Co.,Ltd
 
 OUI:60A8FE*
- ID_OUI_FROM_DATABASE=Nokia
+ ID_OUI_FROM_DATABASE=Nokia Solutions and Networks GmbH & Co. KG
 
 OUI:60A9B0*
  ID_OUI_FROM_DATABASE=Merchandising Technologies, Inc
@@ -61406,6 +61784,9 @@ OUI:64037F*
 OUI:6405BE*
  ID_OUI_FROM_DATABASE=NEW LIGHT LED
 
+OUI:6405E4*
+ ID_OUI_FROM_DATABASE=ALPSALPINE CO .,LTD
+
 OUI:6405E9*
  ID_OUI_FROM_DATABASE=Shenzhen WayOS Technology Crop., Ltd.
 
@@ -61457,6 +61838,9 @@ OUI:641331*
 OUI:64136C*
  ID_OUI_FROM_DATABASE=zte corporation
 
+OUI:6413AB*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:641666*
  ID_OUI_FROM_DATABASE=Nest Labs Inc.
 
@@ -61508,6 +61892,9 @@ OUI:642400*
 OUI:64255E*
  ID_OUI_FROM_DATABASE=Observint Technologies, Inc.
 
+OUI:642656*
+ ID_OUI_FROM_DATABASE=Shenzhen Fanweitai Technology Service Co.,Ltd
+
 OUI:642737*
  ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd.
 
@@ -61922,6 +62309,9 @@ OUI:649FF7*
 OUI:64A0E7*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
+OUI:64A198*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:64A200*
  ID_OUI_FROM_DATABASE=Xiaomi Communications Co Ltd
 
@@ -62084,6 +62474,9 @@ OUI:64D4BD*
 OUI:64D4DA*
  ID_OUI_FROM_DATABASE=Intel Corporate
 
+OUI:64D7C0*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:64D814*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
@@ -62129,6 +62522,9 @@ OUI:64DF10*
 OUI:64DFE9*
  ID_OUI_FROM_DATABASE=ATEME
 
+OUI:64E003*
+ ID_OUI_FROM_DATABASE=Hui Zhou Gaoshengda Technology Co.,LTD
+
 OUI:64E161*
  ID_OUI_FROM_DATABASE=DEP Corp.
 
@@ -62384,6 +62780,9 @@ OUI:682C7B*
 OUI:682DDC*
  ID_OUI_FROM_DATABASE=Wuhan Changjiang Electro-Communication Equipment CO.,LTD
 
+OUI:682F67*
+ ID_OUI_FROM_DATABASE=Apple, Inc.
+
 OUI:6831FE*
  ID_OUI_FROM_DATABASE=Teladin Co.,Ltd.
 
@@ -62432,6 +62831,9 @@ OUI:683EEC*
 OUI:683F1E*
  ID_OUI_FROM_DATABASE=EFFECT Photonics B.V.
 
+OUI:683F7D*
+ ID_OUI_FROM_DATABASE=INGRAM MICRO SERVICES
+
 OUI:684352*
  ID_OUI_FROM_DATABASE=Bhuu Limited
 
@@ -62496,7 +62898,7 @@ OUI:6854FD*
  ID_OUI_FROM_DATABASE=Amazon Technologies Inc.
 
 OUI:68572D*
- ID_OUI_FROM_DATABASE=HANGZHOU AIXIANGJI TECHNOLOGY CO., LTD
+ ID_OUI_FROM_DATABASE=Tuya Smart Inc.
 
 OUI:6858C5*
  ID_OUI_FROM_DATABASE=ZF TRW Automotive
@@ -62558,11 +62960,14 @@ OUI:6872C3*
 OUI:6872DC*
  ID_OUI_FROM_DATABASE=CETORY.TV Company Limited
 
+OUI:687627*
+ ID_OUI_FROM_DATABASE=Zhuhai Dingzhi Electronic Technology Co., Ltd
+
 OUI:68764F*
  ID_OUI_FROM_DATABASE=Sony Mobile Communications Inc
 
 OUI:687848*
- ID_OUI_FROM_DATABASE=Westunitis Co., Ltd.
+ ID_OUI_FROM_DATABASE=WESTUNITIS CO., LTD.
 
 OUI:68784C*
  ID_OUI_FROM_DATABASE=Nortel Networks
@@ -62831,6 +63236,9 @@ OUI:68AB1E*
 OUI:68AB8A*
  ID_OUI_FROM_DATABASE=RF IDeas
 
+OUI:68ABBC*
+ ID_OUI_FROM_DATABASE=Beijing Xiaomi Mobile Software Co., Ltd
+
 OUI:68AE20*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
@@ -63035,6 +63443,12 @@ OUI:6C006B*
 OUI:6C0273*
  ID_OUI_FROM_DATABASE=Shenzhen Jin Yun Video Equipment Co., Ltd.
 
+OUI:6C02E0*
+ ID_OUI_FROM_DATABASE=HP Inc.
+
+OUI:6C0309*
+ ID_OUI_FROM_DATABASE=Cisco Systems, Inc
+
 OUI:6C0460*
  ID_OUI_FROM_DATABASE=RBH Access Technologies Inc.
 
@@ -63062,6 +63476,9 @@ OUI:6C0D34*
 OUI:6C0DC4*
  ID_OUI_FROM_DATABASE=Beijing Xiaomi Electronics Co., Ltd.
 
+OUI:6C0DE1*
+ ID_OUI_FROM_DATABASE=Dongguan Cannice Precision Manufacturing Co., Ltd.
+
 OUI:6C0E0D*
  ID_OUI_FROM_DATABASE=Sony Mobile Communications Inc
 
@@ -63071,6 +63488,9 @@ OUI:6C0EE6*
 OUI:6C0F6A*
  ID_OUI_FROM_DATABASE=JDC Tech Co., Ltd.
 
+OUI:6C13D5*
+ ID_OUI_FROM_DATABASE=Cisco Systems, Inc
+
 OUI:6C1414*
  ID_OUI_FROM_DATABASE=BUJEON ELECTRONICS Co,.Ltd
 
@@ -63248,6 +63668,9 @@ OUI:6C49C1*
 OUI:6C4A39*
  ID_OUI_FROM_DATABASE=BITA
 
+OUI:6C4A74*
+ ID_OUI_FROM_DATABASE=AERODISK LLC
+
 OUI:6C4A85*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
@@ -63653,6 +64076,9 @@ OUI:6CC7EC*
 OUI:6CCA08*
  ID_OUI_FROM_DATABASE=ARRIS Group, Inc.
 
+OUI:6CCDD6*
+ ID_OUI_FROM_DATABASE=NETGEAR
+
 OUI:6CCE44*
  ID_OUI_FROM_DATABASE=1MORE
 
@@ -63671,6 +64097,9 @@ OUI:6CD2BA*
 OUI:6CD68A*
  ID_OUI_FROM_DATABASE=LG Electronics (Mobile Communications)
 
+OUI:6CD704*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:6CD71F*
  ID_OUI_FROM_DATABASE=GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD
 
@@ -63807,7 +64236,7 @@ OUI:6CF5E8*
  ID_OUI_FROM_DATABASE=Mooredoll Inc.
 
 OUI:6CF712*
- ID_OUI_FROM_DATABASE=Nokia
+ ID_OUI_FROM_DATABASE=Nokia Solutions and Networks GmbH & Co. KG
 
 OUI:6CF97C*
  ID_OUI_FROM_DATABASE=Nanoptix Inc.
@@ -64187,6 +64616,9 @@ OUI:706173*
 OUI:70617B*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
+OUI:7061BE*
+ ID_OUI_FROM_DATABASE=Wistron Neweb Corporation
+
 OUI:7061EE*
  ID_OUI_FROM_DATABASE=Sunwoda Electronic Co.,Ltd
 
@@ -64415,6 +64847,9 @@ OUI:70886BB*
 OUI:70886BC*
  ID_OUI_FROM_DATABASE=MAX4G, Inc.
 
+OUI:708976*
+ ID_OUI_FROM_DATABASE=Tuya (HK) Limietd
+
 OUI:7089CC*
  ID_OUI_FROM_DATABASE=China Mobile Group Device Co.,Ltd.
 
@@ -64766,6 +65201,9 @@ OUI:70B3D504D*
 OUI:70B3D504E*
  ID_OUI_FROM_DATABASE=HUGEL GmbH
 
+OUI:70B3D504F*
+ ID_OUI_FROM_DATABASE=EVPU Defence a.s.
+
 OUI:70B3D5050*
  ID_OUI_FROM_DATABASE=Compusign Systems Pty Ltd
 
@@ -64829,6 +65267,9 @@ OUI:70B3D5063*
 OUI:70B3D5064*
  ID_OUI_FROM_DATABASE=AB PRECISION (POOLE) LTD
 
+OUI:70B3D5065*
+ ID_OUI_FROM_DATABASE=EXATEL
+
 OUI:70B3D5066*
  ID_OUI_FROM_DATABASE=North Pole Engineering, Inc.
 
@@ -65460,7 +65901,7 @@ OUI:70B3D513E*
  ID_OUI_FROM_DATABASE=Stara S/A Indústria de Implementos Agrícolas
 
 OUI:70B3D513F*
- ID_OUI_FROM_DATABASE=Farmobile
+ ID_OUI_FROM_DATABASE=Farmobile, LLC
 
 OUI:70B3D5140*
  ID_OUI_FROM_DATABASE=Virta Laboratories, Inc.
@@ -65798,6 +66239,9 @@ OUI:70B3D51B5*
 OUI:70B3D51B6*
  ID_OUI_FROM_DATABASE=DACOM West GmbH
 
+OUI:70B3D51B7*
+ ID_OUI_FROM_DATABASE=ULSee Inc
+
 OUI:70B3D51B8*
  ID_OUI_FROM_DATABASE=OES Inc.
 
@@ -65837,6 +66281,9 @@ OUI:70B3D51C4*
 OUI:70B3D51C5*
  ID_OUI_FROM_DATABASE=ELSAG
 
+OUI:70B3D51C6*
+ ID_OUI_FROM_DATABASE=Bita-International Co., Ltd.
+
 OUI:70B3D51C7*
  ID_OUI_FROM_DATABASE=Hoshin Electronics Co., Ltd.
 
@@ -65981,6 +66428,9 @@ OUI:70B3D51F8*
 OUI:70B3D51F9*
  ID_OUI_FROM_DATABASE=Automata GmbH & Co. KG
 
+OUI:70B3D51FA*
+ ID_OUI_FROM_DATABASE=EBZ SysTec GmbH
+
 OUI:70B3D51FC*
  ID_OUI_FROM_DATABASE=Guan Show Technologe Co., Ltd.
 
@@ -66239,6 +66689,9 @@ OUI:70B3D5254*
 OUI:70B3D5255*
  ID_OUI_FROM_DATABASE=Asystems Corporation
 
+OUI:70B3D5256*
+ ID_OUI_FROM_DATABASE=Telco Antennas Pty Ltd
+
 OUI:70B3D5257*
  ID_OUI_FROM_DATABASE=LG Electronics
 
@@ -66404,6 +66857,9 @@ OUI:70B3D528E*
 OUI:70B3D528F*
  ID_OUI_FROM_DATABASE=Overline Systems
 
+OUI:70B3D5290*
+ ID_OUI_FROM_DATABASE=GETT Geraetetechnik GmbH
+
 OUI:70B3D5291*
  ID_OUI_FROM_DATABASE=Sequent AG
 
@@ -66440,6 +66896,9 @@ OUI:70B3D529C*
 OUI:70B3D529D*
  ID_OUI_FROM_DATABASE=XTech2 SIA
 
+OUI:70B3D529E*
+ ID_OUI_FROM_DATABASE=B2cloud lda
+
 OUI:70B3D529F*
  ID_OUI_FROM_DATABASE=Code Hardware SA
 
@@ -66767,15 +67226,24 @@ OUI:70B3D530F*
 OUI:70B3D5310*
  ID_OUI_FROM_DATABASE=Conserv Solutions
 
+OUI:70B3D5311*
+ ID_OUI_FROM_DATABASE=Günther Spelsberg GmbH + Co. KG
+
 OUI:70B3D5313*
  ID_OUI_FROM_DATABASE=DIEHL Controls
 
+OUI:70B3D5316*
+ ID_OUI_FROM_DATABASE=Austco Marketing & Service (USA) ltd.
+
 OUI:70B3D5317*
  ID_OUI_FROM_DATABASE=Iotopia Solutions
 
 OUI:70B3D5319*
  ID_OUI_FROM_DATABASE=ISO/TC 22/SC 31
 
+OUI:70B3D531A*
+ ID_OUI_FROM_DATABASE=Terratel Technology s.r.o.
+
 OUI:70B3D531B*
  ID_OUI_FROM_DATABASE=SilTerra Malaysia Sdn. Bhd.
 
@@ -67136,6 +67604,9 @@ OUI:70B3D5397*
 OUI:70B3D5398*
  ID_OUI_FROM_DATABASE=SIPRO s.r.l.
 
+OUI:70B3D5399*
+ ID_OUI_FROM_DATABASE=SPE Smartico, LLC
+
 OUI:70B3D539A*
  ID_OUI_FROM_DATABASE=Videotrend srl
 
@@ -67151,6 +67622,9 @@ OUI:70B3D539D*
 OUI:70B3D539E*
  ID_OUI_FROM_DATABASE=Lanmark Controls Inc.
 
+OUI:70B3D539F*
+ ID_OUI_FROM_DATABASE=CT Company
+
 OUI:70B3D53A0*
  ID_OUI_FROM_DATABASE=chiconypower
 
@@ -67508,6 +67982,9 @@ OUI:70B3D541A*
 OUI:70B3D541B*
  ID_OUI_FROM_DATABASE=SYS TEC electronic GmbH
 
+OUI:70B3D541C*
+ ID_OUI_FROM_DATABASE=Twoway Communications, Inc.
+
 OUI:70B3D541D*
  ID_OUI_FROM_DATABASE=Azmoon Keifiat
 
@@ -67592,6 +68069,9 @@ OUI:70B3D5437*
 OUI:70B3D5439*
  ID_OUI_FROM_DATABASE=TriLED
 
+OUI:70B3D543A*
+ ID_OUI_FROM_DATABASE=ARKS Enterprises, Inc.
+
 OUI:70B3D543B*
  ID_OUI_FROM_DATABASE=Kalycito Infotech Private Limited
 
@@ -67745,6 +68225,9 @@ OUI:70B3D5472*
 OUI:70B3D5473*
  ID_OUI_FROM_DATABASE=KeyProd
 
+OUI:70B3D5474*
+ ID_OUI_FROM_DATABASE=DAYOUPLUS
+
 OUI:70B3D5475*
  ID_OUI_FROM_DATABASE=EWATTCH
 
@@ -67829,6 +68312,9 @@ OUI:70B3D548F*
 OUI:70B3D5490*
  ID_OUI_FROM_DATABASE=Xiamen Beogold Technology Co. Ltd.
 
+OUI:70B3D5491*
+ ID_OUI_FROM_DATABASE=VONSCH
+
 OUI:70B3D5492*
  ID_OUI_FROM_DATABASE=Jiangsu Jinheng  Information Technology Co.,Ltd.
 
@@ -68036,6 +68522,9 @@ OUI:70B3D54D7*
 OUI:70B3D54D8*
  ID_OUI_FROM_DATABASE=Versilis Inc.
 
+OUI:70B3D54DA*
+ ID_OUI_FROM_DATABASE=Private
+
 OUI:70B3D54DB*
  ID_OUI_FROM_DATABASE=Temperature@lert
 
@@ -68043,7 +68532,7 @@ OUI:70B3D54DC*
  ID_OUI_FROM_DATABASE=JK DEVICE CORPORATION
 
 OUI:70B3D54DD*
- ID_OUI_FROM_DATABASE=Road-iQ, LLC
+ ID_OUI_FROM_DATABASE=Velvac Incorporated
 
 OUI:70B3D54DE*
  ID_OUI_FROM_DATABASE=Oso Technologies, Inc.
@@ -68225,6 +68714,9 @@ OUI:70B3D551D*
 OUI:70B3D551E*
  ID_OUI_FROM_DATABASE=Fundación Cardiovascular de Colombia
 
+OUI:70B3D551F*
+ ID_OUI_FROM_DATABASE=VALEO CDA
+
 OUI:70B3D5521*
  ID_OUI_FROM_DATABASE=Selex ES Inc.
 
@@ -68243,6 +68735,9 @@ OUI:70B3D5525*
 OUI:70B3D5526*
  ID_OUI_FROM_DATABASE=FlowNet LLC
 
+OUI:70B3D5527*
+ ID_OUI_FROM_DATABASE=Procon Electronics Pty Ltd
+
 OUI:70B3D5528*
  ID_OUI_FROM_DATABASE=Aplex Technology Inc.
 
@@ -68315,6 +68810,9 @@ OUI:70B3D553E*
 OUI:70B3D553F*
  ID_OUI_FROM_DATABASE=Abbott Diagnostics Technologies AS
 
+OUI:70B3D5540*
+ ID_OUI_FROM_DATABASE=KMtronic ltd
+
 OUI:70B3D5541*
  ID_OUI_FROM_DATABASE=Nanjing Pingguang Electronic Technology Co., Ltd
 
@@ -68408,6 +68906,9 @@ OUI:70B3D555E*
 OUI:70B3D555F*
  ID_OUI_FROM_DATABASE=Deep BV
 
+OUI:70B3D5560*
+ ID_OUI_FROM_DATABASE=DaiShin Information & Communications Co., Ltd
+
 OUI:70B3D5561*
  ID_OUI_FROM_DATABASE=Liberator Pty Ltd
 
@@ -68585,6 +69086,9 @@ OUI:70B3D559C*
 OUI:70B3D559D*
  ID_OUI_FROM_DATABASE=servicios de consultoria independiente S.L.
 
+OUI:70B3D559E*
+ ID_OUI_FROM_DATABASE=i2-electronics
+
 OUI:70B3D55A0*
  ID_OUI_FROM_DATABASE=Ascon Tecnologic S.r.l.
 
@@ -68597,6 +69101,9 @@ OUI:70B3D55A2*
 OUI:70B3D55A3*
  ID_OUI_FROM_DATABASE=CT Company
 
+OUI:70B3D55A4*
+ ID_OUI_FROM_DATABASE=MB connect line GmbH Fernwartungssysteme
+
 OUI:70B3D55A5*
  ID_OUI_FROM_DATABASE=Rehwork GmbH
 
@@ -68607,7 +69114,7 @@ OUI:70B3D55A7*
  ID_OUI_FROM_DATABASE=ABB S.p.A.
 
 OUI:70B3D55A8*
- ID_OUI_FROM_DATABASE=Farmobile
+ ID_OUI_FROM_DATABASE=Farmobile, LLC
 
 OUI:70B3D55A9*
  ID_OUI_FROM_DATABASE=Bunka Shutter Co., Ltd.
@@ -68660,6 +69167,9 @@ OUI:70B3D55BB*
 OUI:70B3D55BC*
  ID_OUI_FROM_DATABASE=LAMTEC Meß- und Regeltechnik für Feuerungen GmbH & Co. KG
 
+OUI:70B3D55BD*
+ ID_OUI_FROM_DATABASE=nexgenwave
+
 OUI:70B3D55BE*
  ID_OUI_FROM_DATABASE=CASWA
 
@@ -68963,6 +69473,9 @@ OUI:70B3D5625*
 OUI:70B3D5626*
  ID_OUI_FROM_DATABASE=KRONOTECH SRL
 
+OUI:70B3D5627*
+ ID_OUI_FROM_DATABASE=EarTex
+
 OUI:70B3D5628*
  ID_OUI_FROM_DATABASE=MECT SRL
 
@@ -69077,6 +69590,9 @@ OUI:70B3D564D*
 OUI:70B3D564E*
  ID_OUI_FROM_DATABASE=BigStuff3, Inc.
 
+OUI:70B3D564F*
+ ID_OUI_FROM_DATABASE=GUNMA ELECTRONICS CO LTD
+
 OUI:70B3D5650*
  ID_OUI_FROM_DATABASE=GIFAS-ELECTRIC GmbH
 
@@ -69428,6 +69944,9 @@ OUI:70B3D56CA*
 OUI:70B3D56CB*
  ID_OUI_FROM_DATABASE=NAJIN automation
 
+OUI:70B3D56CC*
+ ID_OUI_FROM_DATABASE=ARINAX
+
 OUI:70B3D56CD*
  ID_OUI_FROM_DATABASE=NORTHBOUND NETWORKS PTY. LTD.
 
@@ -69989,6 +70508,9 @@ OUI:70B3D5790*
 OUI:70B3D5791*
  ID_OUI_FROM_DATABASE=Romteck Australia
 
+OUI:70B3D5792*
+ ID_OUI_FROM_DATABASE=IMMOLAS
+
 OUI:70B3D5793*
  ID_OUI_FROM_DATABASE=Gastech Australia Pty Ltd
 
@@ -70343,6 +70865,9 @@ OUI:70B3D580C*
 OUI:70B3D580D*
  ID_OUI_FROM_DATABASE=Data Physics Corporation
 
+OUI:70B3D580E*
+ ID_OUI_FROM_DATABASE=Utopi Ltd
+
 OUI:70B3D580F*
  ID_OUI_FROM_DATABASE=Quickware Eng & Des LLC
 
@@ -70379,6 +70904,9 @@ OUI:70B3D581A*
 OUI:70B3D581B*
  ID_OUI_FROM_DATABASE=bobz GmbH
 
+OUI:70B3D581C*
+ ID_OUI_FROM_DATABASE=QIT Co., Ltd.
+
 OUI:70B3D581D*
  ID_OUI_FROM_DATABASE=DEUTA-WERKE GmbH
 
@@ -70427,6 +70955,9 @@ OUI:70B3D582D*
 OUI:70B3D582E*
  ID_OUI_FROM_DATABASE=PlayAlive A/S
 
+OUI:70B3D582F*
+ ID_OUI_FROM_DATABASE=SIANA Systems
+
 OUI:70B3D5830*
  ID_OUI_FROM_DATABASE=Nordson Corporation
 
@@ -70688,6 +71219,9 @@ OUI:70B3D5885*
 OUI:70B3D5886*
  ID_OUI_FROM_DATABASE=MB connect line GmbH Fernwartungssysteme
 
+OUI:70B3D5887*
+ ID_OUI_FROM_DATABASE=Entec Solar S.L.
+
 OUI:70B3D5888*
  ID_OUI_FROM_DATABASE=Zetechtics Ltd
 
@@ -70901,6 +71435,12 @@ OUI:70B3D58CF*
 OUI:70B3D58D0*
  ID_OUI_FROM_DATABASE=Raft Technologies
 
+OUI:70B3D58D1*
+ ID_OUI_FROM_DATABASE=Field Design Inc.
+
+OUI:70B3D58D2*
+ ID_OUI_FROM_DATABASE=WIZAPPLY CO.,LTD
+
 OUI:70B3D58D3*
  ID_OUI_FROM_DATABASE=PERFORMANCE CONTROLS, INC.
 
@@ -70958,6 +71498,9 @@ OUI:70B3D58E6*
 OUI:70B3D58E7*
  ID_OUI_FROM_DATABASE=REO AG
 
+OUI:70B3D58E8*
+ ID_OUI_FROM_DATABASE=PREO INDUSTRIES FAR EAST LTD
+
 OUI:70B3D58EA*
  ID_OUI_FROM_DATABASE=JLCooper Electronics
 
@@ -71087,6 +71630,9 @@ OUI:70B3D5917*
 OUI:70B3D5918*
  ID_OUI_FROM_DATABASE=Glova Rail A/S
 
+OUI:70B3D5919*
+ ID_OUI_FROM_DATABASE=Thesycon Software Solutions GmbH & Co. KG
+
 OUI:70B3D591A*
  ID_OUI_FROM_DATABASE=Fujian Landfone Information Technology Co.,Ltd
 
@@ -71186,6 +71732,9 @@ OUI:70B3D593A*
 OUI:70B3D593B*
  ID_OUI_FROM_DATABASE=Changchun FAW Yanfeng Visteon Automotive Electronics.,Ltd.
 
+OUI:70B3D593C*
+ ID_OUI_FROM_DATABASE=GSP Sprachtechnologie GmbH
+
 OUI:70B3D593D*
  ID_OUI_FROM_DATABASE=Elmeasure India Pvt Ltd
 
@@ -71417,6 +71966,9 @@ OUI:70B3D598B*
 OUI:70B3D598C*
  ID_OUI_FROM_DATABASE=University of Wisconsin Madison - Department of High Energy Physics
 
+OUI:70B3D598D*
+ ID_OUI_FROM_DATABASE=Motohaus Powersports Limited
+
 OUI:70B3D598E*
  ID_OUI_FROM_DATABASE=Autocom Diagnostic Partner AB
 
@@ -71447,6 +71999,9 @@ OUI:70B3D5996*
 OUI:70B3D5997*
  ID_OUI_FROM_DATABASE=ProTom International
 
+OUI:70B3D5998*
+ ID_OUI_FROM_DATABASE=Kita Kirmizi Takim Bilgi Guvenligi Danismanlik ve Egitim A.S.
+
 OUI:70B3D5999*
  ID_OUI_FROM_DATABASE=LOGICUBE INC
 
@@ -71792,6 +72347,9 @@ OUI:70B3D5A0F*
 OUI:70B3D5A10*
  ID_OUI_FROM_DATABASE=w-tec AG
 
+OUI:70B3D5A11*
+ ID_OUI_FROM_DATABASE=TRIOPTICS
+
 OUI:70B3D5A12*
  ID_OUI_FROM_DATABASE=QUERCUS TECHNOLOGIES, S.L.
 
@@ -71801,6 +72359,9 @@ OUI:70B3D5A13*
 OUI:70B3D5A15*
  ID_OUI_FROM_DATABASE=Intercore GmbH
 
+OUI:70B3D5A16*
+ ID_OUI_FROM_DATABASE=devAIs s.r.l.
+
 OUI:70B3D5A17*
  ID_OUI_FROM_DATABASE=Tunstall A/S
 
@@ -72029,6 +72590,9 @@ OUI:70B3D5A62*
 OUI:70B3D5A64*
  ID_OUI_FROM_DATABASE=Newshine
 
+OUI:70B3D5A65*
+ ID_OUI_FROM_DATABASE=CREATIVE
+
 OUI:70B3D5A66*
  ID_OUI_FROM_DATABASE=Trapeze Software Group Inc
 
@@ -72086,6 +72650,9 @@ OUI:70B3D5A77*
 OUI:70B3D5A78*
  ID_OUI_FROM_DATABASE=Bionics co.,ltd.
 
+OUI:70B3D5A79*
+ ID_OUI_FROM_DATABASE=NOREYA Technology e.U.
+
 OUI:70B3D5A7A*
  ID_OUI_FROM_DATABASE=Fluid Management Technology
 
@@ -72353,6 +72920,9 @@ OUI:70B3D5AD5*
 OUI:70B3D5AD6*
  ID_OUI_FROM_DATABASE=Lemonade Lab Inc
 
+OUI:70B3D5AD7*
+ ID_OUI_FROM_DATABASE=Octopus IoT srl
+
 OUI:70B3D5AD8*
  ID_OUI_FROM_DATABASE=Euklis by GSG International
 
@@ -72461,6 +73031,9 @@ OUI:70B3D5AFA*
 OUI:70B3D5AFB*
  ID_OUI_FROM_DATABASE=Shanghai Tianhe Automation Instrumentation Co., Ltd.
 
+OUI:70B3D5AFC*
+ ID_OUI_FROM_DATABASE=BAE Systems
+
 OUI:70B3D5AFE*
  ID_OUI_FROM_DATABASE=MESOTECHNIC
 
@@ -72500,6 +73073,9 @@ OUI:70B3D5B0B*
 OUI:70B3D5B0C*
  ID_OUI_FROM_DATABASE=Vigilate srl
 
+OUI:70B3D5B0D*
+ ID_OUI_FROM_DATABASE=ALFI
+
 OUI:70B3D5B0E*
  ID_OUI_FROM_DATABASE=Servotronix Motion Control
 
@@ -72572,6 +73148,9 @@ OUI:70B3D5B25*
 OUI:70B3D5B26*
  ID_OUI_FROM_DATABASE=INTEC International GmbH
 
+OUI:70B3D5B27*
+ ID_OUI_FROM_DATABASE=Naval Group
+
 OUI:70B3D5B28*
  ID_OUI_FROM_DATABASE=HUSTY M.Styczen J.Hupert sp.j.
 
@@ -72584,6 +73163,9 @@ OUI:70B3D5B2A*
 OUI:70B3D5B2B*
  ID_OUI_FROM_DATABASE=Vtron Pty Ltd
 
+OUI:70B3D5B2C*
+ ID_OUI_FROM_DATABASE=Elman srl
+
 OUI:70B3D5B2D*
  ID_OUI_FROM_DATABASE=Plexus
 
@@ -72644,6 +73226,9 @@ OUI:70B3D5B40*
 OUI:70B3D5B41*
  ID_OUI_FROM_DATABASE=T&M Media Pty Ltd
 
+OUI:70B3D5B42*
+ ID_OUI_FROM_DATABASE=Samwell International Inc
+
 OUI:70B3D5B43*
  ID_OUI_FROM_DATABASE=ZAO ZEO
 
@@ -72668,6 +73253,9 @@ OUI:70B3D5B49*
 OUI:70B3D5B4A*
  ID_OUI_FROM_DATABASE=MEDEX
 
+OUI:70B3D5B4B*
+ ID_OUI_FROM_DATABASE=Network Customizing Technologies Inc
+
 OUI:70B3D5B4D*
  ID_OUI_FROM_DATABASE=Avidbots Corporation
 
@@ -72866,6 +73454,9 @@ OUI:70B3D5B90*
 OUI:70B3D5B91*
  ID_OUI_FROM_DATABASE=Dynetics, Inc.
 
+OUI:70B3D5B92*
+ ID_OUI_FROM_DATABASE=N A Communications LLC
+
 OUI:70B3D5B93*
  ID_OUI_FROM_DATABASE=INTERNET PROTOCOLO LOGICA SL
 
@@ -73070,6 +73661,12 @@ OUI:70B3D5BD9*
 OUI:70B3D5BDA*
  ID_OUI_FROM_DATABASE=5-D Systems, Inc.
 
+OUI:70B3D5BDB*
+ ID_OUI_FROM_DATABASE=Power Electronics Espana, S.L.
+
+OUI:70B3D5BDC*
+ ID_OUI_FROM_DATABASE=EDF Lab
+
 OUI:70B3D5BDD*
  ID_OUI_FROM_DATABASE=CDR SRL
 
@@ -73127,6 +73724,9 @@ OUI:70B3D5BEE*
 OUI:70B3D5BEF*
  ID_OUI_FROM_DATABASE=Sensortech Systems Inc.
 
+OUI:70B3D5BF0*
+ ID_OUI_FROM_DATABASE=Alfa Elettronica srl
+
 OUI:70B3D5BF1*
  ID_OUI_FROM_DATABASE=Flashnet SRL
 
@@ -73226,6 +73826,9 @@ OUI:70B3D5C11*
 OUI:70B3D5C12*
  ID_OUI_FROM_DATABASE=Beijing Wisetone Information Technology Co.,Ltd.
 
+OUI:70B3D5C13*
+ ID_OUI_FROM_DATABASE=Guangzhou Xianhe Technology Engineering Co., Ltd
+
 OUI:70B3D5C14*
  ID_OUI_FROM_DATABASE=Grupo Epelsa S.L.
 
@@ -73283,6 +73886,9 @@ OUI:70B3D5C26*
 OUI:70B3D5C27*
  ID_OUI_FROM_DATABASE=GD Mission Systems
 
+OUI:70B3D5C28*
+ ID_OUI_FROM_DATABASE=Mitech Integrated Systems Inc.
+
 OUI:70B3D5C29*
  ID_OUI_FROM_DATABASE=SOFTLAND INDIA LTD
 
@@ -73304,6 +73910,9 @@ OUI:70B3D5C2E*
 OUI:70B3D5C2F*
  ID_OUI_FROM_DATABASE=ATBiS Co.,Ltd
 
+OUI:70B3D5C30*
+ ID_OUI_FROM_DATABASE=Polskie Sady Nowe Podole Sp. z o.o.
+
 OUI:70B3D5C31*
  ID_OUI_FROM_DATABASE=German Power GmbH
 
@@ -73370,6 +73979,9 @@ OUI:70B3D5C45*
 OUI:70B3D5C46*
  ID_OUI_FROM_DATABASE=eumig industrie-TV GmbH.
 
+OUI:70B3D5C47*
+ ID_OUI_FROM_DATABASE=ABB
+
 OUI:70B3D5C48*
  ID_OUI_FROM_DATABASE=Weltek Technologies Co. Ltd.
 
@@ -73730,6 +74342,9 @@ OUI:70B3D5CC5*
 OUI:70B3D5CC6*
  ID_OUI_FROM_DATABASE=MB connect line GmbH Fernwartungssysteme
 
+OUI:70B3D5CC7*
+ ID_OUI_FROM_DATABASE=SOtM
+
 OUI:70B3D5CC8*
  ID_OUI_FROM_DATABASE=PROFEN COMMUNICATIONS
 
@@ -73778,6 +74393,9 @@ OUI:70B3D5CD6*
 OUI:70B3D5CD7*
  ID_OUI_FROM_DATABASE=AutomationX GmbH
 
+OUI:70B3D5CD8*
+ ID_OUI_FROM_DATABASE=Nexus Electric S.A.
+
 OUI:70B3D5CD9*
  ID_OUI_FROM_DATABASE=Peter Huber Kaeltemaschinenbau GmbH
 
@@ -73829,6 +74447,9 @@ OUI:70B3D5CEC*
 OUI:70B3D5CED*
  ID_OUI_FROM_DATABASE=Advanced Products Corporation Pte Ltd
 
+OUI:70B3D5CEE*
+ ID_OUI_FROM_DATABASE=ACRIOS Systems s.r.o.
+
 OUI:70B3D5CEF*
  ID_OUI_FROM_DATABASE=Ellego Powertec Oy
 
@@ -73883,6 +74504,9 @@ OUI:70B3D5D01*
 OUI:70B3D5D02*
  ID_OUI_FROM_DATABASE=Arctos Showlasertechnik GmbH
 
+OUI:70B3D5D03*
+ ID_OUI_FROM_DATABASE=Digitella Inc.
+
 OUI:70B3D5D05*
  ID_OUI_FROM_DATABASE=Colmek
 
@@ -74039,6 +74663,9 @@ OUI:70B3D5D3C*
 OUI:70B3D5D3D*
  ID_OUI_FROM_DATABASE=Netzikon GmbH
 
+OUI:70B3D5D3E*
+ ID_OUI_FROM_DATABASE=enders GmbH
+
 OUI:70B3D5D3F*
  ID_OUI_FROM_DATABASE=GLOBALCOM ENGINEERING SPA
 
@@ -74198,6 +74825,9 @@ OUI:70B3D5D76*
 OUI:70B3D5D77*
  ID_OUI_FROM_DATABASE=Portrait Displays, Inc.
 
+OUI:70B3D5D78*
+ ID_OUI_FROM_DATABASE=Nxvi Microelectronics Technology (Jinan) Co., Ltd.
+
 OUI:70B3D5D79*
  ID_OUI_FROM_DATABASE=GOMA ELETTRONICA SpA
 
@@ -74384,6 +75014,9 @@ OUI:70B3D5DB7*
 OUI:70B3D5DB8*
  ID_OUI_FROM_DATABASE=SISTEM SA
 
+OUI:70B3D5DB9*
+ ID_OUI_FROM_DATABASE=PULOON Tech
+
 OUI:70B3D5DBA*
  ID_OUI_FROM_DATABASE=KODENSHI CORP.
 
@@ -74435,6 +75068,9 @@ OUI:70B3D5DC9*
 OUI:70B3D5DCA*
  ID_OUI_FROM_DATABASE=DSan Corporation
 
+OUI:70B3D5DCB*
+ ID_OUI_FROM_DATABASE=MIJIENETRTECH CO.,LTD
+
 OUI:70B3D5DCC*
  ID_OUI_FROM_DATABASE=Eutron SPA
 
@@ -74627,6 +75263,9 @@ OUI:70B3D5E11*
 OUI:70B3D5E12*
  ID_OUI_FROM_DATABASE=SNK, Inc.
 
+OUI:70B3D5E13*
+ ID_OUI_FROM_DATABASE=Suzhou ZhiCai Co.,Ltd.
+
 OUI:70B3D5E14*
  ID_OUI_FROM_DATABASE=Automata Spa
 
@@ -74846,6 +75485,9 @@ OUI:70B3D5E5E*
 OUI:70B3D5E61*
  ID_OUI_FROM_DATABASE=Adeli
 
+OUI:70B3D5E62*
+ ID_OUI_FROM_DATABASE=Eon
+
 OUI:70B3D5E63*
  ID_OUI_FROM_DATABASE=Potomac Electric Corporation
 
@@ -74855,6 +75497,9 @@ OUI:70B3D5E64*
 OUI:70B3D5E65*
  ID_OUI_FROM_DATABASE=BIRTECH TECHNOLOGY
 
+OUI:70B3D5E66*
+ ID_OUI_FROM_DATABASE=Eneon sp. z o.o.
+
 OUI:70B3D5E67*
  ID_OUI_FROM_DATABASE=APPLIED PROCESSING
 
@@ -74867,6 +75512,9 @@ OUI:70B3D5E69*
 OUI:70B3D5E6A*
  ID_OUI_FROM_DATABASE=MAC Solutions (UK) Ltd
 
+OUI:70B3D5E6B*
+ ID_OUI_FROM_DATABASE=Shenzhen Shi Fang Communication Technology Co., Ltd
+
 OUI:70B3D5E6C*
  ID_OUI_FROM_DATABASE=Fusar Technologies inc
 
@@ -75119,6 +75767,9 @@ OUI:70B3D5EBF*
 OUI:70B3D5EC1*
  ID_OUI_FROM_DATABASE=Xafax Nederland bv
 
+OUI:70B3D5EC2*
+ ID_OUI_FROM_DATABASE=Lightside Instruments AS
+
 OUI:70B3D5EC3*
  ID_OUI_FROM_DATABASE=Virtual Control Systems Ltd
 
@@ -75135,7 +75786,7 @@ OUI:70B3D5EC7*
  ID_OUI_FROM_DATABASE=Neoptix Inc.
 
 OUI:70B3D5EC8*
- ID_OUI_FROM_DATABASE=Viko Elektrik-Elektronik A.Ş.
+ ID_OUI_FROM_DATABASE=PANASONIC LIFE SOLUTIONS ELEKTRİK SANAYİ VE TİCARE
 
 OUI:70B3D5EC9*
  ID_OUI_FROM_DATABASE=Qlinx Technologies
@@ -75182,6 +75833,9 @@ OUI:70B3D5ED7*
 OUI:70B3D5ED8*
  ID_OUI_FROM_DATABASE=Wartsila Voyage Limited
 
+OUI:70B3D5ED9*
+ ID_OUI_FROM_DATABASE=AADONA Communication Pvt Ltd
+
 OUI:70B3D5EDA*
  ID_OUI_FROM_DATABASE=Breas Medical AB
 
@@ -75494,6 +76148,9 @@ OUI:70B3D5F47*
 OUI:70B3D5F48*
  ID_OUI_FROM_DATABASE=HEITEC AG
 
+OUI:70B3D5F49*
+ ID_OUI_FROM_DATABASE=ZMBIZI APP LLC
+
 OUI:70B3D5F4A*
  ID_OUI_FROM_DATABASE=LACS SRL
 
@@ -75740,6 +76397,9 @@ OUI:70B3D5F9B*
 OUI:70B3D5F9C*
  ID_OUI_FROM_DATABASE=SureFlap Ltd
 
+OUI:70B3D5F9D*
+ ID_OUI_FROM_DATABASE=Teledyne API
+
 OUI:70B3D5F9E*
  ID_OUI_FROM_DATABASE=International Center for Elementary Particle Physics, The University of Tokyo
 
@@ -76085,6 +76745,9 @@ OUI:70CD91*
 OUI:70CE8C*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
+OUI:70CF49*
+ ID_OUI_FROM_DATABASE=Intel Corporate
+
 OUI:70D081*
  ID_OUI_FROM_DATABASE=Beijing Netpower Technologies Inc.
 
@@ -76127,6 +76790,9 @@ OUI:70DDA1*
 OUI:70DDA8*
  ID_OUI_FROM_DATABASE=GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD
 
+OUI:70DDEF*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:70DEE2*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
@@ -76292,6 +76958,9 @@ OUI:7403BD*
 OUI:74042B*
  ID_OUI_FROM_DATABASE=Lenovo Mobile Communication (Wuhan) Company Limited
 
+OUI:7404F0*
+ ID_OUI_FROM_DATABASE=Mobiwire Mobiles (NingBo) Co., LTD
+
 OUI:7405A5*
  ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD.
 
@@ -76547,12 +77216,18 @@ OUI:744AA4*
 OUI:744BE9*
  ID_OUI_FROM_DATABASE=EXPLORER HYPERTECH CO.,LTD
 
+OUI:744CA1*
+ ID_OUI_FROM_DATABASE=Liteon Technology Corporation
+
 OUI:744D28*
  ID_OUI_FROM_DATABASE=Routerboard.com
 
 OUI:744D79*
  ID_OUI_FROM_DATABASE=Arrive Systems Inc.
 
+OUI:74504E*
+ ID_OUI_FROM_DATABASE=New H3C Technologies Co., Ltd
+
 OUI:7451BA*
  ID_OUI_FROM_DATABASE=Xiaomi Communications Co Ltd
 
@@ -76790,6 +77465,9 @@ OUI:748A28*
 OUI:748A69*
  ID_OUI_FROM_DATABASE=Korea Image Technology Co., Ltd
 
+OUI:748B29*
+ ID_OUI_FROM_DATABASE=Micobiomed
+
 OUI:748B34*
  ID_OUI_FROM_DATABASE=Shanghai Smart System Technology Co., Ltd
 
@@ -76809,7 +77487,7 @@ OUI:748F3C*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
 OUI:748F4D*
- ID_OUI_FROM_DATABASE=MEN Mikro Elektronik GmbH
+ ID_OUI_FROM_DATABASE=duagon Germany GmbH
 
 OUI:74901F*
  ID_OUI_FROM_DATABASE=Ragile Networks Inc.
@@ -76841,6 +77519,9 @@ OUI:749781*
 OUI:749975*
  ID_OUI_FROM_DATABASE=IBM Corporation
 
+OUI:749AC0*
+ ID_OUI_FROM_DATABASE=Cachengo, Inc.
+
 OUI:749BE8*
  ID_OUI_FROM_DATABASE=Hitron Technologies. Inc
 
@@ -77147,6 +77828,9 @@ OUI:74E6E2*
 OUI:74E7C6*
  ID_OUI_FROM_DATABASE=ARRIS Group, Inc.
 
+OUI:74E9BF*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:74EA3A*
  ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD.
 
@@ -77453,6 +78137,9 @@ OUI:783690*
 OUI:7836CC*
  ID_OUI_FROM_DATABASE=GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD
 
+OUI:783716*
+ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
+
 OUI:783A6C*
  ID_OUI_FROM_DATABASE=TECNO MOBILE LIMITED
 
@@ -78041,6 +78728,9 @@ OUI:78CC2B*
 OUI:78CD8E*
  ID_OUI_FROM_DATABASE=SMC Networks Inc
 
+OUI:78CF2F*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:78D004*
  ID_OUI_FROM_DATABASE=Neousys Technology Inc.
 
@@ -78062,6 +78752,51 @@ OUI:78D34F*
 OUI:78D38D*
  ID_OUI_FROM_DATABASE=HONGKONG YUNLINK TECHNOLOGY LIMITED
 
+OUI:78D4F10*
+ ID_OUI_FROM_DATABASE=Burisch Elektronik Bauteile GmbH
+
+OUI:78D4F11*
+ ID_OUI_FROM_DATABASE=Cartender
+
+OUI:78D4F12*
+ ID_OUI_FROM_DATABASE=Lyngsoe Systems
+
+OUI:78D4F13*
+ ID_OUI_FROM_DATABASE=Ekoenergetyka - Polska S.A.
+
+OUI:78D4F14*
+ ID_OUI_FROM_DATABASE=BYD Auto lndustry Co.,Ltd
+
+OUI:78D4F15*
+ ID_OUI_FROM_DATABASE=Huaqin Telecom Technology Co.,Ltd.
+
+OUI:78D4F16*
+ ID_OUI_FROM_DATABASE=Guangzhou Kingray information technology Co.,Ltd.
+
+OUI:78D4F17*
+ ID_OUI_FROM_DATABASE=Famar Fueguina S.A.
+
+OUI:78D4F18*
+ ID_OUI_FROM_DATABASE=Xiamen Cheerzing IOT Technology Co.,Ltd.
+
+OUI:78D4F19*
+ ID_OUI_FROM_DATABASE=shanghai baudcom communication device co.,ltd
+
+OUI:78D4F1A*
+ ID_OUI_FROM_DATABASE=BONENG TRANSMISSION(SUZHOU)CO.,LTD
+
+OUI:78D4F1B*
+ ID_OUI_FROM_DATABASE=Jiangsu byzoro intelligent technology Co.,Ltd
+
+OUI:78D4F1C*
+ ID_OUI_FROM_DATABASE=TNB
+
+OUI:78D4F1D*
+ ID_OUI_FROM_DATABASE=Quidel Corporation
+
+OUI:78D4F1E*
+ ID_OUI_FROM_DATABASE=Blue Sparq, Inc.
+
 OUI:78D5B5*
  ID_OUI_FROM_DATABASE=NAVIELEKTRO KY
 
@@ -78164,6 +78899,9 @@ OUI:78DEE4*
 OUI:78E103*
  ID_OUI_FROM_DATABASE=Amazon Technologies Inc.
 
+OUI:78E22C*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:78E2BD*
  ID_OUI_FROM_DATABASE=Vodafone Automotive S.p.A.
 
@@ -78231,7 +78969,7 @@ OUI:78F944*
  ID_OUI_FROM_DATABASE=Private
 
 OUI:78F9B4*
- ID_OUI_FROM_DATABASE=Nokia
+ ID_OUI_FROM_DATABASE=Nokia Solutions and Networks GmbH & Co. KG
 
 OUI:78FC14*
  ID_OUI_FROM_DATABASE=Family Zone Cyber Safety Ltd
@@ -78545,6 +79283,9 @@ OUI:7C4FB5*
 OUI:7C5049*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
+OUI:7C5079*
+ ID_OUI_FROM_DATABASE=Intel Corporate
+
 OUI:7C50DA*
  ID_OUI_FROM_DATABASE=Private
 
@@ -79007,6 +79748,9 @@ OUI:7CBFB1*
 OUI:7CC294*
  ID_OUI_FROM_DATABASE=Beijing Xiaomi Mobile Software Co., Ltd
 
+OUI:7CC2C6*
+ ID_OUI_FROM_DATABASE=TP-Link Corporation Limited
+
 OUI:7CC385*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
@@ -79400,6 +80144,9 @@ OUI:8020FD*
 OUI:802275*
  ID_OUI_FROM_DATABASE=Beijing Beny Wave Technology Co Ltd
 
+OUI:802278*
+ ID_OUI_FROM_DATABASE=China Mobile IOT Company Limited
+
 OUI:8022A7*
  ID_OUI_FROM_DATABASE=NEC Platforms, Ltd.
 
@@ -79460,6 +80207,9 @@ OUI:803896*
 OUI:8038BC*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
+OUI:8038FB*
+ ID_OUI_FROM_DATABASE=Intel Corporate
+
 OUI:8038FD*
  ID_OUI_FROM_DATABASE=LeapFrog Enterprises, Inc.
 
@@ -79517,6 +80267,9 @@ OUI:804A14*
 OUI:804B20*
  ID_OUI_FROM_DATABASE=Ventilation Control
 
+OUI:804B50*
+ ID_OUI_FROM_DATABASE=Silicon Laboratories
+
 OUI:804E70*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
@@ -79883,6 +80636,9 @@ OUI:80B709*
 OUI:80B95C*
  ID_OUI_FROM_DATABASE=ELFTECH Co., Ltd.
 
+OUI:80B97A*
+ ID_OUI_FROM_DATABASE=eero inc.
+
 OUI:80BAAC*
  ID_OUI_FROM_DATABASE=TeleAdapt Ltd
 
@@ -79898,6 +80654,9 @@ OUI:80BE05*
 OUI:80C16E*
  ID_OUI_FROM_DATABASE=Hewlett Packard
 
+OUI:80C501*
+ ID_OUI_FROM_DATABASE=OctoGate IT Security Systems GmbH
+
 OUI:80C548*
  ID_OUI_FROM_DATABASE=Shenzhen Zowee Technology Co.,Ltd
 
@@ -80405,6 +81164,9 @@ OUI:844167*
 OUI:844464*
  ID_OUI_FROM_DATABASE=ServerU Inc
 
+OUI:8444AF*
+ ID_OUI_FROM_DATABASE=Zhejiang Tmall Technology Co., Ltd.
+
 OUI:8446FE*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
@@ -80456,6 +81218,9 @@ OUI:845B12*
 OUI:845C93*
  ID_OUI_FROM_DATABASE=Chabrier Services
 
+OUI:845CF3*
+ ID_OUI_FROM_DATABASE=Intel Corporate
+
 OUI:845DD7*
  ID_OUI_FROM_DATABASE=Shenzhen Netcom Electronics Co.,Ltd
 
@@ -80474,6 +81239,9 @@ OUI:8462A6*
 OUI:8463D6*
  ID_OUI_FROM_DATABASE=Microsoft Corporation
 
+OUI:846569*
+ ID_OUI_FROM_DATABASE=New H3C Technologies Co., Ltd
+
 OUI:84683E*
  ID_OUI_FROM_DATABASE=Intel Corporate
 
@@ -80504,6 +81272,9 @@ OUI:846FCE*
 OUI:847127*
  ID_OUI_FROM_DATABASE=Silicon Laboratories
 
+OUI:84716A*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:847207*
  ID_OUI_FROM_DATABASE=I&C Technology
 
@@ -80906,6 +81677,9 @@ OUI:84D15A*
 OUI:84D32A*
  ID_OUI_FROM_DATABASE=IEEE 1905.1
 
+OUI:84D343*
+ ID_OUI_FROM_DATABASE=Calix Inc.
+
 OUI:84D412*
  ID_OUI_FROM_DATABASE=Palo Alto Networks
 
@@ -80934,7 +81708,7 @@ OUI:84DB2F*
  ID_OUI_FROM_DATABASE=Sierra Wireless
 
 OUI:84DB9E*
- ID_OUI_FROM_DATABASE=Aifloo AB
+ ID_OUI_FROM_DATABASE=Pink Nectarine Health AB
 
 OUI:84DBAC*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
@@ -81012,7 +81786,7 @@ OUI:84E327*
  ID_OUI_FROM_DATABASE=TAILYN TECHNOLOGIES INC
 
 OUI:84E342*
- ID_OUI_FROM_DATABASE=Tuya?HK?Limietd
+ ID_OUI_FROM_DATABASE=Tuya (HK) Limietd
 
 OUI:84E4D9*
  ID_OUI_FROM_DATABASE=Shenzhen NEED technology Ltd.
@@ -81170,6 +81944,9 @@ OUI:8821E3*
 OUI:882364*
  ID_OUI_FROM_DATABASE=Watchnet DVR Inc
 
+OUI:88238C*
+ ID_OUI_FROM_DATABASE=Fiberhome Telecommunication Technologies Co.,LTD
+
 OUI:8823FE*
  ID_OUI_FROM_DATABASE=TTTech Computertechnik AG
 
@@ -81338,6 +82115,9 @@ OUI:8857EE*
 OUI:885A06*
  ID_OUI_FROM_DATABASE=GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD
 
+OUI:885A85*
+ ID_OUI_FROM_DATABASE=Wistron Neweb Corporation
+
 OUI:885A92*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
@@ -81455,6 +82235,9 @@ OUI:886440*
 OUI:886639*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
+OUI:88665A*
+ ID_OUI_FROM_DATABASE=Apple, Inc.
+
 OUI:8866A5*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
@@ -82028,6 +82811,9 @@ OUI:8C0F83*
 OUI:8C0FA0*
  ID_OUI_FROM_DATABASE=di-soric GmbH & Co. KG
 
+OUI:8C0FC9*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:8C0FFA*
  ID_OUI_FROM_DATABASE=Hutec co.,ltd
 
@@ -82487,6 +83273,9 @@ OUI:8C640B*
 OUI:8C6422*
  ID_OUI_FROM_DATABASE=Sony Mobile Communications Inc
 
+OUI:8C64D4*
+ ID_OUI_FROM_DATABASE=Hyeco Smart Tech Co.,Ltd
+
 OUI:8C683A*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
@@ -82616,6 +83405,9 @@ OUI:8C8ABB*
 OUI:8C8B83*
  ID_OUI_FROM_DATABASE=Texas Instruments
 
+OUI:8C8CAA*
+ ID_OUI_FROM_DATABASE=LCFC(HeFei) Electronics Technology co., ltd
+
 OUI:8C8D28*
  ID_OUI_FROM_DATABASE=Intel Corporate
 
@@ -82688,12 +83480,51 @@ OUI:8CAAB5*
 OUI:8CAB8E*
  ID_OUI_FROM_DATABASE=Shanghai Feixun Communication Co.,Ltd.
 
+OUI:8CAE490*
+ ID_OUI_FROM_DATABASE=Ouman Oy
+
+OUI:8CAE491*
+ ID_OUI_FROM_DATABASE=H3 Platform
+
+OUI:8CAE492*
+ ID_OUI_FROM_DATABASE=SEVERIN Elektrogeräte GmbH
+
+OUI:8CAE493*
+ ID_OUI_FROM_DATABASE=BERTIN TECHNOLOGIES
+
+OUI:8CAE494*
+ ID_OUI_FROM_DATABASE=Jiangsu Sixingda Information Technology Co., Ltd.
+
+OUI:8CAE495*
+ ID_OUI_FROM_DATABASE=Gati Information Technolog(Kunshan)Co.,Ltd.
+
 OUI:8CAE496*
  ID_OUI_FROM_DATABASE=Chengdu BillDTE Technology Co., Ltd
 
+OUI:8CAE497*
+ ID_OUI_FROM_DATABASE=Precitec Optronik GmbH
+
+OUI:8CAE498*
+ ID_OUI_FROM_DATABASE=LLC Taipit - Measuring Equipment
+
+OUI:8CAE499*
+ ID_OUI_FROM_DATABASE=TTR Corporation
+
 OUI:8CAE49A*
  ID_OUI_FROM_DATABASE=Gigawave
 
+OUI:8CAE49B*
+ ID_OUI_FROM_DATABASE=Suzhou Guowang Electronics Technology Co., Ltd.
+
+OUI:8CAE49C*
+ ID_OUI_FROM_DATABASE=Parametric GmbH
+
+OUI:8CAE49D*
+ ID_OUI_FROM_DATABASE=Larch Networks
+
+OUI:8CAE49E*
+ ID_OUI_FROM_DATABASE=Shenzhen C & D Electronics Co., Ltd.
+
 OUI:8CAE4C*
  ID_OUI_FROM_DATABASE=Plugable Technologies
 
@@ -82868,6 +83699,12 @@ OUI:8CDE52*
 OUI:8CDE99*
  ID_OUI_FROM_DATABASE=Comlab Inc.
 
+OUI:8CDEE6*
+ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
+
+OUI:8CDEF9*
+ ID_OUI_FROM_DATABASE=Beijing Xiaomi Mobile Software Co., Ltd
+
 OUI:8CDF9D*
  ID_OUI_FROM_DATABASE=NEC Corporation
 
@@ -82904,12 +83741,18 @@ OUI:8CE7B3*
 OUI:8CEA1B*
  ID_OUI_FROM_DATABASE=Edgecore Networks Corporation
 
+OUI:8CEA48*
+ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
+
 OUI:8CEBC6*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
 OUI:8CEC4B*
  ID_OUI_FROM_DATABASE=Dell Inc.
 
+OUI:8CEC7B*
+ ID_OUI_FROM_DATABASE=Apple, Inc.
+
 OUI:8CEEC6*
  ID_OUI_FROM_DATABASE=Precepscion Pty. Ltd.
 
@@ -82919,6 +83762,9 @@ OUI:8CF112*
 OUI:8CF228*
  ID_OUI_FROM_DATABASE=MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD.
 
+OUI:8CF319*
+ ID_OUI_FROM_DATABASE=Siemens Industrial Automation Products Ltd., Chengdu
+
 OUI:8CF5A3*
  ID_OUI_FROM_DATABASE=SAMSUNG ELECTRO-MECHANICS(THAILAND)
 
@@ -82976,6 +83822,9 @@ OUI:90013B*
 OUI:900218*
  ID_OUI_FROM_DATABASE=BSkyB Ltd
 
+OUI:90027A*
+ ID_OUI_FROM_DATABASE=Shenzhen Sworix Techonlogy Co., Ltd
+
 OUI:90028A*
  ID_OUI_FROM_DATABASE=Shenzhen Shidean Legrand Electronic Products Co.,Ltd
 
@@ -83030,6 +83879,9 @@ OUI:900E83*
 OUI:900EB3*
  ID_OUI_FROM_DATABASE=Shenzhen Amediatech Technology Co., Ltd.
 
+OUI:900F0C*
+ ID_OUI_FROM_DATABASE=CLOUD NETWORK TECHNOLOGY SINGAPORE PTE. LTD.
+
 OUI:901234*
  ID_OUI_FROM_DATABASE=Shenzhen YOUHUA Technology Co., Ltd
 
@@ -83162,6 +84014,9 @@ OUI:903C92*
 OUI:903CAE*
  ID_OUI_FROM_DATABASE=Yunnan KSEC Digital Technology Co.,Ltd.
 
+OUI:903CB3*
+ ID_OUI_FROM_DATABASE=Edgecore Networks Corporation
+
 OUI:903D5A*
  ID_OUI_FROM_DATABASE=Shenzhen Wision Technology Holding Limited
 
@@ -84194,6 +85049,9 @@ OUI:945B7E*
 OUI:945F34*
  ID_OUI_FROM_DATABASE=Renesas Electronics (Penang) Sdn. Bhd.
 
+OUI:946010*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:94611E*
  ID_OUI_FROM_DATABASE=Wata Electronics Co.,Ltd.
 
@@ -84302,6 +85160,9 @@ OUI:948DEF*
 OUI:948E89*
  ID_OUI_FROM_DATABASE=INDUSTRIAS UNIDAS SA DE CV
 
+OUI:948ED3*
+ ID_OUI_FROM_DATABASE=Arista Networks
+
 OUI:948FCF*
  ID_OUI_FROM_DATABASE=ARRIS Group, Inc.
 
@@ -85256,6 +86117,9 @@ OUI:9876B6*
 OUI:987770*
  ID_OUI_FROM_DATABASE=Pep Digital Technology (Guangzhou) Co., Ltd
 
+OUI:9877E7*
+ ID_OUI_FROM_DATABASE=Kaonmedia CO., LTD.
+
 OUI:987A10*
  ID_OUI_FROM_DATABASE=Ericsson AB
 
@@ -85301,6 +86165,9 @@ OUI:988B0A*
 OUI:988B5D*
  ID_OUI_FROM_DATABASE=Sagemcom Broadband SAS
 
+OUI:988B69*
+ ID_OUI_FROM_DATABASE=Shenzhen hylitech Co.,LTD
+
 OUI:988BAD*
  ID_OUI_FROM_DATABASE=Corintech Ltd.
 
@@ -85457,6 +86324,9 @@ OUI:98BC99*
 OUI:98BE94*
  ID_OUI_FROM_DATABASE=IBM
 
+OUI:98BEDC*
+ ID_OUI_FROM_DATABASE=Honor Device Co., Ltd.
+
 OUI:98C0EB*
  ID_OUI_FROM_DATABASE=Global Regency Ltd
 
@@ -85574,6 +86444,9 @@ OUI:98EC65*
 OUI:98ED5C*
  ID_OUI_FROM_DATABASE=Tesla,Inc.
 
+OUI:98ED7E*
+ ID_OUI_FROM_DATABASE=eero inc.
+
 OUI:98EECB*
  ID_OUI_FROM_DATABASE=Wistron Infocomm (Zhongshan) Corporation
 
@@ -85763,6 +86636,9 @@ OUI:9C0473*
 OUI:9C04EB*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
+OUI:9C0567*
+ ID_OUI_FROM_DATABASE=Honor Device Co., Ltd.
+
 OUI:9C061B*
  ID_OUI_FROM_DATABASE=Hangzhou H3C Technologies Co., Limited
 
@@ -86081,6 +86957,9 @@ OUI:9C6650*
 OUI:9C685B*
  ID_OUI_FROM_DATABASE=Octonion SA
 
+OUI:9C6865*
+ ID_OUI_FROM_DATABASE=Fiberhome Telecommunication Technologies Co.,LTD
+
 OUI:9C6937*
  ID_OUI_FROM_DATABASE=Qorvo International Pte. Ltd.
 
@@ -86156,6 +87035,9 @@ OUI:9C7370*
 OUI:9C741A*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
+OUI:9C746F*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:9C7514*
  ID_OUI_FROM_DATABASE=Wildix srl
 
@@ -86186,6 +87068,9 @@ OUI:9C807D*
 OUI:9C80DF*
  ID_OUI_FROM_DATABASE=Arcadyan Technology Corporation
 
+OUI:9C823F*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:9C8275*
  ID_OUI_FROM_DATABASE=Yichip Microelectronics (Hangzhou) Co.,Ltd
 
@@ -86273,6 +87158,9 @@ OUI:9C9AC0*
 OUI:9C9C1D*
  ID_OUI_FROM_DATABASE=Starkey Labs Inc.
 
+OUI:9C9C1F*
+ ID_OUI_FROM_DATABASE=Espressif Inc.
+
 OUI:9C9C40*
  ID_OUI_FROM_DATABASE=SICHUAN TIANYI COMHEART TELECOMCO., LTD
 
@@ -86300,6 +87188,9 @@ OUI:9CA513*
 OUI:9CA525*
  ID_OUI_FROM_DATABASE=Shandong USR IOT Technology Limited
 
+OUI:9CA570*
+ ID_OUI_FROM_DATABASE=eero inc.
+
 OUI:9CA577*
  ID_OUI_FROM_DATABASE=Osorno Enterprises Inc.
 
@@ -86363,6 +87254,9 @@ OUI:9CB793*
 OUI:9CBB98*
  ID_OUI_FROM_DATABASE=Shen Zhen RND Electronic Co.,LTD
 
+OUI:9CBCF0*
+ ID_OUI_FROM_DATABASE=Xiaomi Communications Co Ltd
+
 OUI:9CBD6E*
  ID_OUI_FROM_DATABASE=DERA Co., Ltd
 
@@ -86498,6 +87392,9 @@ OUI:9CE91C*
 OUI:9CE951*
  ID_OUI_FROM_DATABASE=Shenzhen Sang Fei Consumer Communications Ltd., Co.
 
+OUI:9CEA97*
+ ID_OUI_FROM_DATABASE=Honor Device Co., Ltd.
+
 OUI:9CEBE8*
  ID_OUI_FROM_DATABASE=BizLink (Kunshan) Co.,Ltd
 
@@ -86585,6 +87482,9 @@ OUI:9CFBF1*
 OUI:9CFC01*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
+OUI:9CFC28*
+ ID_OUI_FROM_DATABASE=Apple, Inc.
+
 OUI:9CFCD1*
  ID_OUI_FROM_DATABASE=Aetheris Technology (Shanghai) Co., Ltd.
 
@@ -86600,6 +87500,48 @@ OUI:9CFFBE*
 OUI:9CFFC2*
  ID_OUI_FROM_DATABASE=AVI Systems GmbH
 
+OUI:A0024A0*
+ ID_OUI_FROM_DATABASE=Zhejiang Hechuan Technology Co.,Ltd
+
+OUI:A0024A1*
+ ID_OUI_FROM_DATABASE=Vitec Imaging Solutions Spa
+
+OUI:A0024A2*
+ ID_OUI_FROM_DATABASE=Danriver Technologies Corp.
+
+OUI:A0024A3*
+ ID_OUI_FROM_DATABASE=SomaDetect Inc
+
+OUI:A0024A4*
+ ID_OUI_FROM_DATABASE=Argos Solutions AS
+
+OUI:A0024A5*
+ ID_OUI_FROM_DATABASE=Donguan Amsamotion Automation Technology Co., Ltd
+
+OUI:A0024A6*
+ ID_OUI_FROM_DATABASE=Xiaojie Technology (Shenzhen) Co., Ltd
+
+OUI:A0024A8*
+ ID_OUI_FROM_DATABASE=Beijing Lyratone Technology Co., Ltd
+
+OUI:A0024A9*
+ ID_OUI_FROM_DATABASE=Kontakt Micro-Location Sp z o.o.
+
+OUI:A0024AA*
+ ID_OUI_FROM_DATABASE=Guangdong Jinpeng Technology Co. LTD
+
+OUI:A0024AB*
+ ID_OUI_FROM_DATABASE=Xi'an Yingsheng Electric Technology Co.,Ltd.
+
+OUI:A0024AC*
+ ID_OUI_FROM_DATABASE=Encroute AB
+
+OUI:A0024AD*
+ ID_OUI_FROM_DATABASE=bitbee Inc
+
+OUI:A0024AE*
+ ID_OUI_FROM_DATABASE=IoTecha Corp
+
 OUI:A002DC*
  ID_OUI_FROM_DATABASE=Amazon Technologies Inc.
 
@@ -86882,6 +87824,9 @@ OUI:A039F7*
 OUI:A03A75*
  ID_OUI_FROM_DATABASE=PSS Belgium N.V.
 
+OUI:A03B01*
+ ID_OUI_FROM_DATABASE=Kyung In Electronics
+
 OUI:A03B1B*
  ID_OUI_FROM_DATABASE=Inspire Tech
 
@@ -86891,6 +87836,9 @@ OUI:A03BE3*
 OUI:A03C31*
  ID_OUI_FROM_DATABASE=Shenzhen Belon Technology CO.,LTD
 
+OUI:A03D6E*
+ ID_OUI_FROM_DATABASE=Cisco Systems, Inc
+
 OUI:A03D6F*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
@@ -86951,6 +87899,9 @@ OUI:A04041*
 OUI:A040A0*
  ID_OUI_FROM_DATABASE=NETGEAR
 
+OUI:A0412D*
+ ID_OUI_FROM_DATABASE=Lansen Systems AB
+
 OUI:A04147*
  ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
 
@@ -87044,6 +87995,9 @@ OUI:A06090*
 OUI:A06260*
  ID_OUI_FROM_DATABASE=Private
 
+OUI:A062FB*
+ ID_OUI_FROM_DATABASE=HISENSE VISUAL TECHNOLOGY CO.,LTD
+
 OUI:A06391*
  ID_OUI_FROM_DATABASE=NETGEAR
 
@@ -87257,6 +88211,9 @@ OUI:A0A3B8*
 OUI:A0A3E2*
  ID_OUI_FROM_DATABASE=Actiontec Electronics, Inc
 
+OUI:A0A3F0*
+ ID_OUI_FROM_DATABASE=D-Link International
+
 OUI:A0A4C5*
  ID_OUI_FROM_DATABASE=Intel Corporate
 
@@ -87908,6 +88865,9 @@ OUI:A43EA0*
 OUI:A44027*
  ID_OUI_FROM_DATABASE=zte corporation
 
+OUI:A4423B*
+ ID_OUI_FROM_DATABASE=Intel Corporate
+
 OUI:A444D1*
  ID_OUI_FROM_DATABASE=Wingtech Group (HongKong)Limited
 
@@ -88019,6 +88979,45 @@ OUI:A4530E*
 OUI:A45385*
  ID_OUI_FROM_DATABASE=WEIFANG GOERTEK ELECTRONICS CO.,LTD
 
+OUI:A453EE0*
+ ID_OUI_FROM_DATABASE=MAHLE ELECTRONICS, SLU
+
+OUI:A453EE1*
+ ID_OUI_FROM_DATABASE=Stellamore
+
+OUI:A453EE2*
+ ID_OUI_FROM_DATABASE=Ubisafe Smart Devices
+
+OUI:A453EE3*
+ ID_OUI_FROM_DATABASE=Larva.io OÜ
+
+OUI:A453EE4*
+ ID_OUI_FROM_DATABASE=Williamson Corporation
+
+OUI:A453EE5*
+ ID_OUI_FROM_DATABASE=Foshan Yisihang Electrical Technology Co., Ltd.
+
+OUI:A453EE6*
+ ID_OUI_FROM_DATABASE=Aura Home, Inc.
+
+OUI:A453EE7*
+ ID_OUI_FROM_DATABASE=Beijing Lanke Science and Technology Co.,LTd.
+
+OUI:A453EE8*
+ ID_OUI_FROM_DATABASE=T-Touching Co., Ltd.
+
+OUI:A453EE9*
+ ID_OUI_FROM_DATABASE=Dongguan HuaFuu industrial co., LTD
+
+OUI:A453EEB*
+ ID_OUI_FROM_DATABASE=Viper Design, LLC
+
+OUI:A453EEC*
+ ID_OUI_FROM_DATABASE=SOS LAB Co., Ltd.
+
+OUI:A453EED*
+ ID_OUI_FROM_DATABASE=SSK CORPORATION
+
 OUI:A45602*
  ID_OUI_FROM_DATABASE=fenglian Technology Co.,Ltd.
 
@@ -88088,6 +89087,9 @@ OUI:A45D36*
 OUI:A45DA1*
  ID_OUI_FROM_DATABASE=ADB Broadband Italia
 
+OUI:A45E5A*
+ ID_OUI_FROM_DATABASE=ACTIVIO Inc.
+
 OUI:A45E60*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
@@ -88115,6 +89117,9 @@ OUI:A46706*
 OUI:A468BC*
  ID_OUI_FROM_DATABASE=Oakley Inc.
 
+OUI:A46BB6*
+ ID_OUI_FROM_DATABASE=Intel Corporate
+
 OUI:A46C2A*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
@@ -88568,6 +89573,9 @@ OUI:A4E391*
 OUI:A4E4B8*
  ID_OUI_FROM_DATABASE=BlackBerry RTS
 
+OUI:A4E57C*
+ ID_OUI_FROM_DATABASE=Espressif Inc.
+
 OUI:A4E597*
  ID_OUI_FROM_DATABASE=Gessler GmbH
 
@@ -88826,6 +89834,9 @@ OUI:A83759*
 OUI:A83944*
  ID_OUI_FROM_DATABASE=Actiontec Electronics, Inc
 
+OUI:A83B5C*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:A83CCB*
  ID_OUI_FROM_DATABASE=ROSSMA
 
@@ -88889,6 +89900,9 @@ OUI:A8407D*
 OUI:A84122*
  ID_OUI_FROM_DATABASE=China Mobile (Hangzhou) Information Technology Co.,Ltd.
 
+OUI:A842A7*
+ ID_OUI_FROM_DATABASE=Jiangsu Huitong Group Co.,Ltd.
+
 OUI:A84481*
  ID_OUI_FROM_DATABASE=Nokia Corporation
 
@@ -89138,6 +90152,9 @@ OUI:A8995C*
 OUI:A89969*
  ID_OUI_FROM_DATABASE=Dell Inc.
 
+OUI:A899DC*
+ ID_OUI_FROM_DATABASE=i-TOP DESING TECHNOLOGY CO.,LTD
+
 OUI:A89A93*
  ID_OUI_FROM_DATABASE=Sagemcom Broadband SAS
 
@@ -89264,6 +90281,9 @@ OUI:A8CAB9*
 OUI:A8CB95*
  ID_OUI_FROM_DATABASE=EAST BEST CO., LTD.
 
+OUI:A8CC6F*
+ ID_OUI_FROM_DATABASE=HMD Global Oy
+
 OUI:A8CCC5*
  ID_OUI_FROM_DATABASE=Saab AB (publ)
 
@@ -89363,6 +90383,9 @@ OUI:A8F5AC*
 OUI:A8F5DD*
  ID_OUI_FROM_DATABASE=ARRIS Group, Inc.
 
+OUI:A8F766*
+ ID_OUI_FROM_DATABASE=ITE Tech Inc
+
 OUI:A8F7E0*
  ID_OUI_FROM_DATABASE=PLANET Technology Corporation
 
@@ -89378,6 +90401,9 @@ OUI:A8FB70*
 OUI:A8FCB7*
  ID_OUI_FROM_DATABASE=Consolidated Resource Imaging
 
+OUI:A8FFBA*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:AA0000*
  ID_OUI_FROM_DATABASE=DIGITAL EQUIPMENT CORPORATION
 
@@ -89864,6 +90890,9 @@ OUI:AC751D*
 OUI:AC7713*
  ID_OUI_FROM_DATABASE=Honeywell Safety Products (Shanghai) Co.,Ltd
 
+OUI:AC78D1*
+ ID_OUI_FROM_DATABASE=Juniper Networks
+
 OUI:AC7A42*
  ID_OUI_FROM_DATABASE=iConnectivity
 
@@ -89891,6 +90920,9 @@ OUI:AC8112*
 OUI:AC81F3*
  ID_OUI_FROM_DATABASE=Nokia Corporation
 
+OUI:AC8247*
+ ID_OUI_FROM_DATABASE=Intel Corporate
+
 OUI:AC8317*
  ID_OUI_FROM_DATABASE=Shenzhen Furtunetel Communication Co., Ltd
 
@@ -90317,6 +91349,9 @@ OUI:B01266*
 OUI:B01408*
  ID_OUI_FROM_DATABASE=LIGHTSPEED INTERNATIONAL CO.
 
+OUI:B01656*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:B01743*
  ID_OUI_FROM_DATABASE=EDISON GLOBAL CIRCUITS LLC
 
@@ -90545,6 +91580,9 @@ OUI:B05CDA*
 OUI:B05CE5*
  ID_OUI_FROM_DATABASE=Nokia Corporation
 
+OUI:B06088*
+ ID_OUI_FROM_DATABASE=Intel Corporate
+
 OUI:B061C7*
  ID_OUI_FROM_DATABASE=Ericsson-LG Enterprise
 
@@ -90620,6 +91658,9 @@ OUI:B0793C*
 OUI:B07994*
  ID_OUI_FROM_DATABASE=Motorola Mobility LLC, a Lenovo Company
 
+OUI:B07B25*
+ ID_OUI_FROM_DATABASE=Dell Inc.
+
 OUI:B07D47*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
@@ -90668,6 +91709,9 @@ OUI:B089C2*
 OUI:B08BCF*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
+OUI:B08BD0*
+ ID_OUI_FROM_DATABASE=Cisco Systems, Inc
+
 OUI:B08C75*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
@@ -90866,6 +91910,9 @@ OUI:B0BB8B*
 OUI:B0BBE5*
  ID_OUI_FROM_DATABASE=Sagemcom Broadband SAS
 
+OUI:B0BD1B*
+ ID_OUI_FROM_DATABASE=Dongguan Liesheng Electronic Co., Ltd.
+
 OUI:B0BD6D*
  ID_OUI_FROM_DATABASE=Echostreams Innovative Solutions
 
@@ -91043,6 +92090,9 @@ OUI:B0E50E*
 OUI:B0E5ED*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
+OUI:B0E5F9*
+ ID_OUI_FROM_DATABASE=Apple, Inc.
+
 OUI:B0E71D*
  ID_OUI_FROM_DATABASE=Shanghai Maigantech Co.,Ltd
 
@@ -91613,6 +92663,9 @@ OUI:B482FE*
 OUI:B48547*
  ID_OUI_FROM_DATABASE=Amptown System Company GmbH
 
+OUI:B485E1*
+ ID_OUI_FROM_DATABASE=Apple, Inc.
+
 OUI:B48655*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
@@ -91781,6 +92834,9 @@ OUI:B4B15A*
 OUI:B4B265*
  ID_OUI_FROM_DATABASE=DAEHO I&T
 
+OUI:B4B291*
+ ID_OUI_FROM_DATABASE=LG Electronics
+
 OUI:B4B362*
  ID_OUI_FROM_DATABASE=zte corporation
 
@@ -91796,6 +92852,9 @@ OUI:B4B542*
 OUI:B4B5AF*
  ID_OUI_FROM_DATABASE=Minsung Electronics
 
+OUI:B4B5B6*
+ ID_OUI_FROM_DATABASE=CHONGQING FUGUI ELECTRONICS CO.,LTD.
+
 OUI:B4B676*
  ID_OUI_FROM_DATABASE=Intel Corporate
 
@@ -92399,6 +93458,9 @@ OUI:B88AEC*
 OUI:B88D12*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
+OUI:B88DF1*
+ ID_OUI_FROM_DATABASE=Nanjing BigFish Semiconductor Co., Ltd.
+
 OUI:B88E3A*
  ID_OUI_FROM_DATABASE=Infinite Technologies JLT
 
@@ -93062,6 +94124,9 @@ OUI:BC3E07*
 OUI:BC3E13*
  ID_OUI_FROM_DATABASE=Accordance Systems Inc.
 
+OUI:BC3ECB*
+ ID_OUI_FROM_DATABASE=vivo Mobile Communication Co., Ltd.
+
 OUI:BC3F4E*
  ID_OUI_FROM_DATABASE=Teleepoch Ltd
 
@@ -93260,6 +94325,9 @@ OUI:BC6B4D*
 OUI:BC6C21*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
+OUI:BC6D05*
+ ID_OUI_FROM_DATABASE=Dusun Electron Co.,Ltd.
+
 OUI:BC6E64*
  ID_OUI_FROM_DATABASE=Sony Mobile Communications Inc
 
@@ -93443,6 +94511,9 @@ OUI:BC9930*
 OUI:BC99BC*
  ID_OUI_FROM_DATABASE=FonSee Technology Inc.
 
+OUI:BC9A53*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:BC9B68*
  ID_OUI_FROM_DATABASE=Technicolor CH USA Inc.
 
@@ -93452,6 +94523,9 @@ OUI:BC9C31*
 OUI:BC9CC5*
  ID_OUI_FROM_DATABASE=Beijing Huafei Technology Co., Ltd.
 
+OUI:BC9D42*
+ ID_OUI_FROM_DATABASE=SHENZHEN RF-LINK TECHNOLOGY CO.,LTD.
+
 OUI:BC9DA5*
  ID_OUI_FROM_DATABASE=DASCOM Europe GmbH
 
@@ -93539,6 +94613,9 @@ OUI:BCBBC9*
 OUI:BCBC46*
  ID_OUI_FROM_DATABASE=SKS Welding Systems GmbH
 
+OUI:BCBD9E*
+ ID_OUI_FROM_DATABASE=ITEL MOBILE LIMITED
+
 OUI:BCC00F*
  ID_OUI_FROM_DATABASE=Fiberhome Telecommunication Technologies Co.,LTD
 
@@ -93590,6 +94667,9 @@ OUI:BCD177*
 OUI:BCD1D3*
  ID_OUI_FROM_DATABASE=Shenzhen TINNO Mobile Technology Corp.
 
+OUI:BCD295*
+ ID_OUI_FROM_DATABASE=Cisco Systems, Inc
+
 OUI:BCD5B6*
  ID_OUI_FROM_DATABASE=d2d technologies
 
@@ -93599,6 +94679,9 @@ OUI:BCD713*
 OUI:BCD767*
  ID_OUI_FROM_DATABASE=Private
 
+OUI:BCD7CE*
+ ID_OUI_FROM_DATABASE=China Mobile (Hangzhou) Information Technology Co., Ltd.
+
 OUI:BCD940*
  ID_OUI_FROM_DATABASE=ASR Co,.Ltd.
 
@@ -93623,6 +94706,9 @@ OUI:BCE63F*
 OUI:BCE67C*
  ID_OUI_FROM_DATABASE=Cambium Networks Limited
 
+OUI:BCE712*
+ ID_OUI_FROM_DATABASE=Cisco Systems, Inc
+
 OUI:BCE767*
  ID_OUI_FROM_DATABASE=Quanzhou  TDX Electronics Co., Ltd
 
@@ -93662,6 +94748,9 @@ OUI:BCF2AF*
 OUI:BCF310*
  ID_OUI_FROM_DATABASE=Extreme Networks, Inc.
 
+OUI:BCF45F*
+ ID_OUI_FROM_DATABASE=zte corporation
+
 OUI:BCF5AC*
  ID_OUI_FROM_DATABASE=LG Electronics (Mobile Communications)
 
@@ -93782,6 +94871,9 @@ OUI:C025E9*
 OUI:C027B9*
  ID_OUI_FROM_DATABASE=Beijing National Railway Research & Design Institute  of Signal & Communication Co., Ltd.
 
+OUI:C0280B*
+ ID_OUI_FROM_DATABASE=Honor Device Co., Ltd.
+
 OUI:C0288D*
  ID_OUI_FROM_DATABASE=Logitech, Inc
 
@@ -93879,7 +94971,7 @@ OUI:C04004*
  ID_OUI_FROM_DATABASE=Medicaroid Corporation
 
 OUI:C04121*
- ID_OUI_FROM_DATABASE=Nokia
+ ID_OUI_FROM_DATABASE=Nokia Solutions and Networks GmbH & Co. KG
 
 OUI:C041F6*
  ID_OUI_FROM_DATABASE=LG ELECTRONICS INC
@@ -94391,6 +95483,9 @@ OUI:C0CFA3*
 OUI:C0D012*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
+OUI:C0D026*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:C0D044*
  ID_OUI_FROM_DATABASE=Sagemcom Broadband SAS
 
@@ -94478,9 +95573,15 @@ OUI:C0DCDA*
 OUI:C0DF77*
  ID_OUI_FROM_DATABASE=Conrad Electronic SE
 
+OUI:C0E018*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:C0E3A0*
  ID_OUI_FROM_DATABASE=Renesas Electronics (Penang) Sdn. Bhd.
 
+OUI:C0E3FB*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:C0E422*
  ID_OUI_FROM_DATABASE=Texas Instruments
 
@@ -94526,6 +95627,9 @@ OUI:C0F636*
 OUI:C0F6C2*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
+OUI:C0F6EC*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:C0F79D*
  ID_OUI_FROM_DATABASE=Powercode
 
@@ -94625,6 +95729,9 @@ OUI:C412F5*
 OUI:C413E2*
  ID_OUI_FROM_DATABASE=Extreme Networks, Inc.
 
+OUI:C41411*
+ ID_OUI_FROM_DATABASE=Apple, Inc.
+
 OUI:C4143C*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
@@ -94709,6 +95816,9 @@ OUI:C42F90*
 OUI:C43018*
  ID_OUI_FROM_DATABASE=MCS Logic Inc.
 
+OUI:C430CA*
+ ID_OUI_FROM_DATABASE=SD Biosensor
+
 OUI:C432D1*
  ID_OUI_FROM_DATABASE=Farlink Technology Limited
 
@@ -94736,6 +95846,9 @@ OUI:C438D3*
 OUI:C4393A*
  ID_OUI_FROM_DATABASE=SMC Networks Inc
 
+OUI:C43960*
+ ID_OUI_FROM_DATABASE=GD Midea Air-Conditioning Equipment Co.,Ltd.
+
 OUI:C43A35*
  ID_OUI_FROM_DATABASE=FN-LINK TECHNOLOGY LIMITED
 
@@ -94856,6 +95969,9 @@ OUI:C45A86*
 OUI:C45BF7*
  ID_OUI_FROM_DATABASE=ants
 
+OUI:C45D83*
+ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
+
 OUI:C45DD8*
  ID_OUI_FROM_DATABASE=HDMI Forum
 
@@ -95231,6 +96347,9 @@ OUI:C4BE84*
 OUI:C4BED4*
  ID_OUI_FROM_DATABASE=Avaya Inc
 
+OUI:C4BF60*
+ ID_OUI_FROM_DATABASE=TECNO MOBILE LIMITED
+
 OUI:C4C0AE*
  ID_OUI_FROM_DATABASE=MIDORI ELECTRONIC CO., LTD.
 
@@ -95273,6 +96392,9 @@ OUI:C4CD82*
 OUI:C4D197*
  ID_OUI_FROM_DATABASE=Ventia Utility Services
 
+OUI:C4D438*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:C4D489*
  ID_OUI_FROM_DATABASE=JiangSu Joyque Information Industry Co.,Ltd
 
@@ -95312,6 +96434,9 @@ OUI:C4E17C*
 OUI:C4E1A1*
  ID_OUI_FROM_DATABASE=GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD
 
+OUI:C4E287*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:C4E39F*
  ID_OUI_FROM_DATABASE=GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD
 
@@ -95813,6 +96938,9 @@ OUI:C869CD*
 OUI:C86C1E*
  ID_OUI_FROM_DATABASE=Display Systems Ltd
 
+OUI:C86C3D*
+ ID_OUI_FROM_DATABASE=Amazon Technologies Inc.
+
 OUI:C86C87*
  ID_OUI_FROM_DATABASE=Zyxel Communications Corporation
 
@@ -95990,6 +97118,9 @@ OUI:C8A1BA*
 OUI:C8A2CE*
  ID_OUI_FROM_DATABASE=Oasis Media Systems LLC
 
+OUI:C8A40D*
+ ID_OUI_FROM_DATABASE=Cooler Master Technology Inc
+
 OUI:C8A620*
  ID_OUI_FROM_DATABASE=Nebula, Inc
 
@@ -96194,6 +97325,9 @@ OUI:C8E130*
 OUI:C8E1A7*
  ID_OUI_FROM_DATABASE=Vertu Corporation Limited
 
+OUI:C8E265*
+ ID_OUI_FROM_DATABASE=Intel Corporate
+
 OUI:C8E42F*
  ID_OUI_FROM_DATABASE=Technical Research Design and Development
 
@@ -96422,6 +97556,9 @@ OUI:CC1EFF*
 OUI:CC1FC4*
  ID_OUI_FROM_DATABASE=InVue
 
+OUI:CC208C*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:CC20E8*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
@@ -96734,6 +97871,9 @@ OUI:CC66B2*
 OUI:CC69B0*
  ID_OUI_FROM_DATABASE=Global Traffic Technologies, LLC
 
+OUI:CC69FA*
+ ID_OUI_FROM_DATABASE=Apple, Inc.
+
 OUI:CC6A10*
  ID_OUI_FROM_DATABASE=The Chamberlain Group, Inc
 
@@ -97049,6 +98189,9 @@ OUI:CCC8D7*
 OUI:CCC92C*
  ID_OUI_FROM_DATABASE=Schindler - PORT Technology
 
+OUI:CCC95D*
+ ID_OUI_FROM_DATABASE=Apple, Inc.
+
 OUI:CCCC4E*
  ID_OUI_FROM_DATABASE=Sun Fountainhead USA. Corp
 
@@ -97352,6 +98495,9 @@ OUI:D00F6D*
 OUI:D01242*
  ID_OUI_FROM_DATABASE=BIOS Corporation
 
+OUI:D012CB*
+ ID_OUI_FROM_DATABASE=AVM Audiovisuelles Marketing und Computersysteme GmbH
+
 OUI:D0131E*
  ID_OUI_FROM_DATABASE=Sunrex Technology Corp
 
@@ -97538,6 +98684,9 @@ OUI:D039B3*
 OUI:D039EA*
  ID_OUI_FROM_DATABASE=NetApp
 
+OUI:D03C1F*
+ ID_OUI_FROM_DATABASE=Intel Corporate
+
 OUI:D03D52*
  ID_OUI_FROM_DATABASE=Ava Security Limited
 
@@ -97550,6 +98699,9 @@ OUI:D03E5C*
 OUI:D03FAA*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
+OUI:D040EF*
+ ID_OUI_FROM_DATABASE=Murata Manufacturing Co., Ltd.
+
 OUI:D041C9*
  ID_OUI_FROM_DATABASE=Fiberhome Telecommunication Technologies Co.,LTD
 
@@ -97601,6 +98753,9 @@ OUI:D05509*
 OUI:D055B2*
  ID_OUI_FROM_DATABASE=Integrated Device Technology (Malaysia) Sdn. Bhd.
 
+OUI:D056BF*
+ ID_OUI_FROM_DATABASE=AMOSENSE
+
 OUI:D0574C*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
@@ -97649,6 +98804,9 @@ OUI:D05A0F*
 OUI:D05AF1*
  ID_OUI_FROM_DATABASE=Shenzhen Pulier Tech CO.,Ltd
 
+OUI:D05AFD*
+ ID_OUI_FROM_DATABASE=Realme Chongqing Mobile Telecommunications Corp.,Ltd.
+
 OUI:D05BA8*
  ID_OUI_FROM_DATABASE=zte corporation
 
@@ -98441,6 +99599,9 @@ OUI:D437D7*
 OUI:D4389C*
  ID_OUI_FROM_DATABASE=Sony Mobile Communications Inc
 
+OUI:D439B8*
+ ID_OUI_FROM_DATABASE=Ciena Corporation
+
 OUI:D43A2E*
  ID_OUI_FROM_DATABASE=SHENZHEN MTC CO LTD
 
@@ -98883,7 +100044,7 @@ OUI:D4A499*
  ID_OUI_FROM_DATABASE=InView Technology Corporation
 
 OUI:D4A651*
- ID_OUI_FROM_DATABASE=HANGZHOU AIXIANGJI TECHNOLOGY CO., LTD
+ ID_OUI_FROM_DATABASE=Tuya Smart Inc.
 
 OUI:D4A928*
  ID_OUI_FROM_DATABASE=GreenWave Reality Inc
@@ -99080,6 +100241,9 @@ OUI:D4EC0C*
 OUI:D4EC86*
  ID_OUI_FROM_DATABASE=LinkedHope Intelligent Technologies Co., Ltd
 
+OUI:D4ECAB*
+ ID_OUI_FROM_DATABASE=vivo Mobile Communication Co., Ltd.
+
 OUI:D4EE07*
  ID_OUI_FROM_DATABASE=HIWIFI Co., Ltd.
 
@@ -99140,6 +100304,9 @@ OUI:D4FC13*
 OUI:D8004D*
  ID_OUI_FROM_DATABASE=Apple, Inc.
 
+OUI:D80093*
+ ID_OUI_FROM_DATABASE=Aurender Inc.
+
 OUI:D8052E*
  ID_OUI_FROM_DATABASE=Skyviia Corporation
 
@@ -99158,6 +100325,9 @@ OUI:D808F5*
 OUI:D809C3*
  ID_OUI_FROM_DATABASE=Cercacor Labs
 
+OUI:D809D6*
+ ID_OUI_FROM_DATABASE=ZEXELON CO., LTD.
+
 OUI:D80B9A*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
@@ -99176,6 +100346,9 @@ OUI:D80DE3*
 OUI:D80F99*
  ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd.
 
+OUI:D8109F*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:D810CB*
  ID_OUI_FROM_DATABASE=Andrea Informatique
 
@@ -99188,6 +100361,9 @@ OUI:D81399*
 OUI:D814D6*
  ID_OUI_FROM_DATABASE=SURE SYSTEM Co Ltd
 
+OUI:D814DF*
+ ID_OUI_FROM_DATABASE=TCL King Electrical Appliances (Huizhou) Co., Ltd
+
 OUI:D8150D*
  ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD.
 
@@ -99350,6 +100526,9 @@ OUI:D84710*
 OUI:D84732*
  ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD.
 
+OUI:D847BB*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:D848EE*
  ID_OUI_FROM_DATABASE=Hangzhou Xueji Technology Co., Ltd.
 
@@ -99909,7 +101088,7 @@ OUI:D8EF42*
  ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
 
 OUI:D8EFCD*
- ID_OUI_FROM_DATABASE=Nokia
+ ID_OUI_FROM_DATABASE=Nokia Solutions and Networks GmbH & Co. KG
 
 OUI:D8F0F2*
  ID_OUI_FROM_DATABASE=Zeebo Inc
@@ -100055,6 +101234,9 @@ OUI:DC21B9*
 OUI:DC21E2*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
+OUI:DC2727*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:DC2834*
  ID_OUI_FROM_DATABASE=HAKKO Corporation
 
@@ -100427,6 +101609,9 @@ OUI:DC8C1B*
 OUI:DC8C37*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
+OUI:DC9020*
+ ID_OUI_FROM_DATABASE=RURU TEK PRIVATE LIMITED
+
 OUI:DC9088*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
@@ -100466,6 +101651,9 @@ OUI:DC9FA4*
 OUI:DC9FDB*
  ID_OUI_FROM_DATABASE=Ubiquiti Networks Inc.
 
+OUI:DCA120*
+ ID_OUI_FROM_DATABASE=Nokia
+
 OUI:DCA266*
  ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd.
 
@@ -100586,6 +101774,9 @@ OUI:DCCC8D*
 OUI:DCCD2F*
  ID_OUI_FROM_DATABASE=Seiko Epson Corporation
 
+OUI:DCCD74*
+ ID_OUI_FROM_DATABASE=Japan E.M.Solutions Co., Ltd.
+
 OUI:DCCE41*
  ID_OUI_FROM_DATABASE=FE GLOBAL HONG KONG LIMITED
 
@@ -100622,6 +101813,9 @@ OUI:DCD444*
 OUI:DCD52A*
  ID_OUI_FROM_DATABASE=Sunny Heart Limited
 
+OUI:DCD7A0*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:DCD87C*
  ID_OUI_FROM_DATABASE=Beijing Jingdong Century Trading Co., LTD.
 
@@ -100934,6 +102128,9 @@ OUI:E02861*
 OUI:E0286D*
  ID_OUI_FROM_DATABASE=AVM Audiovisuelles Marketing und Computersysteme GmbH
 
+OUI:E02967*
+ ID_OUI_FROM_DATABASE=HMD Global Oy
+
 OUI:E02A82*
  ID_OUI_FROM_DATABASE=Universal Global Scientific Industrial Co., Ltd.
 
@@ -100952,6 +102149,9 @@ OUI:E02CB2*
 OUI:E02CF3*
  ID_OUI_FROM_DATABASE=MRS Electronic GmbH
 
+OUI:E02E3F*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:E02F6D*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
@@ -101168,6 +102368,9 @@ OUI:E0693A*
 OUI:E06995*
  ID_OUI_FROM_DATABASE=PEGATRON CORPORATION
 
+OUI:E06C4E*
+ ID_OUI_FROM_DATABASE=Shenzhen TINNO Mobile Technology Corp.
+
 OUI:E06CA6*
  ID_OUI_FROM_DATABASE=Creotech Instruments S.A.
 
@@ -101765,6 +102968,9 @@ OUI:E42686*
 OUI:E4268B*
  ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
 
+OUI:E42761*
+ ID_OUI_FROM_DATABASE=Honor Device Co., Ltd.
+
 OUI:E42771*
  ID_OUI_FROM_DATABASE=Smartlabs
 
@@ -101981,6 +103187,9 @@ OUI:E45D52*
 OUI:E45D75*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
+OUI:E45E1B*
+ ID_OUI_FROM_DATABASE=Google, Inc.
+
 OUI:E45E37*
  ID_OUI_FROM_DATABASE=Intel Corporate
 
@@ -102281,6 +103490,9 @@ OUI:E4BD4B*
 OUI:E4BEED*
  ID_OUI_FROM_DATABASE=Netcore Technology Inc.
 
+OUI:E4BFFA*
+ ID_OUI_FROM_DATABASE=Technicolor CH USA Inc.
+
 OUI:E4C0CC*
  ID_OUI_FROM_DATABASE=China Mobile Group Device Co.,Ltd.
 
@@ -102830,6 +104042,9 @@ OUI:E86D6E*
 OUI:E86DCB*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
+OUI:E86DE9*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:E86F38*
  ID_OUI_FROM_DATABASE=CHONGQING FUGUI ELECTRONICS CO.,LTD.
 
@@ -102959,6 +104174,9 @@ OUI:E89F80*
 OUI:E89FEC*
  ID_OUI_FROM_DATABASE=CHENGDU KT ELECTRONIC HI-TECH CO.,LTD
 
+OUI:E8A0CD*
+ ID_OUI_FROM_DATABASE=Nintendo Co.,Ltd
+
 OUI:E8A1F8*
  ID_OUI_FROM_DATABASE=zte corporation
 
@@ -103130,12 +104348,18 @@ OUI:E8D0FC*
 OUI:E8D11B*
  ID_OUI_FROM_DATABASE=ASKEY COMPUTER CORP
 
+OUI:E8D2FF*
+ ID_OUI_FROM_DATABASE=Sagemcom Broadband SAS
+
 OUI:E8D483*
  ID_OUI_FROM_DATABASE=ULTIMATE Europe Transportation Equipment GmbH
 
 OUI:E8D4E0*
  ID_OUI_FROM_DATABASE=Beijing BenyWave Technology Co., Ltd.
 
+OUI:E8D765*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:E8D819*
  ID_OUI_FROM_DATABASE=AzureWave Technology Inc.
 
@@ -103247,6 +104471,9 @@ OUI:E8F2E2*
 OUI:E8F2E3*
  ID_OUI_FROM_DATABASE=Starcor Beijing Co.,Limited
 
+OUI:E8F408*
+ ID_OUI_FROM_DATABASE=Intel Corporate
+
 OUI:E8F724*
  ID_OUI_FROM_DATABASE=Hewlett Packard Enterprise
 
@@ -103565,6 +104792,9 @@ OUI:EC74BA*
 OUI:EC753E*
  ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
 
+OUI:EC75ED*
+ ID_OUI_FROM_DATABASE=Citrix Systems, Inc.
+
 OUI:EC7949*
  ID_OUI_FROM_DATABASE=FUJITSU LIMITED
 
@@ -103574,6 +104804,9 @@ OUI:EC79F2*
 OUI:EC7C74*
  ID_OUI_FROM_DATABASE=Justone Technologies Co., Ltd.
 
+OUI:EC7CB6*
+ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
+
 OUI:EC7D11*
  ID_OUI_FROM_DATABASE=vivo Mobile Communication Co., Ltd.
 
@@ -103799,6 +105032,9 @@ OUI:ECBD09*
 OUI:ECBD1D*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
+OUI:ECBE5F*
+ ID_OUI_FROM_DATABASE=Vestel Elektronik San ve Tic. A.Ş.
+
 OUI:ECBEDD*
  ID_OUI_FROM_DATABASE=Sagemcom Broadband SAS
 
@@ -104018,6 +105254,9 @@ OUI:F015A0*
 OUI:F015B9*
  ID_OUI_FROM_DATABASE=PlayFusion Limited
 
+OUI:F01628*
+ ID_OUI_FROM_DATABASE=Technicolor (China) Technology Co., Ltd.
+
 OUI:F0182B*
  ID_OUI_FROM_DATABASE=LG Chem
 
@@ -104114,6 +105353,9 @@ OUI:F02475*
 OUI:F02572*
  ID_OUI_FROM_DATABASE=Cisco Systems, Inc
 
+OUI:F0258E*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
 OUI:F025B7*
  ID_OUI_FROM_DATABASE=SAMSUNG ELECTRO-MECHANICS(THAILAND)
 
@@ -104165,6 +105407,9 @@ OUI:F03404*
 OUI:F037A1*
  ID_OUI_FROM_DATABASE=Huike Electronics (SHENZHEN) CO., LTD.
 
+OUI:F03965*
+ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
+
 OUI:F03A4B*
  ID_OUI_FROM_DATABASE=Bloombase, Inc.
 
@@ -104243,6 +105488,9 @@ OUI:F041C8E*
 OUI:F0421C*
  ID_OUI_FROM_DATABASE=Intel Corporate
 
+OUI:F042F5*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:F04335*
  ID_OUI_FROM_DATABASE=DVN(Shanghai)Ltd.
 
@@ -104357,6 +105605,9 @@ OUI:F06E0B*
 OUI:F06E32*
  ID_OUI_FROM_DATABASE=MICROTEL INNOVATION S.R.L.
 
+OUI:F06F46*
+ ID_OUI_FROM_DATABASE=Ubiik
+
 OUI:F0728C*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
@@ -104849,6 +106100,9 @@ OUI:F0F260*
 OUI:F0F336*
  ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD.
 
+OUI:F0F564*
+ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
+
 OUI:F0F5AE*
  ID_OUI_FROM_DATABASE=Adaptrum Inc.
 
@@ -104894,6 +106148,9 @@ OUI:F0FDA0*
 OUI:F0FE6B*
  ID_OUI_FROM_DATABASE=Shanghai High-Flying Electronics Technology Co., Ltd
 
+OUI:F0FEE7*
+ ID_OUI_FROM_DATABASE=Huawei Device Co., Ltd.
+
 OUI:F40270*
  ID_OUI_FROM_DATABASE=Dell Inc.
 
@@ -105059,6 +106316,9 @@ OUI:F42896*
 OUI:F42981*
  ID_OUI_FROM_DATABASE=vivo Mobile Communication Co., Ltd.
 
+OUI:F42A7D*
+ ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD.
+
 OUI:F42B48*
  ID_OUI_FROM_DATABASE=Ubiqam
 
@@ -105500,6 +106760,9 @@ OUI:F4AFE7*
 OUI:F4B164*
  ID_OUI_FROM_DATABASE=Lightning Telecommunications Technology Co. Ltd
 
+OUI:F4B301*
+ ID_OUI_FROM_DATABASE=Intel Corporate
+
 OUI:F4B381*
  ID_OUI_FROM_DATABASE=WindowMaster A/S
 
@@ -105623,6 +106886,9 @@ OUI:F4D108*
 OUI:F4D261*
  ID_OUI_FROM_DATABASE=SEMOCON Co., Ltd
 
+OUI:F4D488*
+ ID_OUI_FROM_DATABASE=Apple, Inc.
+
 OUI:F4D620*
  ID_OUI_FROM_DATABASE=GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD
 
@@ -106373,6 +107639,9 @@ OUI:F88DEF*
 OUI:F88E85*
  ID_OUI_FROM_DATABASE=Comtrend Corporation
 
+OUI:F88F07*
+ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
+
 OUI:F88FCA*
  ID_OUI_FROM_DATABASE=Google, Inc.
 
@@ -106811,6 +108080,9 @@ OUI:FC01CD*
 OUI:FC039F*
  ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
 
+OUI:FC041C*
+ ID_OUI_FROM_DATABASE=GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD
+
 OUI:FC0647*
  ID_OUI_FROM_DATABASE=Cortland Research, LLC
 
@@ -106835,6 +108107,9 @@ OUI:FC09F6*
 OUI:FC0A81*
  ID_OUI_FROM_DATABASE=Extreme Networks, Inc.
 
+OUI:FC0C45*
+ ID_OUI_FROM_DATABASE=Shenzhen SuperElectron Technology Co.,Ltd.
+
 OUI:FC0F4B*
  ID_OUI_FROM_DATABASE=Texas Instruments
 
index f06de58509d2425ccdcd28eb47363d3954ec85f5..ac8710870ea66bc3565043967212f959bd51059c 100644 (file)
@@ -7191,6 +7191,9 @@ acpi:USI*:
 acpi:USR*:
  ID_VENDOR_FROM_DATABASE=U.S. Robotics Inc
 
+acpi:UTC*:
+ ID_VENDOR_FROM_DATABASE=Unicompute Technology Co., Ltd.
+
 acpi:UTD*:
  ID_VENDOR_FROM_DATABASE=Up to Date Tech
 
index a3cfdf90ab943d75ff196c5f4ee83028575a483d..cdfe663c2667fdc49f7b97a70150bb83fc185389 100644 (file)
@@ -1,5 +1,5 @@
---- 20-acpi-vendor.hwdb.base   2020-10-13 09:40:27.449819401 +0200
-+++ 20-acpi-vendor.hwdb        2020-10-13 09:40:27.464819680 +0200
+--- 20-acpi-vendor.hwdb.base   2020-11-26 13:49:35.243482590 +0100
++++ 20-acpi-vendor.hwdb        2020-11-26 13:49:35.260482675 +0100
 @@ -3,6 +3,8 @@
  # Data imported from:
  #     https://uefi.org/uefi-pnp-export
  acpi:USD*:
   ID_VENDOR_FROM_DATABASE=U.S. Digital Corporation
  
-@@ -7354,9 +7422,6 @@
+@@ -7357,9 +7425,6 @@
  acpi:WAL*:
   ID_VENDOR_FROM_DATABASE=Wave Access
  
  acpi:WAV*:
   ID_VENDOR_FROM_DATABASE=Wavephore
  
-@@ -7481,7 +7546,7 @@
+@@ -7484,7 +7549,7 @@
   ID_VENDOR_FROM_DATABASE=WyreStorm Technologies LLC
  
  acpi:WYS*:
  
  acpi:WYT*:
   ID_VENDOR_FROM_DATABASE=Wooyoung Image & Information Co.,Ltd.
-@@ -7495,9 +7560,6 @@
+@@ -7498,9 +7563,6 @@
  acpi:XDM*:
   ID_VENDOR_FROM_DATABASE=XDM Ltd.
  
  acpi:XES*:
   ID_VENDOR_FROM_DATABASE=Extreme Engineering Solutions, Inc.
  
-@@ -7528,9 +7590,6 @@
+@@ -7531,9 +7593,6 @@
  acpi:XNT*:
   ID_VENDOR_FROM_DATABASE=XN Technologies, Inc.
  
  acpi:XQU*:
   ID_VENDOR_FROM_DATABASE=SHANGHAI SVA-DAV ELECTRONICS CO., LTD
  
-@@ -7597,6 +7656,9 @@
+@@ -7600,6 +7659,9 @@
  acpi:ZBX*:
   ID_VENDOR_FROM_DATABASE=Zebax Technologies
  
index a98a50e95c4107d19511fd5836d4546a35774b9d..2af181c52bc70fe5dca48e9f85ba2aa1e6b734f0 100644 (file)
@@ -380,6 +380,12 @@ pci:v*d*sv*sd*bc08sc06*
 pci:v*d*sv*sd*bc08sc80*
  ID_PCI_SUBCLASS_FROM_DATABASE=System peripheral
 
+pci:v*d*sv*sd*bc08sc99*
+ ID_PCI_SUBCLASS_FROM_DATABASE=Timing Card
+
+pci:v*d*sv*sd*bc08sc99i01*
+ ID_PCI_INTERFACE_FROM_DATABASE=TAP Timing Card
+
 pci:v*d*sv*sd*bc09*
  ID_PCI_CLASS_FROM_DATABASE=Input device controller
 
index a19490ed56af36116069ef128eb757950c60b17d..21defccc8bfdbd73e4222c84022d73269124f344 100644 (file)
@@ -122,6 +122,9 @@ pci:v0000018Ad00000106*
 pci:v000001DE*
  ID_VENDOR_FROM_DATABASE=Oxide Computer Company
 
+pci:v00000200*
+ ID_VENDOR_FROM_DATABASE=Dell (wrong ID)
+
 pci:v0000021B*
  ID_VENDOR_FROM_DATABASE=Compaq Computer Corporation
 
@@ -1994,6 +1997,9 @@ pci:v00001000d000000AFsv00001D49sd00000202*
 pci:v00001000d000000AFsv00001D49sd00000204*
  ID_MODEL_FROM_DATABASE=SAS3408 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) (ThinkSystem 430-8i SAS/SATA 12Gb Dense HBA)
 
+pci:v00001000d000000B2*
+ ID_MODEL_FROM_DATABASE=PEX880xx PCIe Gen 4 Switch SES management endpoint
+
 pci:v00001000d000000BE*
  ID_MODEL_FROM_DATABASE=SAS3504 Fusion-MPT Tri-Mode RAID On Chip (ROC)
 
@@ -7742,6 +7748,9 @@ pci:v00001002d000067EB*
 pci:v00001002d000067EF*
  ID_MODEL_FROM_DATABASE=Baffin [Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X]
 
+pci:v00001002d000067EFsv00001025sd00001367*
+ ID_MODEL_FROM_DATABASE=Baffin [Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X] (RX560X 4GB)
+
 pci:v00001002d000067EFsv00001028sd00001703*
  ID_MODEL_FROM_DATABASE=Baffin [Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X] (RX 560D OEM OC 2 GB)
 
@@ -7973,6 +7982,9 @@ pci:v00001002d00006820sv000017AAsd00003801*
 pci:v00001002d00006820sv000017AAsd00003824*
  ID_MODEL_FROM_DATABASE=Venus XTX [Radeon HD 8890M / R9 M275X/M375X] (Radeon R9 M375)
 
+pci:v00001002d00006820sv00001DA2sd0000E26A*
+ ID_MODEL_FROM_DATABASE=Venus XTX [Radeon HD 8890M / R9 M275X/M375X] (Radeon R7 250)
+
 pci:v00001002d00006821*
  ID_MODEL_FROM_DATABASE=Venus XT [Radeon HD 8870M / R9 M270X/M370X]
 
@@ -10019,6 +10031,9 @@ pci:v00001002d00006939sv0000148Csd00009380*
 pci:v00001002d00006939sv0000174Bsd0000E308*
  ID_MODEL_FROM_DATABASE=Tonga PRO [Radeon R9 285/380] (Radeon R9 380 Nitro 4G D5)
 
+pci:v00001002d00006939sv0000174Bsd0000E315*
+ ID_MODEL_FROM_DATABASE=Tonga PRO [Radeon R9 285/380] (Radeon R9 285)
+
 pci:v00001002d0000693B*
  ID_MODEL_FROM_DATABASE=Tonga PRO GL [FirePro W7100 / Barco MXRT-7600]
 
@@ -10538,6 +10553,18 @@ pci:v00001002d0000734F*
 pci:v00001002d00007360*
  ID_MODEL_FROM_DATABASE=Navi 12 [Radeon Pro 5600M]
 
+pci:v00001002d000073BF*
+ ID_MODEL_FROM_DATABASE=Navi 21 [Radeon RX 6800/6800 XT / 6900 XT]
+
+pci:v00001002d000073C3*
+ ID_MODEL_FROM_DATABASE=Navi 22
+
+pci:v00001002d000073DF*
+ ID_MODEL_FROM_DATABASE=Navi 22
+
+pci:v00001002d000073FF*
+ ID_MODEL_FROM_DATABASE=Navi 23
+
 pci:v00001002d00007833*
  ID_MODEL_FROM_DATABASE=RS350 Host Bridge
 
@@ -28008,7 +28035,7 @@ pci:v000010DEd000000F4*
  ID_MODEL_FROM_DATABASE=NV43 [GeForce 6600 LE]
 
 pci:v000010DEd000000F5*
- ID_MODEL_FROM_DATABASE=G71 [GeForce 7800 GS AGP]
+ ID_MODEL_FROM_DATABASE=G70/G71 [GeForce 7800 GS AGP]
 
 pci:v000010DEd000000F6*
  ID_MODEL_FROM_DATABASE=NV43 [GeForce 6800 GS/XT]
@@ -34667,6 +34694,9 @@ pci:v000010DEd0000128B*
 pci:v000010DEd0000128Bsv00001043sd000085F7*
  ID_MODEL_FROM_DATABASE=GK208B [GeForce GT 710] (GT710-SL-1GD5)
 
+pci:v000010DEd0000128Bsv00001043sd00008770*
+ ID_MODEL_FROM_DATABASE=GK208B [GeForce GT 710] (GT710-4H-SL-2GD5)
+
 pci:v000010DEd0000128C*
  ID_MODEL_FROM_DATABASE=GK208B
 
@@ -35018,6 +35048,9 @@ pci:v000010DEd00001401*
 pci:v000010DEd00001402*
  ID_MODEL_FROM_DATABASE=GM206 [GeForce GTX 950]
 
+pci:v000010DEd00001404*
+ ID_MODEL_FROM_DATABASE=GM206 [GeForce GTX 960 FAKE]
+
 pci:v000010DEd00001406*
  ID_MODEL_FROM_DATABASE=GM206 [GeForce GTX 960 OEM]
 
@@ -35333,6 +35366,9 @@ pci:v000010DEd00001C31*
 pci:v000010DEd00001C35*
  ID_MODEL_FROM_DATABASE=GP106
 
+pci:v000010DEd00001C36*
+ ID_MODEL_FROM_DATABASE=GP106
+
 pci:v000010DEd00001C60*
  ID_MODEL_FROM_DATABASE=GP106BM [GeForce GTX 1060 Mobile 6GB]
 
@@ -35789,6 +35825,9 @@ pci:v000010DEd00001FF9*
 pci:v000010DEd000020B0*
  ID_MODEL_FROM_DATABASE=GA100 [A100 SXM4 40GB]
 
+pci:v000010DEd000020B1*
+ ID_MODEL_FROM_DATABASE=GA100 [A100 PCIe 40GB]
+
 pci:v000010DEd000020BE*
  ID_MODEL_FROM_DATABASE=GA100 [GRID A100A]
 
@@ -35835,13 +35874,13 @@ pci:v000010DEd00002204*
  ID_MODEL_FROM_DATABASE=GA102 [GeForce RTX 3090]
 
 pci:v000010DEd00002206*
- ID_MODEL_FROM_DATABASE=GA102 [GeForce RTX 3080 10GB / 20GB]
+ ID_MODEL_FROM_DATABASE=GA102 [GeForce RTX 3080]
 
 pci:v000010DEd00002206sv000010DEsd0000146D*
- ID_MODEL_FROM_DATABASE=GA102 [GeForce RTX 3080 10GB / 20GB] (GA102 [GeForce RTX 3080 20GB])
+ ID_MODEL_FROM_DATABASE=GA102 [GeForce RTX 3080] (GA102 [GeForce RTX 3080 20GB])
 
 pci:v000010DEd00002206sv00001462sd00003892*
- ID_MODEL_FROM_DATABASE=GA102 [GeForce RTX 3080 10GB / 20GB] (RTX 3080 10GB GAMING X TRIO)
+ ID_MODEL_FROM_DATABASE=GA102 [GeForce RTX 3080] (RTX 3080 10GB GAMING X TRIO)
 
 pci:v000010DEd0000222B*
  ID_MODEL_FROM_DATABASE=GA102 [GeForce RTX 3090 Engineering Sample]
@@ -35861,24 +35900,45 @@ pci:v000010DEd00002482*
 pci:v000010DEd00002484*
  ID_MODEL_FROM_DATABASE=GA104 [GeForce RTX 3070]
 
+pci:v000010DEd00002484sv000010DEsd0000146B*
+ ID_MODEL_FROM_DATABASE=GA104 [GeForce RTX 3070]
+
+pci:v000010DEd00002484sv000010DEsd000014AE*
+ ID_MODEL_FROM_DATABASE=GA104 [GeForce RTX 3070] (GA104 [GeForce RTX 3070 16GB])
+
 pci:v000010DEd00002486*
  ID_MODEL_FROM_DATABASE=GA104 [GeForce RTX 3060 Ti]
 
 pci:v000010DEd0000249C*
- ID_MODEL_FROM_DATABASE=GA104M [GeForce RTX 3070 Mobile]
+ ID_MODEL_FROM_DATABASE=GA104M [GeForce RTX 3070 Mobile / Max-Q 8GB/16GB]
 
 pci:v000010DEd0000249D*
  ID_MODEL_FROM_DATABASE=GA104M [GeForce RTX 3070 Mobile / Max-Q]
 
+pci:v000010DEd000024AC*
+ ID_MODEL_FROM_DATABASE=GA104 [GeForce RTX 30x0 Engineering Sample]
+
+pci:v000010DEd000024AD*
+ ID_MODEL_FROM_DATABASE=GA104 [GeForce RTX 3060 Engineering Sample]
+
 pci:v000010DEd000024AF*
  ID_MODEL_FROM_DATABASE=GA104 [GeForce RTX 3070 Engineering Sample]
 
 pci:v000010DEd000024BF*
  ID_MODEL_FROM_DATABASE=GA104 [GeForce RTX 3070 Engineering Sample]
 
+pci:v000010DEd000024DC*
+ ID_MODEL_FROM_DATABASE=GA104M [GeForce RTX 3070 Mobile 16GB]
+
+pci:v000010DEd000024DD*
+ ID_MODEL_FROM_DATABASE=GA104M [GeForce RTX 3070 Mobile / Max-Q]
+
 pci:v000010DEd0000252F*
  ID_MODEL_FROM_DATABASE=GA106 [GeForce RTX 3060 Engineering Sample]
 
+pci:v000010DEd000025AF*
+ ID_MODEL_FROM_DATABASE=GA107 [GeForce RTX 3050 Engineering Sample]
+
 pci:v000010DF*
  ID_VENDOR_FROM_DATABASE=Emulex Corporation
 
@@ -36566,6 +36626,9 @@ pci:v000010ECd00005289*
 pci:v000010ECd00005289sv00001043sd00001457*
  ID_MODEL_FROM_DATABASE=RTL8411 PCI Express Card Reader (K55A Laptop)
 
+pci:v000010ECd00005762*
+ ID_MODEL_FROM_DATABASE=RTS5763DL NVMe SSD Controller
+
 pci:v000010ECd00008029*
  ID_MODEL_FROM_DATABASE=RTL-8029(AS)
 
@@ -41543,6 +41606,12 @@ pci:v00001137d00000042sv00001137sd0000012E*
 pci:v00001137d00000042sv00001137sd0000014D*
  ID_MODEL_FROM_DATABASE=VIC Management Controller (VIC 1385 PCIe Management Controller)
 
+pci:v00001137d00000042sv00001137sd00000217*
+ ID_MODEL_FROM_DATABASE=VIC Management Controller (VIC 1455 PCIe Management Controller)
+
+pci:v00001137d00000042sv00001137sd00000218*
+ ID_MODEL_FROM_DATABASE=VIC Management Controller (VIC 1457 PCIe Management Controller)
+
 pci:v00001137d00000043*
  ID_MODEL_FROM_DATABASE=VIC Ethernet NIC
 
@@ -46757,6 +46826,21 @@ pci:v0000125Bd00001400*
 pci:v0000125Bd00001400sv00001186sd00001100*
  ID_MODEL_FROM_DATABASE=AX88141 Fast Ethernet Controller (AX8814X Based PCI Fast Ethernet Adapter)
 
+pci:v0000125Bd00009100*
+ ID_MODEL_FROM_DATABASE=AX99100 PCIe to Multi I/O Controller
+
+pci:v0000125Bd00009100sv0000A000sd00001000*
+ ID_MODEL_FROM_DATABASE=AX99100 PCIe to Multi I/O Controller (Serial Port)
+
+pci:v0000125Bd00009100sv0000A000sd00002000*
+ ID_MODEL_FROM_DATABASE=AX99100 PCIe to Multi I/O Controller (Parallel Port)
+
+pci:v0000125Bd00009100sv0000A000sd00006000*
+ ID_MODEL_FROM_DATABASE=AX99100 PCIe to Multi I/O Controller (SPI)
+
+pci:v0000125Bd00009100sv0000A000sd00007000*
+ ID_MODEL_FROM_DATABASE=AX99100 PCIe to Multi I/O Controller (Local Bus)
+
 pci:v0000125C*
  ID_VENDOR_FROM_DATABASE=Aurora Technologies, Inc.
 
@@ -57854,6 +57938,9 @@ pci:v000014F1d00008800sv00000070sd00007801*
 pci:v000014F1d00008800sv00000070sd00009001*
  ID_MODEL_FROM_DATABASE=CX23880/1/2/3 PCI Video and Audio Decoder (Nova-T DVB-T)
 
+pci:v000014F1d00008800sv00000070sd00009002*
+ ID_MODEL_FROM_DATABASE=CX23880/1/2/3 PCI Video and Audio Decoder (Nova-T DVB-T Model 909)
+
 pci:v000014F1d00008800sv00000070sd00009200*
  ID_MODEL_FROM_DATABASE=CX23880/1/2/3 PCI Video and Audio Decoder (Nova-SE2 DVB-S)
 
@@ -59943,10 +60030,28 @@ pci:v000015B7d00005001*
  ID_MODEL_FROM_DATABASE=WD Black NVMe SSD
 
 pci:v000015B7d00005002*
- ID_MODEL_FROM_DATABASE=WD Black 2018/PC SN720 NVMe SSD
+ ID_MODEL_FROM_DATABASE=WD Black 2018 / PC SN720 NVMe SSD
 
 pci:v000015B7d00005003*
- ID_MODEL_FROM_DATABASE=WD Black 2018/PC SN520 NVMe SSD
+ ID_MODEL_FROM_DATABASE=WD Black 2018 / PC SN520 NVMe SSD
+
+pci:v000015B7d00005004*
+ ID_MODEL_FROM_DATABASE=PC SN520 NVMe SSD
+
+pci:v000015B7d00005005*
+ ID_MODEL_FROM_DATABASE=PC SN520 NVMe SSD
+
+pci:v000015B7d00005006*
+ ID_MODEL_FROM_DATABASE=WD Black 2019/PC SN750 NVMe SSD
+
+pci:v000015B7d00005009*
+ ID_MODEL_FROM_DATABASE=WD Blue SN550 NVMe SSD
+
+pci:v000015B7d00005009sv000015B7sd00005009*
+ ID_MODEL_FROM_DATABASE=WD Blue SN550 NVMe SSD
+
+pci:v000015B7d0000500D*
+ ID_MODEL_FROM_DATABASE=WD Ultrastar DC SN340 NVMe SSD
 
 pci:v000015B8*
  ID_VENDOR_FROM_DATABASE=ADDI-DATA GmbH
@@ -64256,6 +64361,12 @@ pci:v000018F4d000001A5*
 pci:v000018F4d000001C5*
  ID_MODEL_FROM_DATABASE=NT200A02 Network Adapter
 
+pci:v000018F4d000001D5*
+ ID_MODEL_FROM_DATABASE=NT50B01 Network Adapter
+
+pci:v000018F4d000001E5*
+ ID_MODEL_FROM_DATABASE=NT100A01 Network Adapter
+
 pci:v000018F6*
  ID_VENDOR_FROM_DATABASE=NextIO
 
@@ -65363,6 +65474,12 @@ pci:v00001974d00000009*
 pci:v00001974d00000011*
  ID_MODEL_FROM_DATABASE=FlexCard PMC-II Ethernet
 
+pci:v00001974d00000018*
+ ID_MODEL_FROM_DATABASE=FlexCard PXIe3
+
+pci:v00001974d00000019*
+ ID_MODEL_FROM_DATABASE=FlexCard PCIe3
+
 pci:v00001976*
  ID_VENDOR_FROM_DATABASE=TRENDnet
 
@@ -65381,6 +65498,9 @@ pci:v0000197Bd00000260*
 pci:v0000197Bd00000368*
  ID_MODEL_FROM_DATABASE=JMB368 IDE controller
 
+pci:v0000197Bd00000585*
+ ID_MODEL_FROM_DATABASE=JMB58x AHCI SATA controller
+
 pci:v0000197Bd00002360*
  ID_MODEL_FROM_DATABASE=JMB360 AHCI Controller
 
@@ -65799,7 +65919,7 @@ pci:v000019E5d00001710*
  ID_MODEL_FROM_DATABASE=iBMA Virtual Network Adapter
 
 pci:v000019E5d00001711*
- ID_MODEL_FROM_DATABASE=Hi1710 [iBMC Intelligent Management system chip w/VGA support]
+ ID_MODEL_FROM_DATABASE=Hi171x Series [iBMC Intelligent Management system chip w/VGA support]
 
 pci:v000019E5d00001822*
  ID_MODEL_FROM_DATABASE=Hi1822 Family (4*25GE)
@@ -66098,8 +66218,8 @@ pci:v00001A4Ad00001000*
 pci:v00001A4Ad00001010*
  ID_MODEL_FROM_DATABASE=AMC EVR - Stockholm Timing Board
 
-pci:v00001A4Ad00001020*
- ID_MODEL_FROM_DATABASE=Cluster On Board (COB) Ethernet Switch
+pci:v00001A4Ad00001030*
+ ID_MODEL_FROM_DATABASE=PGPCard - Gen3 GIGe Interface
 
 pci:v00001A4Ad00002000*
  ID_MODEL_FROM_DATABASE=PGPCard - 4 Lane
@@ -66110,12 +66230,24 @@ pci:v00001A4Ad00002001*
 pci:v00001A4Ad00002010*
  ID_MODEL_FROM_DATABASE=PCI-Express EVR
 
+pci:v00001A4Ad00002011*
+ ID_MODEL_FROM_DATABASE=PCI-Express EVR - TPR Version
+
 pci:v00001A4Ad00002020*
- ID_MODEL_FROM_DATABASE=PGP-GEN3 PCIe
+ ID_MODEL_FROM_DATABASE=PGP-GEN3 PCIe - 8 Lane Plus EVR
 
 pci:v00001A4Ad00002030*
  ID_MODEL_FROM_DATABASE=AXI Stream DAQ PCIe card
 
+pci:v00001A4Ad00002040*
+ ID_MODEL_FROM_DATABASE=EXO PCIe TEM
+
+pci:v00001A4Ad00003000*
+ ID_MODEL_FROM_DATABASE=COB DTM V1
+
+pci:v00001A4Ad00003001*
+ ID_MODEL_FROM_DATABASE=COB DTM V2
+
 pci:v00001A51*
  ID_VENDOR_FROM_DATABASE=Hectronic AB
 
@@ -66614,6 +66746,9 @@ pci:v00001B1A*
 pci:v00001B1Ad00000E70*
  ID_MODEL_FROM_DATABASE=GRAPE
 
+pci:v00001B1C*
+ ID_VENDOR_FROM_DATABASE=Corsair
+
 pci:v00001B21*
  ID_VENDOR_FROM_DATABASE=ASMedia Technology Inc.
 
@@ -66626,6 +66761,9 @@ pci:v00001B21d00000612*
 pci:v00001B21d00000612sv00001849sd00000612*
  ID_MODEL_FROM_DATABASE=ASM1062 Serial ATA Controller (Motherboard)
 
+pci:v00001B21d00001040*
+ ID_MODEL_FROM_DATABASE=ASM1040 XHCI Controller
+
 pci:v00001B21d00001042*
  ID_MODEL_FROM_DATABASE=ASM1042 SuperSpeed USB Host Controller
 
@@ -66857,6 +66995,12 @@ pci:v00001B4Bd00000640*
 pci:v00001B4Bd00002241*
  ID_MODEL_FROM_DATABASE=88NR2241 Non-Volatile memory controller
 
+pci:v00001B4Bd00002241sv00001028sd00002112*
+ ID_MODEL_FROM_DATABASE=88NR2241 Non-Volatile memory controller (BOSS-N1 Monolithic)
+
+pci:v00001B4Bd00002241sv00001028sd00002113*
+ ID_MODEL_FROM_DATABASE=88NR2241 Non-Volatile memory controller (BOSS-N1 Modular)
+
 pci:v00001B4Bd00002241sv00001D49sd00000306*
  ID_MODEL_FROM_DATABASE=88NR2241 Non-Volatile memory controller (ThinkSystem M.2 NVMe 2-Bay RAID Enablement Kit)
 
@@ -67061,6 +67205,36 @@ pci:v00001B94d0000E400*
 pci:v00001B96*
  ID_VENDOR_FROM_DATABASE=Western Digital
 
+pci:v00001B96d00002200*
+ ID_MODEL_FROM_DATABASE=Ultrastar DC SN630 NVMe SSD
+
+pci:v00001B96d00002201*
+ ID_MODEL_FROM_DATABASE=Ultrastar DC SN630 NVMe SSD
+
+pci:v00001B96d00002300*
+ ID_MODEL_FROM_DATABASE=Ultrastar DC SN840 NVMe SSD
+
+pci:v00001B96d00002400*
+ ID_MODEL_FROM_DATABASE=Ultrastar DC SN640 NVMe SSD
+
+pci:v00001B96d00002401*
+ ID_MODEL_FROM_DATABASE=Ultrastar DC SN640 NVMe SSD
+
+pci:v00001B96d00002402*
+ ID_MODEL_FROM_DATABASE=Ultrastar DC SN640 NVMe SSD
+
+pci:v00001B96d00002404*
+ ID_MODEL_FROM_DATABASE=Ultrastar DC SN640 NVMe SSD
+
+pci:v00001B96d00002500*
+ ID_MODEL_FROM_DATABASE=Ultrastar DC SN840 NVMe SSD
+
+pci:v00001B96d00003714*
+ ID_MODEL_FROM_DATABASE=PC SN730 NVMe SSD
+
+pci:v00001B96d00003734*
+ ID_MODEL_FROM_DATABASE=PC SN730 NVMe SSD
+
 pci:v00001B9A*
  ID_VENDOR_FROM_DATABASE=XAVi Technologies Corp.
 
@@ -67514,10 +67688,16 @@ pci:v00001C5Cd00001327*
 pci:v00001C5Cd00001504*
  ID_MODEL_FROM_DATABASE=SC300 512GB M.2 2280 SATA Solid State Drive
 
+pci:v00001C5Cd0000243B*
+ ID_MODEL_FROM_DATABASE=PE6110 NVMe Solid State Drive
+
+pci:v00001C5Cd0000243Bsv00001C5Csd00000100*
+ ID_MODEL_FROM_DATABASE=PE6110 NVMe Solid State Drive
+
 pci:v00001C5Cd00002839*
  ID_MODEL_FROM_DATABASE=PE8000 Series NVMe Solid State Drive
 
-pci:v00001C5Cd00002839sv00000100sd00001C5C*
+pci:v00001C5Cd00002839sv00001C5Csd00000100*
  ID_MODEL_FROM_DATABASE=PE8000 Series NVMe Solid State Drive
 
 pci:v00001C5F*
@@ -67676,6 +67856,9 @@ pci:v00001CD2d00000305*
 pci:v00001CD2d00000306*
  ID_MODEL_FROM_DATABASE=Simulyzer-RT CompactPCI Serial CAN-2 card (CAN-FD)
 
+pci:v00001CD2d00000307*
+ ID_MODEL_FROM_DATABASE=Simulyzer-RT CompactPCI Serial DIO-2 card [Xilinx Zynq UltraScale+]
+
 pci:v00001CD7*
  ID_VENDOR_FROM_DATABASE=Nanjing Magewell Electronics Co., Ltd.
 
@@ -68195,6 +68378,9 @@ pci:v00001D78d00001512sv00001D78sd00003107*
 pci:v00001D7C*
  ID_VENDOR_FROM_DATABASE=Aerotech, Inc.
 
+pci:v00001D7Cd00000001*
+ ID_MODEL_FROM_DATABASE=HyperWire Adapter
+
 pci:v00001D82*
  ID_VENDOR_FROM_DATABASE=NETINT Technologies Inc.
 
@@ -68339,6 +68525,9 @@ pci:v00001DA1*
 pci:v00001DA2*
  ID_VENDOR_FROM_DATABASE=Sapphire Technology Limited
 
+pci:v00001DA2d0000E26A*
+ ID_MODEL_FROM_DATABASE=Radeon R7 250
+
 pci:v00001DA3*
  ID_VENDOR_FROM_DATABASE=Habana Labs Ltd.
 
@@ -68747,6 +68936,12 @@ pci:v00001E0Fd00000007sv00001028sd00002110*
 pci:v00001E0Fd00000007sv00001E0Fsd00000001*
  ID_MODEL_FROM_DATABASE=NVMe SSD Controller Cx6 (Generic NVMe CM6 RI 3.84TB)
 
+pci:v00001E0Fd00000009*
+ ID_MODEL_FROM_DATABASE=NVMe SSD
+
+pci:v00001E0Fd00000009sv00001E0Fsd00000001*
+ ID_MODEL_FROM_DATABASE=NVMe SSD (Toshiba RC500 NVMe SSD 500GB)
+
 pci:v00001E17*
  ID_VENDOR_FROM_DATABASE=Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
 
@@ -68783,12 +68978,99 @@ pci:v00001E36*
 pci:v00001E36d00000001*
  ID_MODEL_FROM_DATABASE=T10 [CloudBlazer]
 
+pci:v00001E36d00000002*
+ ID_MODEL_FROM_DATABASE=T11 [CloudBlazer]
+
+pci:v00001E36d00000003*
+ ID_MODEL_FROM_DATABASE=T10s [CloudBlazer]
+
+pci:v00001E36d00008011*
+ ID_MODEL_FROM_DATABASE=I10 [CloudBlazer]
+
 pci:v00001E38*
  ID_VENDOR_FROM_DATABASE=Blaize, Inc
 
 pci:v00001E38d00000102*
  ID_MODEL_FROM_DATABASE=Xplorer X1600
 
+pci:v00001E3B*
+ ID_VENDOR_FROM_DATABASE=Shenzhen DAPU Microelectronics Co., Ltd
+
+pci:v00001E3Bd00001098*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD
+
+pci:v00001E3Bd00001098sv00001E3Bsd00000001*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD U.2 0.8TB (H2100))
+
+pci:v00001E3Bd00001098sv00001E3Bsd00000002*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD U.2 0.96TB (H2200))
+
+pci:v00001E3Bd00001098sv00001E3Bsd00000004*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD U.2 1.6TB (H2100))
+
+pci:v00001E3Bd00001098sv00001E3Bsd00000005*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD U.2 1.92TB (H2200))
+
+pci:v00001E3Bd00001098sv00001E3Bsd00000009*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD U.2 0.8TB (H3100))
+
+pci:v00001E3Bd00001098sv00001E3Bsd0000000A*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD U.2 0.96TB (H3200))
+
+pci:v00001E3Bd00001098sv00001E3Bsd0000000C*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD U.2 1.6TB (H3100))
+
+pci:v00001E3Bd00001098sv00001E3Bsd0000000D*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD U.2 1.92TB (H3200))
+
+pci:v00001E3Bd00001098sv00001E3Bsd00000014*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD U.2 3.2TB (H3100))
+
+pci:v00001E3Bd00001098sv00001E3Bsd00000015*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD U.2 3.84TB (H3200))
+
+pci:v00001E3Bd00001098sv00001E3Bsd00000021*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD U.2 6.4TB (H3100))
+
+pci:v00001E3Bd00001098sv00001E3Bsd00000022*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD U.2 7.68TB (H3200))
+
+pci:v00001E3Bd00001098sv00001E3Bsd00000061*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD HHHL 0.8TB (H2100))
+
+pci:v00001E3Bd00001098sv00001E3Bsd00000062*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD HHHL 0.96TB (H2200))
+
+pci:v00001E3Bd00001098sv00001E3Bsd00000064*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD HHHL 1.6TB (H2100))
+
+pci:v00001E3Bd00001098sv00001E3Bsd00000065*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD HHHL 1.92TB (H2200))
+
+pci:v00001E3Bd00001098sv00001E3Bsd0000006C*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD HHHL 0.8TB (H3100))
+
+pci:v00001E3Bd00001098sv00001E3Bsd0000006D*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD HHHL 0.96TB (H3200))
+
+pci:v00001E3Bd00001098sv00001E3Bsd0000006F*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD HHHL 1.6TB (H3100))
+
+pci:v00001E3Bd00001098sv00001E3Bsd00000070*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD HHHL 1.92TB (H3200))
+
+pci:v00001E3Bd00001098sv00001E3Bsd0000007C*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD HHHL 3.2TB (H3100))
+
+pci:v00001E3Bd00001098sv00001E3Bsd0000007D*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD HHHL 3.84TB (H3200))
+
+pci:v00001E3Bd00001098sv00001E3Bsd0000007F*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD HHHL 6.4TB (H3100))
+
+pci:v00001E3Bd00001098sv00001E3Bsd00000080*
+ ID_MODEL_FROM_DATABASE=Haishen NVMe SSD (Enterprise NVMe SSD HHHL 7.68TB (H3200))
+
 pci:v00001E3D*
  ID_VENDOR_FROM_DATABASE=Burlywood, Inc
 
@@ -68820,10 +69102,10 @@ pci:v00001E4C*
  ID_VENDOR_FROM_DATABASE=GSI Technology
 
 pci:v00001E4Cd00000010*
- ID_MODEL_FROM_DATABASE=Gemini [ Lida ]
+ ID_MODEL_FROM_DATABASE=APU [Leda-G]
 
 pci:v00001E4Cd00000010sv00001E4Csd00000120*
- ID_MODEL_FROM_DATABASE=Gemini [ Lida ] (SE120)
+ ID_MODEL_FROM_DATABASE=APU [Leda-G] (SE120)
 
 pci:v00001E57*
  ID_VENDOR_FROM_DATABASE=Beijing Panyi Technology Co., Ltd
@@ -68837,6 +69119,9 @@ pci:v00001E57d00000100sv00000000sd00000100*
 pci:v00001E6B*
  ID_VENDOR_FROM_DATABASE=Axiado Corp.
 
+pci:v00001E7B*
+ ID_VENDOR_FROM_DATABASE=Dataland
+
 pci:v00001E7C*
  ID_VENDOR_FROM_DATABASE=Brainchip Inc
 
@@ -68861,6 +69146,12 @@ pci:v00001E94*
 pci:v00001E95*
  ID_VENDOR_FROM_DATABASE=Solid State Storage Technology Corporation
 
+pci:v00001EAB*
+ ID_VENDOR_FROM_DATABASE=Hefei DATANG Storage Technology Co.,LTD.
+
+pci:v00001EAE*
+ ID_VENDOR_FROM_DATABASE=XFX Limited
+
 pci:v00001EB1*
  ID_VENDOR_FROM_DATABASE=VeriSilicon Inc
 
@@ -69105,7 +69396,7 @@ pci:v00002646*
  ID_VENDOR_FROM_DATABASE=Kingston Technology Company, Inc.
 
 pci:v00002646d00002263*
- ID_MODEL_FROM_DATABASE=A2000, M.2, 500GB
+ ID_MODEL_FROM_DATABASE=A2000 NVMe SSD
 
 pci:v0000270B*
  ID_VENDOR_FROM_DATABASE=Xantel Corporation
@@ -72926,6 +73217,12 @@ pci:v00008086d00000A55sv00001028sd00001FE8*
 pci:v00008086d00000A55sv00001028sd00001FE9*
  ID_MODEL_FROM_DATABASE=NVMe DC SSD [3DNAND, Beta Rock Controller] (Express Flash NVMe 4.0TB HHHL AIC (P4600))
 
+pci:v00008086d00000B26*
+ ID_MODEL_FROM_DATABASE=Thunderbolt 4 Bridge [Goshen Ridge 2020]
+
+pci:v00008086d00000B27*
+ ID_MODEL_FROM_DATABASE=Thunderbolt 4 USB Controller [Goshen Ridge 2020]
+
 pci:v00008086d00000B60*
  ID_MODEL_FROM_DATABASE=NVMe DC SSD [3DNAND, Beta Rock Controller]
 
@@ -76037,6 +76334,18 @@ pci:v00008086d00001240*
 pci:v00008086d0000124B*
  ID_MODEL_FROM_DATABASE=82380FB (MPCI2) Mobile Docking Controller
 
+pci:v00008086d0000124C*
+ ID_MODEL_FROM_DATABASE=Ethernet Connection E823-L for backplane
+
+pci:v00008086d0000124D*
+ ID_MODEL_FROM_DATABASE=Ethernet Connection E823-L for SFP
+
+pci:v00008086d0000124E*
+ ID_MODEL_FROM_DATABASE=Ethernet Connection E823-L/X557-AT 10GBASE-T
+
+pci:v00008086d0000124F*
+ ID_MODEL_FROM_DATABASE=Ethernet Connection E823-L 1GbE
+
 pci:v00008086d00001250*
  ID_MODEL_FROM_DATABASE=430HX - 82439HX TXC [Triton II]
 
@@ -76190,6 +76499,9 @@ pci:v00008086d0000151C*
 pci:v00008086d0000151Csv0000108Esd00007B13*
  ID_MODEL_FROM_DATABASE=82599 10 Gigabit TN Network Connection (Dual 10GBASE-T LP)
 
+pci:v00008086d0000151D*
+ ID_MODEL_FROM_DATABASE=Ethernet Connection E823-L for QSFP
+
 pci:v00008086d00001520*
  ID_MODEL_FROM_DATABASE=I350 Ethernet Controller Virtual Function
 
@@ -77492,6 +77804,9 @@ pci:v00008086d000015F2sv00008086sd00000002*
 pci:v00008086d000015F3*
  ID_MODEL_FROM_DATABASE=Ethernet Controller I225-V
 
+pci:v00008086d000015F3sv00008086sd00000003*
+ ID_MODEL_FROM_DATABASE=Ethernet Controller I225-V (Intel(R) Ethernet Controller (3) I225-V)
+
 pci:v00008086d000015F4*
  ID_MODEL_FROM_DATABASE=Ethernet Connection (15) I219-LM
 
@@ -77684,6 +77999,33 @@ pci:v00008086d0000163E*
 pci:v00008086d00001889*
  ID_MODEL_FROM_DATABASE=Ethernet Adaptive Virtual Function
 
+pci:v00008086d00001890*
+ ID_MODEL_FROM_DATABASE=Ethernet Connection E822-C for backplane
+
+pci:v00008086d00001891*
+ ID_MODEL_FROM_DATABASE=Ethernet Connection E822-C for QSFP
+
+pci:v00008086d00001892*
+ ID_MODEL_FROM_DATABASE=Ethernet Connection E822-C for SFP
+
+pci:v00008086d00001893*
+ ID_MODEL_FROM_DATABASE=Ethernet Connection E822-C/X557-AT 10GBASE-T
+
+pci:v00008086d00001894*
+ ID_MODEL_FROM_DATABASE=Ethernet Connection E822-C 1GbE
+
+pci:v00008086d00001897*
+ ID_MODEL_FROM_DATABASE=Ethernet Connection E822-L for backplane
+
+pci:v00008086d00001898*
+ ID_MODEL_FROM_DATABASE=Ethernet Connection E822-L for SFP
+
+pci:v00008086d00001899*
+ ID_MODEL_FROM_DATABASE=Ethernet Connection E822-L/X557-AT 10GBASE-T
+
+pci:v00008086d0000189A*
+ ID_MODEL_FROM_DATABASE=Ethernet Connection E822-L 1GbE
+
 pci:v00008086d000018A0*
  ID_MODEL_FROM_DATABASE=C4xxx Series QAT
 
@@ -79346,6 +79688,9 @@ pci:v00008086d00001F27*
 pci:v00008086d00001F2C*
  ID_MODEL_FROM_DATABASE=Atom processor C2000 USB Enhanced Host Controller
 
+pci:v00008086d00001F2Csv00000200sd00001028*
+ ID_MODEL_FROM_DATABASE=Atom processor C2000 USB Enhanced Host Controller (Atom C2338 on Dell 0K8Y0N motherboard)
+
 pci:v00008086d00001F2E*
  ID_MODEL_FROM_DATABASE=Atom processor C2000 RAID SATA2 Controller
 
@@ -81857,6 +82202,15 @@ pci:v00008086d00002520*
 pci:v00008086d00002521*
  ID_MODEL_FROM_DATABASE=82804AA MRH-S Memory Repeater Hub for SDRAM
 
+pci:v00008086d00002522*
+ ID_MODEL_FROM_DATABASE=NVMe Optane Memory Series
+
+pci:v00008086d00002522sv00008086sd00003806*
+ ID_MODEL_FROM_DATABASE=NVMe Optane Memory Series (Optane Memory 16GB)
+
+pci:v00008086d00002522sv00008086sd00003810*
+ ID_MODEL_FROM_DATABASE=NVMe Optane Memory Series (Optane Memory M10 16GB)
+
 pci:v00008086d00002526*
  ID_MODEL_FROM_DATABASE=Wireless-AC 9260
 
@@ -89942,6 +90296,9 @@ pci:v00008086d00003E33*
 pci:v00008086d00003E34*
  ID_MODEL_FROM_DATABASE=Coffee Lake HOST and DRAM Controller
 
+pci:v00008086d00003E35*
+ ID_MODEL_FROM_DATABASE=Coffee Lake Host Bridge/DRAM Registers
+
 pci:v00008086d00003E81*
  ID_MODEL_FROM_DATABASE=8th Gen Core Processor PCIe Controller (x16)
 
@@ -92540,12 +92897,21 @@ pci:v00008086d00009A13*
 pci:v00008086d00009A14*
  ID_MODEL_FROM_DATABASE=11th Gen Core Processor Host Bridge/DRAM Registers
 
+pci:v00008086d00009A17*
+ ID_MODEL_FROM_DATABASE=Tiger Lake-H Thunderbolt USB Controller
+
 pci:v00008086d00009A1B*
  ID_MODEL_FROM_DATABASE=Tiger Lake-LP Thunderbolt NHI #0
 
 pci:v00008086d00009A1D*
  ID_MODEL_FROM_DATABASE=Tiger Lake-LP Thunderbolt NHI #1
 
+pci:v00008086d00009A1F*
+ ID_MODEL_FROM_DATABASE=Tiger Lake-H Thunderbolt NHI #0
+
+pci:v00008086d00009A21*
+ ID_MODEL_FROM_DATABASE=Tiger Lake-H Thunderbolt NHI #1
+
 pci:v00008086d00009A23*
  ID_MODEL_FROM_DATABASE=Tiger Lake-LP Thunderbolt PCI Express Root Port #0
 
@@ -92558,11 +92924,23 @@ pci:v00008086d00009A27*
 pci:v00008086d00009A29*
  ID_MODEL_FROM_DATABASE=Tiger Lake-LP Thunderbolt PCI Express Root Port #3
 
+pci:v00008086d00009A2B*
+ ID_MODEL_FROM_DATABASE=Tiger Lake-H Thunderbolt PCI Express Root Port #0
+
+pci:v00008086d00009A2D*
+ ID_MODEL_FROM_DATABASE=Tiger Lake-H Thunderbolt PCI Express Root Port #1
+
+pci:v00008086d00009A2F*
+ ID_MODEL_FROM_DATABASE=Tiger Lake-H Thunderbolt PCI Express Root Port #2
+
+pci:v00008086d00009A31*
+ ID_MODEL_FROM_DATABASE=Tiger Lake-H Thunderbolt PCI Express Root Port #3
+
 pci:v00008086d00009A33*
  ID_MODEL_FROM_DATABASE=Tiger Lake Trace Hub
 
 pci:v00008086d00009A49*
- ID_MODEL_FROM_DATABASE=UHD Graphics
+ ID_MODEL_FROM_DATABASE=Iris Xe Graphics
 
 pci:v00008086d00009B41*
  ID_MODEL_FROM_DATABASE=UHD Graphics
@@ -95570,6 +95948,18 @@ pci:v00009005d0000028Fsv0000152Dsd00008A36*
 pci:v00009005d0000028Fsv0000152Dsd00008A37*
  ID_MODEL_FROM_DATABASE=Smart Storage PQI SAS (QS-8242-24i)
 
+pci:v00009005d0000028Fsv0000193Dsd00001104*
+ ID_MODEL_FROM_DATABASE=Smart Storage PQI SAS (RAID P2404-Mf-4i-2GB)
+
+pci:v00009005d0000028Fsv0000193Dsd00001105*
+ ID_MODEL_FROM_DATABASE=Smart Storage PQI SAS (RAID P4408-Mf-8i-2GB)
+
+pci:v00009005d0000028Fsv0000193Dsd00001106*
+ ID_MODEL_FROM_DATABASE=Smart Storage PQI SAS (RAID P2404-Mf-4i-1GB)
+
+pci:v00009005d0000028Fsv0000193Dsd00001107*
+ ID_MODEL_FROM_DATABASE=Smart Storage PQI SAS (RAID P4408-Mf-8i-4GB)
+
 pci:v00009005d0000028Fsv0000193Dsd00008460*
  ID_MODEL_FROM_DATABASE=Smart Storage PQI SAS (HBA H460-M1)
 
@@ -95657,6 +96047,12 @@ pci:v00009005d0000028Fsv00009005sd00000806*
 pci:v00009005d0000028Fsv00009005sd00000807*
  ID_MODEL_FROM_DATABASE=Smart Storage PQI SAS (SmartRAID 3162-8i)
 
+pci:v00009005d0000028Fsv00009005sd00000808*
+ ID_MODEL_FROM_DATABASE=Smart Storage PQI SAS (SmartRAID 3101E-4i)
+
+pci:v00009005d0000028Fsv00009005sd00000809*
+ ID_MODEL_FROM_DATABASE=Smart Storage PQI SAS (SmartRAID 3102E-8i)
+
 pci:v00009005d0000028Fsv00009005sd00000900*
  ID_MODEL_FROM_DATABASE=Smart Storage PQI SAS (SmartHBA 2100-8i)
 
@@ -95702,6 +96098,9 @@ pci:v00009005d0000028Fsv00009005sd00001280*
 pci:v00009005d0000028Fsv00009005sd00001281*
  ID_MODEL_FROM_DATABASE=Smart Storage PQI SAS (HBA 1100-16e)
 
+pci:v00009005d0000028Fsv00009005sd00001282*
+ ID_MODEL_FROM_DATABASE=Smart Storage PQI SAS (SmartHBA 2100-16i)
+
 pci:v00009005d0000028Fsv00009005sd00001300*
  ID_MODEL_FROM_DATABASE=Smart Storage PQI SAS (HBA 1100-8i8e)
 
@@ -96059,6 +96458,9 @@ pci:v00009D32d00001203*
 pci:v00009D32d00001204*
  ID_MODEL_FROM_DATABASE=STAR1200E NVMe SSD
 
+pci:v0000A000*
+ ID_VENDOR_FROM_DATABASE=Asix Electronics Corporation (Wrong ID)
+
 pci:v0000A0A0*
  ID_VENDOR_FROM_DATABASE=AOPEN Inc.
 
index 37689cc83295e3021ba109e7a414713c113b97c2..55d3fcc3b082553e5e9bffb7fd596a7207662fcb 100644 (file)
@@ -25,7 +25,6 @@
 # Allowed properties are:
 #    ID_AUTOSUSPEND=1
 
-#
 # Sort by brand, model
 
 #########################################
index 7c51d93016e9664cb7cc93e2a49d72aa44248287..2d21066d22b70208d26fab86b52aa6c91ebc0e78 100644 (file)
@@ -3,10 +3,10 @@
 # The lookup keys are composed in:
 #   60-evdev.rules
 #
-# Note: The format of the "evdev:" prefix match key is a
-# contract between the rules file and the hardware data, it might
-# change in later revisions to support more or better matches, it
-# is not necessarily expected to be a stable ABI.
+# Note: The format of the "evdev:" prefix match key is a contract between the
+# rules file and the hardware data, it might change in later revisions to
+# support more or better matches, it is not necessarily expected to be a stable
+# ABI.
 #
 # Match string formats:
 # evdev:<modalias>
@@ -17,8 +17,8 @@
 # and add your rules there. To load the new rules execute (as root):
 #   systemd-hwdb update
 #   udevadm trigger /dev/input/eventXX
-# where /dev/input/eventXX is the device in question. If in
-# doubt, simply use /dev/input/event* to reload all input rules.
+# where /dev/input/eventXX is the device in question. If in doubt, simply use
+# /dev/input/event* to reload all input rules.
 #
 # If your changes are generally applicable, preferably send them as a pull
 # request to
 # Allowed properties are:
 #    EVDEV_ABS_<axis>=<min>:<max>:<res>:<fuzz>:<flat>
 #
-# where <axis> is the hexadecimal EV_ABS code as listed in linux/input.h
-# and min, max, res, fuzz, flat are the decimal values to the respective
-# fields of the struct input_absinfo as listed in linux/input.h.
-# If a field is missing the field will be left as-is. Not all fields need to
-# be present. e.g. ::45 sets the resolution to 45 units/mm.
+# where <axis> is the hexadecimal EV_ABS code as listed in linux/input.h and
+# min, max, res, fuzz, flat are the decimal values to the respective fields of
+# the struct input_absinfo as listed in linux/input.h. If a field is missing
+# the field will be left as-is. Not all fields need to be present. e.g. ::45
+# sets the resolution to 45 units/mm.
 
-#
 # Sort by brand, model
 
 #########################################
@@ -133,7 +132,7 @@ evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro14,3:*
 #########################################
 
 # Asus N53SV
-evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnASUSTeKComputerInc.:pnN53SV*
+evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnASUSTeKComputerInc.:pnN53SV:*
  EVDEV_ABS_00=0:1152:14
  EVDEV_ABS_01=0:576:10
  EVDEV_ABS_35=0:1152:14
@@ -145,7 +144,7 @@ evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnASUSTeKComputerInc.:pnF3Sg:*
  EVDEV_ABS_01=1103:5856:61
 
 # Asus VivoBook E402SA
-evdev:name:Elan Touchpad:dmi:*svnASUSTeKCOMPUTERINC.:pnE402SA*
+evdev:name:Elan Touchpad:dmi:*svnASUSTeKCOMPUTERINC.:pnE402SA:*
  EVDEV_ABS_00=::29
  EVDEV_ABS_01=::29
  EVDEV_ABS_35=::29
@@ -197,26 +196,26 @@ evdev:name:SYNA3602:00 0911:5288 Touchpad:dmi:*svnBANGHO:pnCLOUDPRO:*
 #########################################
 
 # Dell Vostro 1510
-evdev:name:AlpsPS/2 ALPS GlidePoint*:dmi:bvn*:bvr*:bd*:svnDellInc.:pnVostro1510*
+evdev:name:AlpsPS/2 ALPS GlidePoint*:dmi:bvn*:bvr*:bd*:svnDellInc.:pnVostro1510:*
  EVDEV_ABS_00=::14
  EVDEV_ABS_01=::18
 
 # Dell Inspiron 3537 - PS/2
-evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnDellInc.:pnInspiron3537*
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnDellInc.:pnInspiron3537:*
  EVDEV_ABS_00=1268:5675:41
  EVDEV_ABS_01=1101:4792:61
  EVDEV_ABS_35=1268:5675:41
  EVDEV_ABS_36=1101:4792:61
 
 # Dell Inspiron 3537 - RMI4
-evdev:name:Synaptics TM2382-001:dmi:*svnDellInc.:pnInspiron3537*
+evdev:name:Synaptics TM2382-001:dmi:*svnDellInc.:pnInspiron3537:*
  EVDEV_ABS_00=::24
  EVDEV_ABS_01=::34
  EVDEV_ABS_35=::24
  EVDEV_ABS_36=::34
 
 # Dell Inspiron N5040
-evdev:name:AlpsPS/2 ALPS DualPoint TouchPad:dmi:bvn*:bvr*:bd*:svnDellInc.:pnInspironN5040*
+evdev:name:AlpsPS/2 ALPS DualPoint TouchPad:dmi:bvn*:bvr*:bd*:svnDellInc.:pnInspironN5040:*
  EVDEV_ABS_00=25:2000:22
  EVDEV_ABS_01=0:1351:28
  EVDEV_ABS_35=25:2000:22
@@ -228,42 +227,42 @@ evdev:name:SynPS/2 Synaptics TouchPad:dmi:*bvn*:bvr*:bd*:svnDellInc.:pnMM061:*
  EVDEV_ABS_01=687:5176:107
 
 # Dell Latitude E6220
-evdev:name:AlpsPS/2 ALPS DualPoint TouchPad:dmi:bvn*:bvr*:bd*:svnDellInc.:pnLatitudeE6220*
+evdev:name:AlpsPS/2 ALPS DualPoint TouchPad:dmi:bvn*:bvr*:bd*:svnDellInc.:pnLatitudeE6220:*
  EVDEV_ABS_00=76:1815:22
  EVDEV_ABS_01=131:1330:30
  EVDEV_ABS_35=76:1815:22
  EVDEV_ABS_36=131:1330:30
 
 # Dell Latitude E6320
-evdev:name:AlpsPS/2 ALPS DualPoint TouchPad:dmi:bvn*:bvr*:bd*:svnDellInc.:pnLatitudeE6320*
+evdev:name:AlpsPS/2 ALPS DualPoint TouchPad:dmi:bvn*:bvr*:bd*:svnDellInc.:pnLatitudeE6320:*
  EVDEV_ABS_00=79:1841:22
  EVDEV_ABS_01=140:1325:29
  EVDEV_ABS_35=79:1841:22
  EVDEV_ABS_36=140:1325:29
 
 # Dell Latitude E7250
-evdev:name:AlpsPS/2 ALPS GlidePoint:dmi:bvn*:bvr*:bd*:svnDellInc.:pnLatitudeE7250*
+evdev:name:AlpsPS/2 ALPS GlidePoint:dmi:bvn*:bvr*:bd*:svnDellInc.:pnLatitudeE7250:*
  EVDEV_ABS_00=179:3903:38
  EVDEV_ABS_01=277:1916:32
  EVDEV_ABS_35=179:3903:38
  EVDEV_ABS_36=277:1916:32
 
 # Dell Latitude E7470
-evdev:name:AlpsPS/2 ALPS DualPoint TouchPad:dmi:bvn*:bvr*:bd*:svnDellInc.:pnLatitudeE7470*
+evdev:name:AlpsPS/2 ALPS DualPoint TouchPad:dmi:bvn*:bvr*:bd*:svnDellInc.:pnLatitudeE7470:*
  EVDEV_ABS_00=29:2930:30
  EVDEV_ABS_01=26:1533:29
  EVDEV_ABS_35=29:2930:30
  EVDEV_ABS_36=26:1533:29
 
 # Dell Precision 5510
-evdev:name:SynPS/2 Synaptics TouchPad:dmi:bvn*:bvr*:bd*:svnDellInc.:pnPrecision5510*
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:bvn*:bvr*:bd*:svnDellInc.:pnPrecision5510:*
  EVDEV_ABS_00=::42
  EVDEV_ABS_01=::43
  EVDEV_ABS_35=::42
  EVDEV_ABS_36=::43
 
 # Dell Precision M4700
-evdev:name:AlpsPS/2 ALPS DualPoint TouchPad:dmi:*svnDellInc.:pnPrecisionM4700*
+evdev:name:AlpsPS/2 ALPS DualPoint TouchPad:dmi:*svnDellInc.:pnPrecisionM4700:*
  EVDEV_ABS_00=0:1960:24
  EVDEV_ABS_01=113:1436:30
  EVDEV_ABS_35=0:1960:24
@@ -277,14 +276,14 @@ evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnDellInc.:pnXPS139360:cvr:*
  EVDEV_ABS_36=::60
 
 # Dell XPS15 9550
-evdev:name:SynPS/2 Synaptics TouchPad:dmi:bvn*:bvr*:bd*:svnDellInc.:pnXPS159550*
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:bvn*:bvr*:bd*:svnDellInc.:pnXPS159550:*
  EVDEV_ABS_00=::41
  EVDEV_ABS_01=::43
  EVDEV_ABS_35=::41
  EVDEV_ABS_36=::43
 
 # Dell XPS M1530
-evdev:name:AlpsPS/2 ALPS GlidePoint:dmi:bvn*:bvr*:bd*:svnDellInc.:pnXPSM1530*
+evdev:name:AlpsPS/2 ALPS GlidePoint:dmi:bvn*:bvr*:bd*:svnDellInc.:pnXPSM1530:*
  EVDEV_ABS_00=85:947:15
  EVDEV_ABS_01=154:726:18
 
@@ -302,7 +301,7 @@ evdev:input:b0003v0430p0530*
 #########################################
 
 # Chromebook Pixel (2015) - Samus
-evdev:name:Atmel maXTouch Touch*:dmi:bvn*:bvr*:bd*:svnGOOGLE:pnSamus*
+evdev:name:Atmel maXTouch Touch*:dmi:bvn*:bvr*:bd*:svnGOOGLE:pnSamus:*
  EVDEV_ABS_00=::10
  EVDEV_ABS_01=::10
  EVDEV_ABS_35=::10
@@ -313,28 +312,28 @@ evdev:name:Atmel maXTouch Touch*:dmi:bvn*:bvr*:bd*:svnGOOGLE:pnSamus*
 #########################################
 
 # HP Chromebook 14 (Falco)
-evdev:name:Cypress APA Trackpad ?cyapa?:dmi:*:svnHewlett-Packard*:pnFalco*:
+evdev:name:Cypress APA Trackpad ?cyapa?:dmi:*:svnHewlett-Packard*:pnFalco*:*
  EVDEV_ABS_00=:::8
  EVDEV_ABS_01=:::8
  EVDEV_ABS_35=:::8
  EVDEV_ABS_36=:::8
 
 # HP Pavilion dm4
-evdev:name:SynPS/2 Synaptics TouchPad*:dmi:*svnHewlett-Packard:pnHPPaviliondm4*
+evdev:name:SynPS/2 Synaptics TouchPad*:dmi:*svnHewlett-Packard:pnHPPaviliondm4:*
  EVDEV_ABS_00=1360:5563:47
  EVDEV_ABS_01=1269:4618:61
  EVDEV_ABS_35=1360:5563:47
  EVDEV_ABS_36=1269:4618:61
 
 # HP Pavilion g6
-evdev:name:SynPS/2 Synaptics TouchPad:dmi:bvnHewlett-Packard:*svnHewlett-Packard:pnHPPaviliong6*
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:bvnHewlett-Packard:*svnHewlett-Packard:pnHPPaviliong6:*
  EVDEV_ABS_00=1255:5728:50
  EVDEV_ABS_01=1215:4761:71
  EVDEV_ABS_35=1255:5728:50
  EVDEV_ABS_36=1215:4761:71
 
 # HP Pavilion dv7
-evdev:name:SynPS/2 Synaptics TouchPad*:dmi:*svnHewlett-Packard:pnHPPaviliondv7*
+evdev:name:SynPS/2 Synaptics TouchPad*:dmi:*svnHewlett-Packard:pnHPPaviliondv7:*
  EVDEV_ABS_00=1068:5805:44
  EVDEV_ABS_01=1197:4890:57
  EVDEV_ABS_35=1068:5805:44
@@ -348,14 +347,14 @@ evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnHP:pnHPLaptop15-bs0xx:*
  EVDEV_ABS_36=1029:4916:78
 
 # HP Spectre
-evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnHP:pnHPSpectreNotebook*
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnHP:pnHPSpectreNotebook:*
  EVDEV_ABS_00=1205:5691:47
  EVDEV_ABS_01=1083:4808:65
  EVDEV_ABS_35=1205:5691:47
  EVDEV_ABS_36=1083:4808:65
 
 # HP Envy x360
-evdev:name:SynPS/2 Synaptics TouchPad:*svnHP:pnHPENVYx360Convertible15m-cn0xxx*
+evdev:name:SynPS/2 Synaptics TouchPad:*svnHP:pnHPENVYx360Convertible15m-cn0xxx:*
  EVDEV_ABS_00=1302:5640:36
  EVDEV_ABS_01=1119:4741:61
  EVDEV_ABS_35=1302:5640:36
@@ -366,28 +365,28 @@ evdev:name:SynPS/2 Synaptics TouchPad:*svnHP:pnHPENVYx360Convertible15m-cn0xxx*
 #########################################
 
 # Lenovo B590
-evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pvrLenovoB590*
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pvrLenovoB590:*
  EVDEV_ABS_00=1243:5759:48
  EVDEV_ABS_01=1130:4832:65
  EVDEV_ABS_35=1243:5759:48
  EVDEV_ABS_36=1130:4832:65
 
 # Lenovo E530
-evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:pn*ThinkPadEdgeE530*
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:pn*ThinkPadEdgeE530:*
  EVDEV_ABS_00=1241:5703:49
  EVDEV_ABS_01=1105:4820:68
  EVDEV_ABS_35=1241:5703:49
  EVDEV_ABS_36=1105:4820:68
 
 # Lenovo L430
-evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnLENOVO*:pvrThinkPadL430*
+evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnLENOVO*:pvrThinkPadL430:*
  EVDEV_ABS_00=19:2197:29
  EVDEV_ABS_01=12:1151:25
  EVDEV_ABS_35=19:2197:29
  EVDEV_ABS_36=12:1151:25
 
 # Lenovo P50
-evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pn*ThinkPad*P50*
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pn*ThinkPad*P50:*
  EVDEV_ABS_00=::44
  EVDEV_ABS_01=::67
  EVDEV_ABS_35=::44
@@ -404,41 +403,48 @@ evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pvrThinkPad??40?:*
 # Lenovo X240 series
 evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pvrThinkPadX240:*
 evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pvrThinkPadX240?:*
- EVDEV_ABS_00=1232:5711:51
- EVDEV_ABS_01=1159:4700:53
- EVDEV_ABS_35=1232:5711:51
- EVDEV_ABS_36=1159:4700:53
+ EVDEV_ABS_00=1232:5711:51:13
+ EVDEV_ABS_01=1159:4700:53:13
+ EVDEV_ABS_35=1232:5711:51:13
+ EVDEV_ABS_36=1159:4700:53:13
 
 # Lenovo ThinkPad X140e
-evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pvrThinkPadX140e*
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pvrThinkPadX140e:*
  EVDEV_ABS_00=1176:5767:62
  EVDEV_ABS_01=416:5534:160
  EVDEV_ABS_35=1176:5767:62
  EVDEV_ABS_36=416:5534:160
 
 # Lenovo ThinkPad T430
-evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pvrThinkPadT430*
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pvrThinkPadT430:*
  EVDEV_ABS_00=1250:5631:58
  EVDEV_ABS_01=1309:4826:78
  EVDEV_ABS_35=1250:5631:58
  EVDEV_ABS_36=1309:4826:78
 
+# Lenovo Thinkpad X1 Carbon Extreme 3rd gen.
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*pvrThinkPadX1ExtremeGen3*
+ EVDEV_ABS_00=1354:5678:43
+ EVDEV_ABS_01=1169:4695:51
+ EVDEV_ABS_35=1354:5678:43
+ EVDEV_ABS_36=1169:4695:51
+
 # Lenovo Thinkpad Carbon X1 4th gen. and X1 Yoga 1st gen.
-evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pvrThinkPadX1Carbon4th*
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pvrThinkPadX1Carbon4th:*
  EVDEV_ABS_00=1262:5679:44
  EVDEV_ABS_01=1101:4824:65
  EVDEV_ABS_35=1262:5679:44
  EVDEV_ABS_36=1101:4824:65
 
 # Lenovo Thinkpad Carbon X1 5th gen.
-evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pvrThinkPadX1Carbon5th*
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pvrThinkPadX1Carbon5th:*
  EVDEV_ABS_00=::44
  EVDEV_ABS_01=::65
  EVDEV_ABS_35=::44
  EVDEV_ABS_36=::65
 
 # Lenovo Thinkpad Carbon X1 5th gen. (rmi4)
-evdev:name:Synaptics TM3289-002:dmi:*svnLENOVO*:pvrThinkPadX1Carbon5th*
+evdev:name:Synaptics TM3289-002:dmi:*svnLENOVO*:pvrThinkPadX1Carbon5th:*
  EVDEV_ABS_00=::19
  EVDEV_ABS_01=::19
  EVDEV_ABS_35=::19
@@ -452,101 +458,102 @@ evdev:input:b0003v17EFp60B5*
  EVDEV_ABS_36=::11
 
 # Lenovo T460
-evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pn*ThinkPad*T460*
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pn*ThinkPad*T460:*
  EVDEV_ABS_00=1266:5677:44
  EVDEV_ABS_01=1093:4832:65
  EVDEV_ABS_35=1266:5677:44
  EVDEV_ABS_36=1093:4832:65
 
 # Lenovo T510
-evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pn*ThinkPad*T510*
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pn*ThinkPad*T510:*
  EVDEV_ABS_00=778:6239:72
  EVDEV_ABS_01=841:5330:100
  EVDEV_ABS_35=778:6239:72
  EVDEV_ABS_36=841:5330:100
 
 # Lenovo V360
-evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*pvrLenovoV360*
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*pvrLenovoV360:*
  EVDEV_ABS_00=1243:5927:60
  EVDEV_ABS_01=902:5330:108
 
 # Lenovo W530
-evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*pvrThinkPadW530*
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*pvrThinkPadW530:*
  EVDEV_ABS_00=1250:5631:59
  EVDEV_ABS_01=1205:4834:81
  EVDEV_ABS_35=1250:5631:59
  EVDEV_ABS_36=1205:4834:81
 
 # Lenovo X220 series
-evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*pvrThinkPadX220*
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO:*pvrThinkPadX220:*
  EVDEV_ABS_00=1316:5627:58
  EVDEV_ABS_01=1355:4826:81
  EVDEV_ABS_35=1316:5627:58
  EVDEV_ABS_36=1355:4826:81
 
 # Lenovo X230 series
-evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pn*ThinkPad*X230*
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pn*ThinkPad*X230:*
  EVDEV_ABS_01=::100
  EVDEV_ABS_36=::100
 
 # Lenovo Y700-14ISK
-evdev:name:AlpsPS/2 ALPS GlidePoint:dmi:*svnLENOVO:*pvrLenovoideapadY700-14ISK*
+evdev:name:AlpsPS/2 ALPS GlidePoint:dmi:*svnLENOVO:*pvrLenovoideapadY700-14ISK:*
  EVDEV_ABS_00=::27
  EVDEV_ABS_01=::29
  EVDEV_ABS_35=::27
  EVDEV_ABS_36=::29
 
 # Lenovo Ideapad 310S-14ISK
-evdev:name:AlpsPS/2 ALPS GlidePoint:dmi:*svnLENOVO:*pvrLenovoideapad310S-14ISK*
+evdev:name:AlpsPS/2 ALPS GlidePoint:dmi:*svnLENOVO:*pvrLenovoideapad310S-14ISK:*
  EVDEV_ABS_00=113:3960:37
  EVDEV_ABS_01=100:1959:27
  EVDEV_ABS_35=113:3960:37
  EVDEV_ABS_36=100:1959:27
 
 # Lenovo Ideapad 500S-13ISK
-evdev:name:AlpsPS/2 ALPS GlidePoint:dmi:*svnLENOVO:*pvrLenovoideapad500S-13ISK*
+evdev:name:AlpsPS/2 ALPS GlidePoint:dmi:*svnLENOVO:*pvrLenovoideapad500S-13ISK:*
  EVDEV_ABS_00=125:3955:37
  EVDEV_ABS_01=104:1959:27
  EVDEV_ABS_35=125:3954:37
  EVDEV_ABS_36=104:1959:27
 
 # Lenovo Yoga 500-14ISK
-evdev:name:AlpsPS/2 ALPS GlidePoint:dmi:*svnLENOVO:*pvrLenovoYoga500-14ISK*
+evdev:name:AlpsPS/2 ALPS GlidePoint:dmi:*svnLENOVO:*pvrLenovoYoga500-14ISK:*
  EVDEV_ABS_00=124:3955:36
  EVDEV_ABS_01=103:1959:26
  EVDEV_ABS_35=124:3955:36
  EVDEV_ABS_36=103:1959:26
 
 # Lenovo Flex 3 15-inch
-evdev:name:AlpsPS/2 ALPS GlidePoint*:dmi:bvn*:bvr*:bd*:svnLENOVO*:pvrFlex3-15*
+evdev:name:AlpsPS/2 ALPS GlidePoint*:dmi:bvn*:bvr*:bd*:svnLENOVO*:pvrFlex3-15:*
  EVDEV_ABS_00=::38
  EVDEV_ABS_01=::28
  EVDEV_ABS_35=::38
  EVDEV_ABS_36=::28
 
 # Lenovo ThinkPad Edge 13 (02173BG)
-evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pn*02173BG*:*pvrThinkPadEdge*
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pn*02173BG*:*pvrThinkPadEdge:*
  EVDEV_ABS_00=916:6077:55
  EVDEV_ABS_01=653:5395:116
  EVDEV_ABS_35=916:6077:55
  EVDEV_ABS_36=653:5395:116
 
 # Lenovo Yoga 500-14IBD, 80N4
-evdev:name:AlpsPS/2 ALPS GlidePoint:dmi:*svnLENOVO:*pvrLenovoYoga500-14IBD*
+evdev:name:AlpsPS/2 ALPS GlidePoint:dmi:*svnLENOVO:*pvrLenovoYoga500-14IBD:*
  EVDEV_ABS_00=117:3952:36
  EVDEV_ABS_01=105:1960:26
  EVDEV_ABS_35=117:3952:36
  EVDEV_ABS_36=105:1960:26
 
-# Lenovo Thinkpad T490
+# Lenovo Thinkpad T490 and T14 Gen1
 evdev:name:SynPS/2 Synaptics TouchPad:dmi:*:svnLENOVO:*pvrThinkPadT490:*
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:*:svnLENOVO:*pvrThinkPadT14Gen1:*
  EVDEV_ABS_00=::44
  EVDEV_ABS_01=::52
  EVDEV_ABS_35=::44
  EVDEV_ABS_36=::52
 
 # Lenovo Legion Y9000X2020
-evdev:name:MSFT0001:02 04F3:304B Touchpad:dmi:*svnLENOVO:*pvrLenovoLegionY9000X2020*
+evdev:name:MSFT0001:02 04F3:304B Touchpad:dmi:*svnLENOVO:*pvrLenovoLegionY9000X2020:*
  EVDEV_ABS_00=::31
  EVDEV_ABS_01=::30
  EVDEV_ABS_35=::31
@@ -564,7 +571,7 @@ evdev:name:1A58675*:00 06CB:8323 Touchpad:dmi:*svnRazer:pnBladeStealth:*
  EVDEV_ABS_36=::11:8
 
 # Razer Blade Stealth (2016)
-evdev:name:Synaptics TM2438-005:dmi:*svnRazer:pnBladeStealth*
+evdev:name:Synaptics TM2438-005:dmi:*svnRazer:pnBladeStealth:*
  EVDEV_ABS_00=0:4064:29
  EVDEV_ABS_01=0:2405:37
  EVDEV_ABS_35=0:4064:29
@@ -575,14 +582,14 @@ evdev:name:Synaptics TM2438-005:dmi:*svnRazer:pnBladeStealth*
 #########################################
 
 # Samsung 305V4
-evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnSAMSUNGELECTRONICSCO.,LTD.:pn305V4A/305V5A*
+evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnSAMSUNGELECTRONICSCO.,LTD.:pn305V4A/305V5A:*
  EVDEV_ABS_00=0:2480:28
  EVDEV_ABS_01=0:1116:24
  EVDEV_ABS_35=0:2480:28
  EVDEV_ABS_36=0:1116:24
 
 # Samsung 880Z5E
-evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnSAMSUNGELECTRONICSCO.,LTD.:pn870Z5E/880Z5E/680Z5E*
+evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnSAMSUNGELECTRONICSCO.,LTD.:pn870Z5E/880Z5E/680Z5E:*
  EVDEV_ABS_00=::30
  EVDEV_ABS_01=::29
  EVDEV_ABS_35=::30
@@ -593,7 +600,7 @@ evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnSAMSUNGELECTRONICSCO.,LTD.:pn870Z5E/
 #########################################
 
 # Star LabTop Mk III
-evdev:name:ALPS0001:00 0911:5288 Touchpad:dmi:*svnStarLabs:pnLabTop*
+evdev:name:ALPS0001:00 0911:5288 Touchpad:dmi:*svnStarLabs:pnLabTop:*
  EVDEV_ABS_00=0:2627:25
  EVDEV_ABS_01=0:1331:20
  EVDEV_ABS_35=0:2627:25
@@ -622,12 +629,12 @@ evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnSystem76:pnGalagoPro:pvrgalp2:*
 #########################################
 
 # Toshiba Tecra M11
-evdev:name:AlpsPS/2 ALPS DualPoint TouchPad:dmi:*svnTOSHIBA:pnTECRAM11*
+evdev:name:AlpsPS/2 ALPS DualPoint TouchPad:dmi:*svnTOSHIBA:pnTECRAM11:*
  EVDEV_ABS_00=90:962:11
  EVDEV_ABS_01=51:681:14
 
 # Toshiba Satellite R830
-evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnTOSHIBA:pnSATELLITER830*
+evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnTOSHIBA:pnSATELLITER830:*
  EVDEV_ABS_00=1238:5785:53
  EVDEV_ABS_01=1045:4826:76
  EVDEV_ABS_35=1238:5785:53
index 9e28db1e493d7576cfb4e505c7d805d7def24eda..1eec776885ba076d149d3a8041a8bab3d5f69cca 100644 (file)
@@ -3,10 +3,10 @@
 # The lookup keys are composed in:
 #   60-input-id.rules
 #
-# Note: The format of the "input-id:" prefix match key is a
-# contract between the rules file and the hardware data, it might
-# change in later revisions to support more or better matches, it
-# is not necessarily expected to be a stable ABI.
+# Note: The format of the "input-id:" prefix match key is a contract between
+# the rules file and the hardware data, it might change in later revisions to
+# support more or better matches, it is not necessarily expected to be a stable
+# ABI.
 #
 # Match string formats:
 # id-input:modalias:<modalias>
 #   udevadm info /dev/input/eventXX.
 #
 # This file must only be used where the input_id builtin assigns the wrong
-# properties or lacks the assignment of some properties. This is almost
-# always caused by a device not adhering to the standard of the device's
-# type.
+# properties or lacks the assignment of some properties. This is almost always
+# caused by a device not adhering to the standard of the device's type.
 #
 # Allowed properties are:
-#    ID_INPUT
-#    ID_INPUT_ACCELEROMETER, ID_INPUT_MOUSE,
-#    ID_INPUT_POINTINGSTICK, ID_INPUT_TOUCHSCREEN, ID_INPUT_TOUCHPAD,
-#    ID_INPUT_TABLET, ID_INPUT_TABLET_PAD, ID_INPUT_JOYSTICK, ID_INPUT_KEY,
-#    ID_INPUT_KEYBOARD, ID_INPUT_SWITCH, ID_INPUT_TRACKBALL
+#    ID_INPUT, ID_INPUT_ACCELEROMETER, ID_INPUT_MOUSE, ID_INPUT_POINTINGSTICK,
+#    ID_INPUT_TOUCHSCREEN, ID_INPUT_TOUCHPAD, ID_INPUT_TABLET,
+#    ID_INPUT_TABLET_PAD, ID_INPUT_JOYSTICK, ID_INPUT_KEY, ID_INPUT_KEYBOARD,
+#    ID_INPUT_SWITCH, ID_INPUT_TRACKBALL
 #
 #    ID_INPUT
 #       * MUST be set when ANY of ID_INPUT_* is set
@@ -45,7 +43,7 @@
 #    ID_INPUT_TABLET
 #       * MUST be set when setting ID_INPUT_TABLET_PAD
 #
-# Allowed values are 1 and 0 to set or unset, repsectively.
+# Allowed values are 1 and 0 to set or unset, respectively.
 #
 # NOT allowed in this file are:
 #    ID_INPUT_WIDTH_MM, ID_INPUT_HEIGHT_MM, ID_INPUT_TOUCHPAD_INTEGRATION
index cba626db1bd4fbd1b17d68f869c2f2dde65d0996..37955a316d6fd04af97f85668b26f3b558ad1353 100644 (file)
 # The lookup keys are composed in:
 #   60-evdev.rules
 #
-# Note: The format of the "evdev:" prefix match key is a
-# contract between the rules file and the hardware data, it might
-# change in later revisions to support more or better matches, it
-# is not necessarily expected to be a stable ABI.
+# Note: The format of the "evdev:" prefix match key is a contract between the
+# rules file and the hardware data, it might change in later revisions to
+# support more or better matches, it is not necessarily expected to be a stable
+# ABI.
 #
 # Supported hardware matches are:
 #  - Generic input devices match:
@@ -48,7 +48,6 @@
 #    firmware-provided string exported by the kernel DMI modalias,
 #    see /sys/class/dmi/id/modalias
 
-
 # ######################### KEY MAPPING ######################################
 #
 # Keyboard mapping of scan codes to key codes, and
 
 # A device with a fixed keyboard layout that must not be changed by
 # the desktop environment may specify that layout as:
-#   XKB_FIXED_LAYOUT="us"
-#   XKB_FIXED_VARIANT=""
+#   XKB_FIXED_LAYOUT=us
+#   XKB_FIXED_VARIANT=
 # Examples of such devices: the Yubikey or other key-code generating
 # devices.
 
 # A device where the scan code to key code mapping is insufficient and
 # requires a special key code to symbol configuration may specify that with:
-#   XKB_FIXED_MODEL="xkbmodel"
+#   XKB_FIXED_MODEL=xkbmodel
 # Examples of such devices: Chromebooks where the top row is used for both
 # media and F1-F10 keys.
 
 ##########################################
 
 # common keys
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnGateway*:pnA0A1*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svneMachines:pneMachines*E725:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnGateway*:pnA0A1*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svneMachines:pneMachines*E725:*
  KEYBOARD_KEY_86=wlan                                   # Fn+F3 or Fn+Q for comunication key
  KEYBOARD_KEY_a5=help                                   # Fn+F1
  KEYBOARD_KEY_a6=setup                                  # Fn+F2 Acer eSettings
@@ -133,17 +132,17 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svneMachines:pneMachines*E725:pvr*
  KEYBOARD_KEY_f9=prog1                                  # Launch NTI shadow
 
 # Acer kernel driver
-evdev:name:Acer WMI hotkeys:dmi:bvn*:bvr*:bd*:svn*:pnAcer*:pvr*
+evdev:name:Acer WMI hotkeys:dmi:bvn*:bvr*:bd*:svn*:pnAcer*:*
  KEYBOARD_KEY_82=f21                                    # Touchpad toggle
 
 # Aspire models
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*:*
  KEYBOARD_KEY_84=bluetooth                              # sent when bluetooth module missing, and key pressed
  KEYBOARD_KEY_d9=bluetooth                              # Bluetooth off
  KEYBOARD_KEY_92=media                                  # Acer arcade
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*5720*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnZG8*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*5720*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnZG8*:*
  KEYBOARD_KEY_f4=prog3                                  # e-key
 
 evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*5920G:*
@@ -157,16 +156,16 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*8930:*
  KEYBOARD_KEY_89=fastforward
  KEYBOARD_KEY_9e=back
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*7750G:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*7750G:*
  KEYBOARD_KEY_e0=!pageup
 
 # Predator PH 315-52
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnPredator*PH*315-52:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnPredator*PH*315-52:*
  KEYBOARD_KEY_ef=kbdillumup                             # Fn+F10
  KEYBOARD_KEY_f0=kbdillumdown                           # Fn+F9
 
 # Travelmate C300
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*C3[01]0*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*C3[01]0*:*
  KEYBOARD_KEY_67=f24                                    # FIXME: rotate screen
  KEYBOARD_KEY_68=up
  KEYBOARD_KEY_69=down
@@ -174,43 +173,41 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*C3[01]0*:pvr*
  KEYBOARD_KEY_6c=screenlock                             # FIXME: lock tablet device/buttons
 
 # Travelmate P648-G2-MG, P648-G3-M and P645-S
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*P648-G2-MG*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*P648-G3-M*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*P645-S*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*P648-G2-MG*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*P648-G3-M*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*P645-S*:*
  KEYBOARD_KEY_8a=f20                                    # Microphone mute button; should be micmute
 
 # on some models this isn't brightnessup
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*5210*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*5220*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*5610*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*5620*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*5720*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*4720*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*5210*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*5220*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*5610*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*5620*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*5720*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*4720*:*
 evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*6593:*
 evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnAspire*1640:*
  KEYBOARD_KEY_ee=screenlock
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnAOA*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnAOA*:*
  KEYBOARD_KEY_a9=!switchvideomode                       # Fn+F5
 
 # Packard Bell and Gateway models
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnGateway*:pn*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnPackard*Bell*:pn*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnGateway*:pn*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnPackard*Bell*:pn*:*
  KEYBOARD_KEY_86=wlan                                   # Fn+F3 or Fn+Q for comunication key
 
 ###########################################################
 # Alienware
 ###########################################################
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAlienware*:pn*
+# Alienware/Dell reserves these keys; safe to apply on all their devices
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAlienware*:pn*:*
  KEYBOARD_KEY_81=f21                                    # Touchpad toggle
  KEYBOARD_KEY_8a=ejectcd
-
-# Alienware/Dell reserves these keys; safe to apply on all their devices
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAlienware*:pn*:pvr*
- KEYBOARD_KEY_bf=!prog1                                 #graphics amplifier, cable plug-in event
- KEYBOARD_KEY_c1=!prog2                                 #graphics amplifier, undock-button event
- KEYBOARD_KEY_c2=!power                                 #graphics amplifier, surprise undock event
+ KEYBOARD_KEY_bf=!prog1                                 # graphics amplifier, cable plug-in event
+ KEYBOARD_KEY_c1=!prog2                                 # graphics amplifier, undock-button event
+ KEYBOARD_KEY_c2=!power                                 # graphics amplifier, surprise undock event
 
 # Alienware M17xR3 laptops
 evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAlienware*:pnM17xR3:*
@@ -220,14 +217,14 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAlienware*:pnM17xR3:*
 # Asus
 ###########################################################
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnASUS:pn*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnASUS:pn*:*
  KEYBOARD_KEY_ed=volumeup
  KEYBOARD_KEY_ee=volumedown
  KEYBOARD_KEY_ef=mute
 
-evdev:name:Asus WMI hotkeys:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:pvr*
-evdev:name:Eee PC WMI hotkeys:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:pvr*
-evdev:name:Asus Laptop extra buttons:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:pvr*
+evdev:name:Asus WMI hotkeys:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:*
+evdev:name:Eee PC WMI hotkeys:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:*
+evdev:name:Asus Laptop extra buttons:dmi:bvn*:bvr*:bd*:svnASUS*:pn*:*
  KEYBOARD_KEY_6b=f21                                    # Touchpad Toggle
 
 # USB keyboard in Asus FX503VD
@@ -238,14 +235,14 @@ evdev:input:b0003v0B05p1869*
 # BenQ
 ###########################################################
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svn*BenQ*:pn*Joybook*R22*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn*BenQ*:pn*Joybook*R22*:*
  KEYBOARD_KEY_6e=wlan
 
 ###########################################################
 # Clevo
 ###########################################################
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnNotebook:pnW65_67SZ:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnNotebook:pnW65_67SZ:*
  KEYBOARD_KEY_a0=!mute
  KEYBOARD_KEY_a2=!playpause
  KEYBOARD_KEY_ae=!volumedown
@@ -262,8 +259,8 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnCOMPAL:pnHEL80I:*
 # COMPAQ
 ###########################################################
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnCompaq*:pn*E500*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnCompaq*:pn*Evo*N*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnCompaq*:pn*E500*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnCompaq*:pn*Evo*N*:*
  KEYBOARD_KEY_a3=www                                    # I key
  KEYBOARD_KEY_9a=search
  KEYBOARD_KEY_9e=email
@@ -288,7 +285,7 @@ evdev:name:gpio-keys:phys:gpio-keys/input0:ev:3:dmi:bvn*:bvr*:bd*:svncube:pni1-T
 # Dell
 ###########################################################
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pn*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pn*:*
  KEYBOARD_KEY_81=playpause                              # Play/Pause
  KEYBOARD_KEY_82=stopcd                                 # Stop
  KEYBOARD_KEY_83=previoussong                           # Previous song
@@ -320,69 +317,80 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pn*
  KEYBOARD_KEY_d9=f21                                    # Touchpad toggle
 
 #
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*910:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*101[012]:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*1110:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*1210:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*910:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*101[012]:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*1110:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*1210:*
  KEYBOARD_KEY_84=wlan
 
+# Dell Inspiron 11 3168
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron11-3168:pvr*
+ KEYBOARD_KEY_c7=!home                                 # Fn-LeftArrow
+ KEYBOARD_KEY_cf=!end                                  # Fn-RightArrow
+ KEYBOARD_KEY_c9=!pageup                               # Fn-UpArrow
+ KEYBOARD_KEY_d1=!pagedown                             # Fn-DownArrow
+
 # Dell Inspiron 1520 and Latitude 2110
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*1520:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*2110:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron*1520:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*2110:*
  KEYBOARD_KEY_85=unknown  # Brightness Down, also emitted by acpi-video, ignore
  KEYBOARD_KEY_86=unknown  # Brightness Up, also emitted by acpi-video, ignore
 
 # Dell Inspiron 537*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron537*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnInspiron537*:*
  KEYBOARD_KEY_88=!wlan                                  # Fn-PrtScr rfkill
 
 # Latitude XT2
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*XT2:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*XT2:*
  KEYBOARD_KEY_9b=up                                     # tablet rocker up
  KEYBOARD_KEY_9e=enter                                  # tablet rocker press
  KEYBOARD_KEY_9f=back                                   # tablet back
  KEYBOARD_KEY_a3=down                                   # tablet rocker down
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnStudio*155[78]:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnStudio*155[78]:*
  KEYBOARD_KEY_a0=!                                      # mute
  KEYBOARD_KEY_ae=!                                      # volume down
  KEYBOARD_KEY_b0=!                                      # volume up
 
 # Dell Touchpad
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnPrecision*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnPrecision*:*
  KEYBOARD_KEY_88=!                                      # wireless switch
  KEYBOARD_KEY_9e=!f21
 
 # Dell Latitude E7*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*E7*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*E7*:*
  KEYBOARD_KEY_88=unknown                                # Fn-PrtScr rfkill - handled in HW
 
 # Dell XPS
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnXPS*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnXPS*:*
  KEYBOARD_KEY_8c=!unknown
 
 # Dell XPS L702x
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDellInc.:pnDellSystemXPSL702X:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDellInc.:pnDellSystemXPSL702X:*
  KEYBOARD_KEY_84=prog1
  KEYBOARD_KEY_85=prog2
 
 # Dell XPS12 9Q33
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnXPS12-9Q33*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pnXPS12-9Q33*:*
  KEYBOARD_KEY_88=wlan
  KEYBOARD_KEY_65=direction                              # Screen Rotate
 
 # Dell Latitude microphone mute
-evdev:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*
+evdev:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*:*
 # Dell Precision microphone mute
-evdev:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnPrecision*
- KEYBOARD_KEY_100150=f20                                   # Mic mute toggle, should be micmute
+evdev:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnPrecision*:*
+ KEYBOARD_KEY_100150=f20                                # Mic mute toggle, should be micmute
+
+# Dell Latitude privacy microphone mute
+evdev:name:Dell Privacy Driver:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*:sku0A3E:*
+ KEYBOARD_KEY_12001=f20                                 # Mic mute toggle, should be micmute
 
 ###########################################################
 # Everex
 ###########################################################
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnEverex:pnXT5000*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnEverex:pnXT5000*:*
  KEYBOARD_KEY_5c=media
  KEYBOARD_KEY_65=f21                                    # Fn+F5 Touchpad toggle
  KEYBOARD_KEY_67=prog3                                  # Fan speed control button
@@ -395,7 +403,7 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnEverex:pnXT5000*:pvr*
 # Fujitsu
 ##########################################
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnFUJITSU*:pnAMILO*M*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnFUJITSU*:pnAMILO*M*:*
  KEYBOARD_KEY_97=prog2
  KEYBOARD_KEY_9f=prog1
 
@@ -409,25 +417,25 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnFUJITSU*:pnAMILO*Li*2732:*
  KEYBOARD_KEY_a9=switchvideomode                        # Fn+F10 Cycle between available video outputs
 
 # Amilo Pa 2548
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnFUJITSU*:pn*AMILO*Pa*2548*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnFUJITSU*:pn*AMILO*Pa*2548*:*
  KEYBOARD_KEY_e0=volumedown
  KEYBOARD_KEY_e1=volumeup
  KEYBOARD_KEY_e5=prog1
 
 # Amilo Pro Edition V3505
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnFUJITSU*:pn*AMILO*Pro*Edition*V3505*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnFUJITSU*:pn*AMILO*Pro*Edition*V3505*:*
  KEYBOARD_KEY_a5=help                                   # Fn+F1
  KEYBOARD_KEY_a9=switchvideomode                        # Fn+F3
  KEYBOARD_KEY_d9=brightnessdown                         # Fn+F8
  KEYBOARD_KEY_e0=brightnessup                           # Fn+F9
 
 # Amilo Pro v3205
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnFUJITSU*:pn*AMILO*Pro*V3205*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnFUJITSU*:pn*AMILO*Pro*V3205*:*
  KEYBOARD_KEY_f4=f21                                    # FIXME: silent-mode decrease CPU/GPU clock
  KEYBOARD_KEY_f7=switchvideomode                        # Fn+F3
 
 # Amilo Si 1520
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnFUJITSU*:pn*Amilo*Si*1520*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnFUJITSU*:pn*Amilo*Si*1520*:*
  KEYBOARD_KEY_e1=wlan
  KEYBOARD_KEY_f3=wlan
  KEYBOARD_KEY_ee=brightnessdown
@@ -436,14 +444,14 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnFUJITSU*:pn*Amilo*Si*1520*:pvr*
  KEYBOARD_KEY_f7=video
 
 # Esprimo Mobile V5
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnFUJITSU*:pn*ESPRIMO*Mobile*V5*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnFUJITSU*:pn*ESPRIMO*Mobile*V5*:*
  KEYBOARD_KEY_a9=switchvideomode
  KEYBOARD_KEY_d9=brightnessdown
  KEYBOARD_KEY_df=sleep
  KEYBOARD_KEY_ef=brightnessup
 
 # Esprimo Mobile V6
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnFUJITSU*:pn*ESPRIMO*Mobile*V6*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnFUJITSU*:pn*ESPRIMO*Mobile*V6*:*
  KEYBOARD_KEY_ce=brightnessup
  KEYBOARD_KEY_ef=brightnessdown
 
@@ -486,11 +494,11 @@ evdev:input:b0003v0458p0708*
 # Hewlett Packard
 ###########################################################
 
-evdev:name:Intel HID events:dmi:bvn*:bvr*:bd*:svnHP*:pn*:pvr*
- KEYBOARD_KEY_8=unknown                                        # Use hp-wireless instead
+evdev:name:Intel HID events:dmi:bvn*:bvr*:bd*:svnHP*:pn*:*
+ KEYBOARD_KEY_8=unknown                                 # Use hp-wireless instead
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pn*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pn*:*
  KEYBOARD_KEY_81=fn_esc
  KEYBOARD_KEY_89=battery                                # Fn+F8
  KEYBOARD_KEY_8a=screenlock                             # Fn+F6
@@ -505,7 +513,7 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pn*:pvr*
  KEYBOARD_KEY_ee=switchvideomode                        # Fn+F4
 
 # Tablet
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*[tT][aA][bB][lL][eE][tT]*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*[tT][aA][bB][lL][eE][tT]*:*
  KEYBOARD_KEY_82=prog2                                  # Funny Key
  KEYBOARD_KEY_83=prog1                                  # Q
  KEYBOARD_KEY_84=tab
@@ -514,31 +522,31 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*[tT][aA][bB][lL][eE][tT]*:p
  KEYBOARD_KEY_87=pagedown
 
 # Pavilion
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*[pP][aA][vV][iI][lL][iI][oO][nN]*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*[pP][aA][vV][iI][lL][iI][oO][nN]*:*
  KEYBOARD_KEY_88=media                                  # FIXME: quick play
  KEYBOARD_KEY_b7=print
  KEYBOARD_KEY_d8=!f23                                   # touchpad off
  KEYBOARD_KEY_d9=!f22                                   # touchpad on
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP*Pavilion*dv7*Notebook*PC:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP*Pavilion*dv7*Notebook*PC:*
  KEYBOARD_KEY_b7=print
  KEYBOARD_KEY_c2=media                                  # FIXME: quick play
  KEYBOARD_KEY_c6=break
  KEYBOARD_KEY_94=reserved
 
 # Pavilion 13 x360 (Tablet mode and SYSRQ key)
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*[pP][aA][vV][iI][lL][iI][oO][nN]*13*x360*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*[pP][aA][vV][iI][lL][iI][oO][nN]*13*x360*:*
  KEYBOARD_KEY_d7=!f22                                   # touchpad off
  KEYBOARD_KEY_d9=unknown
  KEYBOARD_KEY_d2=sysrq                                  # Fn+Print = SYSRQ
 
 # Spectre x360 13 (Prevents random airplane mode activation)
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*[sS][pP][eE][cC][tT][rR][eE]*x360*13*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pn*[sS][pP][eE][cC][tT][rR][eE]*x360Convertible*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*[sS][pP][eE][cC][tT][rR][eE]*x360*13*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pn*[sS][pP][eE][cC][tT][rR][eE]*x360Convertible*:*
  KEYBOARD_KEY_d7=unknown
 
 # Spectre x360 13
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHPSpectrex360Convertible13*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHPSpectrex360Convertible13*:*
  KEYBOARD_KEY_82=f20                                    # Fn+F12; Microphone mute button, should be micmute
 
 # HP Elite x2 1013 G3
@@ -554,42 +562,42 @@ evdev:name:Intel HID events:dmi:bvn*:bvr*:svnHP*:pnHPElitex21013G3:*
   KEYBOARD_KEY_08=unknown                               # rfkill is also reported by HP Wireless hotkeys
 
 # Elitebook
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*Compaq*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*EliteBook*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*2230s*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*Compaq*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*EliteBook*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*2230s*:*
  KEYBOARD_KEY_88=presentation
  KEYBOARD_KEY_d9=help                                   # I key (high keycode: "info")
 
 # Presario
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*Presario*CQ*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*Presario*CQ*:*
  KEYBOARD_KEY_d8=f21
  KEYBOARD_KEY_d9=f21
 
 # 2510p 2530p
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*2510p*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*2530p*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP*G60*Notebook*PC:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*2510p*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*2530p*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP*G60*Notebook*PC:*
  KEYBOARD_KEY_d8=!f23                                   # touchpad off
  KEYBOARD_KEY_d9=!f22                                   # touchpad on
 
 # 2570p
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*2570p*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*2570p*:*
  KEYBOARD_KEY_f8=wlan                                   # Wireless HW switch button
 
 # TX2
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*[tT][xX]2*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pn*[tT][xX]2*:*
  KEYBOARD_KEY_c2=media
  KEYBOARD_KEY_d8=!f23                                   # Toggle touchpad button on tx2 (OFF)
  KEYBOARD_KEY_d9=!f22                                   # Toggle touchpad button on tx2 (ON)
 
 # Presario 2100
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnPresario*2100*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnPresario*2100*:*
  KEYBOARD_KEY_f0=help
  KEYBOARD_KEY_f1=screenlock
  KEYBOARD_KEY_f3=search
 
 # Elitebook 8440p
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP*EliteBook*8440p:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP*EliteBook*8440p:*
  KEYBOARD_KEY_88=www
  KEYBOARD_KEY_a0=mute
  KEYBOARD_KEY_ae=volumedown
@@ -597,58 +605,65 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP*EliteBook*8440p:pvr*
  KEYBOARD_KEY_ec=mail
 
 # Elitebook 8460p
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP*EliteBook*8460p:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP*EliteBook*8460p:*
  KEYBOARD_KEY_f8=wlan                                   # Wireless HW switch button
  KEYBOARD_KEY_b3=prog1                                  # Fn+F11 - Ambient Light Sensor button
  KEYBOARD_KEY_b1=prog2                                  # Fn+ESC - System information button
 
 # HDX9494nr
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHDX9494NR:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHDX9494NR:*
  KEYBOARD_KEY_b2=www                                    # Fn+F3
  KEYBOARD_KEY_d8=!f23                                   # touchpad off
  KEYBOARD_KEY_d9=!f22                                   # touchpad on
 
 # HP EliteBook 725 G2
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHPLicrice:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHPLicrice:*
 # HP EliteBook
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHPEliteBook*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHPEliteBook*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHPEliteBook*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHPEliteBook*:*
 # HP ProBook 440 G2
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP440G2:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP440G2:*
 # several HP ProBooks 4xx
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP*ProBook4*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHP*ProBook*4*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP*ProBook4*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHP*ProBook*4*:*
 # HP ZBook
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHPZBook*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHPZBook*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHPZBook*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHPZBook*:*
  KEYBOARD_KEY_81=f20                                    # Fn+F8; Microphone mute button, should be micmute
 
+# HP ZBook Studio G5
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP*:pnHPZBookStudioG5*:*
+ KEYBOARD_KEY_64=calendar                               # Calendar icon (Fn + F12)
+ KEYBOARD_KEY_6d=displaytoggle                          # Display icon
+ KEYBOARD_KEY_66=connect                                # Pickup phone button → connect → XF86Go
+ KEYBOARD_KEY_65=cancel                                 # Hangup phone button → cancel → Cancel
+
 # HP ZBook 15 G2
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHPZBook15G2:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHPZBook15G2:*
  KEYBOARD_KEY_f8=wlan                                   # Wireless HW switch button
 
 # HP ProBook 11 G1
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHPProBook11G1:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHPProBook11G1:*
  KEYBOARD_KEY_81=f20                                    # Fn+F8; Microphone mute button, should be micmute
  KEYBOARD_KEY_d8=f21                                    # touchpad toggle
  KEYBOARD_KEY_d9=f21                                    # touchpad toggle
 
 # HP ZBook Studio G4
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP:pnHPZBookStudioG4:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP:pnHPZBookStudioG4:*
  KEYBOARD_KEY_f8=wlan                                   # Wireless HW switch button
 
 # HP EliteBook Folio 1040 G2
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHPEliteBookFolio1040G2:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHPEliteBookFolio1040G2:*
  KEYBOARD_KEY_d8=!f23                                   # touchpad off
  KEYBOARD_KEY_d9=!f22                                   # touchpad on
 
 # HP EliteBook Folio G1
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP:pnHPEliteBookFolioG1:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHP:pnHPEliteBookFolioG1:*
  KEYBOARD_KEY_64=calendar
  KEYBOARD_KEY_81=micmute
 
 # HP ProBook 650
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP*ProBook*650*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP*ProBook*650*:*
  KEYBOARD_KEY_f8=wlan                                   # Wireless HW switch button
 
 # HP ProBook 6555b
@@ -656,14 +671,14 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard:pnHPProBook6555b:*
  KEYBOARD_KEY_b2=www                                    # Earth
 
 # HP ProBook 440 G3
-evdev:atkbd:dmi:bvn*:bvr*:svnHP*:pnHP*ProBook*440*G3*
+evdev:atkbd:dmi:bvn*:bvr*:svnHP*:pnHP*ProBook*440*G3*:*
 # HP ProBook 640 G2
-evdev:atkbd:dmi:bvn*:bvr*:svnHP*:pnHP*ProBook*640*G2*
+evdev:atkbd:dmi:bvn*:bvr*:svnHP*:pnHP*ProBook*640*G2*:*
  KEYBOARD_KEY_85=unknown                                # lid close; also reported via special evdev
  KEYBOARD_KEY_f8=unknown                                # rf kill; also reported via special evdev
 
 # HP ProBook 645 G4
-evdev:atkbd:dmi:bvn*:bvr*:svnHP*:pnHP*ProBook*645*G4*
+evdev:atkbd:dmi:bvn*:bvr*:svnHP*:pnHP*ProBook*645*G4*:*
  KEYBOARD_KEY_73=slash                                  # Slash key
  KEYBOARD_KEY_f8=wlan                                   # Wireless HW switch button
 
@@ -680,15 +695,15 @@ evdev:name:gpio-keys:phys:gpio-keys/input0:ev:23:dmi:*:svnHewlett-Packard:pnHPSt
 ##########################################################
 
 # Huawei WMI hotkeys driver
-evdev:name:Huawei WMI hotkeys:dmi:bvn*:bvr*:bd*:svnHUAWEI*
+evdev:name:Huawei WMI hotkeys:dmi:bvn*:bvr*:bd*:svnHUAWEI:*
  KEYBOARD_KEY_287=f20                                   # Microphone mute button, should be micmute
 
 # Huawei MACH-WX9
-evdev:atkbd:dmi:bvn*:bvr*:svnHUAWEI*:pnMACH-WX9:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:svnHUAWEI*:pnMACH-WX9:*
  KEYBOARD_KEY_f7=unknown
  KEYBOARD_KEY_f8=fn
 
-evdev:name:Huawei WMI hotkeys:dmi:bvn*:bvr*:bd*:svnHUAWEI*:pnMACH-WX9:pvr*
+evdev:name:Huawei WMI hotkeys:dmi:bvn*:bvr*:bd*:svnHUAWEI*:pnMACH-WX9:*
  KEYBOARD_KEY_281=unknown                               # Brightness Down, also emitted by acpi-video, ignore
  KEYBOARD_KEY_282=unknown                               # Brightness Up, also emitted by acpi-video, ignore
 
@@ -697,7 +712,7 @@ evdev:name:Huawei WMI hotkeys:dmi:bvn*:bvr*:bd*:svnHUAWEI*:pnMACH-WX9:pvr*
 ###########################################################
 
 # thinkpad_acpi driver
-evdev:name:ThinkPad Extra Buttons:dmi:bvn*:bvr*:bd*:svnIBM*:pn*:pvr*
+evdev:name:ThinkPad Extra Buttons:dmi:bvn*:bvr*:bd*:svnIBM*:pn*:*
  KEYBOARD_KEY_01=battery                                # Fn+F2
  KEYBOARD_KEY_02=screenlock                             # Fn+F3
  KEYBOARD_KEY_03=sleep                                  # Fn+F4
@@ -730,7 +745,7 @@ evdev:input:b0003v04B3p301[89]*
 ###########################################################
 
 # Symphony
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnINVENTEC:pnSYMPHONY*6.0/7.0:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnINVENTEC:pnSYMPHONY*6.0/7.0:*
  KEYBOARD_KEY_f3=prog2
  KEYBOARD_KEY_f4=prog1
 
@@ -739,7 +754,7 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnINVENTEC:pnSYMPHONY*6.0/7.0:pvr*
 ###########################################################
 
 # thinkpad_acpi driver
-evdev:name:ThinkPad Extra Buttons:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*
+evdev:name:ThinkPad Extra Buttons:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*:*
  KEYBOARD_KEY_01=screenlock
  KEYBOARD_KEY_02=battery
  KEYBOARD_KEY_03=sleep
@@ -775,7 +790,7 @@ evdev:input:b0003v17EFp6009*
  KEYBOARD_KEY_090010=f20                                # Microphone mute button; should be micmute
 
 # Lenovo 3000
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*3000*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*3000*:*
  KEYBOARD_KEY_8b=switchvideomode                        # Fn+F7 video
  KEYBOARD_KEY_96=wlan                                   # Fn+F5 wireless
  KEYBOARD_KEY_97=sleep                                  # Fn+F4 suspend
@@ -787,8 +802,8 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO:pn0769AP2:pvr3000N200:*
  KEYBOARD_KEY_b4=prog1
 
 # lenovo-ideapad
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*IdeaPad*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO*:pnS10-*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*IdeaPad*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO*:pnS10-*:*
  KEYBOARD_KEY_81=rfkill                                 # does nothing in BIOS
  KEYBOARD_KEY_83=display_off                            # BIOS toggles screen state
  KEYBOARD_KEY_b9=brightnessup                           # does nothing in BIOS
@@ -798,7 +813,7 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO*:pnS10-*:pvr*
  KEYBOARD_KEY_f3=f21
 
 # Thinkpad X200_Tablet
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*:pvrThinkPad*X2*Tablet*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*:pvrThinkPad*X2*Tablet*:*
  KEYBOARD_KEY_5d=menu
  KEYBOARD_KEY_63=fn
  KEYBOARD_KEY_66=screenlock
@@ -807,7 +822,7 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*:pvrThinkPad*X2*Tablet*
  KEYBOARD_KEY_6c=direction                              # rotate screen
 
 # ThinkPad X6 Tablet
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*:pvrThinkPad*X6*Tablet*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*:pvrThinkPad*X6*Tablet*:*
  KEYBOARD_KEY_6c=direction                              # rotate
  KEYBOARD_KEY_68=leftmeta                               # toolbox
  KEYBOARD_KEY_6b=esc                                    # escape
@@ -818,28 +833,28 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*:pvrThinkPad*X6*Tablet*
  KEYBOARD_KEY_69=enter                                  # enter on d-pad
 
 # ThinkPad X41 Tablet
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnIBM*:pn18666TU:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnIBM*:pn18666TU:*
  KEYBOARD_KEY_6c=direction                              # rotate
  KEYBOARD_KEY_68=leftmeta                               # toolbox
  KEYBOARD_KEY_6b=esc                                    # escape
  KEYBOARD_KEY_69=enter                                  # enter on d-pad
 
 # IdeaPad
-evdev:name:Ideapad extra buttons:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*
+evdev:name:Ideapad extra buttons:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*:*
  KEYBOARD_KEY_0d=rfkill                                 # airplane mode switch (toggle all wireless devices)
  KEYBOARD_KEY_08=f20                                    # micmute
  KEYBOARD_KEY_42=f23
  KEYBOARD_KEY_43=f22
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*IdeaPad*Y550*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*IdeaPad*Y550*:*
  KEYBOARD_KEY_95=media
  KEYBOARD_KEY_a3=play
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*IdeaPad*U300s*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*IdeaPad*U300s*:*
  KEYBOARD_KEY_f1=f21
  KEYBOARD_KEY_ce=f20                                    # micmute
 
-evdev:atkbd:dmi:bvn*:bvr*:svnLENOVO*:pn*IdeaPad*Z370*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:svnLENOVO*:pn*IdeaPad*Z370*:*
  KEYBOARD_KEY_a0=!mute
  KEYBOARD_KEY_ae=!volumedown
  KEYBOARD_KEY_b0=!volumeup
@@ -848,22 +863,22 @@ evdev:atkbd:dmi:bvn*:bvr*:svnLENOVO*:pn*IdeaPad*Z370*:pvr*
 # For 10th gen it should be pn81Q8 instead of pn81Q7 but
 # I don't have a device to test
 # perhaps pn81Q* would work for both generations
-evdev:atkbd:dmi:bvn*:bvr*:svnLENOVO:pn81Q7*:pvrLenovoYogaS940*
+evdev:atkbd:dmi:bvn*:bvr*:svnLENOVO:pn81Q7*:pvrLenovoYogaS940:*
  KEYBOARD_KEY_a0=!mute
  KEYBOARD_KEY_ae=!volumedown
  KEYBOARD_KEY_b0=!volumeup
 
 # Lenovo Y50-70
-evdev:atkbd:dmi:bvn*:bvr*:svnLENOVO*:pn*20378*:pvr*
- KEYBOARD_KEY_f3=f21      # Fn+F6 (toggle touchpad)
+evdev:atkbd:dmi:bvn*:bvr*:svnLENOVO*:pn*20378*:*
+ KEYBOARD_KEY_f3=f21                                    # Fn+F6 (toggle touchpad)
 
 # V480
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*Lenovo*V480*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*Lenovo*V480*:*
  KEYBOARD_KEY_f1=f21
 
 # Lenovo ThinkCentre M800z/M820z/M920z AIO machines
 # key_scancode 00 is KEY_MICMUTE
-evdev:name:Microphone Mute Button:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*
+evdev:name:Microphone Mute Button:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*:*
  KEYBOARD_KEY_00=f20
 
 # enhanced USB keyboard
@@ -886,53 +901,54 @@ evdev:input:b0003v04B3p301B*
 # logitech custom consumer usage-page codes. The mappings below are the most
 # common, but some mapping may differ, especially the Fn F1-F12 mappings
 evdev:input:b0003v046Dp00*
- KEYBOARD_KEY_c0183=media           # HUT:config, kbd:Media/Music player button
- KEYBOARD_KEY_c1001=chat            # Messenger button
- KEYBOARD_KEY_c1002=camera          # Webcam button
- KEYBOARD_KEY_c1003=audio           # Music Browser button
- KEYBOARD_KEY_c1004=video           # Video Browser button
- KEYBOARD_KEY_c1005=images          # Image Browser button
- KEYBOARD_KEY_c100a=documents       # Document Browser button
- KEYBOARD_KEY_c100b=rewind          # Rewind button
- KEYBOARD_KEY_c100c=fastforward     # Fast Forward button
- KEYBOARD_KEY_c100f=f14             # Track 1 button → f14 → XF86Launch5
- KEYBOARD_KEY_c1010=f15             # Track 2 button → f15 → XF86Launch6
- KEYBOARD_KEY_c1011=channeldown     # Playlist back button
- KEYBOARD_KEY_c1012=channelup       # Playlist advance button
- KEYBOARD_KEY_c1013=camera          # Webcam button
- KEYBOARD_KEY_c1014=coffee          # Status button
- KEYBOARD_KEY_c1015=record          # Record symbol button
- KEYBOARD_KEY_c1016=sound           # Flame/CD burning → sound → XF86AudioPreset
- KEYBOARD_KEY_c1017=ejectcd         # Eject button
- KEYBOARD_KEY_c1018=config          # Remote-control ico
- KEYBOARD_KEY_c1019=f14             # Preset 1 → f14 → XF86Launch5
- KEYBOARD_KEY_c101a=f15             # Preset 2 → f15 → XF86Launch6
- KEYBOARD_KEY_c101b=f16             # Preset 3 → f16 → XF86Launch7
- KEYBOARD_KEY_c101c=cyclewindows    # 2 overlapping windows icon
- KEYBOARD_KEY_c101f=zoomout         # zoom - button / - side of zoomrocker
- KEYBOARD_KEY_c1020=zoomin          # zoom + button / + side off zoom rocker
- KEYBOARD_KEY_c1021=zoomreset       # 100% symbol on kbd left side
- KEYBOARD_KEY_c1023=close           # [x] symbol on kbd left side
- KEYBOARD_KEY_c1027=menu            # Hamburger menu icon
- KEYBOARD_KEY_c1028=angle           # Rotate button
- KEYBOARD_KEY_c1029=shuffle         # Shuffle button
- KEYBOARD_KEY_c102a=back            # Back button
- KEYBOARD_KEY_c102b=cyclewindows    # Empty window icon
- KEYBOARD_KEY_c102d=www             # www text + magnifierglass icon
- KEYBOARD_KEY_c1031=connect         # Pickup phone button → connect → XF86Go
- KEYBOARD_KEY_c1032=cancel          # Hangup phone button → cancel → Cancel
- KEYBOARD_KEY_c1041=help            # Help text or icon (Fn + F1)
- KEYBOARD_KEY_c1042=wordprocessor   # Word icon (Fn + F2)
- KEYBOARD_KEY_c1043=spreadsheet     # Excel icon (Fn + F3)
- KEYBOARD_KEY_c1044=presentation    # Presentation icon (Fn + F4)
- KEYBOARD_KEY_c1045=undo            # Undo Icon (Fn + F5)
- KEYBOARD_KEY_c1046=redo            # Redo Icon (Fn + F6)
- KEYBOARD_KEY_c1047=print           # Printer Icon (Fn + F7)
- KEYBOARD_KEY_c1048=save            # Floppy Icon (Fn + F8)
- KEYBOARD_KEY_c1049=prog1           # Smartkey A (Fn + F9)  → XF86Launch1
- KEYBOARD_KEY_c104a=prog2           # Smartkey B (Fn + F10) → XF86Launch2
- KEYBOARD_KEY_c104b=prog3           # Smartkey C (Fn + F11) → XF86Launch3
- KEYBOARD_KEY_c104c=prog4           # Smartkey D (Fn + F12) → XF86Launch4
+ KEYBOARD_KEY_c0183=media                               # HUT:config, kbd:Media/Music player button
+ KEYBOARD_KEY_c1001=chat                                # Messenger button
+ KEYBOARD_KEY_c1002=camera                              # Webcam button
+ KEYBOARD_KEY_c1003=audio                               # Music Browser button
+ KEYBOARD_KEY_c1004=video                               # Video Browser button
+ KEYBOARD_KEY_c1005=images                              # Image Browser button
+ KEYBOARD_KEY_c100a=documents                           # Document Browser button
+ KEYBOARD_KEY_c100b=rewind                              # Rewind button
+ KEYBOARD_KEY_c100c=fastforward                         # Fast Forward button
+ KEYBOARD_KEY_c100f=f14                                 # Track 1 button → f14 → XF86Launch5
+ KEYBOARD_KEY_c1010=f15                                 # Track 2 button → f15 → XF86Launch6
+ KEYBOARD_KEY_c1011=channeldown                         # Playlist back button
+ KEYBOARD_KEY_c1012=channelup                           # Playlist advance button
+ KEYBOARD_KEY_c1013=camera                              # Webcam button
+ KEYBOARD_KEY_c1014=coffee                              # Status button
+ KEYBOARD_KEY_c1015=record                              # Record symbol button
+ KEYBOARD_KEY_c1016=sound                               # Flame/CD burning → sound → XF86AudioPreset
+ KEYBOARD_KEY_c1017=ejectcd                             # Eject button
+ KEYBOARD_KEY_c1018=config                              # Remote-control ico
+ KEYBOARD_KEY_c1019=f14                                 # Preset 1 → f14 → XF86Launch5
+ KEYBOARD_KEY_c101a=f15                                 # Preset 2 → f15 → XF86Launch6
+ KEYBOARD_KEY_c101b=f16                                 # Preset 3 → f16 → XF86Launch7
+ KEYBOARD_KEY_c101c=cyclewindows                        # 2 overlapping windows icon
+ KEYBOARD_KEY_c101f=zoomout                             # zoom - button / - side of zoomrocker
+ KEYBOARD_KEY_c1020=zoomin                              # zoom + button / + side off zoom rocker
+ KEYBOARD_KEY_c1021=zoomreset                           # 100% symbol on kbd left side
+ KEYBOARD_KEY_c1023=close                               # [x] symbol on kbd left side
+ KEYBOARD_KEY_c1027=menu                                # Hamburger menu icon
+ KEYBOARD_KEY_c1028=angle                               # Rotate button
+ KEYBOARD_KEY_c1029=shuffle                             # Shuffle button
+ KEYBOARD_KEY_c102a=back                                # Back button
+ KEYBOARD_KEY_c102b=cyclewindows                        # Empty window icon
+ KEYBOARD_KEY_c102c=fn                                  # Fn key
+ KEYBOARD_KEY_c102d=www                                 # www text + magnifierglass icon
+ KEYBOARD_KEY_c1031=connect                             # Pickup phone button → connect → XF86Go
+ KEYBOARD_KEY_c1032=cancel                              # Hangup phone button → cancel → Cancel
+ KEYBOARD_KEY_c1041=help                                # Help text or icon (Fn + F1)
+ KEYBOARD_KEY_c1042=wordprocessor                       # Word icon (Fn + F2)
+ KEYBOARD_KEY_c1043=spreadsheet                         # Excel icon (Fn + F3)
+ KEYBOARD_KEY_c1044=presentation                        # Presentation icon (Fn + F4)
+ KEYBOARD_KEY_c1045=undo                                # Undo Icon (Fn + F5)
+ KEYBOARD_KEY_c1046=redo                                # Redo Icon (Fn + F6)
+ KEYBOARD_KEY_c1047=print                               # Printer Icon (Fn + F7)
+ KEYBOARD_KEY_c1048=save                                # Floppy Icon (Fn + F8)
+ KEYBOARD_KEY_c1049=prog1                               # Smartkey A (Fn + F9)  → XF86Launch1
+ KEYBOARD_KEY_c104a=prog2                               # Smartkey B (Fn + F10) → XF86Launch2
+ KEYBOARD_KEY_c104b=prog3                               # Smartkey C (Fn + F11) → XF86Launch3
+ KEYBOARD_KEY_c104c=prog4                               # Smartkey D (Fn + F12) → XF86Launch4
 
 # Cordless Access Keyboard (27 MHz, modelnumber Y-RH35)
 evdev:input:b0003v046Dp0042*
@@ -962,7 +978,7 @@ evdev:input:b0003v046Dp0045*
 
 # S510 keyboard (27 MHz, modelnumber Y-RAK73)
 evdev:input:b0003v046Dp0056*
- KEYBOARD_KEY_c1041=battery      # Battery icon (Fn + F1)
+ KEYBOARD_KEY_c1041=battery                             # Battery icon (Fn + F1)
 
 # MX3000 keyboard (27 MHz, modelnumber Y-RAM74)
 # We ignore the scroll up / down keypress events since these buttons also
@@ -971,7 +987,7 @@ evdev:input:b0003v046Dp0056*
 # cleared then the scroll-wheel events for these buttons go away and then
 # tilting the scrollwheel left/right starts sending c1022 / c1024 events
 evdev:input:b0003v046Dp0057*
- KEYBOARD_KEY_c1041=battery      # Battery icon (Fn + F1)
+ KEYBOARD_KEY_c1041=battery                             # Battery icon (Fn + F1)
 
 #KEYBOARD_KEY_c101d=scrolldown   # Button below scrollwheel (see note above)
 #KEYBOARD_KEY_c101e=scrollup     # Button above scrollwheel (see note above)
@@ -980,69 +996,82 @@ evdev:input:b0003v046Dp0057*
 
 # MX3200 keyboard (27 MHz, modelnumber Y-RAV80)
 evdev:input:b0003v046Dp005C*
- KEYBOARD_KEY_c1001=phone           # VOIP button
- KEYBOARD_KEY_c1016=record          # Record button
- KEYBOARD_KEY_c1041=wordprocessor   # Word icon (Fn + F1)
- KEYBOARD_KEY_c1042=spreadsheet     # Excel icon (Fn + F2)
- KEYBOARD_KEY_c1043=calendar        # Calendar icon (Fn + F3)
- KEYBOARD_KEY_c1044=documents       # My Documents icon (Fn + F4)
- KEYBOARD_KEY_c1045=prog1           # Smartkey A (Fn + F5) → XF86Launch1
- KEYBOARD_KEY_c1046=prog2           # Smartkey B (Fn + F6) → XF86Launch2
- KEYBOARD_KEY_c1047=prog3           # Smartkey C (Fn + F7) → XF86Launch3
- KEYBOARD_KEY_c1048=prog4           # Smartkey D (Fn + F8) → XF86Launch4
+ KEYBOARD_KEY_c1001=phone                               # VOIP button
+ KEYBOARD_KEY_c1016=record                              # Record button
+ KEYBOARD_KEY_c1041=wordprocessor                       # Word icon (Fn + F1)
+ KEYBOARD_KEY_c1042=spreadsheet                         # Excel icon (Fn + F2)
+ KEYBOARD_KEY_c1043=calendar                            # Calendar icon (Fn + F3)
+ KEYBOARD_KEY_c1044=documents                           # My Documents icon (Fn + F4)
+ KEYBOARD_KEY_c1045=prog1                               # Smartkey A (Fn + F5) → XF86Launch1
+ KEYBOARD_KEY_c1046=prog2                               # Smartkey B (Fn + F6) → XF86Launch2
+ KEYBOARD_KEY_c1047=prog3                               # Smartkey C (Fn + F7) → XF86Launch3
+ KEYBOARD_KEY_c1048=prog4                               # Smartkey D (Fn + F8) → XF86Launch4
 
 # EX100 keyboard (27 MHz, modelnumber Y-RBH94)
 evdev:input:b0003v046Dp0065*
- KEYBOARD_KEY_c104b=battery         # Battery icon (Fn + F11)
- KEYBOARD_KEY_c104c=ejectcd         # Eject icon (Fn + F12)
+ KEYBOARD_KEY_c104b=battery                             # Battery icon (Fn + F11)
+ KEYBOARD_KEY_c104c=ejectcd                             # Eject icon (Fn + F12)
 
 # S520 keyboard (27 MHz, modelnumber Y-RBA97)
 # Note this one uses non-standard codes for FN + F9 - Fn + F12?
 evdev:input:b0003v046Dp0066*
- KEYBOARD_KEY_c100e=prog4           # Smartkey D (Fn + F12) → XF86Launch4
- KEYBOARD_KEY_c1019=prog1           # Smartkey A (Fn + F9)  → XF86Launch1
- KEYBOARD_KEY_c101a=prog2           # Smartkey B (Fn + F10) → XF86Launch2
- KEYBOARD_KEY_c101b=prog3           # Smartkey C (Fn + F11) → XF86Launch3
- KEYBOARD_KEY_c1041=wordprocessor   # Word icon (Fn + F1)
- KEYBOARD_KEY_c1042=spreadsheet     # Excel icon (Fn + F2)
- KEYBOARD_KEY_c1043=presentation    # Presentation icon (Fn + F3)
- KEYBOARD_KEY_c1044=calendar        # Calendar icon (Fn + F4)
- KEYBOARD_KEY_c1045=homepage        # Home icon (Fn + F5)
- KEYBOARD_KEY_c1046=email           # Letter icon (Fn + F6)
- KEYBOARD_KEY_c1047=search          # Magnifying glass icon (Fn + F7)
- KEYBOARD_KEY_c1048=config          # Window with gear icon (Fn + F8)
- KEYBOARD_KEY_c106f=battery         # Battery icon
+ KEYBOARD_KEY_c100e=prog4                               # Smartkey D (Fn + F12) → XF86Launch4
+ KEYBOARD_KEY_c1019=prog1                               # Smartkey A (Fn + F9)  → XF86Launch1
+ KEYBOARD_KEY_c101a=prog2                               # Smartkey B (Fn + F10) → XF86Launch2
+ KEYBOARD_KEY_c101b=prog3                               # Smartkey C (Fn + F11) → XF86Launch3
+ KEYBOARD_KEY_c1041=wordprocessor                       # Word icon (Fn + F1)
+ KEYBOARD_KEY_c1042=spreadsheet                         # Excel icon (Fn + F2)
+ KEYBOARD_KEY_c1043=presentation                        # Presentation icon (Fn + F3)
+ KEYBOARD_KEY_c1044=calendar                            # Calendar icon (Fn + F4)
+ KEYBOARD_KEY_c1045=homepage                            # Home icon (Fn + F5)
+ KEYBOARD_KEY_c1046=email                               # Letter icon (Fn + F6)
+ KEYBOARD_KEY_c1047=search                              # Magnifying glass icon (Fn + F7)
+ KEYBOARD_KEY_c1048=config                              # Window with gear icon (Fn + F8)
+ KEYBOARD_KEY_c106f=battery                             # Battery icon
 
 # S510 remote control (27 MHz)
 evdev:input:b0003v046Dp00FE*
- KEYBOARD_KEY_c1018=media           # Media button
+ KEYBOARD_KEY_c1018=media                               # Media button
 
 # MX5000 keyboard (HID proxy mode and bluetooth matches)
 evdev:input:b0003v046DpB305*
 evdev:input:b0005v046DpB305*
- KEYBOARD_KEY_c0230=zoomreset  # HUT says fullscreen, kbd says 100%
- KEYBOARD_KEY_c1004=send       # Send and receive / sync button
- KEYBOARD_KEY_c1006=coffee     # Status (online/away) button
- KEYBOARD_KEY_c1007=camera     # Webcam button
- KEYBOARD_KEY_c100c=kbd_lcd_menu1 # 1st button below the builtin LCD
- KEYBOARD_KEY_c100d=kbd_lcd_menu4 # 4th button below the builtin LCD
- KEYBOARD_KEY_c100e=kbd_lcd_menu2 # 2nd button below the builtin LCD
- KEYBOARD_KEY_c100f=kbd_lcd_menu3 # 3th button below the builtin LCD
- KEYBOARD_KEY_c1038=prog1      # Smartkey A → XF86Launch1
- KEYBOARD_KEY_c1039=prog2      # Smartkey B → XF86Launch2
- KEYBOARD_KEY_c103a=prog3      # Smartkey C → XF86Launch3
- KEYBOARD_KEY_c103b=prog4      # Smartkey D → XF86Launch4
+ KEYBOARD_KEY_c0183=media                               # HUT says config, kbd says Media
+ KEYBOARD_KEY_c0230=zoomreset                           # HUT says fullscreen, kbd says 100%
+ KEYBOARD_KEY_c1004=send                                # Send and receive / sync button
+ KEYBOARD_KEY_c1006=coffee                              # Status (online/away) button
+ KEYBOARD_KEY_c1007=camera                              # Webcam button
+ KEYBOARD_KEY_c100c=kbd_lcd_menu1                       # 1st button below the builtin LCD
+ KEYBOARD_KEY_c100d=kbd_lcd_menu4                       # 4th button below the builtin LCD
+ KEYBOARD_KEY_c100e=kbd_lcd_menu2                       # 2nd button below the builtin LCD
+ KEYBOARD_KEY_c100f=kbd_lcd_menu3                       # 3th button below the builtin LCD
+ KEYBOARD_KEY_c1038=prog1                               # Smartkey A → XF86Launch1
+ KEYBOARD_KEY_c1039=prog2                               # Smartkey B → XF86Launch2
+ KEYBOARD_KEY_c103a=prog3                               # Smartkey C → XF86Launch3
+ KEYBOARD_KEY_c103b=prog4                               # Smartkey D → XF86Launch4
+ KEYBOARD_KEY_c1040=fn_esc                              # Fn mode on/off toggle
+
+# Dinovo Edge (HID proxy mode and bluetooth matches)
+evdev:input:b0003v046DpB309*
+evdev:input:b0005v046DpB309*
+ KEYBOARD_KEY_c102c=fn                                  # Fn key
+ KEYBOARD_KEY_c1038=prog1                               # Fn + F9  Smartkey A → XF86Launch1
+ KEYBOARD_KEY_c1039=prog2                               # Fn + F10 Smartkey B → XF86Launch2
+ KEYBOARD_KEY_c103a=prog3                               # Fn + F11 Smartkey C → XF86Launch3
+ KEYBOARD_KEY_c103b=prog4                               # Fn + F12 Smartkey D → XF86Launch4
+ KEYBOARD_KEY_c1050=phone                               # Fn + F1  Phone button
 
 # MX5500 keyboard (HID proxy mode and bluetooth matches)
 evdev:input:b0003v046DpB30B*
 evdev:input:b0005v046DpB30B*
- KEYBOARD_KEY_c0183=media      # HUT says consumer control configuration, kbd says Media Center
- KEYBOARD_KEY_c100e=images      # Camera icon, "Photo Gallery"
- KEYBOARD_KEY_c100f=config      # Window with gear icon
- KEYBOARD_KEY_c1038=prog1      # Smartkey A → XF86Launch1
- KEYBOARD_KEY_c1039=prog2      # Smartkey B → XF86Launch2
- KEYBOARD_KEY_c103a=prog3      # Smartkey C → XF86Launch3
- KEYBOARD_KEY_c103b=prog4      # Smartkey D → XF86Launch4
+ KEYBOARD_KEY_c0183=media                               # HUT says consumer control configuration, kbd says Media Center
+ KEYBOARD_KEY_c100e=images                              # Camera icon, "Photo Gallery"
+ KEYBOARD_KEY_c100f=config                              # Window with gear icon
+ KEYBOARD_KEY_c102c=fn                                  # Fn key
+ KEYBOARD_KEY_c1038=prog1                               # Smartkey A → XF86Launch1
+ KEYBOARD_KEY_c1039=prog2                               # Smartkey B → XF86Launch2
+ KEYBOARD_KEY_c103a=prog3                               # Smartkey C → XF86Launch3
+ KEYBOARD_KEY_c103b=prog4                               # Smartkey D → XF86Launch4
 
 # Logitech K811
 evdev:input:b0005v046DpB317*
@@ -1121,22 +1150,22 @@ evdev:input:b0003v046DpC52D*
 
 # Internet Navigator
 evdev:input:b0003v046DpC309*
- KEYBOARD_KEY_90001=chat         # Messenger/SMS
- KEYBOARD_KEY_90002=camera       # webcam
- KEYBOARD_KEY_90003=prog1        # iTouch
- KEYBOARD_KEY_90004=shop         # Shopping
- KEYBOARD_KEY_c0201=new          # New (F1)
- KEYBOARD_KEY_c0289=reply        # Reply mail (F2)
- KEYBOARD_KEY_c028b=forwardmail  # Forward mail (F3)
- KEYBOARD_KEY_c028c=send         # Send (F4)
- KEYBOARD_KEY_c021a=undo         # Undo (F5)
- KEYBOARD_KEY_c0279=redo         # Redo (F6)
- KEYBOARD_KEY_c0208=print        # Print (F7)
- KEYBOARD_KEY_c0207=save         # Save (F8)
- KEYBOARD_KEY_c0194=file         # My Computer (F9)
- KEYBOARD_KEY_c01a7=documents    # My Documents (F10)
- KEYBOARD_KEY_c01b6=images       # My Pictures (F11)
- KEYBOARD_KEY_c01b7=audio        # My Music (F12)
+ KEYBOARD_KEY_90001=chat                                # Messenger/SMS
+ KEYBOARD_KEY_90002=camera                              # webcam
+ KEYBOARD_KEY_90003=prog1                               # iTouch
+ KEYBOARD_KEY_90004=shop                                # Shopping
+ KEYBOARD_KEY_c0201=new                                 # New (F1)
+ KEYBOARD_KEY_c0289=reply                               # Reply mail (F2)
+ KEYBOARD_KEY_c028b=forwardmail                         # Forward mail (F3)
+ KEYBOARD_KEY_c028c=send                                # Send (F4)
+ KEYBOARD_KEY_c021a=undo                                # Undo (F5)
+ KEYBOARD_KEY_c0279=redo                                # Redo (F6)
+ KEYBOARD_KEY_c0208=print                               # Print (F7)
+ KEYBOARD_KEY_c0207=save                                # Save (F8)
+ KEYBOARD_KEY_c0194=file                                # My Computer (F9)
+ KEYBOARD_KEY_c01a7=documents                           # My Documents (F10)
+ KEYBOARD_KEY_c01b6=images                              # My Pictures (F11)
+ KEYBOARD_KEY_c01b7=audio                               # My Music (F12)
 
 
 ###########################################################
@@ -1144,7 +1173,7 @@ evdev:input:b0003v046DpC309*
 ###########################################################
 
 # Pro 7000
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMAXDATA:pnPro*7000*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMAXDATA:pnPro*7000*:*
  KEYBOARD_KEY_97=prog2
  KEYBOARD_KEY_9f=prog1
  KEYBOARD_KEY_a0=mute                                   # Fn+F5
@@ -1160,9 +1189,9 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMAXDATA:pnPro*7000*:pvr*
 ###########################################################
 
 # Akoya
-evdev:atkbd:dmi:bvn*:bvr*:svnMEDION*:pnS3409*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:svnMedion*:pnAkoya*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:svnMedion*:pnP6669*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:svnMEDION*:pnS3409*:*
+evdev:atkbd:dmi:bvn*:bvr*:svnMedion*:pnAkoya*:*
+evdev:atkbd:dmi:bvn*:bvr*:svnMedion*:pnP6669*:*
  KEYBOARD_KEY_a0=!mute
  KEYBOARD_KEY_ae=!volumedown
  KEYBOARD_KEY_b0=!volumeup
@@ -1170,19 +1199,19 @@ evdev:atkbd:dmi:bvn*:bvr*:svnMedion*:pnP6669*:pvr*
  KEYBOARD_KEY_df=sleep
 
 # FID2060
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMEDION*:pn*FID2060*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMEDION*:pn*FID2060*:*
  KEYBOARD_KEY_6b=channeldown                            # Thottle Down
  KEYBOARD_KEY_6d=channelup                              # Thottle Up
 
 # NB-A555
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMEDIONNB:pnA555*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMEDIONNB:pnA555*:*
  KEYBOARD_KEY_63=www                                    # N button
  KEYBOARD_KEY_66=prog1                                  # link 1 button
  KEYBOARD_KEY_67=email                                  # envelope button
  KEYBOARD_KEY_69=prog2                                  # link 2 button
 
 # Erazer
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMedion*:pnErazer*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMedion*:pnErazer*:*
  KEYBOARD_KEY_a0=!mute
  KEYBOARD_KEY_ae=!volumedown
  KEYBOARD_KEY_b0=!volumeup
@@ -1206,12 +1235,13 @@ evdev:input:b0003v1532p0200*
 # Micro Star
 ###########################################################
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pn*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMicro-Star*:pn*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pn*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMicro-Star*:pn*:*
  KEYBOARD_KEY_a0=mute                                   # Fn+F9
  KEYBOARD_KEY_ae=volumedown                             # Fn+F7
  KEYBOARD_KEY_b0=volumeup                               # Fn+F8
  KEYBOARD_KEY_b2=www                                    # e button
+ KEYBOARD_KEY_c2=ejectcd
  KEYBOARD_KEY_df=sleep                                  # Fn+F12
  KEYBOARD_KEY_e2=bluetooth                              # satellite dish2
  KEYBOARD_KEY_e4=f21                                    # Fn+F3 Touchpad disable
@@ -1222,20 +1252,18 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMicro-Star*:pn*
  KEYBOARD_KEY_f8=brightnessup                           # Fn+F5
  KEYBOARD_KEY_f9=search
 
-#
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pnGE60*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pnGE70*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMicro-Star*:pn*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pnGE60*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pnGE70*:*
  KEYBOARD_KEY_c2=ejectcd
 
 # some MSI models generate ACPI/input events on the LNXVIDEO input devices,
 # plus some extra synthesized ones on atkbd as an echo of actually changing the
 # brightness; so ignore those atkbd ones, to avoid loops
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pn*U-100*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pn*U100*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pn*U-100*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pn*U100*:*
 evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pn*N033:*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMicro-Star*:pn*VR420*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMicro-Star*:pn*PR200*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMicro-Star*:pn*VR420*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMicro-Star*:pn*PR200*:*
  KEYBOARD_KEY_f7=reserved
  KEYBOARD_KEY_f8=reserved
 
@@ -1244,7 +1272,7 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pnU90/U100:*
  KEYBOARD_KEY_e4=reserved
 
 # MSI Prestige15 A10SC specific keycodes. Needed for microphone and screen rotation
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMicro-Star*:pn*A10SC*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMicro-Star*:pn*A10SC*:*
  KEYBOARD_KEY_f1=f20
  KEYBOARD_KEY_f2=f21
 
@@ -1252,7 +1280,7 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMicro-Star*:pn*A10SC*:pvr*
 # MSI
 ###########################################################
 
-evdev:name:MSI Laptop hotkeys:dmi:bvn*:bvr*:bd*:svn*:pnM[iI][cC][rR][oO]-S[tT][aA][rR]*:pvr*
+evdev:name:MSI Laptop hotkeys:dmi:bvn*:bvr*:bd*:svn*:pnM[iI][cC][rR][oO]-S[tT][aA][rR]*:*
  KEYBOARD_KEY_0213=f22
  KEYBOARD_KEY_0214=f23
 
@@ -1358,7 +1386,7 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnONKYO*CORPORATION:pnONKYOPC:*
 ###########################################################
 
 # Model 2
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnOQO*Inc.*:pnOQO*Model*2*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnOQO*Inc.*:pnOQO*Model*2*:*
  KEYBOARD_KEY_8e=wlan
  KEYBOARD_KEY_f0=switchvideomode
  KEYBOARD_KEY_f1=mute
@@ -1379,25 +1407,35 @@ evdev:input:b0003v05A4p9735*
  KEYBOARD_KEY_c000c=stop
  KEYBOARD_KEY_c0018=refresh
  KEYBOARD_KEY_c00b9=search
- KEYBOARD_KEY_c0006=bookmarks    # Button labeled "Favorites"
- KEYBOARD_KEY_c00a8=homepage     # Button labeled "Web/Home"
+ KEYBOARD_KEY_c0006=bookmarks                           # Button labeled "Favorites"
+ KEYBOARD_KEY_c00a8=homepage                            # Button labeled "Web/Home"
  KEYBOARD_KEY_c0010=mute
  KEYBOARD_KEY_c0011=volumedown
  KEYBOARD_KEY_c0014=volumeup
  KEYBOARD_KEY_c000e=close
  KEYBOARD_KEY_c00a7=print
- KEYBOARD_KEY_c0013=documents    # Button labeled "Stickies"
- KEYBOARD_KEY_c000d=find         # Button labeled "Sherlock2"
+ KEYBOARD_KEY_c0013=documents                           # Button labeled "Stickies"
+ KEYBOARD_KEY_c000d=find                                # Button labeled "Sherlock2"
  KEYBOARD_KEY_c000f=mail
  KEYBOARD_KEY_c000a=calc
  KEYBOARD_KEY_c000b=sleep
- KEYBOARD_KEY_c0007=previoussong # Button with standard |<< icon
- KEYBOARD_KEY_c0008=playpause    # Button with standad >/|| icon
- KEYBOARD_KEY_c0009=nextsong     # Button with standard >>| icon
- KEYBOARD_KEY_c00b2=stopcd       # Button with standard square box icon
- KEYBOARD_KEY_c0016=prog1        # Key labeled "pf1"
- KEYBOARD_KEY_c00bb=prog2        # Key labeled "pf2"
- KEYBOARD_KEY_c00b8=prog3        # Key labeled "pf3"
+ KEYBOARD_KEY_c0007=previoussong                        # Button with standard |<< icon
+ KEYBOARD_KEY_c0008=playpause                           # Button with standad >/|| icon
+ KEYBOARD_KEY_c0009=nextsong                            # Button with standard >>| icon
+ KEYBOARD_KEY_c00b2=stopcd                              # Button with standard square box icon
+ KEYBOARD_KEY_c0016=prog1                               # Key labeled "pf1"
+ KEYBOARD_KEY_c00bb=prog2                               # Key labeled "pf2"
+ KEYBOARD_KEY_c00b8=prog3                               # Key labeled "pf3"
+
+###########################################################
+# Pine64
+###########################################################
+
+# Pinebook Pro
+evdev:input:b0003v258Ap001E*
+ KEYBOARD_KEY_700a5=brightnessdown
+ KEYBOARD_KEY_700a6=brightnessup
+ KEYBOARD_KEY_70066=sleep
 
 ###########################################################
 # Plantronics
@@ -1405,22 +1443,22 @@ evdev:input:b0003v05A4p9735*
 
 # Plantronics .Audio 626 DSP
 evdev:input:b0003v047FpC006*
- KEYBOARD_KEY_b002f=f20                                # Microphone mute button; should be micmute
+ KEYBOARD_KEY_b002f=f20                                 # Microphone mute button; should be micmute
 
 ###########################################################
 # Purism
 ###########################################################
 
 # Purism Librem 13 V2
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnPurism*:pn*Librem13v2*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnPurism*:pn*Librem13v2*:*
  KEYBOARD_KEY_56=backslash
 
 # Purism Librem 13 V3
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnPurism*:pn*Librem13v3*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnPurism*:pn*Librem13v3*:*
  KEYBOARD_KEY_56=backslash
 
 # Purism Librem 13 V4
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnPurism*:pn*Librem13v4*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnPurism*:pn*Librem13v4*:*
  KEYBOARD_KEY_56=backslash
 
 ###########################################################
@@ -1434,7 +1472,7 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svn*:pn*:pvr*:rvnQuanta:rn30B7:rvr65.2B:*
 # Samsung
 ###########################################################
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*:*
  KEYBOARD_KEY_74=prog1                                  # User key
  KEYBOARD_KEY_75=www
  KEYBOARD_KEY_78=mail
@@ -1453,28 +1491,28 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*
  KEYBOARD_KEY_f9=!f23                                   # Fn+F10 Touchpad off
 
 # Series 3
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*300E[457]*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*200E[45]*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*300E[457]*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*200E[45]*:*
  KEYBOARD_KEY_ce=!                                      # Fn+F1  launch control setting
 
 # Series 5
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*530U*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*530U*:*
  KEYBOARD_KEY_ce=!prog1                                 # Fn+F1 launch settings
  KEYBOARD_KEY_a8=!                                      # Fn Lock - Function lock on
  KEYBOARD_KEY_a9=!                                      # Fn Lock - Function lock off
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*550P*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*550P*:*
  KEYBOARD_KEY_ce=!prog1                                 # Fn+F1 launch settings
  KEYBOARD_KEY_a8=!                                      # Fn Lock - Function lock on
  KEYBOARD_KEY_a9=!                                      # Fn Lock - Function lock off
 
 # Series 7 / 9
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*350V*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*670Z*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700Z*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700G*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34]*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*940X3G*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*350V*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*670Z*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700Z*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700G*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34]*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*940X3G*:*
  KEYBOARD_KEY_ce=!prog1                                 # Fn+F1 launch settings
  KEYBOARD_KEY_a0=!mute                                  # Fn+F6 mute
  KEYBOARD_KEY_ae=!volumedown                            # Fn+F7
@@ -1483,14 +1521,14 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*940X3G*:pvr*
  KEYBOARD_KEY_96=!kbdillumup                            # Fn+F10 keyboard backlight up
  KEYBOARD_KEY_b3=!prog3                                 # Fn+F11 fan/cooling mode changer
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34][AB]*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34][AB]*:*
  KEYBOARD_KEY_ce=!                                      # Fn+F8 keyboard backlight up
  KEYBOARD_KEY_8d=!                                      # Fn+F7 keyboard backlight down
  KEYBOARD_KEY_96=!                                      # Fn+F1 performance mode (?)
  KEYBOARD_KEY_97=!                                      # Fn+F12 Wi-Fi toggle
  KEYBOARD_KEY_d5=!                                      # Fn+F6 battery life extender
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*90X3A*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*90X3A*:*
  KEYBOARD_KEY_ce=!prog1                                 # Fn+F1 launch settings
  KEYBOARD_KEY_8d=!prog3                                 # Fn+F6 performance mode
  KEYBOARD_KEY_97=!kbdillumdown                          # Fn+F7 keyboard backlight down
@@ -1498,7 +1536,7 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*90X3A*:pvr*
  KEYBOARD_KEY_d5=!wlan                                  # Fn+F12 Wi-Fi toggle
 
 # Series 7 Ultra
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*7[34]0U3E*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*7[34]0U3E*:*
  KEYBOARD_KEY_ce=!prog1                                 # Fn+F1 launch settings
  KEYBOARD_KEY_97=!kbdillumdown                          # Fn+F9 keyboard backlight down
  KEYBOARD_KEY_96=!kbdillumup                            # Fn+F10 keyboard backlight up
@@ -1506,13 +1544,13 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*7[34]0U3E*:pvr
  KEYBOARD_KEY_d5=!wlan                                  # Fn+F12 wlan/airplane switch
 
 # ATIV Book 6 / 8
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*[68][78]0Z*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*[68][78]0Z*:*
  KEYBOARD_KEY_ce=!prog1                                 # Fn+F1 launch settings
  KEYBOARD_KEY_96=!kbdillumup                            # Fn+F10 keyboard backlight up
  KEYBOARD_KEY_97=!kbdillumdown                          # Fn+F9 keyboard backlight down
 
 # SQ1US
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pnSQ1US:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pnSQ1US:*
  KEYBOARD_KEY_d4=menu
  KEYBOARD_KEY_d8=f1
  KEYBOARD_KEY_d9=f10
@@ -1522,13 +1560,13 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pnSQ1US:pvr*
  KEYBOARD_KEY_ee=f11
 
 # SX20S
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*SX20S*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*SX20S*:*
  KEYBOARD_KEY_74=mute
  KEYBOARD_KEY_75=mute
  KEYBOARD_KEY_77=f22                                    # Touchpad on
  KEYBOARD_KEY_79=f23                                    # Touchpad off
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700T*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700T*:*
  KEYBOARD_KEY_ad=leftmeta
 
 ###########################################################
@@ -1536,7 +1574,7 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700T*:pvr*
 ###########################################################
 
 # sony-laptop driver
-evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*
+evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*:*
  KEYBOARD_KEY_06=mute                                   # Fn+F2
  KEYBOARD_KEY_07=volumedown                             # Fn+F3
  KEYBOARD_KEY_08=volumeup                               # Fn+F4
@@ -1546,22 +1584,22 @@ evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*
  KEYBOARD_KEY_0e=zoom                                   # Fn+F10
  KEYBOARD_KEY_10=suspend                                # Fn+F12
 
-evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*PCG-C1*:pvr*
-evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*PCG-K25*:pvr*
-evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*PCG-F[1-6]*:pvr*
-evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*PCG-FX*:pvr*
-evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*PCG-FRV*:pvr*
-evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*PCG-GR*:pvr*
-evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*PCG-TR*:pvr*
-evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*PCG-NV*:pvr*
-evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*PCG-Z*:pvr*
-evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*VGN-S360*:pvr*
+evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*PCG-C1*:*
+evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*PCG-K25*:*
+evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*PCG-F[1-6]*:*
+evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*PCG-FX*:*
+evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*PCG-FRV*:*
+evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*PCG-GR*:*
+evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*PCG-TR*:*
+evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*PCG-NV*:*
+evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*PCG-Z*:*
+evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pn*VGN-S360*:*
  KEYBOARD_KEY_06=battery
  KEYBOARD_KEY_07=mute
 
-evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pnVGN-AR71*:pvr*
-evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pnVGN-FW*:pvr*
-evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pnVGN-Z21*:pvr*
+evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pnVGN-AR71*:*
+evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pnVGN-FW*:*
+evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pnVGN-Z21*:*
  KEYBOARD_KEY_00=brightnessdown                         # Fn+F5
  KEYBOARD_KEY_10=brightnessup                           # Fn+F6
  KEYBOARD_KEY_11=switchvideomode                        # Fn+F7
@@ -1571,10 +1609,10 @@ evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pnVGN-Z21*:pvr*
  KEYBOARD_KEY_17=prog1
  KEYBOARD_KEY_20=media
 
-evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pnVGN-FW250*:pvr*
+evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pnVGN-FW250*:*
  KEYBOARD_KEY_10=suspend                                # Fn+F12
 
-evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pnVPC*:pvr*
+evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pnVPC*:*
  KEYBOARD_KEY_05=f21                                    # Fn+F1 -> KEY_F21 (The actual touchpad toggle)
  KEYBOARD_KEY_0d=down                                   # Fn+F9 zoomout
  KEYBOARD_KEY_0e=up                                     # Fn+F10 zoomin
@@ -1583,7 +1621,7 @@ evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pnVPC*:pvr*
 # System76
 ###########################################################
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnSystem76*:pn*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnSystem76*:pn*:*
  KEYBOARD_KEY_f7=f21                                    # Touchpad toggle
  KEYBOARD_KEY_f8=f21                                    # Touchpad toggle
 
@@ -1591,7 +1629,7 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnSystem76*:pn*
 # T-bao
 ###########################################################
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnT-bao:pnTbookair:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnT-bao:pnTbookair:*
  KEYBOARD_KEY_76=f21                                    # Touchpad toggle
 
 ###########################################################
@@ -1599,12 +1637,12 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnT-bao:pnTbookair:pvr*
 ###########################################################
 
 # Satellite A100
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSATELLITE*A100:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSATELLITE*A100:*
  KEYBOARD_KEY_a4=stopcd
  KEYBOARD_KEY_b2=www
 
 # Satellite A110
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSatellite*A110:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSatellite*A110:*
  KEYBOARD_KEY_92=stop
  KEYBOARD_KEY_93=www
  KEYBOARD_KEY_94=media
@@ -1617,7 +1655,7 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSatellite*A110:pvr*
  KEYBOARD_KEY_f7=playpause
 
 # Satellite M30X
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSatellite*M30X:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSatellite*M30X:*
  KEYBOARD_KEY_ef=brightnessdown
  KEYBOARD_KEY_d9=brightnessup
  KEYBOARD_KEY_ee=screenlock
@@ -1626,21 +1664,21 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSatellite*M30X:pvr*
  KEYBOARD_KEY_9f=f23                                    # touchpad disable
 
 # Satellite P75-A
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSatellite*P75-A:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSatellite*P75-A:*
  KEYBOARD_KEY_ef=brightnessdown
  KEYBOARD_KEY_ee=brightnessup
  KEYBOARD_KEY_a9=switchvideomode                        # switch display outputs
  KEYBOARD_KEY_d4=wlan                                   # RF Switch Off
 
 # Satellite U940
-evdev:name:Toshiba*input*device:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSATELLITEU940:pvr*
+evdev:name:Toshiba*input*device:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSATELLITEU940:*
  KEYBOARD_KEY_13c=brightnessdown
  KEYBOARD_KEY_13d=brightnessup
  KEYBOARD_KEY_13e=switchvideomode
  KEYBOARD_KEY_13f=f21                                   # Touchpad toggle
 
 # Satellite P75-A7200
-evdev:name:Toshiba*input*device:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSatellite*P75-A:pvr*
+evdev:name:Toshiba*input*device:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSatellite*P75-A:*
  KEYBOARD_KEY_13c=brightnessdown
  KEYBOARD_KEY_13d=brightnessup
  KEYBOARD_KEY_13e=switchvideomode
@@ -1651,14 +1689,14 @@ evdev:name:Toshiba*input*device:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSatellite*P75-A:
 # VIA
 ###########################################################
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnVIA:pnK8N800:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnVIA:pnK8N800:*
  KEYBOARD_KEY_81=prog1
 
 ###########################################################
 # VIOS
 ###########################################################
 
-evdev:name:SIPODEV USB Composite Device:dmi:bvn*:bvr*:bd*:svnVIOS:pnLTH17:pvr*
+evdev:name:SIPODEV USB Composite Device:dmi:bvn*:bvr*:bd*:svnVIOS:pnLTH17:*
  KEYBOARD_KEY_70073=f21                                 # Touchpad toggle
 
 ###########################################################
@@ -1666,7 +1704,7 @@ evdev:name:SIPODEV USB Composite Device:dmi:bvn*:bvr*:bd*:svnVIOS:pnLTH17:pvr*
 ###########################################################
 
 # P325J
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnINET:pnP325J:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnINET:pnP325J:*
  KEYBOARD_KEY_76=f21                                    # Touchpad toggle
 
 ###########################################################
@@ -1763,21 +1801,21 @@ evdev:input:b0003v1038p0310*
 ###########################################################
 
 # Common Volume Keys
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnFUJITSU*SIEMENS:pnAMILO*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnFUJITSU*SIEMENS:pnAMILO*:*
 evdev:atkbd:dmi:bvn*:bvr*:bd*:svnFOXCONN:pnQBOOK:*
 evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMTC:pn*:pvrA0:*
 evdev:atkbd:dmi:bvn*:bvr*:bd*:svnMio*Technology:pnN890:*
 evdev:atkbd:dmi:bvn*:bvr*:bd*:svnPEGATRON*CORP.:pnSpring*Peak:*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnTOSHIBA:pnSatellite*[uU][35]0[05]*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnTOSHIBA:pnSATELLITE*[uU][35]0[05]*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnTOSHIBA:pnSatellite*Pro*[uU]300*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnTOSHIBA:pnEQUIUM [uU][35]0[05]*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnTOSHIBA:pnSatellite*[uU][35]0[05]*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnTOSHIBA:pnSATELLITE*[uU][35]0[05]*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnTOSHIBA:pnSatellite*Pro*[uU]300*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnTOSHIBA:pnEQUIUM [uU][35]0[05]*:*
 evdev:atkbd:dmi:bvn*:bvr*:bd*:svnViooo*Corporation:pnPT17:*
 evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHANNspree:pnSN10E100:*
 evdev:atkbd:dmi:bvn*:bvr*:bd*:svnGIGABYTE:pni1520M:*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnBenQ:pn*nScreen*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnBenQ:pnJoybook*Lite*:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDIXONSP:pnDIXON*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnBenQ:pn*nScreen*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnBenQ:pnJoybook*Lite*:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDIXONSP:pnDIXON*:*
  KEYBOARD_KEY_a0=!                                      # mute
  KEYBOARD_KEY_ae=!                                      # volume down
  KEYBOARD_KEY_b0=!                                      # volume up
@@ -1798,8 +1836,8 @@ evdev:input:b0003v1050p0111*
 evdev:input:b0003v1050p0116*
 # OKE Electron Company USB barcode reader
 evdev:input:b0003v05FEp1010*
- XKB_FIXED_LAYOUT="us"
- XKB_FIXED_VARIANT=""
+ XKB_FIXED_LAYOUT=us
+ XKB_FIXED_VARIANT=
 
 ######################### LACK OF MODIFIER LEDS ############################
 # This section lists keyboard which do not have their own LEDs for some
@@ -1820,24 +1858,24 @@ evdev:input:b0003v04FEp000D*
  KEYBOARD_LED_CAPSLOCK=0
 
 # Lenovo ThinkPad T430s
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO:pn*:pvrThinkPadT430s
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO:pn*:pvrThinkPadT430s:*
  KEYBOARD_LED_CAPSLOCK=0
 
 # Lenovo ThinkPad T440s
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO:pn*:pvrThinkPadT440s
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO:pn*:pvrThinkPadT440s:*
  KEYBOARD_LED_CAPSLOCK=0
 
 # Lenovo ThinkPad T450s
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO:pn*:pvrThinkPadT450s
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO:pn*:pvrThinkPadT450s:*
  KEYBOARD_LED_CAPSLOCK=0
 
 # Lenovo ThinkPad T560s
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO:pn*:pvrThinkPadT560s
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO:pn*:pvrThinkPadT560s:*
  KEYBOARD_LED_CAPSLOCK=0
  KEYBOARD_LED_NUMLOCK=0
 
 # Lenovo ThinkPad X1 Carbon 3rd Gen
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO:pn*:pvrThinkPadX1Carbon3rd
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO:pn*:pvrThinkPadX1Carbon3rd:*
  KEYBOARD_LED_CAPSLOCK=0
 
 ######################### FIXED MODEL DEVICES #############################
@@ -1846,6 +1884,6 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnLENOVO:pn*:pvrThinkPadX1Carbon3rd
 # The model must be an xkb compatible model (defined with XKB_FIXED_MODEL).
 
 # Chromebooks
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnFalco:pvr*
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnPeppy:pvr*
- XKB_FIXED_MODEL="chromebook"
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnFalco:*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnPeppy:*
+ XKB_FIXED_MODEL=chromebook
index 396045bffc401c5c481d988724e126981aebfe73..0f75fd11a8621c2e7ac1864f1315496831d53d69 100644 (file)
@@ -3,17 +3,17 @@
 # The lookup keys are composed in:
 #   60-sensor.rules
 #
-# Note: The format of the "sensor:" prefix match key is a
-# contract between the rules file and the hardware data, it might
-# change in later revisions to support more or better matches, it
-# is not necessarily expected to be a stable ABI.
+# Note: The format of the "sensor:" prefix match key is a contract between the
+# rules file and the hardware data, it might change in later revisions to
+# support more or better matches, it is not necessarily expected to be a stable
+# ABI.
 #
 # Match string formats:
-# sensor:modalias:<parent device modalias>:dmi:<dmi string>
+# sensor:modalias:<parent modalias pattern>:dmi:<dmi pattern>
 #
-# The device modalias can be seen in the `modalias` file
-# of the sensor parent, for example:
-# cat /sys/`udevadm info -q path -n /dev/iio:device0`/../modalias
+# The device modalias can be seen in the `modalias` file of the sensor parent,
+# for example:
+#   cat /sys/`udevadm info -q path -n /dev/iio:device0`/../modalias
 #
 # The full DMI string of the running machine can be read from
 #   /sys/class/dmi/id/modalias
@@ -46,7 +46,7 @@
 # where <matrix> is a mount-matrix in the format specified in the IIO
 # subsystem[1]. The default, when unset, is equivalent to:
 #   ACCEL_MOUNT_MATRIX=1, 0, 0; 0, 1, 0; 0, 0, 1
-# eg. the identity matrix.
+# eg. the identity matrix,
 # and <value> is an integer value above which an object is considered
 # close by a proximity sensor:
 #   PROXIMITY_NEAR_LEVEL=100
 # or 'display'. The default, when unset, is equivalent to:
 #    ACCEL_LOCATION=display
 #
+# A note about setting ACCEL_MOUNT_MATRIX for ACCEL_LOCATION=base sensors,
+# on 360 degree hinges style 2-in-1s with 2 sensors (one in the display and
+# 1 in the base). Userspace will use both sensors to calculate the angle between
+# the 2 halves and the angle is defined as being 0 when the device is folded
+# as a regular clamshell laptop with its lid closed. This means that the
+# base-accelerometer's mount-matrix must be such, that after applying
+# the mount-matrices to both sensors, the base-accelerometer's readings must
+# be identical to the display-accelerometer's readings (when the lid is
+# closed).
+#
 # Sort by brand, model
 
 #########################################
 # Acer
 #########################################
-sensor:modalias:acpi:INVN6500*:dmi:*svn*Acer*:*pn*AspireSW5-011*
+sensor:modalias:acpi:KIOX0009*:dmi:*:svnAcer:pnAspireSW3-016:*
+ ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, -1
+
+sensor:modalias:acpi:INVN6500*:dmi:*svn*Acer*:*pn*AspireSW5-011:*
  ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
 
-sensor:modalias:acpi:INVN6500*:dmi:*svn*Acer*:*pn*AspireSW5-012*
+sensor:modalias:acpi:INVN6500*:dmi:*svn*Acer*:*pn*AspireSW5-012:*
  ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
 
-sensor:modalias:acpi:BOSC0200*:dmi:*svnAcer*:*TP-SW5-017-17BU*
+sensor:modalias:acpi:BOSC0200*:dmi:*svnAcer*:*TP-SW5-017-17BU:*
  ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, -1
 
 sensor:modalias:acpi:BMA250E*:dmi:*:svnAcer:pnIconiaW1-810:*
  ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1
 
-sensor:modalias:acpi:SMO8500:*:dmi:*Acer*:pnOneS1002*
+sensor:modalias:acpi:SMO8500:*:dmi:*Acer*:pnOneS1002:*
  ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, -1
 
 sensor:modalias:acpi:KIOX0009*:dmi:*:svnAcer:pnOneS1003:*
@@ -93,11 +106,9 @@ sensor:modalias:acpi:KIOX0009*:dmi:*:svnAcer:pnOneS1003:*
 sensor:modalias:acpi:BOSC0200*:dmi:*:svnAcer*:pnSwitchSW312-31:*
  ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
 
-sensor:modalias:acpi:BOSC0200*:dmi:*svn*Acer*:*pn*Spin*SP111-32*
-sensor:modalias:acpi:BOSC0200*:dmi:*svn*Acer*:*pn*Spin*SP111-33*
- ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
-
-sensor:modalias:acpi:BOSC0200*:dmi:*svnAcer*:*pnSpinSP111-34*
+sensor:modalias:acpi:BOSC0200*:dmi:*svn*Acer*:*pn*Spin*SP111-32:*
+sensor:modalias:acpi:BOSC0200*:dmi:*svn*Acer*:*pn*Spin*SP111-33:*
+sensor:modalias:acpi:BOSC0200*:dmi:*svnAcer*:*pnSpinSP111-34:*
  ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
 
 #########################################
@@ -109,48 +120,49 @@ sensor:modalias:acpi:SMO8500*:dmi:*:svnARCHOS:pnARCHOS80Cesium:*
 #########################################
 # AsusTek
 #########################################
-sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pnT100CHI*
+sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pnT100CHI:*
  ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
 
-sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:pnT300CHI*
+sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:pnT300CHI:*
  ACCEL_MOUNT_MATRIX=0, -1, 0; 1, 0, 0; 0, 0, 1
 
-sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pnM80TA*
-sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pnT100TA*
-sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:pnT200TA*
+sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pnM80TA:*
+sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pnT100TA:*
+sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:pnT200TA:*
  ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1
 
-sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pnTP201SA*
-sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:pn*E205SA*
+sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pnTP201SA:*
+sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:pn*E205SA:*
  ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
 
-sensor:modalias:acpi:INVN6500*:dmi:*svn*ASUSTeK*:*pn*TP300LA*
-sensor:modalias:acpi:INVN6500*:dmi:*svn*ASUSTeK*:*pn*TP300LD*
+sensor:modalias:acpi:INVN6500*:dmi:*svn*ASUSTeK*:*pn*TP300LA:*
+sensor:modalias:acpi:INVN6500*:dmi:*svn*ASUSTeK*:*pn*TP300LD:*
  ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
 
-sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pn*Q551LN*
+sensor:modalias:acpi:INVN6500*:dmi:*svnASUSTeK*:*pn*Q551LN:*
  ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, 1
 
-sensor:modalias:acpi:KXJ2109*:dmi:*:svnASUSTeK*:pnME176C*
+sensor:modalias:acpi:KXJ2109*:dmi:*:svnASUSTeK*:pnME176C:*
  ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
 
-sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP300LJ*
+sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP300LJ:*
  ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
 
-sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP500LAB*
-sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP500LB*
+sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP500LAB:*
+sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP500LB:*
  ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
 
-sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP300LD*
+sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP300LD:*
+sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP300LAB:*
  ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
 
-sensor:modalias:acpi:BOSC0200*:dmi:*svn*ASUSTeK*:*pn*TP412UA*
+sensor:modalias:acpi:BOSC0200*:dmi:*svn*ASUSTeK*:*pn*TP412UA:*
  ACCEL_MOUNT_MATRIX=0, -1, 0; 1, 0, 0; 0, 0, 1
 
 #########################################
 # Axxo
 #########################################
-sensor:modalias:acpi:SMO8500*:dmi:*:svnStandard:pnWCBT1011:*
+sensor:modalias:acpi:SMO8500*:dmi:*:svnStandard:pnWCBT1011::*
  ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
 
 #########################################
@@ -169,6 +181,10 @@ sensor:modalias:acpi:BOSC0200*:dmi:*:svnHampoo:pnD2D3_Vi8A1:*
 sensor:modalias:acpi:BMA250E*:dmi:bvnINSYDECorp.:bvrG1D_S165*:svnilife:pnS165:*
  ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
 
+# Chuwi Hi8 (CWI509)
+sensor:modalias:acpi:BMA250E*:dmi:*svnilife*:pnS806:*
+ ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1
+
 # Chuwi Hi8 Pro (CWI513)
 sensor:modalias:acpi:BOSC0200*:dmi:*:svnHampoo:pnX1D3_C806N:*
  ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
@@ -203,8 +219,8 @@ sensor:modalias:acpi:KIOX000A*:dmi:*:svnChuwi*:pnHi13:*
 # Chuwi HiBook does not have its product name filled, so we
 # match the entire dmi-alias, assuming that the use of a BOSC0200 +
 # bios-version + bios-date combo is unique
-sensor:modalias:acpi:BOSC0200*:dmi:bvnAmericanMegatrendsInc.:bvr5.11:bd05/07/2016:svnDefaultstring:pnDefaultstring:pvrDefaultstring:rvnHampoo:rnCherryTrailCR:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:
-sensor:modalias:acpi:BOSC0200*:dmi:bvnAmericanMegatrendsInc.:bvr5.11:bd05/28/2016:svnDefaultstring:pnDefaultstring:pvrDefaultstring:rvnHampoo:rnCherryTrailCR:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:
+sensor:modalias:acpi:BOSC0200*:dmi:bvnAmericanMegatrendsInc.:bvr5.11:bd05/07/2016:svnDefaultstring:pnDefaultstring:pvrDefaultstring:rvnHampoo:rnCherryTrailCR:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:*
+sensor:modalias:acpi:BOSC0200*:dmi:bvnAmericanMegatrendsInc.:bvr5.11:bd05/28/2016:svnDefaultstring:pnDefaultstring:pvrDefaultstring:rvnHampoo:rnCherryTrailCR:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:*
  ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1
 
 # Chuwi HiBook Pro (CWI526)
@@ -214,7 +230,7 @@ sensor:modalias:acpi:BOSC0200*:dmi:*:svnHampoo*:pnP1D6_C109K:*
 # Chuwi CoreBook
 # Chuwi CoreBook does not have its product name filled, so we
 # match the entire dmi-alias
-sensor:modalias:acpi:BOSC0200*:dmi:bvnAmericanMegatrendsInc.:bvrY13D_KB133.103:bd06/01/2018:svnHampoo:pnDefaultstring:pvrV100:rvnHampoo:rnY13D_KB133:rvrV100:cvnDefaultstring:ct9:cvrDefaultstring:
+sensor:modalias:acpi:BOSC0200*:dmi:bvnAmericanMegatrendsInc.:bvrY13D_KB133.103:bd06/01/2018:svnHampoo:pnDefaultstring:pvrV100:rvnHampoo:rnY13D_KB133:rvrV100:cvnDefaultstring:ct9:cvrDefaultstring:*
  ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
 
 #########################################
@@ -262,7 +278,7 @@ sensor:modalias:acpi:KIOX000A*:dmi:*:svnALLDOCUBE:pni1102:*
 #########################################
 # Cytrix (Mytrix)
 #########################################
-sensor:modalias:acpi:*KIOX000A*:dmi:*svn*CytrixTechnology:*pn*Complex11t*
+sensor:modalias:acpi:*KIOX000A*:dmi:*svn*CytrixTechnology:*pn*Complex11t:*
  ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
 
 #########################################
@@ -271,18 +287,24 @@ sensor:modalias:acpi:*KIOX000A*:dmi:*svn*CytrixTechnology:*pn*Complex11t*
 sensor:modalias:platform:HID-SENSOR-200073:dmi:*svnDell*:pnVostro5581:*
  ACCEL_LOCATION=base
 
+sensor:modalias:platform:HID-SENSOR-200073:dmi:*svnDell*:pnLatitude9520:*:ct10:*
+ ACCEL_LOCATION=base
+
+sensor:modalias:platform:HID-SENSOR-200073:dmi:*svnDell*:pnLatitude7420:*
+ ACCEL_LOCATION=base
+
 # Dell Venue 8 Pro 3845
-sensor:modalias:acpi:INVN6500*:dmi:*svnDellInc.*:pnVenue8Pro3845*
+sensor:modalias:acpi:INVN6500*:dmi:*svnDellInc.*:pnVenue8Pro3845:*
  ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
 
 # Dell Venue 10 Pro 5055
-sensor:modalias:acpi:INVN6500*:dmi:*svnDell*:pnVenue10Pro5055*
+sensor:modalias:acpi:INVN6500*:dmi:*svnDell*:pnVenue10Pro5055:*
  ACCEL_MOUNT_MATRIX=0, -1, 0; 1, 0, 0; 0, 0, 1
 
 #########################################
 # DEXP
 #########################################
-sensor:modalias:acpi:SMO8500*:dmi:*svn*DEXP*:*pn*DEXPOEM*
+sensor:modalias:acpi:SMO8500*:dmi:*svn*DEXP*:*pn*DEXPOEM:*
  ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
 
 #########################################
@@ -296,7 +318,7 @@ sensor:modalias:acpi:BOSC0200*:dmi:*:svnDigma:pnCITIE203ES2010EW:*
 #########################################
 # Endless
 #########################################
-sensor:modalias:acpi:ACCE0001*:dmi:*svnEndless*:*pnELT-NL3*
+sensor:modalias:acpi:ACCE0001*:dmi:*svnEndless*:*pnELT-NL3:*
  ACCEL_MOUNT_MATRIX=0, 1, 0; 0, 0, -1; -1, 0, 0
 
 #########################################
@@ -316,19 +338,19 @@ sensor:modalias:acpi:KIOX010A*:dmi:*:svnGEO*:pnGeoFlex*:*
 #########################################
 # Google Chromebooks
 #########################################
-sensor:modalias:platform:cros-ec-accel:dmi:*:svnGOOGLE*
+sensor:modalias:platform:cros-ec-accel:dmi:*:svnGOOGLE:*
  ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, -1, 0; 0, 0, -1
 
 # caroline board (Samsung Chromebook Pro) reports itself as svnGoogle
-sensor:modalias:platform:cros-ec-accel:dmi:*:svnGoogle:pnCaroline*
+sensor:modalias:platform:cros-ec-accel:dmi:*:svnGoogle:pnCaroline*:*
  ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, -1, 0; 0, 0, -1
 
 # Dell Inspiron Chromebook 14 2-in-1
-sensor:modalias:platform:cros-ec-accel:dmi:*svnGoogle:pnVayne*
+sensor:modalias:platform:cros-ec-accel:dmi:*svnGoogle:pnVayne*:*
  ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, -1, 0; 0, 0, -1
 
 # nocturne board (Google Pixel Slate)
-sensor:modalias:platform:cros-ec-accel:dmi:*Google_Nocturne*
+sensor:modalias:platform:cros-ec-accel:dmi:*Google_Nocturne*:*
  ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1
 
 #########################################
@@ -348,13 +370,13 @@ sensor:modalias:acpi:KIOX000A*:dmi:bvnINSYDECorp.:bvrBYT70A.YNCHENG.WIN.007:*:sv
 # and no other devices have both board_name *and* product_name set to
 # "Default string". So combined with the sensor modalias and BIOS date this
 # should be unique enough to identify the GPDwin
-sensor:modalias:acpi:KIOX000A*:dmi:bvnAmericanMegatrendsInc.:bvr5.11:bd10/25/2016:svnDefaultstring:pnDefaultstring:pvrDefaultstring:rvnAMICorporation:rnDefaultstring:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:
-sensor:modalias:acpi:KIOX000A*:dmi:bvnAmericanMegatrendsInc.:bvr5.11:bd11/18/2016:svnDefaultstring:pnDefaultstring:pvrDefaultstring:rvnAMICorporation:rnDefaultstring:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:
-sensor:modalias:acpi:KIOX000A*:dmi:bvnAmericanMegatrendsInc.:bvr5.11:bd12/23/2016:svnDefaultstring:pnDefaultstring:pvrDefaultstring:rvnAMICorporation:rnDefaultstring:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:
-sensor:modalias:acpi:KIOX000A*:dmi:bvnAmericanMegatrendsInc.:bvr5.11:bd12/26/2016:svnDefaultstring:pnDefaultstring:pvrDefaultstring:rvnAMICorporation:rnDefaultstring:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:
-sensor:modalias:acpi:KIOX000A*:dmi:bvnAmericanMegatrendsInc.:bvr5.11:bd02/21/2017:svnDefaultstring:pnDefaultstring:pvrDefaultstring:rvnAMICorporation:rnDefaultstring:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:
-sensor:modalias:acpi:KIOX000A*:dmi:bvnAmericanMegatrendsInc.:bvr5.11:bd03/20/2017:svnDefaultstring:pnDefaultstring:pvrDefaultstring:rvnAMICorporation:rnDefaultstring:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:
-sensor:modalias:acpi:KIOX000A*:dmi:bvnAmericanMegatrendsInc.:bvr5.11:bd05/25/2017:svnDefaultstring:pnDefaultstring:pvrDefaultstring:rvnAMICorporation:rnDefaultstring:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:
+sensor:modalias:acpi:KIOX000A*:dmi:bvnAmericanMegatrendsInc.:bvr5.11:bd10/25/2016:svnDefaultstring:pnDefaultstring:pvrDefaultstring:rvnAMICorporation:rnDefaultstring:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:*
+sensor:modalias:acpi:KIOX000A*:dmi:bvnAmericanMegatrendsInc.:bvr5.11:bd11/18/2016:svnDefaultstring:pnDefaultstring:pvrDefaultstring:rvnAMICorporation:rnDefaultstring:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:*
+sensor:modalias:acpi:KIOX000A*:dmi:bvnAmericanMegatrendsInc.:bvr5.11:bd12/23/2016:svnDefaultstring:pnDefaultstring:pvrDefaultstring:rvnAMICorporation:rnDefaultstring:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:*
+sensor:modalias:acpi:KIOX000A*:dmi:bvnAmericanMegatrendsInc.:bvr5.11:bd12/26/2016:svnDefaultstring:pnDefaultstring:pvrDefaultstring:rvnAMICorporation:rnDefaultstring:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:*
+sensor:modalias:acpi:KIOX000A*:dmi:bvnAmericanMegatrendsInc.:bvr5.11:bd02/21/2017:svnDefaultstring:pnDefaultstring:pvrDefaultstring:rvnAMICorporation:rnDefaultstring:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:*
+sensor:modalias:acpi:KIOX000A*:dmi:bvnAmericanMegatrendsInc.:bvr5.11:bd03/20/2017:svnDefaultstring:pnDefaultstring:pvrDefaultstring:rvnAMICorporation:rnDefaultstring:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:*
+sensor:modalias:acpi:KIOX000A*:dmi:bvnAmericanMegatrendsInc.:bvr5.11:bd05/25/2017:svnDefaultstring:pnDefaultstring:pvrDefaultstring:rvnAMICorporation:rnDefaultstring:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:*
  ACCEL_LOCATION=base
 
 #########################################
@@ -382,7 +404,7 @@ sensor:modalias:i2c:bmc150_accel:dmi:*:svnHewlett-Packard:pnHPPavilionx2Detachab
 # The I.T.Works TW891 2-in-1's DMI has the product-name field set, but not
 # the sys-vendor field. This makes the DMI data a bit generic, so we match
 # the whole dmi modalias, except for the BIOS version/date
-sensor:modalias:acpi:KIOX000A*:dmi:bvnAmericanMegatrendsInc.:*:svnTobefilledbyO.E.M.:pnTW891:pvrTobefilledbyO.E.M.:rvnTobefilledbyO.E.M.:rnTW891:rvr1.0:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
+sensor:modalias:acpi:KIOX000A*:dmi:bvnAmericanMegatrendsInc.:*:svnTobefilledbyO.E.M.:pnTW891:pvrTobefilledbyO.E.M.:rvnTobefilledbyO.E.M.:rnTW891:rvr1.0:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:*
  ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
 
 # I.T.Works TW701 7" windows tablet, same hw as Trekstor ST70416-6
@@ -398,7 +420,7 @@ sensor:modalias:acpi:BOSC0200*:dmi:*:svnIRBIS:pnTW90:*
  ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, 1
 
 # NB111
-sensor:modalias:acpi:KIOX010A*:dmi:*svn*IRBIS*:*pn*NB111*
+sensor:modalias:acpi:KIOX010A*:dmi:*svn*IRBIS*:*pn*NB111:*
  ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
 
 #TW118
@@ -408,7 +430,7 @@ sensor:modalias:acpi:BOSC0200*:dmi:*:svnIRBIS:pnTW118:*
 #########################################
 # iOTA 360
 #########################################
-sensor:modalias:acpi:KIOX000A*:dmi:*svn*iOTA*:*pn*IOTA2210*
+sensor:modalias:acpi:KIOX000A*:dmi:*svn*iOTA*:*pn*IOTA2210:*
  ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
 
 #########################################
@@ -416,7 +438,7 @@ sensor:modalias:acpi:KIOX000A*:dmi:*svn*iOTA*:*pn*IOTA2210*
 #########################################
 
 # EZpad mini 3
-sensor:modalias:acpi:BOSC0200*:dmi:bvnINSYDECorp.:bvrjumperx.T87.KFBNEE*
+sensor:modalias:acpi:BOSC0200*:dmi:bvnINSYDECorp.:bvrjumperx.T87.KFBNEE:*
  ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
 
 # EZpad 6 Pro
@@ -436,10 +458,10 @@ sensor:modalias:acpi:KIOX000A*:dmi:bvnINSYDECorp.:bvrVISION.I22K*:svnKAZAM:pnVIS
 #########################################
 # Lamina
 #########################################
-sensor:modalias:acpi:SMO8500*:dmi:*svnLamina*:*pnT701BR.SE*
+sensor:modalias:acpi:SMO8500*:dmi:*svnLamina*:*pnT701BR.SE:*
  ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
 
-sensor:modalias:acpi:KIOX000A*:dmi:*svnLAMINA:pnT-1016BNORD*
+sensor:modalias:acpi:KIOX000A*:dmi:*svnLAMINA:pnT-1016BNORD:*
  ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
 
 #########################################
@@ -448,8 +470,11 @@ sensor:modalias:acpi:KIOX000A*:dmi:*svnLAMINA:pnT-1016BNORD*
 sensor:modalias:acpi:NCPE0388*:dmi:*:rnLenovoYOGA510-14IKB:*
  ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, -1, 0; 0, 0, 1
 
-sensor:modalias:acpi:BOSC0200*:dmi:*ThinkPadYoga11e3rdGen*
- ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, 1
+sensor:modalias:acpi:BOSC0200*:dmi:*ThinkPadYoga11e3rdGen:*
+ ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, -1
+
+sensor:modalias:acpi:BOSC0200*:dmi:*:svnLENOVO:*pvrThinkPadYoga11e4thGen:*
+ ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, -1
 
 # Miix3-1030
 sensor:modalias:acpi:BMA250E*:dmi:bvnLENOVO:*:pvrLenovoMIIX3-1030:*
@@ -464,7 +489,7 @@ sensor:modalias:acpi:BOSC0200*:dmi:*:svnLENOVO:pn81H3:*
  ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, 1
 
 # IdeaPad Miix 300
-sensor:modalias:acpi:SMO8500*:dmi:bvnLENOVO:*:pvrMIIX300-*
+sensor:modalias:acpi:SMO8500*:dmi:bvnLENOVO:*:pvrMIIX300-*:*
  ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
 
 # IdeaPad Miix 310 note this only is for BIOS version (bvr) 1HCN4?WW and 1HCN2?WW, which has
@@ -475,7 +500,7 @@ sensor:modalias:acpi:KIOX000A*:dmi:bvnLENOVO:bvr1HCN2?WW:*:svnLENOVO:pn80SG:*
 
 # IdeaPad Miix 320, different batches use a different sensor
 sensor:modalias:acpi:*BOSC0200*:dmi:*:svnLENOVO*:pn80XF:*
-sensor:modalias:acpi:SMO8840*:dmi:*:svnLENOVO:pn80XF:pvrLenovoMIIX320*
+sensor:modalias:acpi:SMO8840*:dmi:*:svnLENOVO:pn80XF:pvrLenovoMIIX320:*
  ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
 
 # IdeaPad Miix 510, multiple expressions match different internal names
@@ -521,10 +546,12 @@ sensor:modalias:acpi:KIOX010A*:dmi:*:svnMEDION:pnE*:*
 # Medion Akoya E3222 MD62450
 sensor:modalias:acpi:KIOX010A*:dmi:*:svnMEDION:pnMEDION*:*
  ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
+ ACCEL_LOCATION=display
 
-# Medion Akoya E2221T MD60691
-sensor:modalias:acpi:KIOX020A*:dmi:*:pnE2221TMD60691*:*
- ACCEL_MOUNT_MATRIX=1, 0, 0; 0, 1, 0; 0, 0, 1
+# Same as above, but for base sensor
+sensor:modalias:acpi:KIOX020A*:dmi:*:svnMEDION:pnE*:*
+sensor:modalias:acpi:KIOX020A*:dmi:*:svnMEDION:pnMEDION*:*
+ ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, -1
  ACCEL_LOCATION=base
 
 #########################################
@@ -587,7 +614,7 @@ sensor:modalias:acpi:BMA250E*:dmi:bvnINSYDECorp.:bvrONDA.W89*:svnInsyde:pnONDATa
  ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
 
 # Onda v975w, generic DMI strings, match entire dmi modalias inc. bios-date
-sensor:modalias:acpi:SMO8500*:dmi:bvnAmericanMegatrendsInc.:bvr5.6.5:bd07/25/2014:svnTobefilledbyO.E.M.:pnTobefilledbyO.E.M.:pvrTobefilledbyO.E.M.:rvnAMICorporation:rnAptioCRB:rvrTobefilledbyO.E.M.:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
+sensor:modalias:acpi:SMO8500*:dmi:bvnAmericanMegatrendsInc.:bvr5.6.5:bd07/25/2014:svnTobefilledbyO.E.M.:pnTobefilledbyO.E.M.:pvrTobefilledbyO.E.M.:rvnAMICorporation:rnAptioCRB:rvrTobefilledbyO.E.M.:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:*
  ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
 
 #########################################
@@ -627,8 +654,8 @@ sensor:modalias:acpi:BMA250E*:dmi:*:svnShenzhenPLOYER*:pnMOMO7W:*
 # The Point of View TAB-P800W does not have its product name filled, so we
 # match the entire dmi-alias, assuming that the use of a BMA250E +
 # bios-version + bios-date combo is unique
-sensor:modalias:acpi:BMA250E*:dmi:bvnAmericanMegatrendsInc.:bvr3BAIR1013:bd08/22/2014:svnTobefilledbyO.E.M.:pnTobefilledbyO.E.M.:pvrTobefilledbyO.E.M.:rvnAMICorporation:rnAptioCRB:rvrTobefilledbyO.E.M.:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
-sensor:modalias:acpi:BMA250E*:dmi:bvnAmericanMegatrendsInc.:bvr3BAIR1014:bd10/24/2014:svnTobefilledbyO.E.M.:pnTobefilledbyO.E.M.:pvrTobefilledbyO.E.M.:rvnAMICorporation:rnAptioCRB:rvrTobefilledbyO.E.M.:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
+sensor:modalias:acpi:BMA250E*:dmi:bvnAmericanMegatrendsInc.:bvr3BAIR1013:bd08/22/2014:svnTobefilledbyO.E.M.:pnTobefilledbyO.E.M.:pvrTobefilledbyO.E.M.:rvnAMICorporation:rnAptioCRB:rvrTobefilledbyO.E.M.:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:*
+sensor:modalias:acpi:BMA250E*:dmi:bvnAmericanMegatrendsInc.:bvr3BAIR1014:bd10/24/2014:svnTobefilledbyO.E.M.:pnTobefilledbyO.E.M.:pvrTobefilledbyO.E.M.:rvnAMICorporation:rnAptioCRB:rvrTobefilledbyO.E.M.:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:*
  ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
 
 # Point of View TAB-P1005W-232 (v2.0)
@@ -639,6 +666,14 @@ sensor:modalias:acpi:KIOX000A*:dmi:*:rvnPOV:rnI102A:*
 sensor:modalias:i2c:bmc150_accel:dmi:bvnINSYDECorp.:*:svnInsyde:pnBayTrail:*:rvn105B:rn0E57:*
  ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1
 
+#########################################
+# Predia
+#########################################
+
+# Predia Basic tablet, most DMI strings are generic, match on BIOS version
+sensor:modalias:acpi:BOSC0200*:dmi:bvnINSYDECorp.:bvrMx.WT107.KUBNGEA*svnInsyde:pnCherryTrail:*
+ ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
+
 #########################################
 # Prowise
 #########################################
@@ -650,7 +685,7 @@ sensor:modalias:acpi:SMO8500*:dmi:*:svnProwise:pnPT301:*
 #########################################
 
 # SCT101CTM
-sensor:modalias:acpi:BOSC0200*:dmi:bvnAmericanMegatrendsInc.:bvrSCH12i.WJ210Z.KtBJRCA03*
+sensor:modalias:acpi:BOSC0200*:dmi:bvnAmericanMegatrendsInc.:bvrSCH12i.WJ210Z.KtBJRCA03:*
  ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
 
 #########################################
@@ -682,7 +717,7 @@ sensor:modalias:acpi:SMO8500*:dmi:*bd12/19/2014:*:rvnTECLAST:rntPAD:*
  ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1
 
 # Teclast X98 Plus I (A5C6), generic DMI strings, match entire dmi modalias inc. bios-date
-sensor:modalias:acpi:KIOX000A*:dmi:bvnAmericanMegatrendsInc.:bvr5.011:bd11/03/2015:svnTobefilledbyO.E.M.:pnTobefilledbyO.E.M.:pvrTobefilledbyO.E.M.:rvnAMICorporation:rnCherryTrailCR:rvrTobefilledbyO.E.M.:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
+sensor:modalias:acpi:KIOX000A*:dmi:bvnAmericanMegatrendsInc.:bvr5.011:bd11/03/2015:svnTobefilledbyO.E.M.:pnTobefilledbyO.E.M.:pvrTobefilledbyO.E.M.:rvnAMICorporation:rnCherryTrailCR:rvrTobefilledbyO.E.M.:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:*
  ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1
 
 # Teclast X98 Plus II
@@ -694,7 +729,7 @@ sensor:modalias:acpi:KIOX000A*:dmi:*:svnTECLAST:pnX98PlusII:*
 #########################################
 
 # Thundersoft TST168 tablet, generic DMI strings, match entire dmi modalias inc. bios-date
-sensor:modalias:acpi:BMA250E*:dmi:bvnAmericanMegatrendsInc.:bvr5.6.5:bd04/15/2014:svnTobefilledbyO.E.M.:pnTobefilledbyO.E.M.:pvrTobefilledbyO.E.M.:rvnAMICorporation:rnAptioCRB:rvrTobefilledbyO.E.M.:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
+sensor:modalias:acpi:BMA250E*:dmi:bvnAmericanMegatrendsInc.:bvr5.6.5:bd04/15/2014:svnTobefilledbyO.E.M.:pnTobefilledbyO.E.M.:pvrTobefilledbyO.E.M.:rvnAMICorporation:rnAptioCRB:rvrTobefilledbyO.E.M.:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:*
  ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
 
 #########################################
@@ -743,6 +778,16 @@ sensor:modalias:acpi:KIOX000A*:dmi:*:svnUMAX:pnVisionBook10WiPro:*
 sensor:modalias:acpi:SMO8500*:dmi:*:svnUMAX:pnVisionBook10WiPlus:*
  ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1
 
+#########################################
+# Voyo
+#########################################
+# Voyo Winpad A15
+# The Winpad A15 does not have its product name filled, so we
+# match the entire dmi-alias, assuming that the use of a SMO8500 +
+# bios-version + bios-date combo is unique
+sensor:modalias:acpi:SMO8500*:dmi:bvnAmericanMegatrendsInc.:bvr5.6.5:bd11/20/2014:br5.6:svnTobefilledbyO.E.M.:pnTobefilledbyO.E.M.:pvrTobefilledbyO.E.M.:rvnAMICorporation:rnAptioCRB:rvrTobefilledbyO.E.M.:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:*
+ ACCEL_MOUNT_MATRIX=0, -1, 0; 1, 0, 0; 0, 0, -1
+
 #########################################
 # Wortmann
 #########################################
index d0a2a22709a063ad0142f4b3d9204b078a14f256..98b79dc0d2fbb28c35c44acf08449c50218a3dc1 100644 (file)
@@ -6,35 +6,37 @@
 # The lookup keys are composed in:
 #   70-mouse.rules
 #
-# Note: The format of the "mouse:" prefix match key is a
-# contract between the rules file and the hardware data, it might
-# change in later revisions to support more or better matches, it
-# is not necessarily expected to be a stable ABI.
+# Note: The format of the "mouse:" prefix match key is a contract between the
+# rules file and the hardware data, it might change in later revisions to
+# support more or better matches, it is not necessarily expected to be a stable
+# ABI.
 #
-# Match string format:
+# Match key format:
 # mouse:<subsystem>:v<vid>p<pid>:name:<name>:
 #
 # Supported subsystems: usb, bluetooth
 # vid/pid as 4-digit hex lowercase vendor/product
 #
 # if vid/pid is unavailable, use
-# mouse:*:name:<name>:
+#   mouse:*:name:<name>:*
 # if name is unavailable, use
-# mouse:<subsystem>:v<vid>p<pid>:*
+#   mouse:<subsystem>:v<vid>p<pid>:*
 #
 # For example, the following 5 matches all match the same mouse:
-# mouse:usb:v17efp6019:name:Lenovo Optical USB Mouse:
-# mouse:usb:*:name:Lenovo Optical USB Mouse:
-# mouse:usb:v17efp6019:*
-# mouse:*:name:Lenovo Optical USB Mouse:
+#   mouse:usb:v17efp6019:name:Lenovo Optical USB Mouse:*
+#   mouse:usb:*:name:Lenovo Optical USB Mouse:*
+#   mouse:usb:v17efp6019:*
+#   mouse:*:name:Lenovo Optical USB Mouse:*
+#
+# All matches should end in ':*' to allow future expansions of the match key.
 #
 # To add local entries, create a new file
 #   /etc/udev/hwdb.d/71-mouse-local.hwdb
 # and add your rules there. To load the new rules execute (as root):
 #   systemd-hwdb update
 #   udevadm trigger /dev/input/eventXX
-# where /dev/input/eventXX is the mouse in question. If in
-# doubt, simply use /dev/input/event* to reload all input rules.
+# where /dev/input/eventXX is the mouse in question. If in doubt, simply use
+# /dev/input/event* to reload all input rules.
 #
 # If your changes are generally applicable, preferably send them as a pull
 # request to
 #   udevadm info /dev/input/eventXX.
 #
 # Allowed properties are:
-#    ID_INPUT_TRACKBALL
-#    MOUSE_DPI
-#    MOUSE_WHEEL_CLICK_ANGLE
-#    MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL
-#    MOUSE_WHEEL_CLICK_COUNT
-#    MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL
+#   ID_INPUT_TRACKBALL
+#   MOUSE_DPI
+#   MOUSE_WHEEL_CLICK_ANGLE
+#   MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL
+#   MOUSE_WHEEL_CLICK_COUNT
+#   MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL
 #
 #########################################
 #         ID_INPUT_TRACKBALL            #
@@ -63,7 +65,7 @@
 #########################################
 #
 # DPI settings are specified as
-#    MOUSE_DPI=<dpi>[@<frequency>]
+#   MOUSE_DPI=<dpi>[@<frequency>]
 #
 # Where <dpi> is the resolution in dots per inch, and <frequency> the
 # sampling frequency in Hz (optional). If a device supports dynamic
 ##########################################
 # Generic
 ##########################################
-mouse:*:name:*Trackball*:
-mouse:*:name:*trackball*:
-mouse:*:name:*TrackBall*:
+mouse:*:name:*Trackball*:*
+mouse:*:name:*trackball*:*
+mouse:*:name:*TrackBall*:*
  ID_INPUT_TRACKBALL=1
 
 ##########################################
@@ -153,7 +155,7 @@ mouse:*:name:*TrackBall*:
 # Apple MagicMouse
 # Note: this device changes name once connected to a mac, the name ends up
 # as $username`s mouse
-mouse:bluetooth:v05acp030d:name:*:
+mouse:bluetooth:v05acp030d:name:*:*
  MOUSE_DPI=1300@1000
 
 ##########################################
@@ -161,7 +163,7 @@ mouse:bluetooth:v05acp030d:name:*:
 ##########################################
 
 # Chicony 2.4G Multimedia Wireless Kit MG-0919
-mouse:usb:v04f2p0963:name:Chicony 2.4G Multimedia Wireless Kit:
+mouse:usb:v04f2p0963:name:Chicony 2.4G Multimedia Wireless Kit:*
  MOUSE_DPI=1000@142
 
 ##########################################
@@ -169,15 +171,15 @@ mouse:usb:v04f2p0963:name:Chicony 2.4G Multimedia Wireless Kit:
 ##########################################
 
 # Dell MUAR DEL7
-mouse:usb:v413cp3012:name:Dell Dell USB Optical Mouse:
+mouse:usb:v413cp3012:name:Dell Dell USB Optical Mouse:*
  MOUSE_DPI=400@166
 
 # Dell USB Laser Mouse
-mouse:usb:v046dpc063:name:DELL DELL USB Laser Mouse:
+mouse:usb:v046dpc063:name:DELL DELL USB Laser Mouse:*
  MOUSE_DPI=1000@125
 
 # Dell MS116t
-mouse:usb:v413cp301a:name:PixArt Dell MS116 USB Optical Mouse:
+mouse:usb:v413cp301a:name:PixArt Dell MS116 USB Optical Mouse:*
  MOUSE_DPI=1000@125
 
 ##########################################
@@ -185,14 +187,14 @@ mouse:usb:v413cp301a:name:PixArt Dell MS116 USB Optical Mouse:
 #########################################
 
 # Dynex Wired Optical Mouse (DX-WMSE2)
-mouse:usb:v0461p4d46:name:USB Optical Mouse:
+mouse:usb:v0461p4d46:name:USB Optical Mouse:*
  MOUSE_DPI=1000@125
 
 ##########################################
 # Fujitsu Siemens
 ##########################################
 
-mouse:usb:v0461p4d16:name:USB Optical Mouse:
+mouse:usb:v0461p4d16:name:USB Optical Mouse:*
  MOUSE_DPI=500@125
 
 ##########################################
@@ -200,7 +202,7 @@ mouse:usb:v0461p4d16:name:USB Optical Mouse:
 ##########################################
 
 # SNES Mouse plugged into a Retrode 2
-mouse:usb:v0403p97c1:name:Retrode SNES Mouse:
+mouse:usb:v0403p97c1:name:Retrode SNES Mouse:*
  MOUSE_DPI=235@126
 
 ##########################################
@@ -208,11 +210,11 @@ mouse:usb:v0403p97c1:name:Retrode SNES Mouse:
 ##########################################
 
 # FM-901 Wireless Mouse
-mouse:usb:v1ea7p000b:name:2.4G RF Mouse:
+mouse:usb:v1ea7p000b:name:2.4G RF Mouse:*
  MOUSE_DPI=*800@125 1600@125
 
 # WK-727
-mouse:usb:v04d9p0499:name:*
+mouse:usb:v04d9p0499:name:*:*
  MOUSE_DPI=800@125
 
 ##########################################
@@ -220,7 +222,7 @@ mouse:usb:v04d9p0499:name:*
 ##########################################
 
 # HandShoe Mouse
-mouse:usb:v192fp0916:name:USB Optical Mouse:
+mouse:usb:v192fp0916:name:USB Optical Mouse:*
  MOUSE_DPI=1000@128
 
 ##########################################
@@ -228,7 +230,7 @@ mouse:usb:v192fp0916:name:USB Optical Mouse:
 ##########################################
 
 # Hoverstop active ergonomic mouse
-mouse:usb:v088dp1234:name:HoverStop NL Hoverstop active ergonomic mouse:
+mouse:usb:v088dp1234:name:HoverStop NL Hoverstop active ergonomic mouse:*
  MOUSE_DPI=400@129
 
 ##########################################
@@ -236,18 +238,18 @@ mouse:usb:v088dp1234:name:HoverStop NL Hoverstop active ergonomic mouse:
 ##########################################
 
 # HP USB 1000dpi Laser Mouse
-mouse:usb:v0458p0133:name:Mouse Laser Mouse:
+mouse:usb:v0458p0133:name:Mouse Laser Mouse:*
  MOUSE_DPI=1000@125
  MOUSE_WHEEL_CLICK_ANGLE=15
 
 # HP X1000
 # Dell MS111-T
-mouse:usb:v093ap2510:name:PixArt USB Optical Mouse:
-mouse:usb:v093ap2510:name:PIXART USB OPTICAL MOUSE:
+mouse:usb:v093ap2510:name:PixArt USB Optical Mouse:*
+mouse:usb:v093ap2510:name:PIXART USB OPTICAL MOUSE:*
  MOUSE_DPI=1000@125
 
 # HP X1200 Optical Mouse
-mouse:usb:v03f0p0641:name:PixArt HP X1200 USB Optical Mouse:
+mouse:usb:v03f0p0641:name:PixArt HP X1200 USB Optical Mouse:*
  MOUSE_DPI=1100@125
 
 ##########################################
@@ -263,7 +265,7 @@ mouse:usb:v04b3p3107:name:*
 ##########################################
 
 # Kensington Expert Mouse trackball
-mouse:usb:v047dp1020:*Kensington Expert Mouse*
+mouse:usb:v047dp1020:*Kensington Expert Mouse*:*
  ID_INPUT_TRACKBALL=1
 
 ##########################################
@@ -271,31 +273,31 @@ mouse:usb:v047dp1020:*Kensington Expert Mouse*
 ##########################################
 
 # Lenovo Optical USB Mouse
-mouse:usb:v17efp6019:name:Lenovo Optical USB Mouse:
+mouse:usb:v17efp6019:name:Lenovo Optical USB Mouse:*
  MOUSE_DPI=1000@125
 
 # Lenovo M-U0025-O
-mouse:usb:v17efp6019:name:Logitech Lenovo USB Optical Mouse:
+mouse:usb:v17efp6019:name:Logitech Lenovo USB Optical Mouse:*
  MOUSE_DPI=1000@166
 
 # Lenovo USB mouse model MO28UOL
-mouse:usb:v04b3p310c:name:USB Optical Mouse:
+mouse:usb:v04b3p310c:name:USB Optical Mouse:*
  MOUSE_DPI=400@142
 
 # Lenovo Precision USB Mouse
-mouse:usb:v17efp6050:name:Lenovo Precision USB Mouse:
+mouse:usb:v17efp6050:name:Lenovo Precision USB Mouse:*
  MOUSE_DPI=1200@127
 
 # Lenovo MOBGUL
-mouse:usb:v17efp601d:name:Primax Lenovo Laser Mouse:
+mouse:usb:v17efp601d:name:Primax Lenovo Laser Mouse:*
  MOUSE_DPI=1600@125
 
 # Lenovo MOBGULA
-mouse:usb:v17efp6045:name:Lenovo USB Laser Mouse:
+mouse:usb:v17efp6045:name:Lenovo USB Laser Mouse:*
  MOUSE_DPI=1600@125
 
 # ThinkPad USB Laser Mouse
-mouse:usb:v17efp6044:name:ThinkPad USB Laser Mouse:
+mouse:usb:v17efp6044:name:ThinkPad USB Laser Mouse:*
  MOUSE_DPI=1200@125
 
 ##########################################
@@ -310,135 +312,139 @@ mouse:usb:v17efp6044:name:ThinkPad USB Laser Mouse:
 ## G Series ##
 
 # Logitech G5 Laser Mouse
-mouse:usb:v046dpc049:name:Logitech USB Gaming Mouse:
+mouse:usb:v046dpc049:name:Logitech USB Gaming Mouse:*
  MOUSE_DPI=400@500 *800@500 2000@500
 
 # Logitech G500s Laser Gaming Mouse
-mouse:usb:v046dpc24e:name:Logitech G500s Laser Gaming Mouse:
+mouse:usb:v046dpc24e:name:Logitech G500s Laser Gaming Mouse:*
  MOUSE_DPI=400@500 *800@500 2000@500
 
 # Logitech G9
-mouse:usb:v046dpc048:name:Logitech G9 Laser Mouse:
+mouse:usb:v046dpc048:name:Logitech G9 Laser Mouse:*
  MOUSE_DPI=400@1000 800@1000 *1600@1000
 
 # Logitech G9x [Call of Duty MW3 Edition]
-mouse:usb:v046dpc249:name:Logitech G9x Laser Mouse:
+mouse:usb:v046dpc249:name:Logitech G9x Laser Mouse:*
  MOUSE_DPI=400@1000 800@1000 *1600@1000 3200@1000
 
 # Logitech G100s Optical Gaming Mouse
-mouse:usb:v046dpc247:name:Logitech G100s Optical Gaming Mouse:
+mouse:usb:v046dpc247:name:Logitech G100s Optical Gaming Mouse:*
  MOUSE_DPI=*1000@500 1750@500 2500@500
 
 # Logitech G400 (Wired)
-mouse:usb:v046dpc245:name:Logitech Gaming Mouse G400:
+mouse:usb:v046dpc245:name:Logitech Gaming Mouse G400:*
  MOUSE_DPI=400@1000 *800@1000 1800@1000 3600@1000
 
 # Logitech G400s (Wired)
-mouse:usb:v046dpc24c:name:Logitech G400s Optical Gaming Mouse:
+mouse:usb:v046dpc24c:name:Logitech G400s Optical Gaming Mouse:*
  MOUSE_DPI=400@1000 *800@1000 2000@1000 4000@1000
 
 # Logitech G402 Hyperion Fury
-mouse:usb:v046dpc07e:name:Logitech Gaming Mouse G402:
+mouse:usb:v046dpc07e:name:Logitech Gaming Mouse G402:*
+ MOUSE_DPI=400@1000 *800@1000 1600@1000 3200@1000
+
+# Logitech G403 Prodigy (Wired)
+mouse:usb:v046dpc083:name:Logitech G403 Prodigy Gaming Mouse:*
  MOUSE_DPI=400@1000 *800@1000 1600@1000 3200@1000
 
 # Logitech G500 Mouse
-mouse:usb:v046dpc068:name:Logitech G500:
+mouse:usb:v046dpc068:name:Logitech G500:*
  MOUSE_DPI=*1600@500 2600@500 3600@500
 
 # Logitech G502 Proteus Spectrum
-mouse:usb:v046dpc332:name:Logitech Gaming Mouse G502:
+mouse:usb:v046dpc332:name:Logitech Gaming Mouse G502:*
 # Logitech G502 HERO SE
-mouse:usb:v046dpc08b:name:Logitech G502 HERO SE:
+mouse:usb:v046dpc08b:name:Logitech G502 HERO SE:*
 # Logitech G502 Hero
-mouse:usb:v046dpc08b:name:Logitech G502 HERO Gaming Mouse:
+mouse:usb:v046dpc08b:name:Logitech G502 HERO Gaming Mouse:*
  MOUSE_DPI=1200@1000 *2400@1000 3200@1000 6400@1000
 
 # Logitech G700 Laser Mouse (Wired)
-mouse:usb:v046dpc06b:name:Logitech G700 Laser Mouse:
+mouse:usb:v046dpc06b:name:Logitech G700 Laser Mouse:*
 # Logitech G700 Laser Mouse (Wireless)
-mouse:usb:v046dpc531:name:Logitech USB Receiver:
+mouse:usb:v046dpc531:name:Logitech USB Receiver:*
  MOUSE_DPI=*1000@500 3800@500 500@1000 1500@1000 2000@1000
 
 # Logitech G703 (Wired)
-mouse:usb:v046dpc087:name:Logitech G703 Wired/Wireless Gaming Mouse:
+mouse:usb:v046dpc087:name:Logitech G703 Wired/Wireless Gaming Mouse:*
 # Logitech G703 (Wireless)
-mouse:usb:v046dpc539:name:Logitech USB Receiver Mouse:
+mouse:usb:v046dpc539:name:Logitech USB Receiver Mouse:*
  MOUSE_DPI=400@1000 800@1000 *1600@1000 3200@1000
 
 ## M Series ##
 
 # Logitech Wireless Mouse M185
-mouse:usb:v046dp4008:name:Logitech M185:
-mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:4008:
+mouse:usb:v046dp4008:name:Logitech M185:*
+mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:4008:*
  MOUSE_DPI=1000@125
 
 # Logitech Wireless Mouse M510
-mouse:usb:v046dp1025:name:Logitech M510:
+mouse:usb:v046dp1025:name:Logitech M510:*
  MOUSE_DPI=1000@125
 
 # Logitech M705 (marathon mouse)
-mouse:usb:v046dp101b:name:Logitech M705:
-mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:101b:
+mouse:usb:v046dp101b:name:Logitech M705:*
+mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:101b:*
  MOUSE_DPI=1000@125
 
 # Logitech M705 (newer version?)
-mouse:usb:v046dp406d:name:Logitech M705:
+mouse:usb:v046dp406d:name:Logitech M705:*
  MOUSE_DPI=1000@167
 
 # Logitech M305 Wireless Optical Mouse
-mouse:usb:v046dpc52f:name:Logitech USB Receiver:
+mouse:usb:v046dpc52f:name:Logitech USB Receiver:*
  MOUSE_DPI=1000@170
 
 # Logitech Wireless Mouse M310
-mouse:usb:v046dp1024:name:Logitech M310:
+mouse:usb:v046dp1024:name:Logitech M310:*
  MOUSE_DPI=1100@168
 
 # Logitech Wireless Mouse M325
-mouse:usb:v046dp400a:name:Logitech M325:
-mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:400a:
+mouse:usb:v046dp400a:name:Logitech M325:*
+mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:400a:*
  MOUSE_DPI=600@166
  MOUSE_WHEEL_CLICK_ANGLE=20
 
 # Logitech M570 trackball
-mouse:usb:v046dp1028:name:Logitech M570:
+mouse:usb:v046dp1028:name:Logitech M570:*
  MOUSE_DPI=540@167
  ID_INPUT_TRACKBALL=1
 
 ## MX Series ##
 
 # Logitech Performance MX
-mouse:usb:v046dp101a:name:Logitech Performance MX:
+mouse:usb:v046dp101a:name:Logitech Performance MX:*
  MOUSE_DPI=1000@166
 
 # Logitech MX Revolution
-mouse:usb:v046dpc51a:name:Logitech USB Receiver:
+mouse:usb:v046dpc51a:name:Logitech USB Receiver:*
  MOUSE_DPI=800@200
 
 # Logitech MX 518
-mouse:usb:v046dpc01e:name:Logitech USB-PS/2 Optical Mouse:
+mouse:usb:v046dpc01e:name:Logitech USB-PS/2 Optical Mouse:*
  MOUSE_DPI=400@125 *800@125 1600@125
 
 # Logitech MX1000 Laser Cordless Mouse
-mouse:bluetooth:v046dpb003:name:Logitech MX1000 mouse:
+mouse:bluetooth:v046dpb003:name:Logitech MX1000 mouse:*
  MOUSE_DPI=800@80
 
 # Logitech Anywhere MX
-mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:1017:
-mouse:usb:v046dp1017:name:Logitech Anywhere MX:
+mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:1017:*
+mouse:usb:v046dp1017:name:Logitech Anywhere MX:*
  MOUSE_WHEEL_CLICK_ANGLE=20
 
 # Logitech Anywhere MX 2S (via Logitech Unifying Receiver)
-mouse:usb:v046dp406a:name:Logitech MX Anywhere 2S:
+mouse:usb:v046dp406a:name:Logitech MX Anywhere 2S:*
  MOUSE_WHEEL_CLICK_ANGLE=20
 
 # Logitech Anywhere MX 2S (via Bluetooth)
-mouse:bluetooth:v046dpb01a:name:MX Anywhere 2S Mouse:
+mouse:bluetooth:v046dpb01a:name:MX Anywhere 2S Mouse:*
  MOUSE_WHEEL_CLICK_ANGLE=20
 
 # Logitech MX Master (via Logitech Unifying Receiver)
 # Horiz wheel has 14 stops, angle is rounded up
-mouse:usb:v046dp4060:name:Logitech MX Master:
-mouse:usb:v046dp4041:name:Logitech MX Master:
+mouse:usb:v046dp4060:name:Logitech MX Master:*
+mouse:usb:v046dp4041:name:Logitech MX Master:*
  MOUSE_DPI=1000@166
  MOUSE_WHEEL_CLICK_ANGLE=15
  MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL=26
@@ -447,7 +453,7 @@ mouse:usb:v046dp4041:name:Logitech MX Master:
 
 # Logitech MX Master (via Bluetooth)
 # Horiz wheel has 14 stops, angle is rounded up
-mouse:bluetooth:v046dpb012:name:MX Master Mouse:
+mouse:bluetooth:v046dpb012:name:MX Master Mouse:*
  MOUSE_DPI=1000@2000
  MOUSE_WHEEL_CLICK_ANGLE=15
  MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL=26
@@ -456,7 +462,7 @@ mouse:bluetooth:v046dpb012:name:MX Master Mouse:
 
 # Logitech MX Master 2S (via Logitech Unifying Receiver)
 # Horiz wheel has 14 stops, angle is rounded up
-mouse:usb:v046dp4069:name:Logitech MX Master 2s:
+mouse:usb:v046dp4069:name:Logitech MX Master 2s:*
  MOUSE_DPI=1000@125
  MOUSE_WHEEL_CLICK_ANGLE=15
  MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL=26
@@ -465,7 +471,7 @@ mouse:usb:v046dp4069:name:Logitech MX Master 2s:
 
 # Logitech MX Master 2S (via Bluetooth)
 # Horiz wheel has 14 stops, angle is rounded up
-mouse:bluetooth:v046dpb019:name:MX Master 2S Mouse:
+mouse:bluetooth:v046dpb019:name:MX Master 2S Mouse:*
  MOUSE_DPI=1000@2000
  MOUSE_WHEEL_CLICK_ANGLE=15
  MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL=26
@@ -473,176 +479,176 @@ mouse:bluetooth:v046dpb019:name:MX Master 2S Mouse:
  MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL=14
 
 # Logitech MX Ergo (via Bluetooth)
-mouse:bluetooth:v046dpb01d:name:MX Ergo Mouse:
+mouse:bluetooth:v046dpb01d:name:MX Ergo Mouse:*
  ID_INPUT_TRACKBALL=1
 
 ## Other ##
 
 # Logitech M-BJ58 Optical Mouse
-mouse:usb:v046dpc00e:name:Logitech USB-PS/2 Optical Mouse:
+mouse:usb:v046dpc00e:name:Logitech USB-PS/2 Optical Mouse:*
  MOUSE_DPI=400@125
 
 # Logitech Mini Optical Mouse
-mouse:usb:v046dpc016:name:Logitech Optical USB Mouse:
+mouse:usb:v046dpc016:name:Logitech Optical USB Mouse:*
  MOUSE_DPI=400@125
 
 # Logitech MX310 Optical Mouse
-mouse:usb:v046dpc01b:name:Logitech USB-PS/2 Optical Mouse:
+mouse:usb:v046dpc01b:name:Logitech USB-PS/2 Optical Mouse:*
  MOUSE_DPI=400@125
 
 # Logitech USB-PS/2 M-BT58
-mouse:usb:v046dpc03e:name:Logitech USB-PS/2 Optical Mouse:
+mouse:usb:v046dpc03e:name:Logitech USB-PS/2 Optical Mouse:*
  MOUSE_DPI=400@125
 
 # Logitech TrackMan Marble Wheel USB
-mouse:usb:v046dpc401:name:Logitech USB-PS/2 Trackball:
+mouse:usb:v046dpc401:name:Logitech USB-PS/2 Trackball:*
  MOUSE_DPI=400@125
 
 # Logitech Cordless MouseMan Optical M-RM63
-mouse:usb:v046dpc501:name:Logitech USB Receiver:
+mouse:usb:v046dpc501:name:Logitech USB Receiver:*
  MOUSE_DPI=800@63
 
 # Logitech USB-PS/2 M-BZ96C
-mouse:usb:v046dpc045:name:Logitech USB-PS/2 Optical Mouse:
+mouse:usb:v046dpc045:name:Logitech USB-PS/2 Optical Mouse:*
  MOUSE_DPI=600@125
 
 # Logitech MX400 Performance Laser Mouse
-mouse:usb:v046dpc043:name:Logitech USB-PS/2 Optical Mouse:
+mouse:usb:v046dpc043:name:Logitech USB-PS/2 Optical Mouse:*
  MOUSE_DPI=800@125
 
 # Logitech MX1000 Laser Cordless Mouse
-mouse:usb:v046dpc50e:name:Logitech USB RECEIVER:
+mouse:usb:v046dpc50e:name:Logitech USB RECEIVER:*
  MOUSE_DPI=800@125
 
 # Logitech Cordless Click! Plus
-mouse:usb:v046dpc50e:name:Logitech USB Receiver:
+mouse:usb:v046dpc50e:name:Logitech USB Receiver:*
  MOUSE_DPI=800@125
 
 # Logitech, Inc. RX 300 Optical Mouse
-mouse:usb:v046dpc040:name:Logitech USB-PS/2 Optical Mouse:
+mouse:usb:v046dpc040:name:Logitech USB-PS/2 Optical Mouse:*
  MOUSE_DPI=800@125
 
 # Logitech, Inc. RX 250 Optical Mouse
-mouse:usb:v046dpc050:name:Logitech USB-PS/2 Optical Mouse:
+mouse:usb:v046dpc050:name:Logitech USB-PS/2 Optical Mouse:*
  MOUSE_DPI=1000@142
 
 # Logitech B605 Wireless Mouse (also M505)
-mouse:usb:v046dp101d:name:Logitech B605:
-mouse:usb:v046dp101d:name:Logitech M505:
-mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:101d:
+mouse:usb:v046dp101d:name:Logitech B605:*
+mouse:usb:v046dp101d:name:Logitech M505:*
+mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:101d:*
  MOUSE_DPI=900@166
 
 # Logitech Cordless Desktop Wave Mouse
-mouse:usb:v046dpc517:name:Logitech USB Receiver:
+mouse:usb:v046dpc517:name:Logitech USB Receiver:*
  MOUSE_DPI=950@125
 
 # Logitech RX1000 Laser Mouse
-mouse:usb:v046dpc046:name:Logitech USB Optical Mouse:
+mouse:usb:v046dpc046:name:Logitech USB Optical Mouse:*
  MOUSE_DPI=1000@125
 
 # Logitech M100 Optical Mouse
-mouse:usb:v046dpc05a:name:Logitech USB Optical Mouse:
+mouse:usb:v046dpc05a:name:Logitech USB Optical Mouse:*
  MOUSE_DPI=1000@125
 
 # Logitech USB Laser Mouse M-U0011-O rebranded as "terra Laser"
-mouse:usb:v046dpc065:name:Logitech USB Laser Mouse:
+mouse:usb:v046dpc065:name:Logitech USB Laser Mouse:*
  MOUSE_DPI=1000@125
 
 # Logitech USB Laser Mouse M-U0007 [M500]
-mouse:usb:v046dpc069:name:Logitech USB Laser Mouse:
+mouse:usb:v046dpc069:name:Logitech USB Laser Mouse:*
  MOUSE_DPI=1000@125
 
 # Logitech V500 Cordless Notebook Mouse
-mouse:usb:v046dpc510:name:Logitech USB Receiver:
+mouse:usb:v046dpc510:name:Logitech USB Receiver:*
  MOUSE_DPI=1000@125
 
 # Logitech M560 Wireless Mouse
-mouse:usb:v046dp402d:name:Logitech M560:
-mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:402d:
+mouse:usb:v046dp402d:name:Logitech M560:*
+mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:402d:*
  MOUSE_DPI=1000@125
 
 # Logitech MK260 Wireless Combo Receiver aka M-R0011
-mouse:usb:v046dpc52e:name:Logitech USB Receiver:
+mouse:usb:v046dpc52e:name:Logitech USB Receiver:*
  MOUSE_DPI=1000@200
 
 # Logitech USB Laser Mouse M-UAS144 [LS1 Laser Mouse]
-mouse:usb:v046dpc062:name:Logitech USB Laser Mouse:
+mouse:usb:v046dpc062:name:Logitech USB Laser Mouse:*
  MOUSE_DPI=1200@125
 
 # Logitech T620 (or, the soap)
-mouse:usb:v046dp4027:name:Logitech T620:
-mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:4027:
+mouse:usb:v046dp4027:name:Logitech T620:*
+mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:4027:*
  MOUSE_DPI=1200@250
 
 # Logitech ZoneTouch Mouse T400
-mouse:usb:v046dp4026:name:Logitech T400:
-mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:4026:
+mouse:usb:v046dp4026:name:Logitech T400:*
+mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:4026:*
  MOUSE_DPI=1300@166
 
 # Logitech TrackMan Wheel (USB)
-mouse:usb:v046dpc404:name:Logitech Trackball:
+mouse:usb:v046dpc404:name:Logitech Trackball:*
  MOUSE_DPI=300@125
 
 # Logitech Ultrathin Touch Mouse
-mouse:bluetooth:v046dpb00d:name:Ultrathin Touch Mouse:
+mouse:bluetooth:v046dpb00d:name:Ultrathin Touch Mouse:*
  MOUSE_DPI=1000@1000
 
 # ImPS/2 Logitech Wheel Mouse
-mouse:ps2:*:name:ImPS/2 Logitech Wheel Mouse:
+mouse:ps2:*:name:ImPS/2 Logitech Wheel Mouse:*
  MOUSE_DPI=400@100
 
 # ImExPS/2 Logitech Wheel Mouse
-mouse:ps2:*:name:ImExPS/2 Logitech Wheel Mouse:
+mouse:ps2:*:name:ImExPS/2 Logitech Wheel Mouse:*
  MOUSE_DPI=400@250
 
 ##########################################
 # Microsoft
 ##########################################
 
-mouse:usb:v045ep0040:name:Microsoft Microsoft 3-Button Mouse with IntelliEye(TM):
+mouse:usb:v045ep0040:name:Microsoft Microsoft 3-Button Mouse with IntelliEye(TM):*
  MOUSE_DPI=400@125
 
 # Note: unsure that these work, it's likely that all devices on these
 # receivers show up with the same vid/pid/name
 
 # Microsoft Wireless Mouse 5000
-mouse:usb:v045ep0745:name:Microsoft Microsoft® 2.4GHz Transceiver v6.0:
+mouse:usb:v045ep0745:name:Microsoft Microsoft® 2.4GHz Transceiver v6.0:*
  MOUSE_DPI=800@142
 
 # Microsoft Comfort Mouse 4500
-mouse:usb:v045ep076c:name:Microsoft Microsoft® Comfort Mouse 4500:
+mouse:usb:v045ep076c:name:Microsoft Microsoft® Comfort Mouse 4500:*
  MOUSE_DPI=1000@125
 
 # Microsoft Wireless Mobile Mouse 4000
-mouse:usb:v045ep0745:name:Microsoft Microsoft® Nano Transceiver v2.0:
+mouse:usb:v045ep0745:name:Microsoft Microsoft® Nano Transceiver v2.0:*
  MOUSE_DPI=1000@142
 
 # Microsoft Sculpt Ergonomic Mouse
-mouse:usb:v045ep07a5:name:Microsoft Microsoft® 2.4GHz Transceiver v9.0:
+mouse:usb:v045ep07a5:name:Microsoft Microsoft® 2.4GHz Transceiver v9.0:*
  MOUSE_DPI=1000@142
 
 # Microsoft Arc Touch Mouse USB
-mouse:usb:v045ep07b1:name:Microsoft Microsoft® Nano Transceiver v1.0:
+mouse:usb:v045ep07b1:name:Microsoft Microsoft® Nano Transceiver v1.0:*
  MOUSE_DPI=1400@142
 
 # Microsoft  Wireless Laser Mouse 8000
-mouse:bluetooth:v045ep0702:name:Microsoft  Wireless Laser Mouse 8000:
+mouse:bluetooth:v045ep0702:name:Microsoft  Wireless Laser Mouse 8000:*
  MOUSE_DPI=1000@1000
 
 # Microsoft Sculpt Comfort Mouse
-mouse:bluetooth:v045ep07a2:name:Microsoft Sculpt Comfort Mouse:
+mouse:bluetooth:v045ep07a2:name:Microsoft Sculpt Comfort Mouse:*
  MOUSE_DPI=1000@2000
 
 # Microsoft Arc Touch Mouse SE:
-mouse:bluetooth:v045ep07f3:name:Arc Touch Mouse SE:
+mouse:bluetooth:v045ep07f3:name:Arc Touch Mouse SE:*
  MOUSE_DPI=1000@2000
 
 # Microsoft Surface Mouse
-mouse:bluetooth:v0000p0000:name:Surface Mouse:
+mouse:bluetooth:v0000p0000:name:Surface Mouse:*
  MOUSE_DPI=2000@2000
 
 # Microsoft Classic IntelliMouse
-mouse:usb:v045ep0823:name:Microsoft Microsoft?? Classic IntelliMouse??:
+mouse:usb:v045ep0823:name:Microsoft Microsoft?? Classic IntelliMouse??:*
  MOUSE_DPI=3200@1000
 
 ##########################################
@@ -650,7 +656,7 @@ mouse:usb:v045ep0823:name:Microsoft Microsoft?? Classic IntelliMouse??:
 ##########################################
 
 #Mionix Avior 7000
-mouse:usb:v22d4p1308:name:Laview Technology Mionix Avior 7000:
+mouse:usb:v22d4p1308:name:Laview Technology Mionix Avior 7000:*
  MOUSE_DPI=400@1000 *1600@1000 7000@1000
  MOUSE_WHEEL_CLICK_ANGLE=15
 
@@ -659,7 +665,7 @@ mouse:usb:v22d4p1308:name:Laview Technology Mionix Avior 7000:
 ##########################################
 
 # MODECOM MC-WM4 Wireless Optical Mouse
-mouse:usb:v0e8fp00a7:name:DaKai 2.4G RX:
+mouse:usb:v0e8fp00a7:name:DaKai 2.4G RX:*
  MOUSE_DPI=*800@126 1600@126
 
 ##########################################
@@ -667,7 +673,7 @@ mouse:usb:v0e8fp00a7:name:DaKai 2.4G RX:
 ##########################################
 
 # Oklick 406S Bluetooth Laser Mouse
-mouse:bluetooth:v056ep0061:name:Laser  BTmouse:
+mouse:bluetooth:v056ep0061:name:Laser  BTmouse:*
  MOUSE_DPI=*800@333 1600@333
 
 ##########################################
@@ -675,7 +681,7 @@ mouse:bluetooth:v056ep0061:name:Laser  BTmouse:
 ##########################################
 
 # P-Active Wireless Mouse PA-27K2
-mouse:usb:v0425p0101:name:G-Tech CHINA    USB Wireless Mouse & KeyBoard V1.01  :
+mouse:usb:v0425p0101:name:G-Tech CHINA    USB Wireless Mouse & KeyBoard V1.01  :*
  MOUSE_DPI=800@125
 
 ##########################################
@@ -683,11 +689,11 @@ mouse:usb:v0425p0101:name:G-Tech CHINA    USB Wireless Mouse & KeyBoard V1.01  :
 ##########################################
 
 # Razer Abyssus
-mouse:usb:v1532p0042:name:Razer Razer Abyssus:
+mouse:usb:v1532p0042:name:Razer Razer Abyssus:*
  MOUSE_DPI=1600@1000
 
 # Razer DeathAdder Black Edition
-mouse:usb:v1532p0029:name:Razer Razer DeathAdder:
+mouse:usb:v1532p0029:name:Razer Razer DeathAdder:*
  MOUSE_DPI=3500@1000
 
 ##########################################
@@ -695,7 +701,7 @@ mouse:usb:v1532p0029:name:Razer Razer DeathAdder:
 ##########################################
 
 # Roccat Lua (ROC-11-310)
-mouse:usb:v1e7dp2c2e:name:ROCCAT ROCCAT Lua:
+mouse:usb:v1e7dp2c2e:name:ROCCAT ROCCAT Lua:*
  MOUSE_DPI=250@125 500@125 1000@125 1250@125 1500@125 1750@125 2000@125 250@250 500@250 1000@250 1250@250 1500@250 1750@250 2000@250 250@500 500@500 1000@500 1250@500 1500@500 1750@500 2000@500 250@1000 500@1000 *1000@1000 1250@1000 1500@1000 1750@1000 2000@1000
  MOUSE_WHEEL_CLICK_ANGLE=15
 
@@ -704,7 +710,7 @@ mouse:usb:v1e7dp2c2e:name:ROCCAT ROCCAT Lua:
 ##########################################
 
 # Sharkoon Shark Force Gaming Mouse
-mouse:usb:v093ap2521:name:USB OPTICAL MOUSE:
+mouse:usb:v093ap2521:name:USB OPTICAL MOUSE:*
  MOUSE_DPI=*1000@125 1600@125 600@125
 
 ##########################################
@@ -712,7 +718,7 @@ mouse:usb:v093ap2521:name:USB OPTICAL MOUSE:
 ##########################################
 
 # SteelSeries Sensei Raw
-mouse:usb:v1038p1369:name:SteelSeries Sensei Raw Gaming Mouse:
+mouse:usb:v1038p1369:name:SteelSeries Sensei Raw Gaming Mouse:*
  MOUSE_DPI=1000@1022
 
 ##########################################
@@ -720,7 +726,7 @@ mouse:usb:v1038p1369:name:SteelSeries Sensei Raw Gaming Mouse:
 ##########################################
 
 # Trust illuminated mouse gxt 152
-mouse:usb:v145fp01ac:name:HID-compliant Mouse Trust Gaming Mouse:
+mouse:usb:v145fp01ac:name:HID-compliant Mouse Trust Gaming Mouse:*
  MOUSE_DPI=*800@528 1200@537 1600@536 2400@521
 
 ##########################################
@@ -742,7 +748,7 @@ mouse:usb:v3057p0001:*
  MOUSE_WHEEL_CLICK_ANGLE=23
 
 # Zowie ZA12
-mouse:usb:v1af3p0001:name:Kingsis Peripherals ZOWIE Gaming mouse:
+mouse:usb:v1af3p0001:name:Kingsis Peripherals ZOWIE Gaming mouse:*
  MOUSE_DPI=400@125 *800@125 1600@125 3200@125 400@500 800@500 1600@500 3200@500 400@1000 800@1000 1600@1000 3200@1000
  MOUSE_WHEEL_CLICK_COUNT=16
  MOUSE_WHEEL_CLICK_ANGLE=23
index c5c7dd9725747a8da92a7a937f07f21dfb6638a3..b427f21ea54cd21536e69825730c1faff3e7dc13 100644 (file)
@@ -22,7 +22,7 @@
 #    in /sys/class/input/eventX/device/id.
 #
 #  - Input driver device name and DMI data match:
-#      evdev:name:<input device name>:dmi:bvn*:bvr*:bd*:svn<vendor>:pn*
+#      evdev:name:<input device name>:dmi:bvn*:bvr*:bd*:svn<vendor>:pn*:*
 #    <input device name> is the name device specified by the driver,
 #    <vendor> is the firmware-provided string from the kernel DMI modalias,
 #    see /sys/class/dmi/id/modalias
@@ -76,7 +76,6 @@
 # drivers/input/mouse/trackpoint.c in the Linux kernel sources.
 #
 
-#
 # Sort by brand, model
 
 #########################################
 #########################################
 
 # Latitude D620
-evdev:name:*DualPoint Stick:dmi:bvn*:bvr*:bd*:svnDellInc.:pnLatitudeD620*:pvr*
+evdev:name:*DualPoint Stick:dmi:bvn*:bvr*:bd*:svnDellInc.:pnLatitudeD620*:*
  POINTINGSTICK_CONST_ACCEL=0.5
 
 # Latitude E5570
-evdev:name:*DualPoint Stick:dmi:bvn*:bvr*:bd*:svnDellInc.:pnLatitudeE5570*:pvr*
+evdev:name:*DualPoint Stick:dmi:bvn*:bvr*:bd*:svnDellInc.:pnLatitudeE5570*:*
  POINTINGSTICK_CONST_ACCEL=0.1
 
 # Latitude E6320
-evdev:name:*DualPoint Stick:dmi:bvn*:bvr*:bd*:svnDellInc.:pnLatitudeE6320*:pvr*
+evdev:name:*DualPoint Stick:dmi:bvn*:bvr*:bd*:svnDellInc.:pnLatitudeE6320*:*
  POINTINGSTICK_CONST_ACCEL=2.0
 
 # Latitude E6400
-evdev:name:*DualPoint Stick:dmi:bvn*:bvr*:bd*:svnDellInc.:pnLatitudeE6400*:pvr*
+evdev:name:*DualPoint Stick:dmi:bvn*:bvr*:bd*:svnDellInc.:pnLatitudeE6400*:*
  POINTINGSTICK_CONST_ACCEL=1.5
 
 # Latitude E7470
-evdev:name:*DualPoint Stick:dmi:bvn*:bvr*:bd*:svnDellInc.:pnLatitudeE7470*:pvr*
+evdev:name:*DualPoint Stick:dmi:bvn*:bvr*:bd*:svnDellInc.:pnLatitudeE7470*:*
  POINTINGSTICK_CONST_ACCEL=0.6
 
 #########################################
index dcc442f8e91545b5c011061b8d33a873be1b39e7..7c6f323384ca0ae88dfd1196822746289792c83c 100644 (file)
@@ -4499,12 +4499,6 @@ D8ED1C     (base 16)             Magna Technology SL
                                Madrid    28006\r
                                ES\r
 \r
-D8-31-34   (hex)               Roku, Inc\r
-D83134     (base 16)           Roku, Inc\r
-                               150 Winchester Circle\r
-                               Los Gatos  CA  95032\r
-                               US\r
-\r
 40-8B-F6   (hex)               Shenzhen TCL New Technology Co., Ltd\r
 408BF6     (base 16)           Shenzhen TCL New Technology Co., Ltd\r
                                TCL Building, #5 Central Nanhai Road, Nanshan District,\r
@@ -5249,12 +5243,6 @@ F4B7B3     (base 16)             vivo Mobile Communication Co., Ltd.
                                Wusha,Chang'An  DongGuan City,Guangdong,  523860\r
                                CN\r
 \r
-CC-03-D9   (hex)               Cisco Meraki\r
-CC03D9     (base 16)           Cisco Meraki\r
-                               500 Terry A. Francois Blvd\r
-                               San Francisco  null  94158\r
-                               US\r
-\r
 FC-A6-67   (hex)               Amazon Technologies Inc.\r
 FCA667     (base 16)           Amazon Technologies Inc.\r
                                P.O Box 8102\r
@@ -6203,18 +6191,6 @@ B47447     (base 16)             CoreOS
                                Dongguan    523808\r
                                CN\r
 \r
-0C-8D-DB   (hex)               Cisco Meraki\r
-0C8DDB     (base 16)           Cisco Meraki\r
-                               500 Terry A. Francois Blvd\r
-                               San Francisco  null  94158\r
-                               US\r
-\r
-B0-EE-7B   (hex)               Roku, Inc\r
-B0EE7B     (base 16)           Roku, Inc\r
-                               150 Winchester Circle\r
-                               Los Gatos  CA  95032\r
-                               US\r
-\r
 AC-58-7B   (hex)               JCT Healthcare\r
 AC587B     (base 16)           JCT Healthcare\r
                                1/25 London Road\r
@@ -8006,12 +7982,6 @@ FC55DC     (base 16)             Baltic Latvian Universal Electronics LLC
                                Beaverton  OR  97003\r
                                US\r
 \r
-00-25-50   (hex)               Riverbed Technology, Inc.\r
-002550     (base 16)           Riverbed Technology, Inc.\r
-                               125 Cambridge Park Drive\r
-                               Cambridge  MA  02140\r
-                               US\r
-\r
 D0-B2-C4   (hex)               Technicolor CH USA Inc.\r
 D0B2C4     (base 16)           Technicolor CH USA Inc.\r
                                5030 Sugarloaf Parkway Bldg 6\r
@@ -13430,12 +13400,6 @@ E817FC     (base 16)           Fujitsu Cloud Technologies Limited
                                Shenzhen  Guangdong  518172\r
                                CN\r
 \r
-68-78-48   (hex)               Westunitis Co., Ltd.\r
-687848     (base 16)           Westunitis Co., Ltd.\r
-                               North Building 7F, 3-1 Ofuka-cho, Kita-ku\r
-                               Osaka-city  Osaka-pref  5300011\r
-                               JP\r
-\r
 48-D0-CF   (hex)               Universal Electronics, Inc.\r
 48D0CF     (base 16)           Universal Electronics, Inc.\r
                                201 E. Sandpointe Ave\r
@@ -23219,12 +23183,6 @@ D4C766     (base 16)           Acentic GmbH
                                Irving  Texas  75063\r
                                US\r
 \r
-00-12-93   (hex)               GE Energy\r
-001293     (base 16)           GE Energy\r
-                               1501 Roanoke Blvd.\r
-                               Salem  VA  24153\r
-                               US\r
-\r
 00-12-94   (hex)               SUMITOMO ELECTRIC DEVICE INNOVATIONS, INC\r
 001294     (base 16)           SUMITOMO ELECTRIC DEVICE INNOVATIONS, INC\r
                                1000 Kamisukiawara,Showa-cho\r
@@ -32219,12 +32177,6 @@ F05136     (base 16)           TCT mobile ltd
                                Hui Zhou  Guang Dong  516006\r
                                CN\r
 \r
-10-59-32   (hex)               Roku, Inc\r
-105932     (base 16)           Roku, Inc\r
-                               150 Winchester Circle\r
-                               Los Gatos  CA  95032\r
-                               US\r
-\r
 20-74-54   (hex)               vivo Mobile Communication Co., Ltd.\r
 207454     (base 16)           vivo Mobile Communication Co., Ltd.\r
                                #283,BBK Road\r
@@ -34022,18 +33974,6 @@ DC774C     (base 16)           Cisco Systems, Inc
                                Gunpo-si  Gyeonggi-do  15880\r
                                KR\r
 \r
-FC-44-82   (hex)               Intel Corporate\r
-FC4482     (base 16)           Intel Corporate\r
-                               Lot 8, Jalan Hi-Tech 2/3 \r
-                               Kulim  Kedah  09000\r
-                               MY\r
-\r
-D8-F8-83   (hex)               Intel Corporate\r
-D8F883     (base 16)           Intel Corporate\r
-                               Lot 8, Jalan Hi-Tech 2/3 \r
-                               Kulim  Kedah  09000\r
-                               MY\r
-\r
 B8-5F-98   (hex)               Amazon Technologies Inc.\r
 B85F98     (base 16)           Amazon Technologies Inc.\r
                                P.O Box 8102\r
@@ -34244,12 +34184,6 @@ F0F7E7     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD
                                Dongguan    523808\r
                                CN\r
 \r
-E8-84-A5   (hex)               Intel Corporate\r
-E884A5     (base 16)           Intel Corporate\r
-                               Lot 8, Jalan Hi-Tech 2/3 \r
-                               Kulim  Kedah  09000\r
-                               MY\r
-\r
 8C-55-BB   (hex)               Songwoo Information & Technology Co., Ltd\r
 8C55BB     (base 16)           Songwoo Information & Technology Co., Ltd\r
                                24-9, Jinju-daero 404beon-gil, Jinju-si, Gyeongsangnam-do, Korea \r
@@ -34529,12 +34463,6 @@ B456E3     (base 16)           Apple, Inc.
                                Cupertino  CA  95014\r
                                US\r
 \r
-EC-0D-E4   (hex)               Amazon Technologies Inc.\r
-EC0DE4     (base 16)           Amazon Technologies Inc.\r
-                               P.O Box 8102\r
-                               Reno  NV  89507\r
-                               US\r
-\r
 BC-0F-9A   (hex)               D-Link International\r
 BC0F9A     (base 16)           D-Link International\r
                                1 Internal Business Park, #03-12,The Synergy\r
@@ -34589,24 +34517,6 @@ E81E92     (base 16)           Huawei Device Co., Ltd.
                                Hong Kong    999077\r
                                CN\r
 \r
-8C-AE-49   (hex)               IEEE Registration Authority\r
-8CAE49     (base 16)           IEEE Registration Authority\r
-                               445 Hoes Lane\r
-                               Piscataway  NJ  08554\r
-                               US\r
-\r
-74-95-EC   (hex)               ALPSALPINE CO,.LTD\r
-7495EC     (base 16)           ALPSALPINE CO,.LTD\r
-                               6-1\r
-                               Kakuda  Miyagi-Pref  981-1595\r
-                               JP\r
-\r
-00-21-4F   (hex)               ALPSALPINE CO,.LTD\r
-00214F     (base 16)           ALPSALPINE CO,.LTD\r
-                               1-2-1, Okinouchi,\r
-                               Soma-city,  Fukushima-pref.,  976-8501\r
-                               JP\r
-\r
 04-98-F3   (hex)               ALPSALPINE CO,.LTD\r
 0498F3     (base 16)           ALPSALPINE CO,.LTD\r
                                6-1 NISHIDA\r
@@ -34643,12 +34553,498 @@ E81E92     (base 16)         Huawei Device Co., Ltd.
                                Osaki  Miyagi-pref  989-6181\r
                                JP\r
 \r
+88-23-8C   (hex)               Fiberhome Telecommunication Technologies Co.,LTD\r
+88238C     (base 16)           Fiberhome Telecommunication Technologies Co.,LTD\r
+                               No.5 DongXin Road\r
+                               Wuhan  Hubei  430074\r
+                               CN\r
+\r
+20-FF-36   (hex)               IFLYTEK CO.,LTD.\r
+20FF36     (base 16)           IFLYTEK CO.,LTD.\r
+                               National Intelligent Speech High-tech Industrialization Base, No. 666, Wangjiang Road West,\r
+                               Hefei  An hui  230088\r
+                               CN\r
+\r
 BC-42-8C   (hex)               ALPSALPINE CO,.LTD\r
 BC428C     (base 16)           ALPSALPINE CO,.LTD\r
                                nishida  6-1 \r
                                Kakuda-City  Miyagi-Pref  981-1595\r
                                JP\r
 \r
+74-95-EC   (hex)               ALPSALPINE CO,.LTD\r
+7495EC     (base 16)           ALPSALPINE CO,.LTD\r
+                               6-1\r
+                               Kakuda  Miyagi-Pref  981-1595\r
+                               JP\r
+\r
+98-ED-7E   (hex)               eero inc.\r
+98ED7E     (base 16)           eero inc.\r
+                               660 3rd Street\r
+                               San Francisco  CA  94107\r
+                               US\r
+\r
+8C-AE-49   (hex)               IEEE Registration Authority\r
+8CAE49     (base 16)           IEEE Registration Authority\r
+                               445 Hoes Lane\r
+                               Piscataway  NJ  08554\r
+                               US\r
+\r
+00-21-4F   (hex)               ALPSALPINE CO,.LTD\r
+00214F     (base 16)           ALPSALPINE CO,.LTD\r
+                               1-2-1, Okinouchi,\r
+                               Soma-city,  Fukushima-pref.,  976-8501\r
+                               JP\r
+\r
+78-CF-2F   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+78CF2F     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+A8-3B-5C   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+A83B5C     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+B0-EE-7B   (hex)               Roku, Inc\r
+B0EE7B     (base 16)           Roku, Inc\r
+                               1155 Coleman Ave\r
+                               San Jose  CA  95110\r
+                               US\r
+\r
+D8-31-34   (hex)               Roku, Inc\r
+D83134     (base 16)           Roku, Inc\r
+                               1155 Coleman Ave\r
+                               San Jose  CA  95110\r
+                               US\r
+\r
+64-05-E4   (hex)               ALPSALPINE CO .,LTD\r
+6405E4     (base 16)           ALPSALPINE CO .,LTD\r
+                               nishida 6-1\r
+                               kakuda-City  Miyagi-Pref  981-1595\r
+                               JP\r
+\r
+10-59-32   (hex)               Roku, Inc\r
+105932     (base 16)           Roku, Inc\r
+                               1155 Coleman Ave\r
+                               San Jose  CA  95110\r
+                               US\r
+\r
+A8-CC-6F   (hex)               HMD Global Oy\r
+A8CC6F     (base 16)           HMD Global Oy\r
+                               Bertel Jungin aukio 9\r
+                               Espoo    02600\r
+                               FI\r
+\r
+5C-6F-69   (hex)               Broadcom Limited\r
+5C6F69     (base 16)           Broadcom Limited\r
+                               15191 Alton Parkway\r
+                               Irvine  CA  92618\r
+                               US\r
+\r
+D0-12-CB   (hex)               AVM Audiovisuelles Marketing und Computersysteme GmbH\r
+D012CB     (base 16)           AVM Audiovisuelles Marketing und Computersysteme GmbH\r
+                               Alt-Moabit 95\r
+                               Berlin  Berlin  10559\r
+                               DE\r
+\r
+FC-44-82   (hex)               Intel Corporate\r
+FC4482     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+D8-F8-83   (hex)               Intel Corporate\r
+D8F883     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+E8-84-A5   (hex)               Intel Corporate\r
+E884A5     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+E8-F4-08   (hex)               Intel Corporate\r
+E8F408     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+74-8B-29   (hex)               Micobiomed\r
+748B29     (base 16)           Micobiomed\r
+                               54 Changeop-ro\r
+                               54 Changeop-ro  Gyeonggi-do  13449\r
+                               KR\r
+\r
+00-25-50   (hex)               Riverbed Technology, Inc.\r
+002550     (base 16)           Riverbed Technology, Inc.\r
+                               680 Folsom St\r
+                               San Francisco  CA  94107\r
+                               US\r
+\r
+58-B0-FE   (hex)               Team EPS GmbH\r
+58B0FE     (base 16)           Team EPS GmbH\r
+                               Am Herdicksbach 2 - Halle 9\r
+                               Waltrop    45731\r
+                               DE\r
+\r
+14-3F-A6   (hex)               Sony Home Entertainment&Sound Products Inc\r
+143FA6     (base 16)           Sony Home Entertainment&Sound Products Inc\r
+                               Sony City Osaki 2-10-1 Osaki Shinagawa-ku\r
+                               Tokyo  Japan  141-8610\r
+                               JP\r
+\r
+F0-FE-E7   (hex)               Huawei Device Co., Ltd.\r
+F0FEE7     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+54-21-1D   (hex)               Huawei Device Co., Ltd.\r
+54211D     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+04-49-5D   (hex)               Huawei Device Co., Ltd.\r
+04495D     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+44-D4-53   (hex)               Sagemcom Broadband SAS\r
+44D453     (base 16)           Sagemcom Broadband SAS\r
+                               250, route de l'Empereur\r
+                               Rueil Malmaison Cedex  hauts de seine  92848\r
+                               FR\r
+\r
+DC-A1-20   (hex)               Nokia\r
+DCA120     (base 16)           Nokia\r
+                               600 March Road\r
+                               Kanata  Ontario  K2K 2E6\r
+                               CA\r
+\r
+50-52-3B   (hex)               Nokia\r
+50523B     (base 16)           Nokia\r
+                               600 March Road\r
+                               Kanata  Ontario  K2K 2E6\r
+                               CA\r
+\r
+DC-CD-74   (hex)               Japan E.M.Solutions Co., Ltd.\r
+DCCD74     (base 16)           Japan E.M.Solutions Co., Ltd.\r
+                               35 Saho\r
+                               Kato    673-1447\r
+                               JP\r
+\r
+00-12-93   (hex)               ABB Power Protection (CH)\r
+001293     (base 16)           ABB Power Protection (CH)\r
+                               1501 Roanoke Blvd.\r
+                               Salem  VA  24153\r
+                               US\r
+\r
+A0-3B-01   (hex)               Kyung In Electronics\r
+A03B01     (base 16)           Kyung In Electronics\r
+                               #1411, Byucksan Digital Valley 2, 184, Gasan Digital2-ro, Geumcheon-gu\r
+                                Seoul    08501\r
+                               KR\r
+\r
+18-18-8B   (hex)               FUJITSU CONNECTED TECHNOLOGIES LIMITED\r
+18188B     (base 16)           FUJITSU CONNECTED TECHNOLOGIES LIMITED\r
+                               Sanki Yamato Building, 7-10-1 Chuorinkan\r
+                               Yamato  Kanagawa  242-8588\r
+                               JP\r
+\r
+14-5E-69   (hex)               GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD\r
+145E69     (base 16)           GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD\r
+                               NO.18 HAIBIN ROAD,\r
+                               DONG GUAN  GUANG DONG  523860\r
+                               CN\r
+\r
+48-4C-29   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+484C29     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+C4-D4-38   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+C4D438     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+C0-28-0B   (hex)               Honor Device Co., Ltd.\r
+C0280B     (base 16)           Honor Device Co., Ltd.\r
+                               A1701, Block AB, Building 1, Tianan Yungu Phase I, Gangtou Community, Bantian Street\r
+                               Shenzhen  Guangdong  518129\r
+                               CN\r
+\r
+9C-EA-97   (hex)               Honor Device Co., Ltd.\r
+9CEA97     (base 16)           Honor Device Co., Ltd.\r
+                               A1701, Block AB, Building 1, Tianan Yungu Phase I, Gangtou Community, Bantian Street\r
+                               Shenzhen  Guangdong  518129\r
+                               CN\r
+\r
+EC-0D-E4   (hex)               Amazon Technologies Inc.\r
+EC0DE4     (base 16)           Amazon Technologies Inc.\r
+                               P.O Box 8102 \r
+                               Reno  NV  89507\r
+                               US\r
+\r
+0C-96-CD   (hex)               MERCURY CORPORATION\r
+0C96CD     (base 16)           MERCURY CORPORATION\r
+                               90, Gajaeul-ro, Seo-gu\r
+                               INCHEON    22830\r
+                               KR\r
+\r
+E8-D2-FF   (hex)               Sagemcom Broadband SAS\r
+E8D2FF     (base 16)           Sagemcom Broadband SAS\r
+                               250, route de l'Empereur\r
+                               Rueil Malmaison Cedex  hauts de seine  92848\r
+                               FR\r
+\r
+C4-E2-87   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+C4E287     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+F4-B3-01   (hex)               Intel Corporate\r
+F4B301     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+5C-DE-34   (hex)               SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD.\r
+5CDE34     (base 16)           SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD.\r
+                               3/F, Building R1-B, High-Tech Industrial Park, Nanshan District\r
+                               Shenzhen  Guangdong  518057\r
+                               CN\r
+\r
+E8-A0-CD   (hex)               Nintendo Co.,Ltd\r
+E8A0CD     (base 16)           Nintendo Co.,Ltd\r
+                               11-1 HOKOTATE-CHO KAMITOBA,MINAMI-KU\r
+                               KYOTO  KYOTO  601-8501\r
+                               JP\r
+\r
+A0-A3-F0   (hex)               D-Link International\r
+A0A3F0     (base 16)           D-Link International\r
+                               1 Internal Business Park, #03-12,The Synergy\r
+                               Singapore   Singapore  609917\r
+                               SG\r
+\r
+84-65-69   (hex)               New H3C Technologies Co., Ltd\r
+846569     (base 16)           New H3C Technologies Co., Ltd\r
+                               466 Changhe Road, Binjiang District\r
+                               Hangzhou  Zhejiang  310052\r
+                               CN\r
+\r
+34-F7-16   (hex)               TP-LINK TECHNOLOGIES CO.,LTD.\r
+34F716     (base 16)           TP-LINK TECHNOLOGIES CO.,LTD.\r
+                               Building 24(floors 1,3,4,5)and 28(floors 1-4)Central Science and Technology Park,Shennan Road,Nanshan\r
+                               Shenzhen  Guangdong  518057\r
+                               CN\r
+\r
+9C-82-3F   (hex)               Huawei Device Co., Ltd.\r
+9C823F     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+54-F6-07   (hex)               Huawei Device Co., Ltd.\r
+54F607     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+68-78-48   (hex)               WESTUNITIS CO., LTD.\r
+687848     (base 16)           WESTUNITIS CO., LTD.\r
+                               29F Grand Front Osaka Tower-A, 4-20, Ofukacho,\r
+                               Osaka  Kita-ku  530-0011\r
+                               JP\r
+\r
+08-FF-24   (hex)               Shenzhen Skyworth  Digital  Technology  CO., Ltd\r
+08FF24     (base 16)           Shenzhen Skyworth  Digital  Technology  CO., Ltd\r
+                               4F,Block A, Skyworth?Building,\r
+                               Shenzhen  Guangdong  518057\r
+                               CN\r
+\r
+50-55-8D   (hex)               China Mobile IOT Company Limited\r
+50558D     (base 16)           China Mobile IOT Company Limited\r
+                               NO.8 Yu Ma Road, NanAn Area\r
+                               Chongqing  Chongqing  401336\r
+                               CN\r
+\r
+64-26-56   (hex)               Shenzhen Fanweitai Technology Service Co.,Ltd\r
+642656     (base 16)           Shenzhen Fanweitai Technology Service Co.,Ltd\r
+                               Room 408, 4 / F, Jinqi Zhigu Building, 1 Tangling Road, Nanshan District, Shenzhen\r
+                                Shenzhen    518000\r
+                               CN\r
+\r
+E0-6C-4E   (hex)               Shenzhen TINNO Mobile Technology Corp.\r
+E06C4E     (base 16)           Shenzhen TINNO Mobile Technology Corp.\r
+                               4/F, H-3 Building, Qiao Cheng Eastern Industrial Park, Overseas Chinese Town, Shenzhen \r
+                               Shenzhen   guangdong  518053\r
+                               CN\r
+\r
+F0-25-8E   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+F0258E     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+9C-74-6F   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+9C746F     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+64-E0-03   (hex)               Hui Zhou Gaoshengda Technology Co.,LTD\r
+64E003     (base 16)           Hui Zhou Gaoshengda Technology Co.,LTD\r
+                               No.75,Zhongkai High-Tech Development District,Huizhou\r
+                               Hui Zhou  Guangdong  516006\r
+                               CN\r
+\r
+18-CE-94   (hex)               Samsung Electronics Co.,Ltd\r
+18CE94     (base 16)           Samsung Electronics Co.,Ltd\r
+                               #94-1, Imsoo-Dong\r
+                               Gumi  Gyeongbuk  730-350\r
+                               KR\r
+\r
+78-37-16   (hex)               Samsung Electronics Co.,Ltd\r
+783716     (base 16)           Samsung Electronics Co.,Ltd\r
+                               #94-1, Imsoo-Dong\r
+                               Gumi  Gyeongbuk  730-350\r
+                               KR\r
+\r
+28-1B-04   (hex)               Zalliant LLC\r
+281B04     (base 16)           Zalliant LLC\r
+                               425 Truax Road\r
+                               Amsterdam  NY  12010\r
+                               US\r
+\r
+7C-50-79   (hex)               Intel Corporate\r
+7C5079     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+80-38-FB   (hex)               Intel Corporate\r
+8038FB     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+08-B4-B1   (hex)               Google, Inc.\r
+08B4B1     (base 16)           Google, Inc.\r
+                               1600 Amphitheatre Parkway\r
+                               Mountain View  CA  94043\r
+                               US\r
+\r
+34-58-7C   (hex)               MIRAE INFORMATION TECHNOLOGY CO., LTD.\r
+34587C     (base 16)           MIRAE INFORMATION TECHNOLOGY CO., LTD.\r
+                               GYEONGGI-DO\r
+                               SEONGNAM-SI  JUNGWON-GU  13376\r
+                               KR\r
+\r
+AC-82-47   (hex)               Intel Corporate\r
+AC8247     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+74-9A-C0   (hex)               Cachengo, Inc.\r
+749AC0     (base 16)           Cachengo, Inc.\r
+                               9575 Hwy 22\r
+                               Huntingdon  TN  38344\r
+                               US\r
+\r
+0C-51-D0   (hex)               Altice Labs S.A.\r
+0C51D0     (base 16)           Altice Labs S.A.\r
+                               NIF 504705610, Rua Eng. José Ferreira Pinto Basto\r
+                               Aveiro    3810-106\r
+                               PT\r
+\r
+A4-5E-5A   (hex)               ACTIVIO Inc.\r
+A45E5A     (base 16)           ACTIVIO Inc.\r
+                               Takeuchi Lorie Bldg. Room 503, 1-34-12, Takadanobaba\r
+                               Shinjuku-ku  Tokyo  1690075\r
+                               JP\r
+\r
+5C-56-A4   (hex)               Wanan Hongsheng Electronic Co.Ltd\r
+5C56A4     (base 16)           Wanan Hongsheng Electronic Co.Ltd\r
+                               1st section of industrial pack,Wan'An County,Ji'An City,jiangxi province\r
+                               Wanan  China/jiangxi  343800\r
+                               CN\r
+\r
+B4-85-E1   (hex)               Apple, Inc.\r
+B485E1     (base 16)           Apple, Inc.\r
+                               1 Infinite Loop\r
+                               Cupertino  CA  95014\r
+                               US\r
+\r
+0C-19-F8   (hex)               Apple, Inc.\r
+0C19F8     (base 16)           Apple, Inc.\r
+                               1 Infinite Loop\r
+                               Cupertino  CA  95014\r
+                               US\r
+\r
+50-1F-C6   (hex)               Apple, Inc.\r
+501FC6     (base 16)           Apple, Inc.\r
+                               1 Infinite Loop\r
+                               Cupertino  CA  95014\r
+                               US\r
+\r
+3C-9B-C6   (hex)               Huawei Device Co., Ltd.\r
+3C9BC6     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+54-09-10   (hex)               Apple, Inc.\r
+540910     (base 16)           Apple, Inc.\r
+                               1 Infinite Loop\r
+                               Cupertino  CA  95014\r
+                               US\r
+\r
+9C-FC-28   (hex)               Apple, Inc.\r
+9CFC28     (base 16)           Apple, Inc.\r
+                               1 Infinite Loop\r
+                               Cupertino  CA  95014\r
+                               US\r
+\r
+CC-69-FA   (hex)               Apple, Inc.\r
+CC69FA     (base 16)           Apple, Inc.\r
+                               1 Infinite Loop\r
+                               Cupertino  CA  95014\r
+                               US\r
+\r
+10-CE-E9   (hex)               Apple, Inc.\r
+10CEE9     (base 16)           Apple, Inc.\r
+                               1 Infinite Loop\r
+                               Cupertino  CA  95014\r
+                               US\r
+\r
+0C-8D-DB   (hex)               Cisco Meraki\r
+0C8DDB     (base 16)           Cisco Meraki\r
+                               500 Terry A. Francois Blvd\r
+                               San Francisco    94158\r
+                               US\r
+\r
+CC-03-D9   (hex)               Cisco Meraki\r
+CC03D9     (base 16)           Cisco Meraki\r
+                               500 Terry A. Francois Blvd\r
+                               San Francisco    94158\r
+                               US\r
+\r
+00-36-BE   (hex)               Northwest Towers\r
+0036BE     (base 16)           Northwest Towers\r
+                               12119 NE 99th St, Suite 2000\r
+                               Vancouver  WA  98682\r
+                               US\r
+\r
 9C-FF-C2   (hex)               AVI Systems GmbH\r
 9CFFC2     (base 16)           AVI Systems GmbH\r
                                Dr. Franz Wilhelmstraße 2A\r
@@ -35720,12 +36116,6 @@ AC2DA9     (base 16)           TECNO MOBILE LIMITED
                                Hong Kong  Hong Kong  999077\r
                                HK\r
 \r
-FC-B6-62   (hex)               IC Holdings LLC\r
-FCB662     (base 16)           IC Holdings LLC\r
-                               9066 S 300 W\r
-                               Sandy  UT  84070\r
-                               US\r
-\r
 48-04-9F   (hex)               ELECOM CO., LTD\r
 48049F     (base 16)           ELECOM CO., LTD\r
                                9FLand Axis Tower.1-1 fushimi machi,4-chome chuoku\r
@@ -35744,12 +36134,6 @@ C85261     (base 16)           ARRIS Group, Inc.
                                San Diego  CA  92121\r
                                US\r
 \r
-C0-41-21   (hex)               Nokia\r
-C04121     (base 16)           Nokia\r
-                               Karaportti 3\r
-                               Espoo  Finland  02610\r
-                               FI\r
-\r
 74-88-BB   (hex)               Cisco Systems, Inc\r
 7488BB     (base 16)           Cisco Systems, Inc\r
                                80 West Tasman Drive\r
@@ -35810,12 +36194,6 @@ F46F4E     (base 16)           Echowell
                                New Taipei City    24872\r
                                TW\r
 \r
-2C-3F-0B   (hex)               Cisco Meraki\r
-2C3F0B     (base 16)           Cisco Meraki\r
-                               500 Terry A. Francois Blvd\r
-                               San Francisco  null  94158\r
-                               US\r
-\r
 5C-88-16   (hex)               Rockwell Automation\r
 5C8816     (base 16)           Rockwell Automation\r
                                1 Allen-Bradley Dr.\r
@@ -36719,12 +37097,6 @@ A4ED43     (base 16)           IEEE Registration Authority
                                San Jose  CA  94568\r
                                US\r
 \r
-0C-7C-28   (hex)               Nokia\r
-0C7C28     (base 16)           Nokia\r
-                               Karaportti 3\r
-                               Espoo  Finland  02610\r
-                               FI\r
-\r
 68-43-D7   (hex)               Agilecom Photonics Solutions Guangdong Limited\r
 6843D7     (base 16)           Agilecom Photonics Solutions Guangdong Limited\r
                                No.1-6, Shenwan Industrial Park, Shenwan Town\r
@@ -38261,12 +38633,6 @@ D896E0     (base 16)           Alibaba Cloud Computing Ltd.
                                Dallas  TX  75243\r
                                US\r
 \r
-20-78-52   (hex)               Nokia\r
-207852     (base 16)           Nokia\r
-                               Karaportti 3\r
-                               Espoo  Finland  02610\r
-                               FI\r
-\r
 C8-DE-C9   (hex)               Coriant\r
 C8DEC9     (base 16)           Coriant\r
                                1415 W. Diehl Rd\r
@@ -39869,12 +40235,6 @@ E4E4AB     (base 16)           Apple, Inc.
                                Logrono  La Rioja  26001\r
                                ES\r
 \r
-54-FA-96   (hex)               Nokia\r
-54FA96     (base 16)           Nokia\r
-                               Karaportti 3\r
-                               Espoo  Finland  02610\r
-                               FI\r
-\r
 60-33-4B   (hex)               Apple, Inc.\r
 60334B     (base 16)           Apple, Inc.\r
                                1 Infinite Loop\r
@@ -41651,12 +42011,6 @@ ECD68A     (base 16)           Shenzhen JMicron Intelligent Technology Developmen
                                Weifang  Shandong  261061\r
                                CN\r
 \r
-6C-98-EB   (hex)               Riverbed Technology, Inc.\r
-6C98EB     (base 16)           Riverbed Technology, Inc.\r
-                                680 Folsom St.\r
-                               San Francisco  CA  94107\r
-                               US\r
-\r
 00-9E-1E   (hex)               Cisco Systems, Inc\r
 009E1E     (base 16)           Cisco Systems, Inc\r
                                80 West Tasman Drive\r
@@ -53687,12 +54041,6 @@ D4AAFF     (base 16)           MICRO WORLD
                                Daejeon    305-510\r
                                KR\r
 \r
-00-1F-F5   (hex)               Kongsberg Defence & Aerospace\r
-001FF5     (base 16)           Kongsberg Defence & Aerospace\r
-                               Olav Brunborgs vei 6\r
-                               Billingstad    1396\r
-                               NO\r
-\r
 00-1F-F2   (hex)               VIA Technologies, Inc.\r
 001FF2     (base 16)           VIA Technologies, Inc.\r
                                1F, 531, Chung-Cheng Road\r
@@ -56351,12 +56699,6 @@ D4AAFF     (base 16)           MICRO WORLD
                                SE-331 02  Värnamo    SE-331 02\r
                                SE\r
 \r
-00-15-E7   (hex)               Quantec Tontechnik\r
-0015E7     (base 16)           Quantec Tontechnik\r
-                               Mittenwalderstr.63\r
-                               München    D-81377\r
-                               DE\r
-\r
 00-15-D3   (hex)               Pantech&Curitel Communications, Inc.\r
 0015D3     (base 16)           Pantech&Curitel Communications, Inc.\r
                                1451-34, Seocho-dong, Seocho-Gu\r
@@ -57707,12 +58049,6 @@ D4AAFF     (base 16)           MICRO WORLD
                                Dresden  Sachsen  01097\r
                                DE\r
 \r
-00-0F-A0   (hex)               CANON KOREA BUSINESS SOLUTIONS INC.\r
-000FA0     (base 16)           CANON KOREA BUSINESS SOLUTIONS INC.\r
-                               736 Wonsi-Dong\r
-                               Ansan-si  Kyunggi-do  425-090\r
-                               KR\r
-\r
 00-0F-9A   (hex)               Synchrony, Inc.\r
 000F9A     (base 16)           Synchrony, Inc.\r
                                6410 Commonwealth Drive\r
@@ -67829,12 +68165,6 @@ A83512     (base 16)           Huawei Device Co., Ltd.
                                Dongguan  Guangdong  523808\r
                                CN\r
 \r
-D4-A6-51   (hex)               HANGZHOU AIXIANGJI TECHNOLOGY CO., LTD\r
-D4A651     (base 16)           HANGZHOU AIXIANGJI TECHNOLOGY CO., LTD\r
-                               34/F.,ICBC Tower,3 Garden Road, Central, Hong Kong.\r
-                               Hong Kong  Central Garden Road  510031\r
-                               CN\r
-\r
 90-F6-44   (hex)               Huawei Device Co., Ltd.\r
 90F644     (base 16)           Huawei Device Co., Ltd.\r
                                No.2 of Xincheng Road, Songshan Lake Zone\r
@@ -68015,12 +68345,6 @@ C8E600     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD
                                Dongguan    523808\r
                                CN\r
 \r
-FC-B3-BC   (hex)               Intel Corporate\r
-FCB3BC     (base 16)           Intel Corporate\r
-                               Lot 8, Jalan Hi-Tech 2/3 \r
-                               Kulim  Kedah  09000\r
-                               MY\r
-\r
 30-57-8E   (hex)               eero inc.\r
 30578E     (base 16)           eero inc.\r
                                660 3rd Street\r
@@ -68213,12 +68537,6 @@ C4278C     (base 16)           Huawei Device Co., Ltd.
                                São José  Santa Catarina  88104800\r
                                BR\r
 \r
-18-CC-18   (hex)               Intel Corporate\r
-18CC18     (base 16)           Intel Corporate\r
-                               Lot 8, Jalan Hi-Tech 2/3 \r
-                               Kulim  Kedah  09000\r
-                               MY\r
-\r
 7C-73-EB   (hex)               Huawei Device Co., Ltd.\r
 7C73EB     (base 16)           Huawei Device Co., Ltd.\r
                                No.2 of Xincheng Road, Songshan Lake Zone\r
@@ -68231,18 +68549,6 @@ E48F1D     (base 16)           Huawei Device Co., Ltd.
                                Dongguan  Guangdong  523808\r
                                CN\r
 \r
-84-E3-42   (hex)               Tuya?HK?Limietd\r
-84E342     (base 16)           Tuya?HK?Limietd\r
-                               FLAT/RM 806 BLK ? 8/F CHEUNG SHA WAN PLAZA 833 CHEUNG SHA WAN ROAD KL\r
-                               hongkong  Hong Kong  999077\r
-                               CN\r
-\r
-C0-3C-59   (hex)               Intel Corporate\r
-C03C59     (base 16)           Intel Corporate\r
-                               Lot 8, Jalan Hi-Tech 2/3 \r
-                               Kulim  Kedah  09000\r
-                               MY\r
-\r
 FC-CD-2F   (hex)               IEEE Registration Authority\r
 FCCD2F     (base 16)           IEEE Registration Authority\r
                                445 Hoes Lane\r
@@ -68429,12 +68735,6 @@ C4DE7B     (base 16)           Huawei Device Co., Ltd.
                                Dongguan  Guangdong  523808\r
                                CN\r
 \r
-84-1B-77   (hex)               Intel Corporate\r
-841B77     (base 16)           Intel Corporate\r
-                               Lot 8, Jalan Hi-Tech 2/3 \r
-                               Kulim  Kedah  09000\r
-                               MY\r
-\r
 7C-C2-94   (hex)               Beijing Xiaomi Mobile Software Co., Ltd\r
 7CC294     (base 16)           Beijing Xiaomi Mobile Software Co., Ltd\r
                                The Rainbow City Office Building, 68 Qinghe Middle Street Haidian District\r
@@ -68633,12 +68933,6 @@ DC9BD6     (base 16)           TCT mobile ltd
                                Hui Zhou  Guang Dong  516006\r
                                CN\r
 \r
-74-EC-B2   (hex)               Amazon Technologies Inc.\r
-74ECB2     (base 16)           Amazon Technologies Inc.\r
-                               P.O Box 8102\r
-                               Reno  NV  89507\r
-                               US\r
-\r
 70-40-FF   (hex)               Huawei Device Co., Ltd.\r
 7040FF     (base 16)           Huawei Device Co., Ltd.\r
                                No.2 of Xincheng Road, Songshan Lake Zone\r
@@ -68687,10 +68981,16 @@ E01FED     (base 16)          Nokia Shanghai Bell Co., Ltd.
                                Hsinchu, Taiwan, R.O.C.    TW 300\r
                                TW\r
 \r
-00-26-43   (hex)               ALPSALPINE CO,.LTD\r
-002643     (base 16)           ALPSALPINE CO,.LTD\r
-                               1-2-1, Okinouchi,\r
-                               Soma-city,  Fukushima-pref.,  976-8501\r
+68-76-27   (hex)               Zhuhai Dingzhi Electronic Technology Co., Ltd\r
+687627     (base 16)           Zhuhai Dingzhi Electronic Technology Co., Ltd\r
+                               6th floor, No.2 Jinliang Road, Hongqi Town, Jinwan District\r
+                               Zhuhai  GuangDong  519000\r
+                               CN\r
+\r
+20-0B-CF   (hex)               Nintendo Co.,Ltd\r
+200BCF     (base 16)           Nintendo Co.,Ltd\r
+                               11-1 HOKOTATE-CHO KAMITOBA,MINAMI-KU\r
+                               KYOTO  KYOTO  601-8501\r
                                JP\r
 \r
 38-C0-96   (hex)               ALPSALPINE CO,.LTD\r
@@ -68711,6 +69011,444 @@ AC7A4D     (base 16)          ALPSALPINE CO,.LTD
                                Osaki  Miyagi-pref  989-6181\r
                                JP\r
 \r
+24-E4-C8   (hex)               Fiberhome Telecommunication Technologies Co.,LTD\r
+24E4C8     (base 16)           Fiberhome Telecommunication Technologies Co.,LTD\r
+                               No.5 DongXin Road\r
+                               Wuhan  Hubei  430074\r
+                               CN\r
+\r
+94-8E-D3   (hex)               Arista Networks\r
+948ED3     (base 16)           Arista Networks\r
+                               5453 Great America Parkway\r
+                               Santa Clara  CA  95054\r
+                               US\r
+\r
+00-26-43   (hex)               ALPSALPINE CO,.LTD\r
+002643     (base 16)           ALPSALPINE CO,.LTD\r
+                               1-2-1, Okinouchi,\r
+                               Soma-city,  Fukushima-pref.,  976-8501\r
+                               JP\r
+\r
+C0-F6-EC   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+C0F6EC     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+CC-20-8C   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+CC208C     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+88-5A-85   (hex)               Wistron Neweb Corporation\r
+885A85     (base 16)           Wistron Neweb Corporation\r
+                               No.20,Park Avenue II,Hsinchu Science Park\r
+                               Hsin-Chu  R.O.C.  308\r
+                               TW\r
+\r
+D8-00-93   (hex)               Aurender Inc.\r
+D80093     (base 16)           Aurender Inc.\r
+                                #1612, OBIZTOWER, 126, Beolmal-ro, Dongan-gu\r
+                               Anyang-si  Gyeonggi-do  14057\r
+                               KR\r
+\r
+38-90-52   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+389052     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+40-8F-9D   (hex)               Juniper Networks\r
+408F9D     (base 16)           Juniper Networks\r
+                               1133 Innovation Way\r
+                               Sunnyvale  CA  94089\r
+                               US\r
+\r
+00-15-E7   (hex)               Quantec Tontechnik\r
+0015E7     (base 16)           Quantec Tontechnik\r
+                               Maenherstr. 35\r
+                               München    D-81375\r
+                               DE\r
+\r
+FC-B3-BC   (hex)               Intel Corporate\r
+FCB3BC     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+18-CC-18   (hex)               Intel Corporate\r
+18CC18     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+C0-3C-59   (hex)               Intel Corporate\r
+C03C59     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+84-1B-77   (hex)               Intel Corporate\r
+841B77     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+2C-A5-9C   (hex)               Hangzhou Hikvision Digital Technology Co.,Ltd.\r
+2CA59C     (base 16)           Hangzhou Hikvision Digital Technology Co.,Ltd.\r
+                               No.555 Qianmo Road\r
+                               Hangzhou  Zhejiang  310052\r
+                               CN\r
+\r
+34-C9-3D   (hex)               Intel Corporate\r
+34C93D     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3 \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+6C-98-EB   (hex)               Riverbed Technology, Inc.\r
+6C98EB     (base 16)           Riverbed Technology, Inc.\r
+                               680 Folsom St\r
+                               San Francisco  CA  94107\r
+                               US\r
+\r
+00-1F-F5   (hex)               Kongsberg Defence & Aerospace\r
+001FF5     (base 16)           Kongsberg Defence & Aerospace\r
+                               Kirkegaardsveien 45  P.O.Box 1003\r
+                               Kongsberg    NO-3601\r
+                               NO\r
+\r
+74-EC-B2   (hex)               Amazon Technologies Inc.\r
+74ECB2     (base 16)           Amazon Technologies Inc.\r
+                               P.O Box 8102 \r
+                               Reno  NV  89507\r
+                               US\r
+\r
+C8-6C-3D   (hex)               Amazon Technologies Inc.\r
+C86C3D     (base 16)           Amazon Technologies Inc.\r
+                               P.O Box 8102 \r
+                               Reno  NV  89507\r
+                               US\r
+\r
+C0-41-21   (hex)               Nokia Solutions and Networks GmbH & Co. KG\r
+C04121     (base 16)           Nokia Solutions and Networks GmbH & Co. KG\r
+                               Werinherstrasse 91\r
+                               München  Bavaria  D-81541\r
+                               DE\r
+\r
+0C-7C-28   (hex)               Nokia Solutions and Networks GmbH & Co. KG\r
+0C7C28     (base 16)           Nokia Solutions and Networks GmbH & Co. KG\r
+                               Werinherstrasse 91\r
+                               München  Bavaria  D-81541\r
+                               DE\r
+\r
+20-78-52   (hex)               Nokia Solutions and Networks GmbH & Co. KG\r
+207852     (base 16)           Nokia Solutions and Networks GmbH & Co. KG\r
+                               Werinherstrasse 91\r
+                               München  Bavaria  D-81541\r
+                               DE\r
+\r
+54-FA-96   (hex)               Nokia Solutions and Networks GmbH & Co. KG\r
+54FA96     (base 16)           Nokia Solutions and Networks GmbH & Co. KG\r
+                               Werinherstrasse 91\r
+                               München  Bavaria  D-81541\r
+                               DE\r
+\r
+7C-C2-C6   (hex)               TP-Link Corporation Limited\r
+7CC2C6     (base 16)           TP-Link Corporation Limited\r
+                               Room 901,9/F.New East Ocean Centre, 9 Science Museum Road\r
+                                Tsim Sha Tsui  Kowloon  999077\r
+                               HK\r
+\r
+08-9A-C7   (hex)               zte corporation\r
+089AC7     (base 16)           zte corporation\r
+                               12/F.,zte R&D building ,kejinan Road,Shenzhen,P.R.China\r
+                               shenzhen  guangdong  518057\r
+                               CN\r
+\r
+BC-6D-05   (hex)               Dusun Electron Co.,Ltd.\r
+BC6D05     (base 16)           Dusun Electron Co.,Ltd.\r
+                               NO.640 FengQing str.,DeQing, ZheJiang, China\r
+                               huzhou  zhejiang  313200\r
+                               CN\r
+\r
+74-4C-A1   (hex)               Liteon Technology Corporation\r
+744CA1     (base 16)           Liteon Technology Corporation\r
+                               4F, 90, Chien 1 Road\r
+                               New Taipei City  Taiwan  23585\r
+                               TW\r
+\r
+B4-B2-91   (hex)               LG Electronics\r
+B4B291     (base 16)           LG Electronics\r
+                               222 LG-ro, JINWI-MYEON\r
+                               Pyeongtaek-si  Gyeonggi-do  451-713\r
+                               KR\r
+\r
+C0-E0-18   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+C0E018     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+5C-E7-47   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+5CE747     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+A8-FF-BA   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+A8FFBA     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+AC-78-D1   (hex)               Juniper Networks\r
+AC78D1     (base 16)           Juniper Networks\r
+                               1133 Innovation Way\r
+                               Sunnyvale  CA  94089\r
+                               US\r
+\r
+EC-BE-5F   (hex)               Vestel Elektronik San ve Tic. A.Ş.\r
+ECBE5F     (base 16)           Vestel Elektronik San ve Tic. A.Ş.\r
+                               Organize san\r
+                               Manisa  Turket  45030\r
+                               TR\r
+\r
+A4-42-3B   (hex)               Intel Corporate\r
+A4423B     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+70-CF-49   (hex)               Intel Corporate\r
+70CF49     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+48-51-C5   (hex)               Intel Corporate\r
+4851C5     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+20-EF-BD   (hex)               Roku, Inc\r
+20EFBD     (base 16)           Roku, Inc\r
+                               1155 Coleman Ave\r
+                               San Jose  CA  95110\r
+                               US\r
+\r
+EC-7C-B6   (hex)               Samsung Electronics Co.,Ltd\r
+EC7CB6     (base 16)           Samsung Electronics Co.,Ltd\r
+                               #94-1, Imsoo-Dong\r
+                               Gumi  Gyeongbuk  730-350\r
+                               KR\r
+\r
+58-A6-39   (hex)               Samsung Electronics Co.,Ltd\r
+58A639     (base 16)           Samsung Electronics Co.,Ltd\r
+                               #94-1, Imsoo-Dong\r
+                               Gumi  Gyeongbuk  730-350\r
+                               KR\r
+\r
+A4-E5-7C   (hex)               Espressif Inc.\r
+A4E57C     (base 16)           Espressif Inc.\r
+                               Room 204, Building 2, 690 Bibo Rd, Pudong New Area\r
+                               Shanghai  Shanghai  201203\r
+                               CN\r
+\r
+84-E3-42   (hex)               Tuya (HK) Limietd\r
+84E342     (base 16)           Tuya (HK) Limietd\r
+                               FLAT/RM 806 BLK ? 8/F CHEUNG SHA WAN PLAZA 833 CHEUNG SHA WAN ROAD KL\r
+                               hongkong  Hong Kong  999077\r
+                               CN\r
+\r
+04-F9-93   (hex)               Infinix mobility limited\r
+04F993     (base 16)           Infinix mobility limited\r
+                               RMS 05-15, 13A/F SOUTH TOWER WORLD FINANCE CTR HARBOUR CITY 17 CANTON RD TST KLN HONG KONG\r
+                               HongKong  HongKong  999077\r
+                               HK\r
+\r
+BC-BD-9E   (hex)               ITEL MOBILE LIMITED\r
+BCBD9E     (base 16)           ITEL MOBILE LIMITED\r
+                               RM B3 & B4 BLOCK B, KO FAI INDUSTRIAL BUILDING  NO.7 KO FAI ROAD, YAU TONG, KLN, H.K\r
+                               Hong Kong  KOWLOON  999077\r
+                               HK\r
+\r
+F4-2A-7D   (hex)               TP-LINK TECHNOLOGIES CO.,LTD.\r
+F42A7D     (base 16)           TP-LINK TECHNOLOGIES CO.,LTD.\r
+                               Building 24(floors 1,3,4,5)and 28(floors 1-4)Central Science and Technology Park,Shennan Road,Nanshan\r
+                               Shenzhen  Guangdong  518057\r
+                               CN\r
+\r
+8C-0F-C9   (hex)               Huawei Device Co., Ltd.\r
+8C0FC9     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+30-4E-1B   (hex)               Huawei Device Co., Ltd.\r
+304E1B     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+6C-03-09   (hex)               Cisco Systems, Inc\r
+6C0309     (base 16)           Cisco Systems, Inc\r
+                               80 West Tasman Drive\r
+                               San Jose  CA  94568\r
+                               US\r
+\r
+BC-D2-95   (hex)               Cisco Systems, Inc\r
+BCD295     (base 16)           Cisco Systems, Inc\r
+                               80 West Tasman Drive\r
+                               San Jose  CA  94568\r
+                               US\r
+\r
+74-50-4E   (hex)               New H3C Technologies Co., Ltd\r
+74504E     (base 16)           New H3C Technologies Co., Ltd\r
+                               466 Changhe Road, Binjiang District\r
+                               Hangzhou  Zhejiang  310052\r
+                               CN\r
+\r
+F0-39-65   (hex)               Samsung Electronics Co.,Ltd\r
+F03965     (base 16)           Samsung Electronics Co.,Ltd\r
+                               #94-1, Imsoo-Dong\r
+                               Gumi  Gyeongbuk  730-350\r
+                               KR\r
+\r
+FC-B6-62   (hex)               IC Holdings LLC\r
+FCB662     (base 16)           IC Holdings LLC\r
+                               1277 Windmill Ln.\r
+                               Midway  UT  84049\r
+                               US\r
+\r
+50-2D-FB   (hex)               IGShare Co., Ltd.\r
+502DFB     (base 16)           IGShare Co., Ltd.\r
+                               410-ho, 28, Digital-ro 30-gil\r
+                               Guro-gu, SEOUL    08389\r
+                               KR\r
+\r
+40-EE-15   (hex)               Zioncom Electronics (Shenzhen) Ltd.\r
+40EE15     (base 16)           Zioncom Electronics (Shenzhen) Ltd.\r
+                               A1&A2 Building,Lantian Technology Park, Xinyu Road, Xingqiao Henggang Block, Shajing Street, Baoan District\r
+                               Shenzhen  Guangdong  518000\r
+                               CN\r
+\r
+00-F3-61   (hex)               Amazon Technologies Inc.\r
+00F361     (base 16)           Amazon Technologies Inc.\r
+                               P.O Box 8102 \r
+                               Reno  NV  89507\r
+                               US\r
+\r
+6C-0D-E1   (hex)               Dongguan Cannice Precision Manufacturing Co., Ltd.\r
+6C0DE1     (base 16)           Dongguan Cannice Precision Manufacturing Co., Ltd.\r
+                               Dongguan Cannice Precision Manufacturing Co., Ltd.\r
+                               Dongguan  Guangdong  523170\r
+                               CN\r
+\r
+60-6C-63   (hex)               Hitron Technologies. Inc\r
+606C63     (base 16)           Hitron Technologies. Inc\r
+                               No. 1-8, Lising 1st Rd. Hsinchu Science Park, Hsinchu, 300, Taiwan, R.O.C\r
+                               Hsin-chu  Taiwan  300\r
+                               TW\r
+\r
+E8-D7-65   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+E8D765     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+E4-5E-1B   (hex)               Google, Inc.\r
+E45E1B     (base 16)           Google, Inc.\r
+                               1600 Amphitheatre Parkway\r
+                               Mountain View  CA  94043\r
+                               US\r
+\r
+C4-30-CA   (hex)               SD Biosensor\r
+C430CA     (base 16)           SD Biosensor\r
+                               C-4th & 5th Floor, Digital Empire Building, 980-3\r
+                               Suwon-si  Kyonggi-do  ASI|KR|KS002|SUWON\r
+                               KR\r
+\r
+D4-A6-51   (hex)               Tuya Smart Inc.\r
+D4A651     (base 16)           Tuya Smart Inc.\r
+                               160 Greentree Drive, Suite 101\r
+                               Dover  DE  19904\r
+                               US\r
+\r
+28-05-2E   (hex)               Dematic Corp\r
+28052E     (base 16)           Dematic Corp\r
+                               507 Plymouth Ave NE\r
+                               Grand Rapids  MI  49505\r
+                               US\r
+\r
+14-D1-9E   (hex)               Apple, Inc.\r
+14D19E     (base 16)           Apple, Inc.\r
+                               1 Infinite Loop\r
+                               Cupertino  CA  95014\r
+                               US\r
+\r
+40-C7-11   (hex)               Apple, Inc.\r
+40C711     (base 16)           Apple, Inc.\r
+                               1 Infinite Loop\r
+                               Cupertino  CA  95014\r
+                               US\r
+\r
+5C-70-17   (hex)               Apple, Inc.\r
+5C7017     (base 16)           Apple, Inc.\r
+                               1 Infinite Loop\r
+                               Cupertino  CA  95014\r
+                               US\r
+\r
+8C-EC-7B   (hex)               Apple, Inc.\r
+8CEC7B     (base 16)           Apple, Inc.\r
+                               1 Infinite Loop\r
+                               Cupertino  CA  95014\r
+                               US\r
+\r
+00-0F-A0   (hex)               CANON KOREA BUSINESS SOLUTIONS INC.\r
+000FA0     (base 16)           CANON KOREA BUSINESS SOLUTIONS INC.\r
+                               Canon BS Tower, 607 Teheran-ro\r
+                               Seoul  Gangnam-gu  06173\r
+                               KR\r
+\r
+40-8C-1F   (hex)               GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD\r
+408C1F     (base 16)           GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD\r
+                               NO.18 HAIBIN ROAD,\r
+                               DONG GUAN  GUANG DONG  523860\r
+                               CN\r
+\r
+04-F0-3E   (hex)               Huawei Device Co., Ltd.\r
+04F03E     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+78-E2-2C   (hex)               Huawei Device Co., Ltd.\r
+78E22C     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+C0-D0-26   (hex)               Huawei Device Co., Ltd.\r
+C0D026     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+2C-3F-0B   (hex)               Cisco Meraki\r
+2C3F0B     (base 16)           Cisco Meraki\r
+                               500 Terry A. Francois Blvd\r
+                               San Francisco    94158\r
+                               US\r
+\r
+80-C5-01   (hex)               OctoGate IT Security Systems GmbH\r
+80C501     (base 16)           OctoGate IT Security Systems GmbH\r
+                               Friedrich List Strasse 42\r
+                               Paderborn  NRW  33100\r
+                               DE\r
+\r
 84-80-94   (hex)               Meter, Inc.\r
 848094     (base 16)           Meter, Inc.\r
                                148 Townsend St\r
@@ -68990,12 +69728,6 @@ ECA5DE     (base 16)           ONYX WIFI Inc
                                Irvine    92618\r
                                US\r
 \r
-8C-49-62   (hex)               Roku, Inc\r
-8C4962     (base 16)           Roku, Inc\r
-                               150 Winchester Circle\r
-                               Los Gatos  CA  95032\r
-                               US\r
-\r
 10-33-BF   (hex)               Technicolor CH USA Inc.\r
 1033BF     (base 16)           Technicolor CH USA Inc.\r
                                5030 Sugarloaf Parkway Bldg 6 \r
@@ -69146,12 +69878,6 @@ B452A9     (base 16)           Texas Instruments
                                Toufen City, Miaoli County    351\r
                                TW\r
 \r
-B8-07-56   (hex)               Cisco Meraki\r
-B80756     (base 16)           Cisco Meraki\r
-                               500 Terry A. Francois Blvd\r
-                               San Francisco  null  94158\r
-                               US\r
-\r
 D0-C8-57   (hex)               IEEE Registration Authority\r
 D0C857     (base 16)           IEEE Registration Authority\r
                                445 Hoes Lane\r
@@ -70313,12 +71039,6 @@ B0E7DE     (base 16)           Homa Technologies JSC
                                Tianjin Pilot Free Trade Zone Airport EconomicArea  Airport International Logistics Zone, Tianjin  300300\r
                                CN\r
 \r
-E4-D3-AA   (hex)               FUJITSU CONNECTED TECHNOLOGIES LIMITED\r
-E4D3AA     (base 16)           FUJITSU CONNECTED TECHNOLOGIES LIMITED\r
-                               4-1-1, Kamikodanaka, Nakahara-ku\r
-                               Kawasaki  Kanagawa  2118588\r
-                               JP\r
-\r
 D4-67-D3   (hex)               GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD\r
 D467D3     (base 16)           GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD\r
                                NO.18 HAIBIN ROAD,\r
@@ -71813,12 +72533,6 @@ E0338E     (base 16)           Apple, Inc.
                                Qingdao  Shandong  266101\r
                                CN\r
 \r
-78-F9-B4   (hex)               Nokia\r
-78F9B4     (base 16)           Nokia\r
-                               Karaportti 3\r
-                               Espoo  Finland  02610\r
-                               FI\r
-\r
 D0-76-E7   (hex)               TP-LINK TECHNOLOGIES CO.,LTD.\r
 D076E7     (base 16)           TP-LINK TECHNOLOGIES CO.,LTD.\r
                                Building 24(floors 1,3,4,5)and 28(floors 1-4)Central Science and Technology Park,Shennan Road,Nanshan\r
@@ -72917,12 +73631,6 @@ E084F3     (base 16)           High Grade Controls Corporation
                                Brentwood  Essex  08854\r
                                GB\r
 \r
-34-56-FE   (hex)               Cisco Meraki\r
-3456FE     (base 16)           Cisco Meraki\r
-                               500 Terry A. Francois Blvd\r
-                               San Francisco  null  94158\r
-                               US\r
-\r
 70-70-8B   (hex)               Cisco Systems, Inc\r
 70708B     (base 16)           Cisco Systems, Inc\r
                                80 West Tasman Drive\r
@@ -73883,12 +74591,6 @@ D45F25     (base 16)           Shenzhen YOUHUA Technology Co., Ltd
                                San Jose  CA  94568\r
                                US\r
 \r
-C8-3A-6B   (hex)               Roku, Inc\r
-C83A6B     (base 16)           Roku, Inc\r
-                               150 Winchester Circle\r
-                               Los Gatos  CA  95032\r
-                               US\r
-\r
 B4-C6-F8   (hex)               Axilspot Communication\r
 B4C6F8     (base 16)           Axilspot Communication\r
                                A302 Han's Innovation Building, No.9018 Beihuan Ave., Nanshan District\r
@@ -77225,12 +77927,6 @@ BCC6DB     (base 16)           Nokia Corporation
                                Salo  NA  24101\r
                                FI\r
 \r
-60-A8-FE   (hex)               Nokia\r
-60A8FE     (base 16)           Nokia\r
-                               Karaportti 3\r
-                               Espoo    02610\r
-                               FI\r
-\r
 00-11-9F   (hex)               Nokia Danmark A/S\r
 00119F     (base 16)           Nokia Danmark A/S\r
                                Frederikskaj\r
@@ -80585,12 +81281,6 @@ ECEED8     (base 16)           ZTLX Network Technology Co.,Ltd
                                HangZhou  ZheJiang  311258\r
                                CN\r
 \r
-D8-EF-CD   (hex)               Nokia\r
-D8EFCD     (base 16)           Nokia\r
-                               Karaportti 3\r
-                               Espoo  Finland  02610\r
-                               FI\r
-\r
 4C-C6-81   (hex)               Shenzhen Aisat Electronic Co., Ltd.\r
 4CC681     (base 16)           Shenzhen Aisat Electronic Co., Ltd.\r
                                Golden Building 419#, Design Park,\r
@@ -98528,12 +99218,6 @@ D8D67E     (base 16)           GSK CNC EQUIPMENT CO.,LTD
                                PLYMOUTH  MN  55441-2625\r
                                US\r
 \r
-00-A0-FB   (hex)               TORAY ENGINEERING CO., LTD.\r
-00A0FB     (base 16)           TORAY ENGINEERING CO., LTD.\r
-                               1-45, OE 1-CHOME, OTSU CITY\r
-                                 520-21  \r
-                               JP\r
-\r
 00-A0-6C   (hex)               SHINDENGEN ELECTRIC MFG. CO., LTD.\r
 00A06C     (base 16)           SHINDENGEN ELECTRIC MFG. CO., LTD.\r
                                10-13, MINAMI-CHO, HANNOU-CITY\r
@@ -101276,12 +101960,6 @@ D003EB     (base 16)         Texas Instruments
                                Irvine  CA  92618\r
                                US\r
 \r
-6C-F7-12   (hex)               Nokia\r
-6CF712     (base 16)           Nokia\r
-                               Karaportti 3\r
-                               Espoo  Finland  02610\r
-                               FI\r
-\r
 4C-C5-3E   (hex)               Zyxel Communications Corporation\r
 4CC53E     (base 16)           Zyxel Communications Corporation\r
                                No. 6 Innovation Road II, Science Park\r
@@ -102440,12 +103118,6 @@ DCCD2F     (base 16)         Seiko Epson Corporation
                                Macomb  MI  48044\r
                                US\r
 \r
-8C-8D-28   (hex)               Intel Corporate\r
-8C8D28     (base 16)           Intel Corporate\r
-                               Lot 8, Jalan Hi-Tech 2/3 \r
-                               Kulim  Kedah  09000\r
-                               MY\r
-\r
 34-3E-A4   (hex)               Ring LLC\r
 343EA4     (base 16)           Ring LLC\r
                                1523 26th St\r
@@ -102518,12 +103190,6 @@ B8D309     (base 16)         Cox Communications, Inc
                                Hangzhou  Zhejiang  310023\r
                                CN\r
 \r
-90-CC-DF   (hex)               Intel Corporate\r
-90CCDF     (base 16)           Intel Corporate\r
-                               Lot 8, Jalan Hi-Tech 2/3 \r
-                               Kulim  Kedah  09000\r
-                               MY\r
-\r
 D4-6A-91   (hex)               SnapAV\r
 D46A91     (base 16)           SnapAV\r
                                1800 Continental Blvd\r
@@ -102548,12 +103214,6 @@ D021F9     (base 16)         Ubiquiti Networks Inc.
                                New York  NY  10017\r
                                US\r
 \r
-08-5B-D6   (hex)               Intel Corporate\r
-085BD6     (base 16)           Intel Corporate\r
-                               Lot 8, Jalan Hi-Tech 2/3 \r
-                               Kulim  Kedah  09000\r
-                               MY\r
-\r
 D0-3D-52   (hex)               Ava Security Limited\r
 D03D52     (base 16)           Ava Security Limited\r
                                The Charter Building, Charter Place\r
@@ -102995,30 +103655,6 @@ D8CC98     (base 16)         Huawei Device Co., Ltd.
                                Dongguan  Guangdong  523808\r
                                CN\r
 \r
-F0-4F-7C   (hex)               Amazon Technologies Inc.\r
-F04F7C     (base 16)           Amazon Technologies Inc.\r
-                               PO Box 8102\r
-                               Reno  NV  89507\r
-                               US\r
-\r
-F0-A2-25   (hex)               Amazon Technologies Inc.\r
-F0A225     (base 16)           Amazon Technologies Inc.\r
-                               PO Box 8102\r
-                               Reno  NV  89507\r
-                               US\r
-\r
-B4-0E-DE   (hex)               Intel Corporate\r
-B40EDE     (base 16)           Intel Corporate\r
-                               Lot 8, Jalan Hi-Tech 2/3 \r
-                               Kulim  Kedah  09000\r
-                               MY\r
-\r
-E0-2B-E9   (hex)               Intel Corporate\r
-E02BE9     (base 16)           Intel Corporate\r
-                               Lot 8, Jalan Hi-Tech 2/3 \r
-                               Kulim  Kedah  09000\r
-                               MY\r
-\r
 DC-B7-2E   (hex)               Xiaomi Communications Co Ltd\r
 DCB72E     (base 16)           Xiaomi Communications Co Ltd\r
                                The Rainbow City of China Resources\r
@@ -103211,18 +103847,6 @@ AC3328     (base 16)         Huawei Device Co., Ltd.
                                Dongguan  Guangdong  523808\r
                                CN\r
 \r
-D4-76-A0   (hex)               Fortinet, Inc.\r
-D476A0     (base 16)           Fortinet, Inc.\r
-                               899 Kifer Road\r
-                               Sunnyvale    94086\r
-                               US\r
-\r
-B4-EC-02   (hex)               ALPSALPINE CO,.LTD\r
-B4EC02     (base 16)           ALPSALPINE CO,.LTD\r
-                               6-1\r
-                               Kakuda  Miyagi-Pref  981-1595\r
-                               JP\r
-\r
 00-23-06   (hex)               ALPSALPINE CO,.LTD\r
 002306     (base 16)           ALPSALPINE CO,.LTD\r
                                1-2-1, Okinouchi,\r
@@ -103253,6 +103877,30 @@ B4EC02     (base 16)         ALPSALPINE CO,.LTD
                                Soma-city,  Fukushima-pref.,  976-8501\r
                                JP\r
 \r
+D4-76-A0   (hex)               Fortinet, Inc.\r
+D476A0     (base 16)           Fortinet, Inc.\r
+                               899 Kifer Road\r
+                               Sunnyvale    94086\r
+                               US\r
+\r
+80-B9-7A   (hex)               eero inc.\r
+80B97A     (base 16)           eero inc.\r
+                               660 3rd Street\r
+                               San Francisco  CA  94107\r
+                               US\r
+\r
+BC-75-36   (hex)               ALPSALPINE CO,.LTD\r
+BC7536     (base 16)           ALPSALPINE CO,.LTD\r
+                               nishida  6-1 \r
+                               Kakuda-City  Miyagi-Pref  981-1595\r
+                               JP\r
+\r
+58-16-D7   (hex)               ALPSALPINE CO,.LTD\r
+5816D7     (base 16)           ALPSALPINE CO,.LTD\r
+                               nishida  6-1 \r
+                               Kakuda-City  Miyagi-Pref  981-1595\r
+                               JP\r
+\r
 E0-75-0A   (hex)               ALPSALPINE CO,.LTD\r
 E0750A     (base 16)           ALPSALPINE CO,.LTD\r
                                6-1\r
@@ -103265,18 +103913,432 @@ E0AE5E     (base 16)               ALPSALPINE CO,.LTD
                                Osaki  Miyagi-pref  989-6181\r
                                JP\r
 \r
-BC-75-36   (hex)               ALPSALPINE CO,.LTD\r
-BC7536     (base 16)           ALPSALPINE CO,.LTD\r
-                               nishida  6-1 \r
-                               Kakuda-City  Miyagi-Pref  981-1595\r
+60-8D-26   (hex)               Arcadyan Corporation\r
+608D26     (base 16)           Arcadyan Corporation\r
+                               No.8, Sec.2, Guangfu Rd.\r
+                               Hsinchu City  Hsinchu  30071\r
+                               TW\r
+\r
+B4-EC-02   (hex)               ALPSALPINE CO,.LTD\r
+B4EC02     (base 16)           ALPSALPINE CO,.LTD\r
+                               6-1\r
+                               Kakuda  Miyagi-Pref  981-1595\r
                                JP\r
 \r
-58-16-D7   (hex)               ALPSALPINE CO,.LTD\r
-5816D7     (base 16)           ALPSALPINE CO,.LTD\r
-                               nishida  6-1 \r
-                               Kakuda-City  Miyagi-Pref  981-1595\r
+E4-27-61   (hex)               Honor Device Co., Ltd.\r
+E42761     (base 16)           Honor Device Co., Ltd.\r
+                               A1701, Block AB, Building 1, Tianan Yungu Phase I, Gangtou Community, Bantian Street\r
+                               Shenzhen  Guangdong  518129\r
+                               CN\r
+\r
+8C-F3-19   (hex)               Siemens Industrial Automation Products Ltd., Chengdu\r
+8CF319     (base 16)           Siemens Industrial Automation Products Ltd., Chengdu\r
+                               Tianyuan Road No.99, High Tech Zone West\r
+                               Chengdu  Sichuan Province  611731 \r
+                               CN\r
+\r
+1C-39-29   (hex)               OHSUNG\r
+1C3929     (base 16)           OHSUNG\r
+                               335-4,SANHODAERO,GUMI,GYEONG BUK,KOREA\r
+                               GUMI  GYEONG BUK  730-030\r
+                               KR\r
+\r
+E4-D3-AA   (hex)               FUJITSU CONNECTED TECHNOLOGIES LIMITED\r
+E4D3AA     (base 16)           FUJITSU CONNECTED TECHNOLOGIES LIMITED\r
+                               Sanki Yamato Building, 7-10-1 Chuorinkan\r
+                               Yamato  Kanagawa  242-8588\r
+                               JP\r
+\r
+C8-A4-0D   (hex)               Cooler Master Technology Inc\r
+C8A40D     (base 16)           Cooler Master Technology Inc\r
+                               8F., No. 788-1, Zhongzheng Rd., Zhonghe Dist.\r
+                               New Taipei City  New Taipei City  23586\r
+                               TW\r
+\r
+38-42-0B   (hex)               Sonos, Inc.\r
+38420B     (base 16)           Sonos, Inc.\r
+                               614 Chapala St\r
+                               Santa Barbara  CA  93101\r
+                               US\r
+\r
+C8-3A-6B   (hex)               Roku, Inc\r
+C83A6B     (base 16)           Roku, Inc\r
+                               1155 Coleman Ave\r
+                               San Jose  CA  95110\r
+                               US\r
+\r
+A4-53-EE   (hex)               IEEE Registration Authority\r
+A453EE     (base 16)           IEEE Registration Authority\r
+                               445 Hoes Lane\r
+                               Piscataway  NJ  08554\r
+                               US\r
+\r
+8C-49-62   (hex)               Roku, Inc\r
+8C4962     (base 16)           Roku, Inc\r
+                               1155 Coleman Ave\r
+                               San Jose  CA  95110\r
+                               US\r
+\r
+E0-2E-3F   (hex)               Huawei Device Co., Ltd.\r
+E02E3F     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+C4-BF-60   (hex)               TECNO MOBILE LIMITED\r
+C4BF60     (base 16)           TECNO MOBILE LIMITED\r
+                               ROOMS 05-15, 13A/F., SOUTH TOWER, WORLD FINANCE CENTRE, HARBOUR CITY, 17 CANTON ROAD, TSIM SHA TSUI, KOWLOON, HONG KONG\r
+                               Hong Kong  Hong Kong  999077\r
+                               HK\r
+\r
+D0-40-EF   (hex)               Murata Manufacturing Co., Ltd.\r
+D040EF     (base 16)           Murata Manufacturing Co., Ltd.\r
+                               1-10-1, Higashikotari\r
+                               Nagaokakyo-shi  Kyoto  617-8555\r
                                JP\r
 \r
+8C-8C-AA   (hex)               LCFC(HeFei) Electronics Technology co., ltd\r
+8C8CAA     (base 16)           LCFC(HeFei) Electronics Technology co., ltd\r
+                               YunGu Road 3188-1\r
+                               Hefei  Anhui  230000\r
+                               CN\r
+\r
+90-CC-DF   (hex)               Intel Corporate\r
+90CCDF     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+08-5B-D6   (hex)               Intel Corporate\r
+085BD6     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+B4-0E-DE   (hex)               Intel Corporate\r
+B40EDE     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+E0-2B-E9   (hex)               Intel Corporate\r
+E02BE9     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+BC-9A-53   (hex)               Huawei Device Co., Ltd.\r
+BC9A53     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+DC-27-27   (hex)               Huawei Device Co., Ltd.\r
+DC2727     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+F0-42-F5   (hex)               Huawei Device Co., Ltd.\r
+F042F5     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+4C-11-54   (hex)               Mobiwire Mobiles (NingBo) Co., LTD\r
+4C1154     (base 16)           Mobiwire Mobiles (NingBo) Co., LTD\r
+                               No.999 Dacheng East Road, Fenghua District, Ningbo City , Zhejiang Province, PRC\r
+                               Ningbo  Zhejiang  315500\r
+                               CN\r
+\r
+C8-E2-65   (hex)               Intel Corporate\r
+C8E265     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3 \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+8C-8D-28   (hex)               Intel Corporate\r
+8C8D28     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+D0-56-BF   (hex)               AMOSENSE\r
+D056BF     (base 16)           AMOSENSE\r
+                               Narutu street 56\r
+                               SEOUL  Sucho gu  06527\r
+                               KR\r
+\r
+B4-B5-B6   (hex)               CHONGQING FUGUI ELECTRONICS CO.,LTD.\r
+B4B5B6     (base 16)           CHONGQING FUGUI ELECTRONICS CO.,LTD.\r
+                               Building D21,No.1, East Zone 1st Road,Xiyong Town,Shapingba District\r
+                               Chongqing  Chongqing  401332\r
+                               CN\r
+\r
+04-7A-0B   (hex)               Beijing Xiaomi Electronics Co., Ltd.\r
+047A0B     (base 16)           Beijing Xiaomi Electronics Co., Ltd.\r
+                               Building C, QingHe ShunShiJiaYe Technology Park, #66 ZhuFang Rd, HaiDian District\r
+                               Beijing  Beijing  10085\r
+                               CN\r
+\r
+90-0F-0C   (hex)               CLOUD NETWORK TECHNOLOGY SINGAPORE PTE. LTD.\r
+900F0C     (base 16)           CLOUD NETWORK TECHNOLOGY SINGAPORE PTE. LTD.\r
+                               B22 Building,NO.51 Tongle Road, Shajing Town, Jiangnan District, Nanning, Guangxi Province, China\r
+                               Nanning  Guangxi  530007\r
+                               CN\r
+\r
+F0-A2-25   (hex)               Amazon Technologies Inc.\r
+F0A225     (base 16)           Amazon Technologies Inc.\r
+                               P.O Box 8102 \r
+                               Reno  NV  89507\r
+                               US\r
+\r
+F0-4F-7C   (hex)               Amazon Technologies Inc.\r
+F04F7C     (base 16)           Amazon Technologies Inc.\r
+                               P.O Box 8102 \r
+                               Reno  NV  89507\r
+                               US\r
+\r
+BC-9D-42   (hex)               SHENZHEN RF-LINK TECHNOLOGY CO.,LTD.\r
+BC9D42     (base 16)           SHENZHEN RF-LINK TECHNOLOGY CO.,LTD.\r
+                               Bldg56A,6/F,Baotian Rd3,Xixiang Town,Baoan District,\r
+                               Shenzhen  Guangdong  518000\r
+                               CN\r
+\r
+4C-75-25   (hex)               Espressif Inc.\r
+4C7525     (base 16)           Espressif Inc.\r
+                               Room 204, Building 2, 690 Bibo Rd, Pudong New Area\r
+                               Shanghai  Shanghai  201203\r
+                               CN\r
+\r
+74-04-F0   (hex)               Mobiwire Mobiles (NingBo) Co., LTD\r
+7404F0     (base 16)           Mobiwire Mobiles (NingBo) Co., LTD\r
+                               No.999 Dacheng East Road, Fenghua District, Ningbo City , Zhejiang Province, PRC\r
+                               Ningbo  Zhejiang  315500\r
+                               CN\r
+\r
+24-0B-88   (hex)               Taicang T&W Electronics\r
+240B88     (base 16)           Taicang T&W Electronics\r
+                               89# Jiang Nan RD\r
+                               Suzhou  Jiangsu  215412\r
+                               CN\r
+\r
+0C-93-8F   (hex)               GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD\r
+0C938F     (base 16)           GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD\r
+                               NO.18 HAIBIN ROAD,\r
+                               DONG GUAN  GUANG DONG  523860\r
+                               CN\r
+\r
+78-F9-B4   (hex)               Nokia Solutions and Networks GmbH & Co. KG\r
+78F9B4     (base 16)           Nokia Solutions and Networks GmbH & Co. KG\r
+                               Werinherstrasse 91\r
+                               München  Bavaria  D-81541\r
+                               DE\r
+\r
+60-A8-FE   (hex)               Nokia Solutions and Networks GmbH & Co. KG\r
+60A8FE     (base 16)           Nokia Solutions and Networks GmbH & Co. KG\r
+                               Werinherstrasse 91\r
+                               München  Bavaria  D-81541\r
+                               DE\r
+\r
+D8-EF-CD   (hex)               Nokia Solutions and Networks GmbH & Co. KG\r
+D8EFCD     (base 16)           Nokia Solutions and Networks GmbH & Co. KG\r
+                               Werinherstrasse 91\r
+                               München  Bavaria  D-81541\r
+                               DE\r
+\r
+6C-F7-12   (hex)               Nokia Solutions and Networks GmbH & Co. KG\r
+6CF712     (base 16)           Nokia Solutions and Networks GmbH & Co. KG\r
+                               Werinherstrasse 91\r
+                               München  Bavaria  D-81541\r
+                               DE\r
+\r
+EC-75-ED   (hex)               Citrix Systems, Inc.\r
+EC75ED     (base 16)           Citrix Systems, Inc.\r
+                               851 W Cypress Creek Rd\r
+                               Fort Lauderdale  FL  33309\r
+                               US\r
+\r
+5C-BD-9A   (hex)               Huawei Device Co., Ltd.\r
+5CBD9A     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+8C-DE-E6   (hex)               Samsung Electronics Co.,Ltd\r
+8CDEE6     (base 16)           Samsung Electronics Co.,Ltd\r
+                               #94-1, Imsoo-Dong\r
+                               Gumi  Gyeongbuk  730-350\r
+                               KR\r
+\r
+10-EC-81   (hex)               Samsung Electronics Co.,Ltd\r
+10EC81     (base 16)           Samsung Electronics Co.,Ltd\r
+                               #94-1, Imsoo-Dong\r
+                               Gumi  Gyeongbuk  730-350\r
+                               KR\r
+\r
+C4-5D-83   (hex)               Samsung Electronics Co.,Ltd\r
+C45D83     (base 16)           Samsung Electronics Co.,Ltd\r
+                               #94-1, Imsoo-Dong\r
+                               Gumi  Gyeongbuk  730-350\r
+                               KR\r
+\r
+5C-A4-A4   (hex)               Fiberhome Telecommunication Technologies Co.,LTD\r
+5CA4A4     (base 16)           Fiberhome Telecommunication Technologies Co.,LTD\r
+                               No.5 DongXin Road\r
+                               Wuhan  Hubei  430074\r
+                               CN\r
+\r
+14-A3-B4   (hex)               Huawei Device Co., Ltd.\r
+14A3B4     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+9C-9C-1F   (hex)               Espressif Inc.\r
+9C9C1F     (base 16)           Espressif Inc.\r
+                               Room 204, Building 2, 690 Bibo Rd, Pudong New Area\r
+                               Shanghai  Shanghai  201203\r
+                               CN\r
+\r
+D8-09-D6   (hex)               ZEXELON CO., LTD.\r
+D809D6     (base 16)           ZEXELON CO., LTD.\r
+                               195 Tonohiraga,\r
+                               Matsudo-City  Chiba  270-0004\r
+                               JP\r
+\r
+E8-6D-E9   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+E86DE9     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+14-46-58   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+144658     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+58-BE-72   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+58BE72     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+10-8F-FE   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+108FFE     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+BC-D7-CE   (hex)               China Mobile (Hangzhou) Information Technology Co., Ltd.\r
+BCD7CE     (base 16)           China Mobile (Hangzhou) Information Technology Co., Ltd.\r
+                               No. 1600 Yuhangtang Road, Wuchang Street, Yuhang District, Hangzhou, Zhejiang\r
+                               Hangzhou  Zhejiang  310000\r
+                               CN\r
+\r
+9C-A5-70   (hex)               eero inc.\r
+9CA570     (base 16)           eero inc.\r
+                               660 3rd Street\r
+                               San Francisco  CA  94107\r
+                               US\r
+\r
+A0-41-2D   (hex)               Lansen Systems AB\r
+A0412D     (base 16)           Lansen Systems AB\r
+                               Skallebackavägen 3\r
+                               Halmstad    30241\r
+                               SE\r
+\r
+C4-39-60   (hex)               GD Midea Air-Conditioning Equipment Co.,Ltd.\r
+C43960     (base 16)           GD Midea Air-Conditioning Equipment Co.,Ltd.\r
+                               Midea Global Innovation Center,Beijiao Town,Shunde\r
+                               Foshan  Guangdong  528311\r
+                               CN\r
+\r
+98-BE-DC   (hex)               Honor Device Co., Ltd.\r
+98BEDC     (base 16)           Honor Device Co., Ltd.\r
+                               A1701, Block AB, Building 1, Tianan Yungu Phase I, Gangtou Community, Bantian Street\r
+                               Shenzhen  Guangdong  518129\r
+                               CN\r
+\r
+44-B6-BE   (hex)               Cisco Systems, Inc\r
+44B6BE     (base 16)           Cisco Systems, Inc\r
+                               80 West Tasman Drive\r
+                               San Jose  CA  94568\r
+                               US\r
+\r
+00-A0-FB   (hex)               Toray Engineering D Solutions Co., Ltd.\r
+00A0FB     (base 16)           Toray Engineering D Solutions Co., Ltd.\r
+                               1-45, OE 1-CHOME\r
+                               OTSU CITY    520-2141\r
+                               JP\r
+\r
+70-61-BE   (hex)               Wistron Neweb Corporation\r
+7061BE     (base 16)           Wistron Neweb Corporation\r
+                               No.20,Park Avenue II,Hsinchu Science Park\r
+                               Hsin-Chu  R.O.C.  308\r
+                               TW\r
+\r
+34-8A-12   (hex)               Aruba, a Hewlett Packard Enterprise Company\r
+348A12     (base 16)           Aruba, a Hewlett Packard Enterprise Company\r
+                               3333 Scott Blvd\r
+                               Santa Clara  CA  95054\r
+                               US\r
+\r
+84-D3-43   (hex)               Calix Inc.\r
+84D343     (base 16)           Calix Inc.\r
+                               2777 Orchard Pkwy\r
+                               San Jose  CA  95131\r
+                               US\r
+\r
+D8-47-BB   (hex)               Huawei Device Co., Ltd.\r
+D847BB     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+C4-14-11   (hex)               Apple, Inc.\r
+C41411     (base 16)           Apple, Inc.\r
+                               1 Infinite Loop\r
+                               Cupertino  CA  95014\r
+                               US\r
+\r
+CC-C9-5D   (hex)               Apple, Inc.\r
+CCC95D     (base 16)           Apple, Inc.\r
+                               1 Infinite Loop\r
+                               Cupertino  CA  95014\r
+                               US\r
+\r
+38-B5-D3   (hex)               SecuWorks\r
+38B5D3     (base 16)           SecuWorks\r
+                               #709, 218 Gajeong-ro\r
+                               Yuseong -gu  Daejeon  34129\r
+                               KR\r
+\r
+34-31-8F   (hex)               Apple, Inc.\r
+34318F     (base 16)           Apple, Inc.\r
+                               1 Infinite Loop\r
+                               Cupertino  CA  95014\r
+                               US\r
+\r
+44-6F-D8   (hex)               IEEE Registration Authority\r
+446FD8     (base 16)           IEEE Registration Authority\r
+                               445 Hoes Lane\r
+                               Piscataway  NJ  08554\r
+                               US\r
+\r
+34-56-FE   (hex)               Cisco Meraki\r
+3456FE     (base 16)           Cisco Meraki\r
+                               500 Terry A. Francois Blvd\r
+                               San Francisco    94158\r
+                               US\r
+\r
+B8-07-56   (hex)               Cisco Meraki\r
+B80756     (base 16)           Cisco Meraki\r
+                               500 Terry A. Francois Blvd\r
+                               San Francisco    94158\r
+                               US\r
+\r
 F8-D0-27   (hex)               Seiko Epson Corporation\r
 F8D027     (base 16)           Seiko Epson Corporation\r
                                2070 Kotobuki Koaka\r
@@ -103754,12 +104816,6 @@ C4411E     (base 16)         Belkin International Inc.
                                Playa Vista  null  90094\r
                                US\r
 \r
-00-77-E4   (hex)               Nokia\r
-0077E4     (base 16)           Nokia\r
-                               Karaportti 3\r
-                               Espoo  Finland  02610\r
-                               FI\r
-\r
 00-AD-63   (hex)               Dedicated Micros Malta LTD\r
 00AD63     (base 16)           Dedicated Micros Malta LTD\r
                                Blb017, Qasam Industrijali Bulebel\r
@@ -104369,9 +105425,6 @@ D0EC35     (base 16)          Cisco Systems, Inc
 10-AE-60   (hex)               Private\r
 10AE60     (base 16)           Private\r
 \r
-00-25-DF   (hex)               Private\r
-0025DF     (base 16)           Private\r
-\r
 BC-CF-4F   (hex)               Zyxel Communications Corporation\r
 BCCF4F     (base 16)           Zyxel Communications Corporation\r
                                No. 6 Innovation Road II, Science Park\r
@@ -104924,12 +105977,6 @@ DC48B2     (base 16)         Baraja Pty. Ltd.
                                West Lindfield  NSW  2070\r
                                AU\r
 \r
-AC-AE-19   (hex)               Roku, Inc\r
-ACAE19     (base 16)           Roku, Inc\r
-                               150 Winchester Circle\r
-                               Los Gatos  CA  95032\r
-                               US\r
-\r
 18-1E-95   (hex)               AuVerte\r
 181E95     (base 16)           AuVerte\r
                                14 Riverview Road\r
@@ -105830,12 +106877,6 @@ FCFBFB     (base 16)         Cisco Systems, Inc
                                Seoul    153-801\r
                                KR\r
 \r
-68-3A-1E   (hex)               Cisco Meraki\r
-683A1E     (base 16)           Cisco Meraki\r
-                               500 Terry A. Francois Blvd\r
-                               San Francisco  null  94158\r
-                               US\r
-\r
 00-10-17   (hex)               Bosch Access Systems GmbH\r
 001017     (base 16)           Bosch Access Systems GmbH\r
                                Charlottenburger Allee 50            \r
@@ -106478,12 +107519,6 @@ DC729B     (base 16)         HUAWEI TECHNOLOGIES CO.,LTD
                                ganzhou  jiangxi  341700\r
                                CN\r
 \r
-84-DB-9E   (hex)               Aifloo AB\r
-84DB9E     (base 16)           Aifloo AB\r
-                               Postbox 2005\r
-                               Stockholm    10311\r
-                               SE\r
-\r
 0C-C6-CC   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
 0CC6CC     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
                                No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
@@ -107234,12 +108269,6 @@ C421C8     (base 16)         KYOCERA CORPORATION
                                Yokohama-shi  Kanagawa  224-8502\r
                                JP\r
 \r
-48-EC-5B   (hex)               Nokia\r
-48EC5B     (base 16)           Nokia\r
-                               Karaportti 3\r
-                               Espoo  Finland  02610\r
-                               FI\r
-\r
 70-58-12   (hex)               Panasonic Corporation AVC Networks Company\r
 705812     (base 16)           Panasonic Corporation AVC Networks Company\r
                                1-15 Matsuo-cho\r
@@ -107624,12 +108653,6 @@ B8F8BE     (base 16)         BLUECOM
                                consolidation    consolidation\r
                                AU\r
 \r
-E0-CB-BC   (hex)               Cisco Meraki\r
-E0CBBC     (base 16)           Cisco Meraki\r
-                               500 Terry A. Francois Blvd\r
-                               San Francisco  null  94158\r
-                               US\r
-\r
 64-47-E0   (hex)               Feitian Technologies Co., Ltd\r
 6447E0     (base 16)           Feitian Technologies Co., Ltd\r
                                Floor 17, Tower B, Huizhi Mansion, No.9 Xueqing Rd, Haidian District\r
@@ -122441,12 +123464,6 @@ A07332     (base 16)         Cashmaster International Limited
                                Gunposi  Kyoungkido  436-862\r
                                KR\r
 \r
-00-21-3E   (hex)               TomTom\r
-00213E     (base 16)           TomTom\r
-                               Oosterdoksstraat 114\r
-                               Amsterdam  North Holland  1011 DK\r
-                               NL\r
-\r
 00-21-3F   (hex)               A-Team Technology Ltd.\r
 00213F     (base 16)           A-Team Technology Ltd.\r
                                Rm. 1608, 16/F., Metropole Square,\r
@@ -126911,12 +127928,6 @@ A07332     (base 16)         Cashmaster International Limited
                                Shanghai    200001\r
                                CN\r
 \r
-00-0E-B6   (hex)               Riverbed Technology, Inc.\r
-000EB6     (base 16)           Riverbed Technology, Inc.\r
-                                680 Folsom St.\r
-                               San Francisco  CA  94107\r
-                               US\r
-\r
 00-0E-B7   (hex)               Knovative, Inc.\r
 000EB7     (base 16)           Knovative, Inc.\r
                                11245 West Bernardo Court\r
@@ -128789,12 +129800,6 @@ A07332     (base 16)         Cashmaster International Limited
                                Seoul    152-721\r
                                KR\r
 \r
-00-08-B0   (hex)               BKtel communications GmbH\r
-0008B0     (base 16)           BKtel communications GmbH\r
-                               Benzstraße 4\r
-                               41836 Hückelhoven-Baal  NRW  41836\r
-                               DE\r
-\r
 00-08-CA   (hex)               TwinHan Technology Co.,Ltd\r
 0008CA     (base 16)           TwinHan Technology Co.,Ltd\r
                                13F-6,No 79,Sec 1,Hsin Tai Wu RD.,Hsi-Ch\r
@@ -135545,12 +136550,6 @@ ACC25D     (base 16)         Fiberhome Telecommunication Technologies Co.,LTD
                                Kanata  Ontario  K2K 2E6\r
                                CA\r
 \r
-18-69-D8   (hex)               HANGZHOU AIXIANGJI TECHNOLOGY CO., LTD\r
-1869D8     (base 16)           HANGZHOU AIXIANGJI TECHNOLOGY CO., LTD\r
-                               7 Floor, 3 Blvd., More Centre, 87 Gudun Rd., Xihu District\r
-                               Hangzhou  Zhejiang  310012\r
-                               CN\r
-\r
 C4-32-D1   (hex)               Farlink Technology Limited\r
 C432D1     (base 16)           Farlink Technology Limited\r
                                Flat A&B,9/F,Wing Cheong Factory Building,121 King Lam Street,Cheung Sha Wan,Hong Kong.\r
@@ -136790,12 +137789,6 @@ B0B113     (base 16)         Texas Instruments
                                Mumbai  Maharashtra  400101\r
                                IN\r
 \r
-70-9C-D1   (hex)               Intel Corporate\r
-709CD1     (base 16)           Intel Corporate\r
-                               Lot 8, Jalan Hi-Tech 2/3 \r
-                               Kulim  Kedah  09000\r
-                               MY\r
-\r
 80-60-B7   (hex)               CLOUD NETWORK TECHNOLOGY SINGAPORE PTE. LTD.\r
 8060B7     (base 16)           CLOUD NETWORK TECHNOLOGY SINGAPORE PTE. LTD.\r
                                B22 Building,NO.51 Tongle Road, Shajing Town, Jiangnan District, Nanning, Guangxi Province, China\r
@@ -137066,24 +138059,6 @@ F01D2D     (base 16)         Cisco Systems, Inc
                                San Jose  CA  94568\r
                                US\r
 \r
-68-3E-26   (hex)               Intel Corporate\r
-683E26     (base 16)           Intel Corporate\r
-                               Lot 8, Jalan Hi-Tech 2/3 \r
-                               Kulim  Kedah  09000\r
-                               MY\r
-\r
-8C-55-4A   (hex)               Intel Corporate\r
-8C554A     (base 16)           Intel Corporate\r
-                               Lot 8, Jalan Hi-Tech 2/3 \r
-                               Kulim  Kedah  09000\r
-                               MY\r
-\r
-40-1C-83   (hex)               Intel Corporate\r
-401C83     (base 16)           Intel Corporate\r
-                               Lot 8, Jalan Hi-Tech 2/3 \r
-                               Kulim  Kedah  09000\r
-                               MY\r
-\r
 44-3B-32   (hex)               Intelbras\r
 443B32     (base 16)           Intelbras\r
                                BR 101, km 210, S/N°\r
@@ -137270,12 +138245,6 @@ A07751     (base 16)         ASMedia Technology Inc.
                                Dongguan  Guangdong  523808\r
                                CN\r
 \r
-38-FC-98   (hex)               Intel Corporate\r
-38FC98     (base 16)           Intel Corporate\r
-                               Lot 8, Jalan Hi-Tech 2/3 \r
-                               Kulim  Kedah  09000\r
-                               MY\r
-\r
 24-94-94   (hex)               Hong Kong Bouffalo Lab Limited\r
 249494     (base 16)           Hong Kong Bouffalo Lab Limited\r
                                RM 1903, 19/F Lee Garden One 33 Hysan Avenue, Causeway Bay\r
@@ -137342,18 +138311,6 @@ F8E43B     (base 16)         ASIX Electronics Corporation
                                Hsinchu    30078\r
                                TW\r
 \r
-F8-5E-A0   (hex)               Intel Corporate\r
-F85EA0     (base 16)           Intel Corporate\r
-                               Lot 8, Jalan Hi-Tech 2/3 \r
-                               Kulim  Kedah  09000\r
-                               MY\r
-\r
-50-2F-9B   (hex)               Intel Corporate\r
-502F9B     (base 16)           Intel Corporate\r
-                               Lot 8, Jalan Hi-Tech 2/3 \r
-                               Kulim  Kedah  09000\r
-                               MY\r
-\r
 48-EF-61   (hex)               Huawei Device Co., Ltd.\r
 48EF61     (base 16)           Huawei Device Co., Ltd.\r
                                No.2 of Xincheng Road, Songshan Lake Zone\r
@@ -137558,12 +138515,6 @@ A89AD7     (base 16)         Nokia
                                San Jose  CA  95002\r
                                US\r
 \r
-F8-7A-41   (hex)               Cisco Systems, Inc\r
-F87A41     (base 16)           Cisco Systems, Inc\r
-                               80 West Tasman Drive\r
-                               San Jose  CA  94568\r
-                               US\r
-\r
 84-F1-47   (hex)               Cisco Systems, Inc\r
 84F147     (base 16)           Cisco Systems, Inc\r
                                80 West Tasman Drive\r
@@ -137582,6 +138533,18 @@ F87A41     (base 16)         Cisco Systems, Inc
                                Dallas  TX  75243\r
                                US\r
 \r
+F8-7A-41   (hex)               Cisco Systems, Inc\r
+F87A41     (base 16)           Cisco Systems, Inc\r
+                               80 West Tasman Drive\r
+                               San Jose  CA  94568\r
+                               US\r
+\r
+D4-39-B8   (hex)               Ciena Corporation\r
+D439B8     (base 16)           Ciena Corporation\r
+                               7035 Ridge Road\r
+                               Hanover  MD  21076\r
+                               US\r
+\r
 30-C3-D9   (hex)               ALPSALPINE CO,.LTD\r
 30C3D9     (base 16)           ALPSALPINE CO,.LTD\r
                                6-1\r
@@ -137594,6 +138557,444 @@ F87A41     (base 16)                Cisco Systems, Inc
                                Soma-city,  Fukushima-pref.,  976-8501\r
                                JP\r
 \r
+00-25-DF   (hex)               Taser International Inc.\r
+0025DF     (base 16)           Taser International Inc.\r
+                               17800 N 85th St.\r
+                               Scottsdale  AZ  85255\r
+                               US\r
+\r
+74-E9-BF   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+74E9BF     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+D8-10-9F   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+D8109F     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+AC-AE-19   (hex)               Roku, Inc\r
+ACAE19     (base 16)           Roku, Inc\r
+                               1155 Coleman Ave\r
+                               San Jose  CA  95110\r
+                               US\r
+\r
+34-FE-C5   (hex)               Shenzhen Sunwoda intelligent hardware Co.,Ltd\r
+34FEC5     (base 16)           Shenzhen Sunwoda intelligent hardware Co.,Ltd\r
+                               No.6-6,Yan Shan Rd.,Baoan District,Shenzhen City,China\r
+                               Shenzhen  Guangdong  518105\r
+                               CN\r
+\r
+A8-F7-66   (hex)               ITE Tech Inc\r
+A8F766     (base 16)           ITE Tech Inc\r
+                               3F, No.13, Chuangsin 1st Rd., Hsinchu Science Park\r
+                               Hsinchu  Taiwan  30076\r
+                               TW\r
+\r
+14-B2-E5   (hex)               Shenzhen iComm Semiconductor CO.,LTD\r
+14B2E5     (base 16)           Shenzhen iComm Semiconductor CO.,LTD\r
+                               Room 504A,Block B,Digital Building,Gargen City,No.1079,Nanhai Road,Nanshan District,Shenzhen.\r
+                               Shenzhen    518067\r
+                               CN\r
+\r
+00-21-3E   (hex)               TomTom International BV\r
+00213E     (base 16)           TomTom International BV\r
+                               Oosterdoksstraat 114\r
+                               Amsterdam  North Holland  1011 DK\r
+                               NL\r
+\r
+68-3E-26   (hex)               Intel Corporate\r
+683E26     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+8C-55-4A   (hex)               Intel Corporate\r
+8C554A     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+40-1C-83   (hex)               Intel Corporate\r
+401C83     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+38-FC-98   (hex)               Intel Corporate\r
+38FC98     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+50-2F-9B   (hex)               Intel Corporate\r
+502F9B     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+F8-5E-A0   (hex)               Intel Corporate\r
+F85EA0     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+A4-6B-B6   (hex)               Intel Corporate\r
+A46BB6     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+FC-0C-45   (hex)               Shenzhen SuperElectron Technology Co.,Ltd.\r
+FC0C45     (base 16)           Shenzhen SuperElectron Technology Co.,Ltd.\r
+                               1213-1214, haosheng business center, dongbin road, nanshan street, nanshan district, shenzhen city\r
+                               Shenzhen  Guangdong  518000\r
+                               CN\r
+\r
+54-67-E6   (hex)               SHENZHEN MTC CO LTD\r
+5467E6     (base 16)           SHENZHEN MTC CO LTD\r
+                               5th Floor, 3rd Building, SHENZHEN MTC Industrial Park, XiaLilang Rd, Nanwan Street, Long’gang District\r
+                               Shenzhen  Guangdong  518100\r
+                               CN\r
+\r
+3C-54-47   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+3C5447     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+00-6B-6F   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+006B6F     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+A0-3D-6E   (hex)               Cisco Systems, Inc\r
+A03D6E     (base 16)           Cisco Systems, Inc\r
+                               80 West Tasman Drive\r
+                               San Jose  CA  94568\r
+                               US\r
+\r
+70-9C-D1   (hex)               Intel Corporate\r
+709CD1     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+00-0E-B6   (hex)               Riverbed Technology, Inc.\r
+000EB6     (base 16)           Riverbed Technology, Inc.\r
+                               680 Folsom St\r
+                               San Francisco  CA  94107\r
+                               US\r
+\r
+84-44-AF   (hex)               Zhejiang Tmall Technology Co., Ltd.\r
+8444AF     (base 16)           Zhejiang Tmall Technology Co., Ltd.\r
+                               Ali Center,No.3331 Keyuan South RD (Shenzhen bay), Nanshan District, Shenzhen Guangdong province\r
+                               Shenzhen  GuangDong  518000\r
+                               CN\r
+\r
+E4-BF-FA   (hex)               Technicolor CH USA Inc.\r
+E4BFFA     (base 16)           Technicolor CH USA Inc.\r
+                               5030 Sugarloaf Parkway Bldg 6 \r
+                               Lawrenceville  GA  30044\r
+                               US\r
+\r
+8C-64-D4   (hex)               Hyeco Smart Tech Co.,Ltd\r
+8C64D4     (base 16)           Hyeco Smart Tech Co.,Ltd\r
+                               12 Beiqian Lane,Industrial Park\r
+                               Suzhou  Jiangsu  215000\r
+                               CN\r
+\r
+8C-DE-F9   (hex)               Beijing Xiaomi Mobile Software Co., Ltd\r
+8CDEF9     (base 16)           Beijing Xiaomi Mobile Software Co., Ltd\r
+                               The Rainbow City Office Building, 68 Qinghe Middle Street Haidian District\r
+                               Beijing  Beijing  100085\r
+                               CN\r
+\r
+58-AE-2B   (hex)               Huawei Device Co., Ltd.\r
+58AE2B     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+D0-3C-1F   (hex)               Intel Corporate\r
+D03C1F     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+B0-8B-D0   (hex)               Cisco Systems, Inc\r
+B08BD0     (base 16)           Cisco Systems, Inc\r
+                               80 West Tasman Drive\r
+                               San Jose  CA  94568\r
+                               US\r
+\r
+6C-D7-04   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+6CD704     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+54-3A-D6   (hex)               Samsung Electronics Co.,Ltd\r
+543AD6     (base 16)           Samsung Electronics Co.,Ltd\r
+                               129, Samsung-ro, Youngtongl-Gu\r
+                               Suwon  Gyeonggi-Do  16677\r
+                               KR\r
+\r
+54-46-17   (hex)               zte corporation\r
+544617     (base 16)           zte corporation\r
+                               12/F.,zte R&D building ,kejinan Road,Shenzhen,P.R.China\r
+                               shenzhen  guangdong  518057\r
+                               CN\r
+\r
+5C-85-F8   (hex)               SHENZHEN KAIFA TECHNOLOGY CO.,LTD.\r
+5C85F8     (base 16)           SHENZHEN KAIFA TECHNOLOGY CO.,LTD.\r
+                               7006 Caitian Rd., Futian Dist. \r
+                               Shen Zhen  Guang Dong  518035\r
+                               CN\r
+\r
+9C-BC-F0   (hex)               Xiaomi Communications Co Ltd\r
+9CBCF0     (base 16)           Xiaomi Communications Co Ltd\r
+                               The Rainbow City of China Resources\r
+                               NO.68, Qinghe Middle Street  Haidian District, Beijing  100085\r
+                               CN\r
+\r
+14-23-0A   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+14230A     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+58-AE-A8   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+58AEA8     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+48-EC-5B   (hex)               Nokia Solutions and Networks GmbH & Co. KG\r
+48EC5B     (base 16)           Nokia Solutions and Networks GmbH & Co. KG\r
+                               Werinherstrasse 91\r
+                               München  Bavaria  D-81541\r
+                               DE\r
+\r
+00-77-E4   (hex)               Nokia Solutions and Networks GmbH & Co. KG\r
+0077E4     (base 16)           Nokia Solutions and Networks GmbH & Co. KG\r
+                               Werinherstrasse 91\r
+                               München  Bavaria  D-81541\r
+                               DE\r
+\r
+80-22-78   (hex)               China Mobile IOT Company Limited\r
+802278     (base 16)           China Mobile IOT Company Limited\r
+                               NO.8 Yu Ma Road, NanAn Area\r
+                               Chongqing  Chongqing  401336\r
+                               CN\r
+\r
+90-3C-B3   (hex)               Edgecore Networks Corporation\r
+903CB3     (base 16)           Edgecore Networks Corporation\r
+                               1 Creation RD 3.\r
+                               Hsinchu    30077\r
+                               TW\r
+\r
+D8-14-DF   (hex)               TCL King Electrical Appliances (Huizhou) Co., Ltd\r
+D814DF     (base 16)           TCL King Electrical Appliances (Huizhou) Co., Ltd\r
+                               10F, TCL Multimedia Building, TCL International E City, No.1001 Zhongshanyuan Rd., Nanshan District\r
+                               Shenzhen  Guangdong  518052\r
+                               CN\r
+\r
+90-02-7A   (hex)               Shenzhen Sworix Techonlogy Co., Ltd\r
+90027A     (base 16)           Shenzhen Sworix Techonlogy Co., Ltd\r
+                               Room202, 2nd floor, Jianghao commercial center, Jianghao Industrial area,Jihua road 430, Bantian, Longgang\r
+                               Shenzhen    518129\r
+                               CN\r
+\r
+3C-06-A7   (hex)               TP-LINK TECHNOLOGIES CO.,LTD.\r
+3C06A7     (base 16)           TP-LINK TECHNOLOGIES CO.,LTD.\r
+                               Building 24(floors 1,3,4,5)and 28(floors 1-4)Central Science and Technology Park,Shennan Road,Nanshan\r
+                               Shenzhen  Guangdong  518057\r
+                               CN\r
+\r
+24-E9-27   (hex)               TomTom International BV\r
+24E927     (base 16)           TomTom International BV\r
+                               Oosterdoksstraat 114\r
+                               Amsterdam  North Holland  1011 DK\r
+                               NL\r
+\r
+84-5C-F3   (hex)               Intel Corporate\r
+845CF3     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+D0-5A-FD   (hex)               Realme Chongqing Mobile Telecommunications Corp.,Ltd.\r
+D05AFD     (base 16)           Realme Chongqing Mobile Telecommunications Corp.,Ltd.\r
+                               No.178 Yulong Avenue, Yufengshan, Yubei District, Chongqing.\r
+                               Chongqing   China  401120\r
+                               CN\r
+\r
+58-41-20   (hex)               TP-LINK TECHNOLOGIES CO.,LTD.\r
+584120     (base 16)           TP-LINK TECHNOLOGIES CO.,LTD.\r
+                               Building 24(floors 1,3,4,5)and 28(floors 1-4)Central Science and Technology Park,Shennan Road,Nanshan\r
+                               Shenzhen  Guangdong  518057\r
+                               CN\r
+\r
+64-D7-C0   (hex)               Huawei Device Co., Ltd.\r
+64D7C0     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+94-60-10   (hex)               Huawei Device Co., Ltd.\r
+946010     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+2C-79-3D   (hex)               Boditech Med\r
+2C793D     (base 16)           Boditech Med\r
+                               43, Geodudanji 1-gil, Dongnae-myeon, \r
+                               Chuncheon-si, Gangwon-do    24398\r
+                               KR\r
+\r
+6C-02-E0   (hex)               HP Inc.\r
+6C02E0     (base 16)           HP Inc.\r
+                               10300 Energy Dr\r
+                               Spring  TX  77389\r
+                               US\r
+\r
+70-89-76   (hex)               Tuya (HK) Limietd\r
+708976     (base 16)           Tuya (HK) Limietd\r
+                               FLAT/RM 806 BLK ? 8/F CHEUNG SHA WAN PLAZA 833 CHEUNG SHA WAN ROAD KL\r
+                               hongkong  Hong Kong  999077\r
+                               CN\r
+\r
+24-5B-83   (hex)               Renesas Electronics (Penang) Sdn. Bhd.\r
+245B83     (base 16)           Renesas Electronics (Penang) Sdn. Bhd.\r
+                               Phase 3, Bayan Lepas FIZ\r
+                               Bayan Lepas  Penang  11900\r
+                               MY\r
+\r
+F0-F5-64   (hex)               Samsung Electronics Co.,Ltd\r
+F0F564     (base 16)           Samsung Electronics Co.,Ltd\r
+                               #94-1, Imsoo-Dong\r
+                               Gumi  Gyeongbuk  730-350\r
+                               KR\r
+\r
+00-DC-B2   (hex)               Extreme Networks, Inc.\r
+00DCB2     (base 16)           Extreme Networks, Inc.\r
+                               6480 Via Del Oro\r
+                               San Jose  NH  95119\r
+                               US\r
+\r
+6C-13-D5   (hex)               Cisco Systems, Inc\r
+6C13D5     (base 16)           Cisco Systems, Inc\r
+                               80 West Tasman Drive\r
+                               San Jose  CA  94568\r
+                               US\r
+\r
+00-08-B0   (hex)               HUBER+SUHNER BKtel GmbH\r
+0008B0     (base 16)           HUBER+SUHNER BKtel GmbH\r
+                               Benzstraße 4\r
+                               41836 Hückelhoven-Baal  NRW  41836\r
+                               DE\r
+\r
+84-DB-9E   (hex)               Pink Nectarine Health AB\r
+84DB9E     (base 16)           Pink Nectarine Health AB\r
+                               Munkbron 11\r
+                               Stockholm    111 28\r
+                               SE\r
+\r
+18-69-D8   (hex)               Tuya Smart Inc.\r
+1869D8     (base 16)           Tuya Smart Inc.\r
+                               160 Greentree Drive, Suite 101\r
+                               Dover  DE  19904\r
+                               US\r
+\r
+68-AB-BC   (hex)               Beijing Xiaomi Mobile Software Co., Ltd\r
+68ABBC     (base 16)           Beijing Xiaomi Mobile Software Co., Ltd\r
+                               The Rainbow City Office Building, 68 Qinghe Middle Street Haidian District\r
+                               Beijing  Beijing  100085\r
+                               CN\r
+\r
+34-C1-03   (hex)               Hangzhou Huamu Technology Co.,Ltd.\r
+34C103     (base 16)           Hangzhou Huamu Technology Co.,Ltd.\r
+                               Xiangnan village,Yiqiao Town,Xiaoshan District,Hangzhou City,Zhejiang\r
+                               Hangzhou    311256\r
+                               CN\r
+\r
+64-13-AB   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+6413AB     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+B0-60-88   (hex)               Intel Corporate\r
+B06088     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+0C-73-29   (hex)               Sercomm Corporation.\r
+0C7329     (base 16)           Sercomm Corporation.\r
+                               3F,No.81,Yu-Yih Rd.,Chu-Nan Chen\r
+                               Miao-Lih Hsuan    115\r
+                               TW\r
+\r
+5C-C3-36   (hex)               ittim\r
+5CC336     (base 16)           ittim\r
+                               1202, No.6, Zhongguancun South Street, Haidian District,\r
+                               beijing    100080\r
+                               CN\r
+\r
+FC-04-1C   (hex)               GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD\r
+FC041C     (base 16)           GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD\r
+                               NO.18 HAIBIN ROAD,\r
+                               DONG GUAN  GUANG DONG  523860\r
+                               CN\r
+\r
+F4-D4-88   (hex)               Apple, Inc.\r
+F4D488     (base 16)           Apple, Inc.\r
+                               1 Infinite Loop\r
+                               Cupertino  CA  95014\r
+                               US\r
+\r
+68-2F-67   (hex)               Apple, Inc.\r
+682F67     (base 16)           Apple, Inc.\r
+                               1 Infinite Loop\r
+                               Cupertino  CA  95014\r
+                               US\r
+\r
+00-3D-E1   (hex)               Huawei Device Co., Ltd.\r
+003DE1     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+F0-6F-46   (hex)               Ubiik\r
+F06F46     (base 16)           Ubiik\r
+                               2F, No. 151, Aikou 1st Street, \r
+                               Zhubei City  Hsinchu County  302\r
+                               TW\r
+\r
+50-ED-3C   (hex)               Apple, Inc.\r
+50ED3C     (base 16)           Apple, Inc.\r
+                               1 Infinite Loop\r
+                               Cupertino  CA  95014\r
+                               US\r
+\r
+E0-CB-BC   (hex)               Cisco Meraki\r
+E0CBBC     (base 16)           Cisco Meraki\r
+                               500 Terry A. Francois Blvd\r
+                               San Francisco    94158\r
+                               US\r
+\r
+68-3A-1E   (hex)               Cisco Meraki\r
+683A1E     (base 16)           Cisco Meraki\r
+                               500 Terry A. Francois Blvd\r
+                               San Francisco    94158\r
+                               US\r
+\r
 7C-8A-E1   (hex)               COMPAL INFORMATION (KUNSHAN) CO., LTD. \r
 7C8AE1     (base 16)           COMPAL INFORMATION (KUNSHAN) CO., LTD. \r
                                NO. 25, THE 3RD Street KUNSHAN EXPORT PROCESSING ZONE \r
@@ -138668,12 +140069,6 @@ E446DA     (base 16)         Xiaomi Communications Co Ltd
                                Reno  NV  89507\r
                                US\r
 \r
-4C-C8-A1   (hex)               Cisco Meraki\r
-4CC8A1     (base 16)           Cisco Meraki\r
-                               500 Terry A. Francois Blvd\r
-                               San Francisco  null  94158\r
-                               US\r
-\r
 4C-BC-98   (hex)               IEEE Registration Authority\r
 4CBC98     (base 16)           IEEE Registration Authority\r
                                445 Hoes Lane\r
@@ -139640,12 +141035,6 @@ BC5EA1     (base 16)         PsiKick, Inc.
                                Vista  CA  92081\r
                                US\r
 \r
-98-18-88   (hex)               Cisco Meraki\r
-981888     (base 16)           Cisco Meraki\r
-                               500 Terry A. Francois Blvd\r
-                               San Francisco  null  94158\r
-                               US\r
-\r
 18-81-0E   (hex)               Apple, Inc.\r
 18810E     (base 16)           Apple, Inc.\r
                                1 Infinite Loop\r
@@ -140360,12 +141749,6 @@ ACFD93     (base 16)         WEIFANG GOERTEK ELECTRONICS CO.,LTD
                                Weifang  Shandong  261205\r
                                CN\r
 \r
-68-57-2D   (hex)               HANGZHOU AIXIANGJI TECHNOLOGY CO., LTD\r
-68572D     (base 16)           HANGZHOU AIXIANGJI TECHNOLOGY CO., LTD\r
-                               7 Floor, 3 Blvd., More Centre, 87 Gudun Rd., Xihu District\r
-                               Hangzhou  Zhejiang  310012\r
-                               CN\r
-\r
 00-B8-C2   (hex)               Heights Telecom T ltd\r
 00B8C2     (base 16)           Heights Telecom T ltd\r
                                Moshe Lerer 15\r
@@ -140816,12 +142199,6 @@ A057E3     (base 16)         HUAWEI TECHNOLOGIES CO.,LTD
                                NEW TAIPEI  TAIWAN  23585\r
                                TW\r
 \r
-AC-17-C8   (hex)               Cisco Meraki\r
-AC17C8     (base 16)           Cisco Meraki\r
-                               500 Terry A. Francois Blvd\r
-                               San Francisco  null  94158\r
-                               US\r
-\r
 F4-84-4C   (hex)               Texas Instruments\r
 F4844C     (base 16)           Texas Instruments\r
                                12500 TI Blvd\r
@@ -150734,12 +152111,6 @@ FCAA14     (base 16)         GIGA-BYTE TECHNOLOGY CO.,LTD.
                                shenzhen  guanggong  518127\r
                                CN\r
 \r
-74-8F-4D   (hex)               MEN Mikro Elektronik GmbH\r
-748F4D     (base 16)           MEN Mikro Elektronik GmbH\r
-                               Neuwieder Str. 3 - 7\r
-                               Nuernberg  Bavaria  90411\r
-                               DE\r
-\r
 50-67-87   (hex)               Planet Networks\r
 506787     (base 16)           Planet Networks\r
                                1 Ivy Crest Ln\r
@@ -160766,12 +162137,6 @@ EC6C9F     (base 16)         Chengdu Volans Technology CO.,LTD
                                HaiDian District,  Beijing  100089\r
                                CN\r
 \r
-00-12-AD   (hex)               IDS GmbH\r
-0012AD     (base 16)           IDS GmbH\r
-                               Nobelstraße, 18\r
-                               Ettlingen  Baden-Württemberg  76275\r
-                               DE\r
-\r
 00-12-A0   (hex)               NeoMeridian Sdn Bhd\r
 0012A0     (base 16)           NeoMeridian Sdn Bhd\r
                                3A-1, Perdana The Place\r
@@ -170711,12 +172076,6 @@ F0D7AF     (base 16)         IEEE Registration Authority
                                Piscataway  NJ  08554\r
                                US\r
 \r
-84-EA-ED   (hex)               Roku, Inc\r
-84EAED     (base 16)           Roku, Inc\r
-                               150 Winchester Circle\r
-                               Los Gatos  CA  95032\r
-                               US\r
-\r
 7C-B2-7D   (hex)               Intel Corporate\r
 7CB27D     (base 16)           Intel Corporate\r
                                Lot 8, Jalan Hi-Tech 2/3 \r
@@ -171023,12 +172382,6 @@ D89ED4     (base 16)         Fiberhome Telecommunication Technologies Co.,LTD
                                Sunnyvale  CA  94089\r
                                US\r
 \r
-08-9B-B9   (hex)               Nokia\r
-089BB9     (base 16)           Nokia\r
-                               Karaportti 3\r
-                               Espoo  Finland  02610\r
-                               FI\r
-\r
 00-1C-FC   (hex)               Sumitomo Electric Industries, Ltd\r
 001CFC     (base 16)           Sumitomo Electric Industries, Ltd\r
                                1-1-3, Shimaya, Konohana-ku\r
@@ -171233,12 +172586,6 @@ CCB182     (base 16)         HUAWEI TECHNOLOGIES CO.,LTD
                                Lawrenceville  GA  30044\r
                                US\r
 \r
-B0-7D-64   (hex)               Intel Corporate\r
-B07D64     (base 16)           Intel Corporate\r
-                               Lot 8, Jalan Hi-Tech 2/3 \r
-                               Kulim  Kedah  09000\r
-                               MY\r
-\r
 F4-BF-A8   (hex)               Juniper Networks\r
 F4BFA8     (base 16)           Juniper Networks\r
                                1133 Innovation Way\r
@@ -171323,12 +172670,6 @@ A0D0DC     (base 16)         Amazon Technologies Inc.
                                San Jose  CA  94568\r
                                US\r
 \r
-00-42-38   (hex)               Intel Corporate\r
-004238     (base 16)           Intel Corporate\r
-                               Lot 8, Jalan Hi-Tech 2/3 \r
-                               Kulim  Kedah  09000\r
-                               MY\r
-\r
 C8-FE-6A   (hex)               Juniper Networks\r
 C8FE6A     (base 16)           Juniper Networks\r
                                1133 Innovation Way\r
@@ -171797,12 +173138,6 @@ C45A86     (base 16)         Huawei Device Co., Ltd.
                                Round Rock  TX  78682\r
                                US\r
 \r
-10-96-93   (hex)               Amazon Technologies Inc.\r
-109693     (base 16)           Amazon Technologies Inc.\r
-                               P.O Box 8102\r
-                               Reno  NV  89507\r
-                               US\r
-\r
 E4-F1-D4   (hex)               vivo Mobile Communication Co., Ltd.\r
 E4F1D4     (base 16)           vivo Mobile Communication Co., Ltd.\r
                                #283,BBK Road\r
@@ -171982,3 +173317,411 @@ FC62B9     (base 16)                ALPSALPINE CO,.LTD
                                Rosswiesstrasse 29\r
                                CH-8608  Bubikon  ZH\r
                                CH\r
+\r
+1C-D1-BA   (hex)               Fiberhome Telecommunication Technologies Co.,LTD\r
+1CD1BA     (base 16)           Fiberhome Telecommunication Technologies Co.,LTD\r
+                               No.5 DongXin Road\r
+                               Wuhan  Hubei  430074\r
+                               CN\r
+\r
+A8-99-DC   (hex)               i-TOP DESING TECHNOLOGY CO.,LTD\r
+A899DC     (base 16)           i-TOP DESING TECHNOLOGY CO.,LTD\r
+                               301-302,Rongchengda Building,Dabao Road, Bao an District\r
+                               Shenzhen    518101\r
+                               CN\r
+\r
+B0-7B-25   (hex)               Dell Inc.\r
+B07B25     (base 16)           Dell Inc.\r
+                               One Dell Way\r
+                               Round Rock  TX  78682\r
+                               US\r
+\r
+84-EA-ED   (hex)               Roku, Inc\r
+84EAED     (base 16)           Roku, Inc\r
+                               1155 Coleman Ave\r
+                               San Jose  CA  95110\r
+                               US\r
+\r
+00-12-AD   (hex)               VIVAVIS AG\r
+0012AD     (base 16)           VIVAVIS AG\r
+                               Nobelstraße, 18\r
+                               Ettlingen  Baden-Württemberg  76275\r
+                               DE\r
+\r
+E0-29-67   (hex)               HMD Global Oy\r
+E02967     (base 16)           HMD Global Oy\r
+                               Bertel Jungin aukio 9\r
+                               Espoo    02600\r
+                               FI\r
+\r
+98-8B-69   (hex)               Shenzhen hylitech Co.,LTD\r
+988B69     (base 16)           Shenzhen hylitech Co.,LTD\r
+                               Room 1001, Tower B, Daulshine Global Science And Technology Center, Hong Lang 2 Road North, Baoan District, Shenzhen 518101, China\r
+                               shenzhen  GuangDong  518109\r
+                               CN\r
+\r
+18-14-6C   (hex)               Zhejiang Tmall Technology Co., Ltd.\r
+18146C     (base 16)           Zhejiang Tmall Technology Co., Ltd.\r
+                               Ali Center,No.3331 Keyuan South RD (Shenzhen bay), Nanshan District, Shenzhen Guangdong province\r
+                               Shenzhen  GuangDong  518000\r
+                               CN\r
+\r
+3C-20-93   (hex)               GD Midea Air-Conditioning Equipment Co.,Ltd.\r
+3C2093     (base 16)           GD Midea Air-Conditioning Equipment Co.,Ltd.\r
+                               Midea Global Innovation Center,Beijiao Town,Shunde\r
+                               Foshan  Guangdong  528311\r
+                               CN\r
+\r
+9C-05-67   (hex)               Honor Device Co., Ltd.\r
+9C0567     (base 16)           Honor Device Co., Ltd.\r
+                               A1701, Block AB, Building 1, Tianan Yungu Phase I, Gangtou Community, Bantian Street\r
+                               Shenzhen  Guangdong  518129\r
+                               CN\r
+\r
+B0-7D-64   (hex)               Intel Corporate\r
+B07D64     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+00-42-38   (hex)               Intel Corporate\r
+004238     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+C0-E3-FB   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+C0E3FB     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+80-4B-50   (hex)               Silicon Laboratories\r
+804B50     (base 16)           Silicon Laboratories\r
+                               400 West Cesar Chavez Street\r
+                               Austin  TX  78701\r
+                               US\r
+\r
+40-89-A8   (hex)               WiredIQ, LLC\r
+4089A8     (base 16)           WiredIQ, LLC\r
+                               1 South School Avenue\r
+                               sarasota  FL  34237\r
+                               US\r
+\r
+68-3F-7D   (hex)               INGRAM MICRO SERVICES\r
+683F7D     (base 16)           INGRAM MICRO SERVICES\r
+                               100 CHEMIN DE BAILLOT\r
+                               MONTAUBAN    82000\r
+                               FR\r
+\r
+74-8F-4D   (hex)               duagon Germany GmbH\r
+748F4D     (base 16)           duagon Germany GmbH\r
+                               Neuwieder Straße 1-7\r
+                               Nuremberg  Bavaria  90411\r
+                               DE\r
+\r
+D4-EC-AB   (hex)               vivo Mobile Communication Co., Ltd.\r
+D4ECAB     (base 16)           vivo Mobile Communication Co., Ltd.\r
+                               #283,BBK Road\r
+                               Wusha,Chang'An  DongGuan City,Guangdong,  523860\r
+                               CN\r
+\r
+BC-3E-CB   (hex)               vivo Mobile Communication Co., Ltd.\r
+BC3ECB     (base 16)           vivo Mobile Communication Co., Ltd.\r
+                               #283,BBK Road\r
+                               Wusha,Chang'An  DongGuan City,Guangdong,  523860\r
+                               CN\r
+\r
+08-79-8C   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+08798C     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+50-C3-A2   (hex)               nFore Technology Co.,Ltd.\r
+50C3A2     (base 16)           nFore Technology Co.,Ltd.\r
+                               5F., No.31, Ln. 258, Ruiguang Rd. Neihu Dist., Taipei City 114, Taiwan\r
+                               Taipei    114\r
+                               TW\r
+\r
+54-DB-A2   (hex)               Fibrain\r
+54DBA2     (base 16)           Fibrain\r
+                               Zaczernie 190F\r
+                               Zaczernie  Subcarpathia  36-062\r
+                               PL\r
+\r
+08-9B-B9   (hex)               Nokia Solutions and Networks GmbH & Co. KG\r
+089BB9     (base 16)           Nokia Solutions and Networks GmbH & Co. KG\r
+                               Werinherstrasse 91\r
+                               München  Bavaria  D-81541\r
+                               DE\r
+\r
+44-AE-25   (hex)               Cisco Systems, Inc\r
+44AE25     (base 16)           Cisco Systems, Inc\r
+                               80 West Tasman Drive\r
+                               San Jose  CA  94568\r
+                               US\r
+\r
+BC-E7-12   (hex)               Cisco Systems, Inc\r
+BCE712     (base 16)           Cisco Systems, Inc\r
+                               80 West Tasman Drive\r
+                               San Jose  CA  94568\r
+                               US\r
+\r
+64-A1-98   (hex)               Huawei Device Co., Ltd.\r
+64A198     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+5C-9A-A1   (hex)               Huawei Device Co., Ltd.\r
+5C9AA1     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+60-55-F9   (hex)               Espressif Inc.\r
+6055F9     (base 16)           Espressif Inc.\r
+                               Room 204, Building 2, 690 Bibo Rd, Pudong New Area\r
+                               Shanghai  Shanghai  201203\r
+                               CN\r
+\r
+50-3D-C6   (hex)               Xiaomi Communications Co Ltd\r
+503DC6     (base 16)           Xiaomi Communications Co Ltd\r
+                               The Rainbow City of China Resources\r
+                               NO.68, Qinghe Middle Street  Haidian District, Beijing  100085\r
+                               CN\r
+\r
+8C-EA-48   (hex)               Samsung Electronics Co.,Ltd\r
+8CEA48     (base 16)           Samsung Electronics Co.,Ltd\r
+                               129, Samsung-ro, Youngtongl-Gu\r
+                               Suwon  Gyeonggi-Do  16677\r
+                               KR\r
+\r
+00-5F-67   (hex)               TP-Link Corporation Limited\r
+005F67     (base 16)           TP-Link Corporation Limited\r
+                               Room 901,9/F.New East Ocean Centre, 9 Science Museum Road\r
+                                Tsim Sha Tsui  Kowloon  999077\r
+                               HK\r
+\r
+BC-F4-5F   (hex)               zte corporation\r
+BCF45F     (base 16)           zte corporation\r
+                               12/F.,zte R&D building ,kejinan Road,Shenzhen,P.R.China\r
+                               shenzhen  guangdong  518057\r
+                               CN\r
+\r
+B0-BD-1B   (hex)               Dongguan Liesheng Electronic Co., Ltd.\r
+B0BD1B     (base 16)           Dongguan Liesheng Electronic Co., Ltd.\r
+                               F5, Building B, North Block, Gaosheng Tech Park, No. 84 Zhongli Road, Nancheng District, Dongguan Ci\r
+                               dongguan   guangdong  523000\r
+                               CN\r
+\r
+10-96-93   (hex)               Amazon Technologies Inc.\r
+109693     (base 16)           Amazon Technologies Inc.\r
+                               P.O Box 8102 \r
+                               Reno  NV  89507\r
+                               US\r
+\r
+34-AF-B3   (hex)               Amazon Technologies Inc.\r
+34AFB3     (base 16)           Amazon Technologies Inc.\r
+                               P.O Box 8102 \r
+                               Reno  NV  89507\r
+                               US\r
+\r
+14-18-C3   (hex)               Intel Corporate\r
+1418C3     (base 16)           Intel Corporate\r
+                               Lot 8, Jalan Hi-Tech 2/3  \r
+                               Kulim  Kedah  09000\r
+                               MY\r
+\r
+24-ED-FD   (hex)               Siemens Canada Limited\r
+24EDFD     (base 16)           Siemens Canada Limited\r
+                               1954 Technology Drive\r
+                               Peterborough  Ontario  K9J 6X7\r
+                               CA\r
+\r
+6C-CD-D6   (hex)               NETGEAR\r
+6CCDD6     (base 16)           NETGEAR\r
+                               350 East Plumeria Drive\r
+                               San Jose  CA  95134\r
+                               US\r
+\r
+54-07-64   (hex)               Huawei Device Co., Ltd.\r
+540764     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+DC-D7-A0   (hex)               Huawei Device Co., Ltd.\r
+DCD7A0     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+9C-68-65   (hex)               Fiberhome Telecommunication Technologies Co.,LTD\r
+9C6865     (base 16)           Fiberhome Telecommunication Technologies Co.,LTD\r
+                               No.5 DongXin Road\r
+                               Wuhan  Hubei  430074\r
+                               CN\r
+\r
+38-3D-5B   (hex)               Fiberhome Telecommunication Technologies Co.,LTD\r
+383D5B     (base 16)           Fiberhome Telecommunication Technologies Co.,LTD\r
+                               No.5 DongXin Road\r
+                               Wuhan  Hubei  430074\r
+                               CN\r
+\r
+A0-62-FB   (hex)               HISENSE VISUAL TECHNOLOGY CO.,LTD\r
+A062FB     (base 16)           HISENSE VISUAL TECHNOLOGY CO.,LTD\r
+                               Qianwangang Road 218\r
+                               Qingdao  Shandong  266510\r
+                               CN\r
+\r
+98-77-E7   (hex)               Kaonmedia CO., LTD.\r
+9877E7     (base 16)           Kaonmedia CO., LTD.\r
+                               884-3, Seongnam-daero, Bundang-gu\r
+                               Seongnam-si  Gyeonggi-do  13517\r
+                               KR\r
+\r
+78-D4-F1   (hex)               IEEE Registration Authority\r
+78D4F1     (base 16)           IEEE Registration Authority\r
+                               445 Hoes Lane\r
+                               Piscataway  NJ  08554\r
+                               US\r
+\r
+B0-16-56   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+B01656     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+04-79-75   (hex)               Honor Device Co., Ltd.\r
+047975     (base 16)           Honor Device Co., Ltd.\r
+                               A1701, Block AB, Building 1, Tianan Yungu Phase I, Gangtou Community, Bantian Street\r
+                               Shenzhen  Guangdong  518129\r
+                               CN\r
+\r
+DC-90-20   (hex)               RURU TEK PRIVATE LIMITED \r
+DC9020     (base 16)           RURU TEK PRIVATE LIMITED \r
+                               The Canopy , BLOCK A  , SECOND FLOOR , UNIT 1B , PARANUR RAILWAY STATION ROAD ,MAHINDRA WORLD CITY,\r
+                               CHENGALPATTU  TAMILNADU  603004\r
+                               IN\r
+\r
+38-10-F0   (hex)               Aruba, a Hewlett Packard Enterprise Company\r
+3810F0     (base 16)           Aruba, a Hewlett Packard Enterprise Company\r
+                               3333 Scott Blvd\r
+                               Santa Clara  CA  95054\r
+                               US\r
+\r
+F8-8F-07   (hex)               Samsung Electronics Co.,Ltd\r
+F88F07     (base 16)           Samsung Electronics Co.,Ltd\r
+                               #94-1, Imsoo-Dong\r
+                               Gumi  Gyeongbuk  730-350\r
+                               KR\r
+\r
+14-EB-08   (hex)               HUAWEI TECHNOLOGIES CO.,LTD\r
+14EB08     (base 16)           HUAWEI TECHNOLOGIES CO.,LTD\r
+                               No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park\r
+                               Dongguan    523808\r
+                               CN\r
+\r
+A8-42-A7   (hex)               Jiangsu Huitong Group Co.,Ltd.\r
+A842A7     (base 16)           Jiangsu Huitong Group Co.,Ltd.\r
+                               No. 24, Block 2, Taohuawu New District\r
+                               Zhenjiang  Jiangsu  212003\r
+                               CN\r
+\r
+2C-D2-6B   (hex)               FN-LINK TECHNOLOGY LIMITED\r
+2CD26B     (base 16)           FN-LINK TECHNOLOGY LIMITED\r
+                               A Building,HuiXin industial park,No 31, YongHe road, Fuyong town, Bao'an District\r
+                               SHENZHEN  GUANGDONG  518100\r
+                               CN\r
+\r
+B8-8D-F1   (hex)               Nanjing BigFish Semiconductor Co., Ltd.\r
+B88DF1     (base 16)           Nanjing BigFish Semiconductor Co., Ltd.\r
+                               7th Floor,Block A, Chuangzhi Building, No.17, Xinghuo Road\r
+                               Nanjing  Jiangsu  210032\r
+                               CN\r
+\r
+6C-4A-74   (hex)               AERODISK LLC\r
+6C4A74     (base 16)           AERODISK LLC\r
+                               Obrucheva, 30/1 b1\r
+                               Moscow  Moskva  117485\r
+                               RU\r
+\r
+40-DE-17   (hex)               Shenzhen Lanfeng Times Industrial Co.,Ltd.\r
+40DE17     (base 16)           Shenzhen Lanfeng Times Industrial Co.,Ltd.\r
+                               Introduction Building 6F,71 Xin’an Street, Baoan District\r
+                               Shenzhen  Guangdong  518101\r
+                               CN\r
+\r
+F0-16-28   (hex)               Technicolor (China) Technology Co., Ltd.\r
+F01628     (base 16)           Technicolor (China) Technology Co., Ltd.\r
+                               No.A2181,2F,Zhongguancun Dongsheng Science and Technology Park, Jia No.18, Xueqing Rd., Haidian District\r
+                               Beijing    100083\r
+                               CN\r
+\r
+68-57-2D   (hex)               Tuya Smart Inc.\r
+68572D     (base 16)           Tuya Smart Inc.\r
+                               160 Greentree Drive, Suite 101\r
+                               Dover  DE  19904\r
+                               US\r
+\r
+14-98-77   (hex)               Apple, Inc.\r
+149877     (base 16)           Apple, Inc.\r
+                               1 Infinite Loop\r
+                               Cupertino  CA  95014\r
+                               US\r
+\r
+88-66-5A   (hex)               Apple, Inc.\r
+88665A     (base 16)           Apple, Inc.\r
+                               1 Infinite Loop\r
+                               Cupertino  CA  95014\r
+                               US\r
+\r
+B0-E5-F9   (hex)               Apple, Inc.\r
+B0E5F9     (base 16)           Apple, Inc.\r
+                               1 Infinite Loop\r
+                               Cupertino  CA  95014\r
+                               US\r
+\r
+84-71-6A   (hex)               Huawei Device Co., Ltd.\r
+84716A     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+48-8C-63   (hex)               Huawei Device Co., Ltd.\r
+488C63     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+70-DD-EF   (hex)               Huawei Device Co., Ltd.\r
+70DDEF     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+54-A6-DB   (hex)               Huawei Device Co., Ltd.\r
+54A6DB     (base 16)           Huawei Device Co., Ltd.\r
+                               No.2 of Xincheng Road, Songshan Lake Zone\r
+                               Dongguan  Guangdong  523808\r
+                               CN\r
+\r
+AC-17-C8   (hex)               Cisco Meraki\r
+AC17C8     (base 16)           Cisco Meraki\r
+                               500 Terry A. Francois Blvd\r
+                               San Francisco    94158\r
+                               US\r
+\r
+98-18-88   (hex)               Cisco Meraki\r
+981888     (base 16)           Cisco Meraki\r
+                               500 Terry A. Francois Blvd\r
+                               San Francisco    94158\r
+                               US\r
+\r
+4C-C8-A1   (hex)               Cisco Meraki\r
+4CC8A1     (base 16)           Cisco Meraki\r
+                               500 Terry A. Francois Blvd\r
+                               San Francisco    94158\r
+                               US\r
index cbfdf97c0232255c67762d207da96ddaa9a2a611..43a498c09f137175a8c17ab122bcab3c0bc977b3 100644 (file)
@@ -3536,6 +3536,12 @@ E00000-EFFFFF     (base 16)              Nanjing Yining Intelligent Technology Co., Ltd.
                                Nanjing  Jiangsu  210019\r
                                CN\r
 \r
+B0-B3-53   (hex)               Blake UK\r
+000000-0FFFFF     (base 16)            Blake UK\r
+                               177-187, Rutland Road\r
+                               Sheffield  --select--  S3 9PT\r
+                               GB\r
+\r
 B0-B3-53   (hex)               Beijing Geekplus Technology Co.,Ltd.\r
 C00000-CFFFFF     (base 16)            Beijing Geekplus Technology Co.,Ltd.\r
                                1st Floor, Building 1, Chaolai High-Tech industrial Part, Chaoyang District\r
@@ -3548,12 +3554,6 @@ D00000-DFFFFF     (base 16)              IPvideo Corporation
                                Bay Shore  NY  11706\r
                                US\r
 \r
-B0-B3-53   (hex)               Blake UK\r
-000000-0FFFFF     (base 16)            Blake UK\r
-                               177-187, Rutland Road\r
-                               Sheffield  --select--  S3 9PT\r
-                               GB\r
-\r
 B0-B3-53   (hex)               Zoox\r
 B00000-BFFFFF     (base 16)            Zoox\r
                                1149 Chess Drive\r
@@ -3572,30 +3572,30 @@ B00000-BFFFFF     (base 16)             Zoox
                                New Taipei City  Xizhi Dist  221\r
                                TW\r
 \r
-14-AE-85   (hex)               MTA Systems\r
-A00000-AFFFFF     (base 16)            MTA Systems\r
-                               Pemstraße 2\r
-                               Mauthausen    4310\r
-                               AT\r
-\r
-64-62-66   (hex)               MiiVii Dynamics Technology CO.,LTD\r
-000000-0FFFFF     (base 16)            MiiVii Dynamics Technology CO.,LTD\r
-                               1408-1415 Tower A BUGG Building,No.18 N. Taipingzhuang Rd,haidian District\r
-                               Beijing  Beijing  100000\r
-                               CN\r
-\r
 64-62-66   (hex)               Annapurna labs\r
 100000-1FFFFF     (base 16)            Annapurna labs\r
                                Matam Scientific Industries Center,   Building 8.2\r
                                Mail box 15123  Haifa  3508409\r
                                IL\r
 \r
+14-AE-85   (hex)               MTA Systems\r
+A00000-AFFFFF     (base 16)            MTA Systems\r
+                               Pemstraße 2\r
+                               Mauthausen    4310\r
+                               AT\r
+\r
 64-62-66   (hex)               Bühler AG\r
 500000-5FFFFF     (base 16)            Bühler AG\r
                                Gupfenstrasse 5\r
                                Uzwil    9240\r
                                CH\r
 \r
+64-62-66   (hex)               MiiVii Dynamics Technology CO.,LTD\r
+000000-0FFFFF     (base 16)            MiiVii Dynamics Technology CO.,LTD\r
+                               1408-1415 Tower A BUGG Building,No.18 N. Taipingzhuang Rd,haidian District\r
+                               Beijing  Beijing  100000\r
+                               CN\r
+\r
 64-62-66   (hex)               Shenzhen Jie Shi Lian Industrial Co., LTD\r
 E00000-EFFFFF     (base 16)            Shenzhen Jie Shi Lian Industrial Co., LTD\r
                                6F,C Building,Jinao Industrial Park,Juling Rd,Guanlan Town,Longhua\r
@@ -3608,30 +3608,24 @@ E00000-EFFFFF     (base 16)             Shenzhen Jie Shi Lian Industrial Co., LTD
                                Hong Kong  Hong Kong  00000\r
                                HK\r
 \r
-94-CC-04   (hex)               Sam Nazarko Trading Ltd\r
-600000-6FFFFF     (base 16)            Sam Nazarko Trading Ltd\r
-                               18 Watermill Way\r
-                               London  Surrey  SW19 2RD\r
-                               GB\r
-\r
 94-CC-04   (hex)               Hanzhuo Information Technology(Shanghai) Ltd.\r
 D00000-DFFFFF     (base 16)            Hanzhuo Information Technology(Shanghai) Ltd.\r
                                Room 2085, building 2, 622 Yingyuan middle Road, Jiading Strict\r
                                Shanghai    201200\r
                                CN\r
 \r
+94-CC-04   (hex)               Sam Nazarko Trading Ltd\r
+600000-6FFFFF     (base 16)            Sam Nazarko Trading Ltd\r
+                               18 Watermill Way\r
+                               London  Surrey  SW19 2RD\r
+                               GB\r
+\r
 94-CC-04   (hex)               hyBee Inc.\r
 A00000-AFFFFF     (base 16)            hyBee Inc.\r
                                #1003, Innovalley B, 253, Pangyo-ro, Bundang-gu\r
                                Seongnam-si  Gyeonggi-do  13486\r
                                KR\r
 \r
-94-05-BB   (hex)               iungo\r
-800000-8FFFFF     (base 16)            iungo\r
-                               Vrouwenlaan 62\r
-                               Zwolle  Overijssel  8017 HS\r
-                               NL\r
-\r
 94-CC-04   (hex)               Nanjing Yacer Communication Technology Co. Ltd.\r
 200000-2FFFFF     (base 16)            Nanjing Yacer Communication Technology Co. Ltd.\r
                                333 Taiping South Road Jinling Yujingyuan 19nd  floor Unit K Qin Huai District\r
@@ -3644,72 +3638,78 @@ A00000-AFFFFF     (base 16)             hyBee Inc.
                                Dubai    90072\r
                                AE\r
 \r
+94-05-BB   (hex)               iungo\r
+800000-8FFFFF     (base 16)            iungo\r
+                               Vrouwenlaan 62\r
+                               Zwolle  Overijssel  8017 HS\r
+                               NL\r
+\r
+94-05-BB   (hex)               Qingdao Maotran Electronics co., ltd\r
+000000-0FFFFF     (base 16)            Qingdao Maotran Electronics co., ltd\r
+                               Room2907, Building 2 of Minghui International, No.39 of Shiling Road, Laoshan District\r
+                               Qingdao  Shandong  266000\r
+                               CN\r
+\r
 94-05-BB   (hex)               Dongguan CXWE Technology Co.,Ltd.\r
 200000-2FFFFF     (base 16)            Dongguan CXWE Technology Co.,Ltd.\r
                                Room 805, building 1, No. 16, Keji 4th Road, Songshanhu\r
                                Dongguan  Guangdong  523000\r
                                CN\r
 \r
+F4-90-CB   (hex)               Cheetah Medical\r
+C00000-CFFFFF     (base 16)            Cheetah Medical\r
+                               2A Hashlosha st.\r
+                               Tel Aviv    6706055\r
+                               IL\r
+\r
 94-05-BB   (hex)               Zimmer GmbH\r
 900000-9FFFFF     (base 16)            Zimmer GmbH\r
                                Im Salmenkopf 5\r
                                Rheinau  Baden-Württemberg  77866\r
                                DE\r
 \r
-94-05-BB   (hex)               Qingdao Maotran Electronics co., ltd\r
-000000-0FFFFF     (base 16)            Qingdao Maotran Electronics co., ltd\r
-                               Room2907, Building 2 of Minghui International, No.39 of Shiling Road, Laoshan District\r
-                               Qingdao  Shandong  266000\r
-                               CN\r
-\r
 94-05-BB   (hex)               BAE Systems\r
 E00000-EFFFFF     (base 16)            BAE Systems\r
                                21 continental boulevard\r
                                Merrimack  NH  03054\r
                                US\r
 \r
-F4-90-CB   (hex)               Cheetah Medical\r
-C00000-CFFFFF     (base 16)            Cheetah Medical\r
-                               2A Hashlosha st.\r
-                               Tel Aviv    6706055\r
-                               IL\r
-\r
 F4-90-CB   (hex)               A-dec Inc.\r
 B00000-BFFFFF     (base 16)            A-dec Inc.\r
                                2601 Crestview Drive\r
                                Newberg  OR  97132\r
                                US\r
 \r
-C0-9B-F4   (hex)               LTD Delovoy Office\r
-600000-6FFFFF     (base 16)            LTD Delovoy Office\r
-                               Block “B”, floor 6, build 4/1, Stroiteley blvd\r
-                               Krasnogorsk    143401\r
-                               RU\r
-\r
 94-05-BB   (hex)               LTE-X, Inc\r
 700000-7FFFFF     (base 16)            LTE-X, Inc\r
                                4F Ginza Showa Dori Building 8-14-14 Ginza\r
                                Chuo-ku  Tokyo  104-0062\r
                                JP\r
 \r
+C0-9B-F4   (hex)               LTD Delovoy Office\r
+600000-6FFFFF     (base 16)            LTD Delovoy Office\r
+                               Block “B”, floor 6, build 4/1, Stroiteley blvd\r
+                               Krasnogorsk    143401\r
+                               RU\r
+\r
 F4-90-CB   (hex)               TEQ SA\r
 700000-7FFFFF     (base 16)            TEQ SA\r
                                Via al Municipio 16\r
                                Barbengo  Ticino  6917\r
                                CH\r
 \r
-E8-B4-70   (hex)               YAWATA ELECTRIC INDUSTRIAL CO.,LTD.\r
-400000-4FFFFF     (base 16)            YAWATA ELECTRIC INDUSTRIAL CO.,LTD.\r
-                               1-17-1 Ohmorihigashi\r
-                               Ohta-ku  Tokyo  143-0012\r
-                               JP\r
-\r
 A4-DA-22   (hex)               Grundig\r
 A00000-AFFFFF     (base 16)            Grundig\r
                                Steinhof 39\r
                                Erkrath   North Rhine-Westphalia  40699\r
                                DE\r
 \r
+E8-B4-70   (hex)               YAWATA ELECTRIC INDUSTRIAL CO.,LTD.\r
+400000-4FFFFF     (base 16)            YAWATA ELECTRIC INDUSTRIAL CO.,LTD.\r
+                               1-17-1 Ohmorihigashi\r
+                               Ohta-ku  Tokyo  143-0012\r
+                               JP\r
+\r
 E8-B4-70   (hex)               Tibit Communications\r
 700000-7FFFFF     (base 16)            Tibit Communications\r
                                1 Willowbrook Court, Suite 150\r
@@ -3728,12 +3728,6 @@ E8-B4-70   (hex)         Tibit Communications
                                Zhonghe Dist.  New Taipei City  23512\r
                                TW\r
 \r
-94-FB-A7   (hex)               Reichert Inc.\r
-000000-0FFFFF     (base 16)            Reichert Inc.\r
-                               3362 Walden Ave\r
-                               Depew  NY  14043\r
-                               US\r
-\r
 38-F7-CD   (hex)               VANGUARD\r
 300000-3FFFFF     (base 16)            VANGUARD\r
                                1st Floor 3 Moore \r
@@ -3752,6 +3746,12 @@ B00000-BFFFFF     (base 16)              Fibergate Inc.
                                Tokyo  Minato-ku  1050012\r
                                JP\r
 \r
+94-FB-A7   (hex)               Reichert Inc.\r
+000000-0FFFFF     (base 16)            Reichert Inc.\r
+                               3362 Walden Ave\r
+                               Depew  NY  14043\r
+                               US\r
+\r
 38-F7-CD   (hex)               Fast Cotton(Beijing) Limited\r
 600000-6FFFFF     (base 16)            Fast Cotton(Beijing) Limited\r
                                Fast Cotton(Beijing)Limited\r
@@ -3794,11 +3794,11 @@ B00000-BFFFFF     (base 16)             EVCO SPA
                                SEDICO  BELLUNO  32036\r
                                IT\r
 \r
-AC-1D-DF   (hex)               FINEpowerX INC\r
-B00000-BFFFFF     (base 16)            FINEpowerX INC\r
-                               Rm 2208, U-Tower, 120 HeungDeok JungAng-ro, GiHeung-Gu\r
-                               YongIn-si  Gyeonggi-do  16950\r
-                               KR\r
+F0-D7-AF   (hex)               Rievtech Electronic Co.,Ltd \r
+700000-7FFFFF     (base 16)            Rievtech Electronic Co.,Ltd \r
+                               Room 505, Building A, No.88,Dazhou Road,Tiexinqiao,Yu huatai District, Nanjing City, Jiangsu Province,P.R.China +0086 25 52895099                 52890138 info@rievtech.com sales@rievtech.com\r
+                               Nanjing City  Jiangsu Province  210000\r
+                               CN\r
 \r
 F0-D7-AF   (hex)               Shenzhen Virtual Clusters Information Technology Co.,Ltd.\r
 C00000-CFFFFF     (base 16)            Shenzhen Virtual Clusters Information Technology Co.,Ltd.\r
@@ -3806,11 +3806,11 @@ C00000-CFFFFF     (base 16)             Shenzhen Virtual Clusters Information Technology Co
                                Shenzhen    518054\r
                                CN\r
 \r
-F0-D7-AF   (hex)               Rievtech Electronic Co.,Ltd \r
-700000-7FFFFF     (base 16)            Rievtech Electronic Co.,Ltd \r
-                               Room 505, Building A, No.88,Dazhou Road,Tiexinqiao,Yu huatai District, Nanjing City, Jiangsu Province,P.R.China +0086 25 52895099                 52890138 info@rievtech.com sales@rievtech.com\r
-                               Nanjing City  Jiangsu Province  210000\r
-                               CN\r
+AC-1D-DF   (hex)               FINEpowerX INC\r
+B00000-BFFFFF     (base 16)            FINEpowerX INC\r
+                               Rm 2208, U-Tower, 120 HeungDeok JungAng-ro, GiHeung-Gu\r
+                               YongIn-si  Gyeonggi-do  16950\r
+                               KR\r
 \r
 30-49-50   (hex)               ATLI WORLD LIMITED\r
 100000-1FFFFF     (base 16)            ATLI WORLD LIMITED\r
@@ -3818,24 +3818,30 @@ F0-D7-AF   (hex)                Rievtech Electronic Co.,Ltd
                                Kowloon  Hong Kong  852\r
                                HK\r
 \r
+30-49-50   (hex)               Anacove LLC\r
+C00000-CFFFFF     (base 16)            Anacove LLC\r
+                               7856 Revelle drive\r
+                               LA JOLLA  CA  92037\r
+                               US\r
+\r
 30-49-50   (hex)               Ledworks SRL\r
 A00000-AFFFFF     (base 16)            Ledworks SRL\r
                                Via Tortona 37\r
                                Milano  Milano  20144\r
                                IT\r
 \r
+D0-D9-4F   (hex)               Mitsubishi Electric US, Inc.\r
+700000-7FFFFF     (base 16)            Mitsubishi Electric US, Inc.\r
+                               1340 Satellite Boulevard\r
+                               Suwanee  GA  30345\r
+                               US\r
+\r
 30-49-50   (hex)               Sercomm Corporation.\r
 200000-2FFFFF     (base 16)            Sercomm Corporation.\r
                                3F,No.81,Yu-Yih Rd.,Chu-Nan Chen\r
                                Miao-Lih Hsuan    115\r
                                TW\r
 \r
-30-49-50   (hex)               Anacove LLC\r
-C00000-CFFFFF     (base 16)            Anacove LLC\r
-                               7856 Revelle drive\r
-                               LA JOLLA  CA  92037\r
-                               US\r
-\r
 D0-14-11   (hex)               powerall\r
 400000-4FFFFF     (base 16)            powerall\r
                                75,Ojeong-ro,Bucheon-si,Gyeonggi-do,Republic of korea\r
@@ -3848,30 +3854,12 @@ A00000-AFFFFF     (base 16)             ABB EVI SPA
                                TERRANUOVA BRACCIOLINI  AREZZO  52028\r
                                IT\r
 \r
-D0-D9-4F   (hex)               Mitsubishi Electric US, Inc.\r
-700000-7FFFFF     (base 16)            Mitsubishi Electric US, Inc.\r
-                               1340 Satellite Boulevard\r
-                               Suwanee  GA  30345\r
-                               US\r
-\r
 D0-14-11   (hex)               Airthings\r
 900000-9FFFFF     (base 16)            Airthings\r
                                Wergelandsveien 7\r
                                Oslo    0167\r
                                NO\r
 \r
-5C-85-7E   (hex)               Shenzhen IP3 Century Intelligent Technology CO.,Ltd\r
-400000-4FFFFF     (base 16)            Shenzhen IP3 Century Intelligent Technology CO.,Ltd\r
-                               aiying.li@ip3-tech.com\r
-                               Shenzhen    518057\r
-                               CN\r
-\r
-5C-85-7E   (hex)               Shanghai Yanhe automation technology co.,LTD\r
-500000-5FFFFF     (base 16)            Shanghai Yanhe automation technology co.,LTD\r
-                               Room E2204, Building 1, 5500 Yuan Jiang Road, MinHang District\r
-                               ShangHai    201100\r
-                               CN\r
-\r
 F4-69-D5   (hex)               ShenZhenShi EVADA technology Co.,Ltd\r
 A00000-AFFFFF     (base 16)            ShenZhenShi EVADA technology Co.,Ltd\r
                                Qianhai,No.1 qianwan Road\r
@@ -3884,6 +3872,18 @@ F4-69-D5   (hex)         Mossman Limited
                                57-59 Au Pui Wan Street, Fotan, Shatin  Hong Kong  NT\r
                                HK\r
 \r
+5C-85-7E   (hex)               Shenzhen IP3 Century Intelligent Technology CO.,Ltd\r
+400000-4FFFFF     (base 16)            Shenzhen IP3 Century Intelligent Technology CO.,Ltd\r
+                               aiying.li@ip3-tech.com\r
+                               Shenzhen    518057\r
+                               CN\r
+\r
+5C-85-7E   (hex)               Shanghai Yanhe automation technology co.,LTD\r
+500000-5FFFFF     (base 16)            Shanghai Yanhe automation technology co.,LTD\r
+                               Room E2204, Building 1, 5500 Yuan Jiang Road, MinHang District\r
+                               ShangHai    201100\r
+                               CN\r
+\r
 5C-85-7E   (hex)               ProdataKey\r
 600000-6FFFFF     (base 16)            ProdataKey\r
                                67 W 13490 S\r
@@ -3908,12 +3908,6 @@ F4-69-D5   (hex)         Rosco, Inc
                                Jamaica  NY  11435\r
                                US\r
 \r
-4C-93-A6   (hex)               4D Sistem Ticaret A.S.\r
-400000-4FFFFF     (base 16)            4D Sistem Ticaret A.S.\r
-                               Oran Mah. Turan Gunes Bul. Park Oran Ofis 180-Y No:6 Cankaya \r
-                               ANKARA    06550\r
-                               TR\r
-\r
 4C-93-A6   (hex)               Private\r
 500000-5FFFFF     (base 16)            Private\r
 \r
@@ -3923,36 +3917,36 @@ F4-69-D5   (hex)                Rosco, Inc
                                Nanjing  Jiangsu  211100\r
                                CN\r
 \r
-28-B7-7C   (hex)               Shenzhen PUAS Industrial Co.,LTD\r
-800000-8FFFFF     (base 16)            Shenzhen PUAS Industrial Co.,LTD\r
-                               2/F, C/Building, Huawang Industrial Park, LongHua New Area In Shenzhen 518106 P.R.C\r
-                               Shenzhen  Guangdong  518106\r
-                               CN\r
-\r
 4C-93-A6   (hex)               Commsignia, Ltd.\r
 300000-3FFFFF     (base 16)            Commsignia, Ltd.\r
                                Irinyi Jozsef u 4-20\r
                                Budapest    1117\r
                                HU\r
 \r
+28-B7-7C   (hex)               Shenzhen PUAS Industrial Co.,LTD\r
+800000-8FFFFF     (base 16)            Shenzhen PUAS Industrial Co.,LTD\r
+                               2/F, C/Building, Huawang Industrial Park, LongHua New Area In Shenzhen 518106 P.R.C\r
+                               Shenzhen  Guangdong  518106\r
+                               CN\r
+\r
 28-B7-7C   (hex)               SolarEdge Technologies\r
 100000-1FFFFF     (base 16)            SolarEdge Technologies\r
                                1 Abba Eban St.\r
                                Herzelia    46725\r
                                IL\r
 \r
-C0-61-9A   (hex)               Nanjing Balance Network Technology Co., Ltd\r
-500000-5FFFFF     (base 16)            Nanjing Balance Network Technology Co., Ltd\r
-                               9-10/F,building 01, No.8,Bailongjiang East Street,Jianye District\r
-                               Nanjing  Jiangsu  210017\r
-                               CN\r
-\r
 C0-61-9A   (hex)               MAD PIECE LLC.\r
 700000-7FFFFF     (base 16)            MAD PIECE LLC.\r
                                2196 flatbush ave.\r
                                BROOKLYN  NY  11234\r
                                US\r
 \r
+C0-61-9A   (hex)               Nanjing Balance Network Technology Co., Ltd\r
+500000-5FFFFF     (base 16)            Nanjing Balance Network Technology Co., Ltd\r
+                               9-10/F,building 01, No.8,Bailongjiang East Street,Jianye District\r
+                               Nanjing  Jiangsu  210017\r
+                               CN\r
+\r
 98-FC-84   (hex)               Shanghai ZeXin Information Technologies Co. Ltd.\r
 300000-3FFFFF     (base 16)            Shanghai ZeXin Information Technologies Co. Ltd.\r
                                Room 205E Building 5#,545 Hulan Road,Baoshan District,Shanghai City\r
@@ -4001,6 +3995,12 @@ C00000-CFFFFF     (base 16)              Ark Vision Systems GmbH & Co. KG
                                Merenberg  Hessen  35799\r
                                DE\r
 \r
+18-FD-CB   (hex)               KWANG YANG MOTOR CO.,LTD\r
+E00000-EFFFFF     (base 16)            KWANG YANG MOTOR CO.,LTD\r
+                               NO. 35, WAN HSING ST., SAN MIN DIST., KAOHSIUNG, TAIWAN, R.O.C\r
+                               Kaohsiung    807\r
+                               TW\r
+\r
 D0-14-11   (hex)               CYLTek Limited\r
 B00000-BFFFFF     (base 16)            CYLTek Limited\r
                                R603,6F.,NO.168,Sec.2,Fuxing 3rd.Rd.\r
@@ -4013,70 +4013,52 @@ B00000-BFFFFF     (base 16)             CYLTek Limited
                                Macclesfield  Cheshire  SK11 9FT\r
                                GB\r
 \r
-18-FD-CB   (hex)               KWANG YANG MOTOR CO.,LTD\r
-E00000-EFFFFF     (base 16)            KWANG YANG MOTOR CO.,LTD\r
-                               NO. 35, WAN HSING ST., SAN MIN DIST., KAOHSIUNG, TAIWAN, R.O.C\r
-                               Kaohsiung    807\r
-                               TW\r
-\r
-CC-4F-5C   (hex)               Beijing Cotytech Technology Co.,LTD.\r
-C00000-CFFFFF     (base 16)            Beijing Cotytech Technology Co.,LTD.\r
-                               Rm2302,Block B,Haojing Building,Zhichunlu,Haidian District,Beijing\r
-                               Beijing    100192\r
-                               CN\r
-\r
 CC-4F-5C   (hex)               Smiths US Innovation LLC\r
 700000-7FFFFF     (base 16)            Smiths US Innovation LLC\r
                                3125 SKYWAY CT\r
                                Fremont  CA  94539\r
                                US\r
 \r
-CC-4F-5C   (hex)               Watertech S.p.A.\r
-600000-6FFFFF     (base 16)            Watertech S.p.A.\r
-                               STRADA ANTICA FORNACE 2/4\r
-                               CANELLI  ITALY  14053\r
-                               IT\r
-\r
 CC-4F-5C   (hex)               Ontex BV\r
 B00000-BFFFFF     (base 16)            Ontex BV\r
                                Genthof 5\r
                                Buggenhout  NA  9255\r
                                BE\r
 \r
+CC-4F-5C   (hex)               Spark Biomedical\r
+400000-4FFFFF     (base 16)            Spark Biomedical\r
+                               4428 Irvin Simmons Drive\r
+                               Dallas  TX  75229\r
+                               US\r
+\r
 CC-4F-5C   (hex)               lesswire GmbH\r
 100000-1FFFFF     (base 16)            lesswire GmbH\r
                                Rudower Chaussee 30\r
                                Berlin  Germany  12489\r
                                DE\r
 \r
-FC-CD-2F   (hex)               Ningbo Bull Digital Technology Co., LTD\r
-000000-0FFFFF     (base 16)            Ningbo Bull Digital Technology Co., LTD\r
-                               No.32 Sanhai Road, East Guanhaiwei Industrial zone\r
-                               Cixi City  Zhejiang   315314\r
+CC-4F-5C   (hex)               Beijing Cotytech Technology Co.,LTD.\r
+C00000-CFFFFF     (base 16)            Beijing Cotytech Technology Co.,LTD.\r
+                               Rm2302,Block B,Haojing Building,Zhichunlu,Haidian District,Beijing\r
+                               Beijing    100192\r
                                CN\r
 \r
-FC-CD-2F   (hex)               QCTEK CO.,LTD.\r
-500000-5FFFFF     (base 16)            QCTEK CO.,LTD.\r
-                               6F., No.496, Bannan Rd., Zhonghe Dist., New Taipei City 235, Taiwan (R.O.C.)\r
-                               New Taipei City  New Taipei City  235\r
-                               TW\r
-\r
-CC-4F-5C   (hex)               Spark Biomedical\r
-400000-4FFFFF     (base 16)            Spark Biomedical\r
-                               4428 Irvin Simmons Drive\r
-                               Dallas  TX  75229\r
-                               US\r
+CC-4F-5C   (hex)               Watertech S.p.A.\r
+600000-6FFFFF     (base 16)            Watertech S.p.A.\r
+                               STRADA ANTICA FORNACE 2/4\r
+                               CANELLI  ITALY  14053\r
+                               IT\r
 \r
-58-95-D8   (hex)               Shenzhen DOOGEE Hengtong Technology CO.,LTD\r
-000000-0FFFFF     (base 16)            Shenzhen DOOGEE Hengtong Technology CO.,LTD\r
-                               Shenzhen DOOGEE Hengtong Technology CO.,LTD\r
-                               Shenzhen  Guangdong  518000\r
+FC-CD-2F   (hex)               Ningbo Bull Digital Technology Co., LTD\r
+000000-0FFFFF     (base 16)            Ningbo Bull Digital Technology Co., LTD\r
+                               No.32 Sanhai Road, East Guanhaiwei Industrial zone\r
+                               Cixi City  Zhejiang   315314\r
                                CN\r
 \r
-DC-4A-9E   (hex)               Astrogate Inc.\r
-700000-7FFFFF     (base 16)            Astrogate Inc.\r
-                               11F-6, No. 120, Qiaohe Rd., Zhonghe Dist.\r
-                               New Taipei City    235\r
+FC-CD-2F   (hex)               QCTEK CO.,LTD.\r
+500000-5FFFFF     (base 16)            QCTEK CO.,LTD.\r
+                               6F., No.496, Bannan Rd., Zhonghe Dist., New Taipei City 235, Taiwan (R.O.C.)\r
+                               New Taipei City  New Taipei City  235\r
                                TW\r
 \r
 58-95-D8   (hex)               Loftie\r
@@ -4091,10 +4073,10 @@ A00000-AFFFFF     (base 16)             Peak Communications Limited
                                Eden Island    123\r
                                SC\r
 \r
-58-95-D8   (hex)               LOCTEK ERGONOMIC TECHNOLOGY CORP.\r
-C00000-CFFFFF     (base 16)            LOCTEK ERGONOMIC TECHNOLOGY CORP.\r
-                               No. 588, Qihang South Road, Yinzhou Economic Development Zone\r
-                               Ningbo City  Zhejiang  315100\r
+58-95-D8   (hex)               Shenzhen DOOGEE Hengtong Technology CO.,LTD\r
+000000-0FFFFF     (base 16)            Shenzhen DOOGEE Hengtong Technology CO.,LTD\r
+                               Shenzhen DOOGEE Hengtong Technology CO.,LTD\r
+                               Shenzhen  Guangdong  518000\r
                                CN\r
 \r
 58-95-D8   (hex)               Norgren Manufacturing Co., Ltd.\r
@@ -4103,17 +4085,41 @@ C00000-CFFFFF     (base 16)             LOCTEK ERGONOMIC TECHNOLOGY CORP.
                                Shanghai  Shanghai  201108\r
                                CN\r
 \r
+DC-4A-9E   (hex)               Methodex Systems Pvt. Ltd.\r
+800000-8FFFFF     (base 16)            Methodex Systems Pvt. Ltd.\r
+                               607-8 Meghdoot, 94 Nehru Place\r
+                               New Delhi  Delhi  110019\r
+                               IN\r
+\r
+DC-4A-9E   (hex)               Astrogate Inc.\r
+700000-7FFFFF     (base 16)            Astrogate Inc.\r
+                               11F-6, No. 120, Qiaohe Rd., Zhonghe Dist.\r
+                               New Taipei City    235\r
+                               TW\r
+\r
+58-95-D8   (hex)               LOCTEK ERGONOMIC TECHNOLOGY CORP.\r
+C00000-CFFFFF     (base 16)            LOCTEK ERGONOMIC TECHNOLOGY CORP.\r
+                               No. 588, Qihang South Road, Yinzhou Economic Development Zone\r
+                               Ningbo City  Zhejiang  315100\r
+                               CN\r
+\r
 DC-4A-9E   (hex)               TATTILE SRL\r
 600000-6FFFFF     (base 16)            TATTILE SRL\r
                                VIA DONIZETTI, 1/3/5\r
                                MAIRANO  BRESCIA  25030\r
                                IT\r
 \r
-DC-4A-9E   (hex)               Methodex Systems Pvt. Ltd.\r
-800000-8FFFFF     (base 16)            Methodex Systems Pvt. Ltd.\r
-                               607-8 Meghdoot, 94 Nehru Place\r
-                               New Delhi  Delhi  110019\r
-                               IN\r
+DC-4A-9E   (hex)               HAPPIEST BABY INC.\r
+D00000-DFFFFF     (base 16)            HAPPIEST BABY INC.\r
+                               3115 S La Cienega Blvd.\r
+                               Los Angeles  CA  90016\r
+                               US\r
+\r
+84-11-C2   (hex)               Kazdream Technologies LLP\r
+000000-0FFFFF     (base 16)            Kazdream Technologies LLP\r
+                               10, Turkestan Str.\r
+                               Nur-Sultan    010000\r
+                               KZ\r
 \r
 84-11-C2   (hex)               LLC STC MZTA\r
 400000-4FFFFF     (base 16)            LLC STC MZTA\r
@@ -4127,10 +4133,10 @@ DC-4A-9E   (hex)                Methodex Systems Pvt. Ltd.
                                Concord  Ontario  L4K 5P8\r
                                CA\r
 \r
-DC-4A-9E   (hex)               HAPPIEST BABY INC.\r
-D00000-DFFFFF     (base 16)            HAPPIEST BABY INC.\r
-                               3115 S La Cienega Blvd.\r
-                               Los Angeles  CA  90016\r
+68-79-12   (hex)               Copper Labs, Inc.\r
+500000-5FFFFF     (base 16)            Copper Labs, Inc.\r
+                               3015 Sterling Circle #200\r
+                               Boulder  CO  80301\r
                                US\r
 \r
 68-79-12   (hex)               Wingtech Mobile Communications Co., Ltd.\r
@@ -4139,29 +4145,23 @@ A00000-AFFFFF     (base 16)             Wingtech Mobile Communications Co., Ltd.
                                Jiaxing  Zhejiang  314006\r
                                CN\r
 \r
-68-79-12   (hex)               Swisscom Broadcast Ltd\r
-B00000-BFFFFF     (base 16)            Swisscom Broadcast Ltd\r
-                               Ostermundigenstrasse 99\r
-                               Bern    3050\r
-                               CH\r
-\r
 68-79-12   (hex)               CNDI CO.,LTD\r
 200000-2FFFFF     (base 16)            CNDI CO.,LTD\r
                                33-13, EUNHAENG-RO, 218 BEON-GIL\r
                                SIHEUNG-SI  GYEONGGI-DO  14908\r
                                KR\r
 \r
-68-79-12   (hex)               Copper Labs, Inc.\r
-500000-5FFFFF     (base 16)            Copper Labs, Inc.\r
-                               3015 Sterling Circle #200\r
-                               Boulder  CO  80301\r
-                               US\r
+68-79-12   (hex)               Swisscom Broadcast Ltd\r
+B00000-BFFFFF     (base 16)            Swisscom Broadcast Ltd\r
+                               Ostermundigenstrasse 99\r
+                               Bern    3050\r
+                               CH\r
 \r
-84-11-C2   (hex)               Kazdream Technologies LLP\r
-000000-0FFFFF     (base 16)            Kazdream Technologies LLP\r
-                               10, Turkestan Str.\r
-                               Nur-Sultan    010000\r
-                               KZ\r
+8C-47-6E   (hex)               Chipsafer Pte. Ltd.\r
+000000-0FFFFF     (base 16)            Chipsafer Pte. Ltd.\r
+                               2 Changi South Lane\r
+                               Singapore    486123\r
+                               SG\r
 \r
 8C-47-6E   (hex)               HuiZhou MIKI Communication Equipment Co.,LTD\r
 200000-2FFFFF     (base 16)            HuiZhou MIKI Communication Equipment Co.,LTD\r
@@ -4181,24 +4181,114 @@ C00000-CFFFFF     (base 16)            ClearCaptions LLC
                                Rocklin   CA  95765\r
                                US\r
 \r
-8C-47-6E   (hex)               Chipsafer Pte. Ltd.\r
-000000-0FFFFF     (base 16)            Chipsafer Pte. Ltd.\r
-                               2 Changi South Lane\r
-                               Singapore    486123\r
-                               SG\r
-\r
 8C-AE-49   (hex)               Gigawave\r
 A00000-AFFFFF     (base 16)            Gigawave\r
                                Unit 4 Metro Business Park, ballycurreen\r
                                cork    T12 HP60\r
                                IE\r
 \r
+8C-AE-49   (hex)               TTR Corporation\r
+900000-9FFFFF     (base 16)            TTR Corporation\r
+                               20-1 Iwaoshi-machi\r
+                               Takasaki-shi  Gunma  370-0044\r
+                               JP\r
+\r
 8C-AE-49   (hex)               Chengdu BillDTE Technology Co., Ltd\r
 600000-6FFFFF     (base 16)            Chengdu BillDTE Technology Co., Ltd\r
                                Chengdu BiiDTE Technology Co.,Ltd\r
                                Chengdu  Sichuan  610041\r
                                CN\r
 \r
+8C-AE-49   (hex)               Precitec Optronik GmbH\r
+700000-7FFFFF     (base 16)            Precitec Optronik GmbH\r
+                               Schleussnerstraße 54\r
+                               Neu-Isenburg  Hessen  63263\r
+                               DE\r
+\r
+8C-AE-49   (hex)               Parametric GmbH\r
+C00000-CFFFFF     (base 16)            Parametric GmbH\r
+                               Waldeggstrasse 82\r
+                               Interlaken  BE  3800\r
+                               CH\r
+\r
+8C-AE-49   (hex)               LLC Taipit - Measuring Equipment\r
+800000-8FFFFF     (base 16)            LLC Taipit - Measuring Equipment\r
+                               Voroshilova, 2\r
+                               Saint-Petersburg    193318\r
+                               RU\r
+\r
+A4-53-EE   (hex)               Stellamore\r
+100000-1FFFFF     (base 16)            Stellamore\r
+                               Room 1519, 15th Floor, Block A, Economic Building, Baoyuan Huafeng Headquarters, No. 288, Xixiang Avenue, Bao'an District\r
+                               Shenzhen  Guangdong  518100\r
+                               CN\r
+\r
+8C-AE-49   (hex)               Shenzhen C & D Electronics Co., Ltd.\r
+E00000-EFFFFF     (base 16)            Shenzhen C & D Electronics Co., Ltd.\r
+                               9th FIoor, Building 9, No.1 Qingxiang road, BaoNeng Science and TechnoIogy Industrial Park, Longhua New District\r
+                               ShenZhen  GuangDong  518000\r
+                               CN\r
+\r
+A4-53-EE   (hex)               Dongguan HuaFuu industrial co., LTD\r
+900000-9FFFFF     (base 16)            Dongguan HuaFuu industrial co., LTD\r
+                               Huafuu technology park,jinggangzhong Road,shatian\r
+                               Dongguan  Guangdong  523841\r
+                               CN\r
+\r
+A4-53-EE   (hex)               Ubisafe Smart Devices\r
+200000-2FFFFF     (base 16)            Ubisafe Smart Devices\r
+                               Getulio Vargas 2729\r
+                               Sao Jose  SC  88103-400\r
+                               BR\r
+\r
+4C-93-A6   (hex)               4TheWall - 4D Sistem A.S\r
+400000-4FFFFF     (base 16)            4TheWall - 4D Sistem A.S\r
+                               Oran Mah. Turan Gunes Bul. Park Oran Ofis 180-Y No:6 Cankaya \r
+                               ANKARA    06550\r
+                               TR\r
+\r
+A0-02-4A   (hex)               Xiaojie Technology (Shenzhen) Co., Ltd\r
+600000-6FFFFF     (base 16)            Xiaojie Technology (Shenzhen) Co., Ltd\r
+                               801#, Block B1,Kexing Secience Park, Hi-Tech Industrial Park, Nanshan District\r
+                               Shenzhen  Guangdong  518000\r
+                               CN\r
+\r
+78-D4-F1   (hex)               Huaqin Telecom Technology Co.,Ltd.\r
+500000-5FFFFF     (base 16)            Huaqin Telecom Technology Co.,Ltd.\r
+                               Building 1,No.399, Keyuan Road, Pudong, Shanghai China\r
+                               Shanghai    200120\r
+                               CN\r
+\r
+78-D4-F1   (hex)               shanghai baudcom communication device co.,ltd\r
+900000-9FFFFF     (base 16)            shanghai baudcom communication device co.,ltd\r
+                               519A, Building A, Lianming Road 389, Minhang District\r
+                               shanghai  shanghai  201101\r
+                               CN\r
+\r
+78-D4-F1   (hex)               BYD Auto lndustry Co.,Ltd\r
+400000-4FFFFF     (base 16)            BYD Auto lndustry Co.,Ltd\r
+                               No.3009 BYD Road, Building D23, BYD EPRI, PingShan District, \r
+                               ShenZhen  GuangDong  518118  \r
+                               CN\r
+\r
+78-D4-F1   (hex)               Famar Fueguina S.A.\r
+700000-7FFFFF     (base 16)            Famar Fueguina S.A.\r
+                               Rodney 70\r
+                               Buenos Aires    1427\r
+                               AR\r
+\r
+44-6F-D8   (hex)               Sichuan subao network technology ltd.co.\r
+000000-0FFFFF     (base 16)            Sichuan subao network technology ltd.co.\r
+                               No. 704 Room ,  No. 599 South Century Town Road, High technology district, Chengdu \r
+                               chengdu  sichuan Province  610094\r
+                               CN\r
+\r
+44-6F-D8   (hex)               ZHEJIANG SHIP ELECTRONICS & TECHNOLOGY CO., LTD.\r
+500000-5FFFFF     (base 16)            ZHEJIANG SHIP ELECTRONICS & TECHNOLOGY CO., LTD.\r
+                               #6 GAOYA RD\r
+                               NINGBO  ZHEJIANG PROVINCE  315191\r
+                               CN\r
+\r
 4C-4B-F9   (hex)               Shenzhen dingsheng technology co., LTD\r
 400000-4FFFFF     (base 16)            Shenzhen dingsheng technology co., LTD\r
                                Floor 3, building 5, kaijeda industrial zone, no.97, huaxing road, langkou community, dalang street, longhua district\r
@@ -4619,12 +4709,6 @@ E00000-EFFFFF     (base 16)              Univer S.p.A.
                                Milan    20128\r
                                IT\r
 \r
-34-E1-D1   (hex)               Apart Audio NV\r
-900000-9FFFFF     (base 16)            Apart Audio NV\r
-                               Industriepark Brechtsebaan 8 bus 1\r
-                               Schoten    2900\r
-                               BE\r
-\r
 FC-D2-B6   (hex)               NREAL TECHNOLOGY LIMITED\r
 A00000-AFFFFF     (base 16)            NREAL TECHNOLOGY LIMITED\r
                                RM 1901,19/F LEE GARDEN ONE 33 HYSAN AVENUE CAUSEWAY BAY\r
@@ -7622,18 +7706,18 @@ B00000-BFFFFF     (base 16)             Shenzhen Dingsheng Intelligent Technology Co., Ltd
                                Chengdu  Sichuan  611731\r
                                CN\r
 \r
-D0-C8-57   (hex)               IFLYTEK CO.,LTD.\r
-D00000-DFFFFF     (base 16)            IFLYTEK CO.,LTD.\r
-                               National Intelligent Speech High-tech Industrialization Base, No. 666, Wangjiang Road West,\r
-                               Hefei  An hui  230088\r
-                               CN\r
-\r
 94-CC-04   (hex)               Shanxi Baixin Information Technology Co., Ltd.\r
 C00000-CFFFFF     (base 16)            Shanxi Baixin Information Technology Co., Ltd.\r
                                Room 210-213, Room 215-217, Room 219-220, No.2, Yari Street, Taiyuan University Park, Shanxi Comprehensive Reform Demonstration Zone\r
                                Taiyuan  Shanxi  030032\r
                                CN\r
 \r
+D0-C8-57   (hex)               IFLYTEK CO.,LTD.\r
+D00000-DFFFFF     (base 16)            IFLYTEK CO.,LTD.\r
+                               National Intelligent Speech High-tech Industrialization Base, No. 666, Wangjiang Road West,\r
+                               Hefei  An hui  230088\r
+                               CN\r
+\r
 94-05-BB   (hex)               ZIGPOS GmbH\r
 600000-6FFFFF     (base 16)            ZIGPOS GmbH\r
                                Räcknitzhöhe 35a\r
@@ -7676,18 +7760,18 @@ C0-9B-F4   (hex)                Big Dutchman International GmbH
                                Vechta  Niedersachsen  49377\r
                                DE\r
 \r
-E8-B4-70   (hex)               Anduril Industries\r
-C00000-CFFFFF     (base 16)            Anduril Industries\r
-                               2272 Michelson Dr\r
-                               Irvine  CA  92612\r
-                               US\r
-\r
 C0-9B-F4   (hex)               Continental Automotive Component Malaysia Sdn.Bhd.\r
 E00000-EFFFFF     (base 16)            Continental Automotive Component Malaysia Sdn.Bhd.\r
                                2455, MK.1, Tingkat Perusahaan 2A,\r
                                Prai Industrial Estate, Prai,  Penang  13600\r
                                MY\r
 \r
+E8-B4-70   (hex)               Anduril Industries\r
+C00000-CFFFFF     (base 16)            Anduril Industries\r
+                               2272 Michelson Dr\r
+                               Irvine  CA  92612\r
+                               US\r
+\r
 E8-B4-70   (hex)               Webfleet Solutions B.V.\r
 300000-3FFFFF     (base 16)            Webfleet Solutions B.V.\r
                                De Ruijterkade 154\r
@@ -7700,11 +7784,11 @@ D00000-DFFFFF     (base 16)             Medica Corporation
                                Bedford  MA  01730\r
                                US\r
 \r
-94-FB-A7   (hex)               Sercomm Corporation.\r
-600000-6FFFFF     (base 16)            Sercomm Corporation.\r
-                               3F,No.81,Yu-Yih Rd.,Chu-Nan Chen\r
-                               Miao-Lih Hsuan    115\r
-                               TW\r
+94-FB-A7   (hex)               Shenzhen Golden Star Technology Ltd\r
+B00000-BFFFFF     (base 16)            Shenzhen Golden Star Technology Ltd\r
+                               Rm.622,building B,MingYou Industrial products Exhibition&Procurement center, Baoyuan Road,Xixiang,Bao’an District,\r
+                               Shenzhen  Guangdong  518000\r
+                               CN\r
 \r
 94-FB-A7   (hex)               GUANG DONG TAKSTAR ELECTRONIC CO.,LTD.\r
 300000-3FFFFF     (base 16)            GUANG DONG TAKSTAR ELECTRONIC CO.,LTD.\r
@@ -7718,17 +7802,23 @@ C00000-CFFFFF     (base 16)             Solaborate Inc.
                                Rancho Cucamonga  CA  91730\r
                                US\r
 \r
+94-FB-A7   (hex)               Sercomm Corporation.\r
+600000-6FFFFF     (base 16)            Sercomm Corporation.\r
+                               3F,No.81,Yu-Yih Rd.,Chu-Nan Chen\r
+                               Miao-Lih Hsuan    115\r
+                               TW\r
+\r
 94-FB-A7   (hex)               CAVITY EYE\r
 500000-5FFFFF     (base 16)            CAVITY EYE\r
                                Ébner György köz 4.\r
                                Budaörs    2040\r
                                HU\r
 \r
-94-FB-A7   (hex)               Shenzhen Golden Star Technology Ltd\r
-B00000-BFFFFF     (base 16)            Shenzhen Golden Star Technology Ltd\r
-                               Rm.622,building B,MingYou Industrial products Exhibition&Procurement center, Baoyuan Road,Xixiang,Bao’an District,\r
-                               Shenzhen  Guangdong  518000\r
-                               CN\r
+94-FB-A7   (hex)               Anvil Systems Group, Inc.\r
+700000-7FFFFF     (base 16)            Anvil Systems Group, Inc.\r
+                               8211 Terminal Road, Suite 1900\r
+                               Lorton   VA  22079\r
+                               US\r
 \r
 38-F7-CD   (hex)               NZIA Connect Inc\r
 100000-1FFFFF     (base 16)            NZIA Connect Inc\r
@@ -7736,12 +7826,6 @@ B00000-BFFFFF     (base 16)              Shenzhen Golden Star Technology Ltd
                                Incheon    21315\r
                                KR\r
 \r
-94-FB-A7   (hex)               Anvil Systems Group, Inc.\r
-700000-7FFFFF     (base 16)            Anvil Systems Group, Inc.\r
-                               8211 Terminal Road, Suite 1900\r
-                               Lorton   VA  22079\r
-                               US\r
-\r
 38-F7-CD   (hex)               Distech Controls\r
 A00000-AFFFFF     (base 16)            Distech Controls\r
                                4205 place de Java\r
@@ -7844,17 +7928,23 @@ F4-69-D5   (hex)                Terminus (Shanghai) Technology Co.,Ltd.
                                Miao-Lih Hsuan    115\r
                                TW\r
 \r
+4C-93-A6   (hex)               Shandong Senter Electronic Co., Ltd\r
+600000-6FFFFF     (base 16)            Shandong Senter Electronic Co., Ltd\r
+                               No. 18 Liuyishan Road, New&High-tech area\r
+                               Zibo  Shandong  255086\r
+                               CN\r
+\r
 4C-93-A6   (hex)               5Voxel Co., Ltd.\r
 700000-7FFFFF     (base 16)            5Voxel Co., Ltd.\r
                                6F-2, No.273, Nong-an St.\r
                                Taipei City    10482\r
                                TW\r
 \r
-28-B7-7C   (hex)               Annapurna labs\r
-400000-4FFFFF     (base 16)            Annapurna labs\r
-                               Matam Scientific Industries Center,   Building 8.2\r
-                               Mail box 15123  Haifa  3508409\r
-                               IL\r
+4C-93-A6   (hex)               CELLTRON\r
+E00000-EFFFFF     (base 16)            CELLTRON\r
+                               #601 L&C TOWER, 153-18 LS-ro,Sanbon\r
+                               Gunpo  Gyeonggi  15808\r
+                               KR\r
 \r
 28-B7-7C   (hex)               Zhuhai RongBang Electronic Technology Co., Ltd.\r
 200000-2FFFFF     (base 16)            Zhuhai RongBang Electronic Technology Co., Ltd.\r
@@ -7862,17 +7952,11 @@ F4-69-D5   (hex)                Terminus (Shanghai) Technology Co.,Ltd.
                                Zhuhai  GuangDong  519000\r
                                CN\r
 \r
-4C-93-A6   (hex)               Shandong Senter Electronic Co., Ltd\r
-600000-6FFFFF     (base 16)            Shandong Senter Electronic Co., Ltd\r
-                               No. 18 Liuyishan Road, New&High-tech area\r
-                               Zibo  Shandong  255086\r
-                               CN\r
-\r
-4C-93-A6   (hex)               CELLTRON\r
-E00000-EFFFFF     (base 16)            CELLTRON\r
-                               #601 L&C TOWER, 153-18 LS-ro,Sanbon\r
-                               Gunpo  Gyeonggi  15808\r
-                               KR\r
+28-B7-7C   (hex)               Annapurna labs\r
+400000-4FFFFF     (base 16)            Annapurna labs\r
+                               Matam Scientific Industries Center,   Building 8.2\r
+                               Mail box 15123  Haifa  3508409\r
+                               IL\r
 \r
 28-B7-7C   (hex)               Convertertec Deutschland GmbH\r
 700000-7FFFFF     (base 16)            Convertertec Deutschland GmbH\r
@@ -7880,18 +7964,18 @@ E00000-EFFFFF     (base 16)             CELLTRON
                                Kempen    47906\r
                                DE\r
 \r
-C0-61-9A   (hex)               Wingtech Mobile Communications  Co.,Ltd.\r
-900000-9FFFFF     (base 16)            Wingtech Mobile Communications  Co.,Ltd.\r
-                               No.777,Yazhong Road,Nanhu District\r
-                               Jiaxing  Zhejiang  314001\r
-                               CN\r
-\r
 C0-61-9A   (hex)               Nanjing SinoVatio Technology Co., Ltd\r
 800000-8FFFFF     (base 16)            Nanjing SinoVatio Technology Co., Ltd\r
                                No. 888 Zhengfang Middle Rd, Jiangning District\r
                                Nanjing  JiangSu  211153\r
                                CN\r
 \r
+C0-61-9A   (hex)               Wingtech Mobile Communications  Co.,Ltd.\r
+900000-9FFFFF     (base 16)            Wingtech Mobile Communications  Co.,Ltd.\r
+                               No.777,Yazhong Road,Nanhu District\r
+                               Jiaxing  Zhejiang  314001\r
+                               CN\r
+\r
 C0-61-9A   (hex)               Gronn Kontakt AS\r
 A00000-AFFFFF     (base 16)            Gronn Kontakt AS\r
                                Kjøita 18\r
@@ -7904,12 +7988,6 @@ A00000-AFFFFF     (base 16)              Gronn Kontakt AS
                                New Taipei City    221\r
                                TW\r
 \r
-98-FC-84   (hex)               Shield Inc.\r
-A00000-AFFFFF     (base 16)            Shield Inc.\r
-                               8F-5, No.57, Sec.1, Dunhua S. Rd., Songshan Dist.,\r
-                               Taipei City    10557\r
-                               TW\r
-\r
 18-FD-CB   (hex)               CISTECH Solutions\r
 800000-8FFFFF     (base 16)            CISTECH Solutions\r
                                170 JAMES ST\r
@@ -7928,17 +8006,11 @@ A00000-AFFFFF     (base 16)             Sercomm Corporation.
                                Miao-Lih Hsuan    115\r
                                TW\r
 \r
-58-20-8A   (hex)               TRING\r
-400000-4FFFFF     (base 16)            TRING\r
-                               Lejlekusa bb\r
-                               Gracanica  TK  75320\r
-                               BA\r
-\r
-58-20-8A   (hex)               Suzhou Ruilisi Technology Ltd.\r
-900000-9FFFFF     (base 16)            Suzhou Ruilisi Technology Ltd.\r
-                               Gaoqingchuanmei Building, Nantiancheng Road, Xiangcheng District\r
-                               Suzhou  Jiangsu  215000\r
-                               CN\r
+98-FC-84   (hex)               Shield Inc.\r
+A00000-AFFFFF     (base 16)            Shield Inc.\r
+                               8F-5, No.57, Sec.1, Dunhua S. Rd., Songshan Dist.,\r
+                               Taipei City    10557\r
+                               TW\r
 \r
 58-20-8A   (hex)               Shangyin Intelligence Technology Shandong Co.,Ltd\r
 600000-6FFFFF     (base 16)            Shangyin Intelligence Technology Shandong Co.,Ltd\r
@@ -7952,6 +8024,18 @@ A00000-AFFFFF     (base 16)              Sercomm Corporation.
                                Mail box 15123  Haifa  3508409\r
                                IL\r
 \r
+58-20-8A   (hex)               TRING\r
+400000-4FFFFF     (base 16)            TRING\r
+                               Lejlekusa bb\r
+                               Gracanica  TK  75320\r
+                               BA\r
+\r
+58-20-8A   (hex)               Suzhou Ruilisi Technology Ltd.\r
+900000-9FFFFF     (base 16)            Suzhou Ruilisi Technology Ltd.\r
+                               Gaoqingchuanmei Building, Nantiancheng Road, Xiangcheng District\r
+                               Suzhou  Jiangsu  215000\r
+                               CN\r
+\r
 58-20-8A   (hex)               UPM Technology, Inc\r
 E00000-EFFFFF     (base 16)            UPM Technology, Inc\r
                                3000 NE Stucki ave ste #100\r
@@ -8012,6 +8096,12 @@ DC-4A-9E   (hex)         AiSight GmbH
                                Cologne     50968\r
                                DE\r
 \r
+68-79-12   (hex)               LEAPS s.r.o.\r
+900000-9FFFFF     (base 16)            LEAPS s.r.o.\r
+                               Na rolich 655/8\r
+                               Praha 4  Czech  141 00\r
+                               CZ\r
+\r
 68-79-12   (hex)               Globus Infocom Limited\r
 C00000-CFFFFF     (base 16)            Globus Infocom Limited\r
                                A 65, Sector 4, Noida\r
@@ -8030,11 +8120,17 @@ E00000-EFFFFF     (base 16)             Ametek Solidstate Controls
                                COLUMBUS  OH  43085-1586\r
                                US\r
 \r
-68-79-12   (hex)               LEAPS s.r.o.\r
-900000-9FFFFF     (base 16)            LEAPS s.r.o.\r
-                               Na rolich 655/8\r
-                               Praha 4  Czech  141 00\r
-                               CZ\r
+24-15-10   (hex)               Private\r
+800000-8FFFFF     (base 16)            Private\r
+                               \r
+                                   \r
+                               \r
+\r
+34-04-9E   (hex)               Church & Dwight Co., Inc.\r
+900000-9FFFFF     (base 16)            Church & Dwight Co., Inc.\r
+                               500 Charles Ewing Blvd\r
+                               Ewing  NJ  08628\r
+                               US\r
 \r
 8C-47-6E   (hex)               AU Optronics Corporation\r
 A00000-AFFFFF     (base 16)            AU Optronics Corporation\r
@@ -8048,16 +8144,70 @@ A00000-AFFFFF     (base 16)             AU Optronics Corporation
                                Seoul    06704\r
                                KR\r
 \r
-24-15-10   (hex)               Private\r
-800000-8FFFFF     (base 16)            Private\r
-                               \r
-                                   \r
-                               \r
+8C-AE-49   (hex)               H3 Platform\r
+100000-1FFFFF     (base 16)            H3 Platform\r
+                               11F-1, No. 79, Sec. 1, Xingtai 5th rd., Xizhi\r
+                               New Taipei    221\r
+                               TW\r
 \r
-34-04-9E   (hex)               Church & Dwight Co., Inc.\r
-900000-9FFFFF     (base 16)            Church & Dwight Co., Inc.\r
-                               500 Charles Ewing Blvd\r
-                               Ewing  NJ  08628\r
+A4-53-EE   (hex)               MAHLE ELECTRONICS, SLU\r
+000000-0FFFFF     (base 16)            MAHLE ELECTRONICS, SLU\r
+                               Ctra. Madrid-Valencia Km. 196\r
+                               Motilla del Palancar  Cuenca  16200\r
+                               ES\r
+\r
+A4-53-EE   (hex)               Aura Home, Inc.\r
+600000-6FFFFF     (base 16)            Aura Home, Inc.\r
+                               50 Eldridge Street, Suite 5D\r
+                               New York  NY  10002\r
+                               US\r
+\r
+A4-53-EE   (hex)               SSK CORPORATION\r
+D00000-DFFFFF     (base 16)            SSK CORPORATION\r
+                               3F, M-10, Centre of Hi-Tech Industrial Park, Nanshan\r
+                               Shenzhen    518054\r
+                               CN\r
+\r
+A0-02-4A   (hex)               Argos Solutions AS\r
+400000-4FFFFF     (base 16)            Argos Solutions AS\r
+                               Dyrmyrgata 35\r
+                               Kongsberg    3611\r
+                               NO\r
+\r
+A0-02-4A   (hex)               Danriver Technologies Corp.\r
+200000-2FFFFF     (base 16)            Danriver Technologies Corp.\r
+                               Building 3#,  2F, Yunxin Rd. \r
+                               Shanghai    200436\r
+                               CN\r
+\r
+A0-02-4A   (hex)               Kontakt Micro-Location Sp z o.o.\r
+900000-9FFFFF     (base 16)            Kontakt Micro-Location Sp z o.o.\r
+                               Stoczniowcow 3\r
+                               Krakow    30-709\r
+                               PL\r
+\r
+A0-02-4A   (hex)               Xi'an Yingsheng Electric Technology Co.,Ltd.\r
+B00000-BFFFFF     (base 16)            Xi'an Yingsheng Electric Technology Co.,Ltd.\r
+                               Room 303, building B, Xi'an University of Technology science and Technology Park, 26 Gazelle road, Zhang Ba Street office,\r
+                               Xi'an    710065\r
+                               CN\r
+\r
+78-D4-F1   (hex)               Quidel Corporation\r
+D00000-DFFFFF     (base 16)            Quidel Corporation\r
+                               9975 Summers Ridge Road\r
+                               San Diego  CA  92121\r
+                               US\r
+\r
+78-D4-F1   (hex)               Xiamen Cheerzing IOT Technology Co.,Ltd.\r
+800000-8FFFFF     (base 16)            Xiamen Cheerzing IOT Technology Co.,Ltd.\r
+                               Xiamen Cheerzing IOT Technology Co.,Ltd.\r
+                               Xiamen  FuJian  361002\r
+                               CN\r
+\r
+34-E1-D1   (hex)               Biamp\r
+900000-9FFFFF     (base 16)            Biamp\r
+                               9300 SW Gemini Drive\r
+                               Beaverton  OR  97008\r
                                US\r
 \r
 20-85-93   (hex)               UNILUMIN GROUP CO.,LTD\r
@@ -11558,18 +11708,24 @@ F4-90-CB   (hex)              Avilution
                                Madison  AL  35758\r
                                US\r
 \r
-F4-90-CB   (hex)               Fractyl Labs\r
-900000-9FFFFF     (base 16)            Fractyl Labs\r
-                               17 HARTWELL AVE\r
-                               LEXINGTON  MA  02421\r
-                               US\r
-\r
 F4-90-CB   (hex)               OmniNet\r
 400000-4FFFFF     (base 16)            OmniNet\r
                                6410 Del Rio Rd\r
                                Charlotte  NC  28277\r
                                US\r
 \r
+F4-90-CB   (hex)               Epitel, Inc.\r
+000000-0FFFFF     (base 16)            Epitel, Inc.\r
+                               630 S. Stringfellow Ct., Unit #B\r
+                               Salt Lake City  UT  84111\r
+                               US\r
+\r
+F4-90-CB   (hex)               Fractyl Labs\r
+900000-9FFFFF     (base 16)            Fractyl Labs\r
+                               17 HARTWELL AVE\r
+                               LEXINGTON  MA  02421\r
+                               US\r
+\r
 C0-9B-F4   (hex)               JSC NPK ATRONIK\r
 400000-4FFFFF     (base 16)            JSC NPK ATRONIK\r
                                VARSHAVSKOE SH, 118-1-P XLII K4 10\r
@@ -11582,12 +11738,6 @@ C00000-CFFFFF     (base 16)            Pinpark Inc.
                                Taipei  Taiwan  104\r
                                TW\r
 \r
-F4-90-CB   (hex)               Epitel, Inc.\r
-000000-0FFFFF     (base 16)            Epitel, Inc.\r
-                               630 S. Stringfellow Ct., Unit #B\r
-                               Salt Lake City  UT  84111\r
-                               US\r
-\r
 C0-9B-F4   (hex)               NUCTECH COMPANY LIMITED\r
 B00000-BFFFFF     (base 16)            NUCTECH COMPANY LIMITED\r
                                 2/F Block A,Tongfang Building,Shuangqinglu,Haidian District\r
@@ -11600,6 +11750,18 @@ C0-9B-F4   (hex)               Osprey Video, Inc
                                Carrollton  TX  75006\r
                                US\r
 \r
+E8-B4-70   (hex)               internet domain name system beijing engineering research center ltd\r
+200000-2FFFFF     (base 16)            internet domain name system beijing engineering research center ltd\r
+                               4,4TH SOUTH STREET ZHONG GUAN CUN\r
+                               hai dian qu ,beijing  BEIJING  100190\r
+                               CN\r
+\r
+E8-B4-70   (hex)               DongGuan Ramaxel Memory Technology\r
+000000-0FFFFF     (base 16)            DongGuan Ramaxel Memory Technology\r
+                               No.32, Industrial East Road,Innovation Park, High-tech Industrial Development Zone, Songshan Lake, Dongguan City, Guangdong Province,China\r
+                               DongGuan  Guangdong  523808\r
+                               CN\r
+\r
 C0-9B-F4   (hex)               Infiot Inc.\r
 500000-5FFFFF     (base 16)            Infiot Inc.\r
                                75 E. Santa Clara St., Suite 600\r
@@ -11612,29 +11774,23 @@ A00000-AFFFFF     (base 16)           plc2 Design GmbH
                                Freiburg i. Br.    79112\r
                                DE\r
 \r
+E8-B4-70   (hex)               Miltek Industries Pte Ltd\r
+900000-9FFFFF     (base 16)            Miltek Industries Pte Ltd\r
+                               62 Ubi Road 1 #10-03, Oxley Bizhub 2. Singapore 408734\r
+                               Singapore    408734\r
+                               SG\r
+\r
 E8-B4-70   (hex)               DEHN SE + Co KG\r
 800000-8FFFFF     (base 16)            DEHN SE + Co KG\r
                                Hans-Dehn-Straße 1\r
                                Neumarkt  Bavaria  92318\r
                                DE\r
 \r
-E8-B4-70   (hex)               internet domain name system beijing engineering research center ltd\r
-200000-2FFFFF     (base 16)            internet domain name system beijing engineering research center ltd\r
-                               4,4TH SOUTH STREET ZHONG GUAN CUN\r
-                               hai dian qu ,beijing  BEIJING  100190\r
-                               CN\r
-\r
-E8-B4-70   (hex)               DongGuan Ramaxel Memory Technology\r
-000000-0FFFFF     (base 16)            DongGuan Ramaxel Memory Technology\r
-                               No.32, Industrial East Road,Innovation Park, High-tech Industrial Development Zone, Songshan Lake, Dongguan City, Guangdong Province,China\r
-                               DongGuan  Guangdong  523808\r
-                               CN\r
-\r
-E8-B4-70   (hex)               Miltek Industries Pte Ltd\r
-900000-9FFFFF     (base 16)            Miltek Industries Pte Ltd\r
-                               62 Ubi Road 1 #10-03, Oxley Bizhub 2. Singapore 408734\r
-                               Singapore    408734\r
-                               SG\r
+E8-B4-70   (hex)               Alperia Fiber srl \r
+500000-5FFFFF     (base 16)            Alperia Fiber srl \r
+                               Via Dodiciville 8\r
+                               Bolzano   bz  39100\r
+                               IT\r
 \r
 E8-B4-70   (hex)               Elcoma\r
 600000-6FFFFF     (base 16)            Elcoma\r
@@ -11642,11 +11798,11 @@ E8-B4-70   (hex)              Elcoma
                                Recife  Pernambuco  50030-330\r
                                BR\r
 \r
-E8-B4-70   (hex)               Alperia Fiber srl \r
-500000-5FFFFF     (base 16)            Alperia Fiber srl \r
-                               Via Dodiciville 8\r
-                               Bolzano   bz  39100\r
-                               IT\r
+38-F7-CD   (hex)               APT MOBILE SATCOM LIMITED\r
+E00000-EFFFFF     (base 16)            APT MOBILE SATCOM LIMITED\r
+                               18th Floor, Building C, Shenye U Center, Zhoushi Road, Baoan District\r
+                               Shenzhen  Guangdong  518000\r
+                               CN\r
 \r
 70-69-79   (hex)               Linksys Telecom Shenzhen CO., LTD\r
 100000-1FFFFF     (base 16)            Linksys Telecom Shenzhen CO., LTD\r
@@ -11660,12 +11816,6 @@ D00000-DFFFFF     (base 16)            FREUND ELEKTRONIKA D.O.O., IP-INTEGRA TECHNOLOGIES
                                SARAJEVO    71000\r
                                BA\r
 \r
-38-F7-CD   (hex)               APT MOBILE SATCOM LIMITED\r
-E00000-EFFFFF     (base 16)            APT MOBILE SATCOM LIMITED\r
-                               18th Floor, Building C, Shenye U Center, Zhoushi Road, Baoan District\r
-                               Shenzhen  Guangdong  518000\r
-                               CN\r
-\r
 CC-C2-61   (hex)               Nortek Security & Control\r
 C00000-CFFFFF     (base 16)            Nortek Security & Control\r
                                5919 Sea Otter Place\r
@@ -11678,12 +11828,6 @@ CC-C2-61   (hex)               Guardiar USA
                                Ennis  TX  75119\r
                                US\r
 \r
-CC-C2-61   (hex)               NWL Inc.\r
-100000-1FFFFF     (base 16)            NWL Inc.\r
-                               312 Rising Sun Road\r
-                               Bordentown  NJ  08505\r
-                               US\r
-\r
 CC-C2-61   (hex)               Winterthur Gas & Diesel Ltd.\r
 B00000-BFFFFF     (base 16)            Winterthur Gas & Diesel Ltd.\r
                                Schützenstrasse 3\r
@@ -11696,6 +11840,12 @@ CC-C2-61   (hex)               NETRADYNE, INC.
                                SAN DIEGO  CA  92122\r
                                US\r
 \r
+CC-C2-61   (hex)               NWL Inc.\r
+100000-1FFFFF     (base 16)            NWL Inc.\r
+                               312 Rising Sun Road\r
+                               Bordentown  NJ  08505\r
+                               US\r
+\r
 F0-D7-AF   (hex)               New IT Project LLC\r
 900000-9FFFFF     (base 16)            New IT Project LLC\r
                                Nagatinskaya St. 16, bld. 9, space VII, room 15, office 5\r
@@ -11744,18 +11894,24 @@ D0-14-11   (hex)              Realwave Inc.
                                Carlsbad  CA  92008-5507\r
                                US\r
 \r
-5C-85-7E   (hex)               HHCC Plant Technology Co., Ltd.\r
-B00000-BFFFFF     (base 16)            HHCC Plant Technology Co., Ltd.\r
-                               RM626, 6th Floor, Zhongguoleshili,’,#35 Xiaoyun Road, Chaoyang District,Beijing, China\r
-                               Beijing  Beijing  100028\r
-                               CN\r
-\r
 D0-14-11   (hex)               Tecnosoft srl\r
 E00000-EFFFFF     (base 16)            Tecnosoft srl\r
                                via Galvani, 4\r
                                Peschiera Borromeo  Milan  20068\r
                                IT\r
 \r
+5C-85-7E   (hex)               BeiJing Xinsheng Technology Co.,Ltd\r
+800000-8FFFFF     (base 16)            BeiJing Xinsheng Technology Co.,Ltd\r
+                               1-1827, East (LIANHANG building), chaichangtun village, Yongledian Town, Tongzhou District\r
+                               BeiJing  BeiJing  250100\r
+                               CN\r
+\r
+5C-85-7E   (hex)               HHCC Plant Technology Co., Ltd.\r
+B00000-BFFFFF     (base 16)            HHCC Plant Technology Co., Ltd.\r
+                               RM626, 6th Floor, Zhongguoleshili,’,#35 Xiaoyun Road, Chaoyang District,Beijing, China\r
+                               Beijing  Beijing  100028\r
+                               CN\r
+\r
 D0-14-11   (hex)               iLOQ Oy\r
 300000-3FFFFF     (base 16)            iLOQ Oy\r
                                Yrttipellontie 10\r
@@ -11768,12 +11924,6 @@ D0-14-11   (hex)               iLOQ Oy
                                Chandler  AZ  85225\r
                                US\r
 \r
-5C-85-7E   (hex)               BeiJing Xinsheng Technology Co.,Ltd\r
-800000-8FFFFF     (base 16)            BeiJing Xinsheng Technology Co.,Ltd\r
-                               1-1827, East (LIANHANG building), chaichangtun village, Yongledian Town, Tongzhou District\r
-                               BeiJing  BeiJing  250100\r
-                               CN\r
-\r
 F4-69-D5   (hex)               Konntek Inc\r
 B00000-BFFFFF     (base 16)            Konntek Inc\r
                                3600 F-X Tessier, Unit #H\r
@@ -11810,6 +11960,12 @@ B00000-BFFFFF     (base 16)            Felten Electronics
                                Saint-Genis-Pouilly    01630\r
                                FR\r
 \r
+28-B7-7C   (hex)               GROTHE GmbH\r
+500000-5FFFFF     (base 16)            GROTHE GmbH\r
+                               Loehestrasse 22\r
+                               Hennef    53773\r
+                               DE\r
+\r
 28-B7-7C   (hex)               SHENZHEN EVIEW GPS TECHNOLOGY\r
 000000-0FFFFF     (base 16)            SHENZHEN EVIEW GPS TECHNOLOGY\r
                                Rm 201, building 1-A, Nankechuang Industrial Park, Gaofeng Road, Longhua district\r
@@ -11828,29 +11984,23 @@ A00000-AFFFFF     (base 16)           Simaudio Ltd
                                Boucherville  Quebec  J4B 5H2\r
                                CA\r
 \r
-28-B7-7C   (hex)               GROTHE GmbH\r
-500000-5FFFFF     (base 16)            GROTHE GmbH\r
-                               Loehestrasse 22\r
-                               Hennef    53773\r
-                               DE\r
-\r
-C0-61-9A   (hex)               Grup Arge Enerji ve Kontrol Sistemleri\r
-200000-2FFFFF     (base 16)            Grup Arge Enerji ve Kontrol Sistemleri\r
-                               ?kitelli OSB Mah. YTÜ ?kitelli Teknopark Sok. No:1 / 2B01-2B07-2B08-2B09\r
-                               ?stanbul  ?STANBUL  34490\r
-                               TR\r
-\r
 28-B7-7C   (hex)               Vehant Technologies Pvt Ltd.\r
 B00000-BFFFFF     (base 16)            Vehant Technologies Pvt Ltd.\r
                                Plot no. 97, Ecotech-12, block-Ecotech -12, Sector-Noida Extension\r
                                Greater Noida  Uttar Pradesh  201310\r
                                IN\r
 \r
-C0-61-9A   (hex)               Stello\r
-400000-4FFFFF     (base 16)            Stello\r
-                               1041 Rue Parent\r
-                               Saint-Bruno-de-Montarville  Quebec  J3V 6L7\r
-                               CA\r
+C0-61-9A   (hex)               Victron Energy B.V.\r
+B00000-BFFFFF     (base 16)            Victron Energy B.V.\r
+                               De Paal 35\r
+                               Almere    1351JG\r
+                               NL\r
+\r
+C0-61-9A   (hex)               Grup Arge Enerji ve Kontrol Sistemleri\r
+200000-2FFFFF     (base 16)            Grup Arge Enerji ve Kontrol Sistemleri\r
+                               ?kitelli OSB Mah. YTÜ ?kitelli Teknopark Sok. No:1 / 2B01-2B07-2B08-2B09\r
+                               ?stanbul  ?STANBUL  34490\r
+                               TR\r
 \r
 C0-61-9A   (hex)               IPG Automotive GmbH\r
 600000-6FFFFF     (base 16)            IPG Automotive GmbH\r
@@ -11858,12 +12008,6 @@ C0-61-9A   (hex)               IPG Automotive GmbH
                                Karlsruhe    76185\r
                                DE\r
 \r
-C0-61-9A   (hex)               Victron Energy B.V.\r
-B00000-BFFFFF     (base 16)            Victron Energy B.V.\r
-                               De Paal 35\r
-                               Almere    1351JG\r
-                               NL\r
-\r
 98-FC-84   (hex)               Fath Mechatronics\r
 900000-9FFFFF     (base 16)            Fath Mechatronics\r
                                Hügelmühle 31\r
@@ -11888,18 +12032,18 @@ D00000-DFFFFF     (base 16)           StreamLocator
                                Richmond Hill  ON  L4B 2N1\r
                                CA\r
 \r
-58-20-8A   (hex)               Aggregate Co.,Ltd.\r
-300000-3FFFFF     (base 16)            Aggregate Co.,Ltd.\r
-                               Toso Building 4F, 1-9-8 Yayoi-cho\r
-                               nakano-ku  tokyo  164-0013\r
-                               JP\r
-\r
 18-FD-CB   (hex)               Gosuncn Technology Group Co.,LTD.\r
 400000-4FFFFF     (base 16)            Gosuncn Technology Group Co.,LTD.\r
                                6F,2819 KaiChuang Blvd.,Science Town,Huangpu District\r
                                Guangzhou City  Guangdong  510530\r
                                CN\r
 \r
+58-20-8A   (hex)               Aggregate Co.,Ltd.\r
+300000-3FFFFF     (base 16)            Aggregate Co.,Ltd.\r
+                               Toso Building 4F, 1-9-8 Yayoi-cho\r
+                               nakano-ku  tokyo  164-0013\r
+                               JP\r
+\r
 58-20-8A   (hex)               MARS DIGI TECH CO .,LTD\r
 200000-2FFFFF     (base 16)            MARS DIGI TECH CO .,LTD\r
                                RM 2314,Build No.B2,GuiMiao Road,NanShan District\r
@@ -11930,18 +12074,18 @@ B00000-BFFFFF     (base 16)           HEAD-DIRECT (KUNSHAN) Co. Ltd
                                Zhuhai  Guangdong   519080\r
                                CN\r
 \r
-FC-CD-2F   (hex)               Asesorias y Servicios Innovaxxion SPA\r
-800000-8FFFFF     (base 16)            Asesorias y Servicios Innovaxxion SPA\r
-                               Alonso de Cordova 5320, of 1403, Las condes\r
-                               Santiago  RM  7550000\r
-                               CL\r
-\r
 FC-CD-2F   (hex)               Annapurna labs\r
 600000-6FFFFF     (base 16)            Annapurna labs\r
                                Matam Scientific Industries Center,   Building 8.2\r
                                Mail box 15123  Haifa  3508409\r
                                IL\r
 \r
+FC-CD-2F   (hex)               Asesorias y Servicios Innovaxxion SPA\r
+800000-8FFFFF     (base 16)            Asesorias y Servicios Innovaxxion SPA\r
+                               Alonso de Cordova 5320, of 1403, Las condes\r
+                               Santiago  RM  7550000\r
+                               CL\r
+\r
 FC-CD-2F   (hex)               Suzhou lehui display co.,ltd\r
 700000-7FFFFF     (base 16)            Suzhou lehui display co.,ltd\r
                                ?225 Jinfeng Road?Suzhou New District?Jiangsu Province\r
@@ -11954,18 +12098,18 @@ FC-CD-2F   (hex)              Suzhou lehui display co.,ltd
                                ShenZhen  GuangDong  518000\r
                                CN\r
 \r
-58-95-D8   (hex)               Tonnet Telecommunication International Co., Ltd.\r
-300000-3FFFFF     (base 16)            Tonnet Telecommunication International Co., Ltd.\r
-                               10F,No.6,Ln.609,Sec.5 Chongxin Rd., Sanchong Dist.\r
-                               New Taipei    241\r
-                               TW\r
-\r
 FC-CD-2F   (hex)               Eltek brojila d.o.o.\r
 E00000-EFFFFF     (base 16)            Eltek brojila d.o.o.\r
                                Svetice 24\r
                                Zagreb    10000\r
                                HR\r
 \r
+58-95-D8   (hex)               Tonnet Telecommunication International Co., Ltd.\r
+300000-3FFFFF     (base 16)            Tonnet Telecommunication International Co., Ltd.\r
+                               10F,No.6,Ln.609,Sec.5 Chongxin Rd., Sanchong Dist.\r
+                               New Taipei    241\r
+                               TW\r
+\r
 58-95-D8   (hex)               Gmv sistemas SAU\r
 E00000-EFFFFF     (base 16)            Gmv sistemas SAU\r
                                C/ Juan Herrera 17 P.T.B. ,Parcela 101\r
@@ -11990,23 +12134,17 @@ DC-4A-9E   (hex)              Advanced Electronics Ltd
                                Newcastle    NE12 8EW\r
                                GB\r
 \r
-DC-4A-9E   (hex)               HEFEI DATANG STORAGE TECHNOLOGY CO.,LTD\r
-C00000-CFFFFF     (base 16)            HEFEI DATANG STORAGE TECHNOLOGY CO.,LTD\r
-                               7F BLOCK C J2 BUILDING INNOVATION PARK HIGH TECH DISTRICT\r
-                               HEFEI  AN HUI PROVINCE PR CHINA  220038\r
-                               CN\r
-\r
 DC-4A-9E   (hex)               SES-imagotag Deutschland GmbH\r
 E00000-EFFFFF     (base 16)            SES-imagotag Deutschland GmbH\r
                                Bundesstrasse 16\r
                                Ettenheim  BW  77955\r
                                DE\r
 \r
-84-11-C2   (hex)               KESSEL AG\r
-600000-6FFFFF     (base 16)            KESSEL AG\r
-                               Bahnhofstraße 31\r
-                               Lenting    85101\r
-                               DE\r
+DC-4A-9E   (hex)               HEFEI DATANG STORAGE TECHNOLOGY CO.,LTD\r
+C00000-CFFFFF     (base 16)            HEFEI DATANG STORAGE TECHNOLOGY CO.,LTD\r
+                               7F BLOCK C J2 BUILDING INNOVATION PARK HIGH TECH DISTRICT\r
+                               HEFEI  AN HUI PROVINCE PR CHINA  220038\r
+                               CN\r
 \r
 84-11-C2   (hex)               igus GmbH\r
 A00000-AFFFFF     (base 16)            igus GmbH\r
@@ -12020,6 +12158,12 @@ D00000-DFFFFF     (base 16)            Neurolab
                                Moscow  -  115114\r
                                RU\r
 \r
+84-11-C2   (hex)               KESSEL AG\r
+600000-6FFFFF     (base 16)            KESSEL AG\r
+                               Bahnhofstraße 31\r
+                               Lenting    85101\r
+                               DE\r
+\r
 68-79-12   (hex)               Annapurna labs\r
 100000-1FFFFF     (base 16)            Annapurna labs\r
                                Matam Scientific Industries Center,   Building 8.2\r
@@ -12044,6 +12188,72 @@ D00000-DFFFFF     (base 16)            innolectric AG
                                Bochum    44799 \r
                                DE\r
 \r
+C0-61-9A   (hex)               Stello\r
+400000-4FFFFF     (base 16)            Stello\r
+                               9995 Rue de Châteauneuf (Local V)\r
+                               Brossard  Quebec  J4Z 3V7\r
+                               CA\r
+\r
+8C-AE-49   (hex)               Larch Networks\r
+D00000-DFFFFF     (base 16)            Larch Networks\r
+                               11 Amal Str.\r
+                               Rosh Ain    4809239\r
+                               IL\r
+\r
+A4-53-EE   (hex)               T-Touching Co., Ltd.\r
+800000-8FFFFF     (base 16)            T-Touching Co., Ltd.\r
+                               28B, No. 4, Science and Technology 10th Road\r
+                               Dongguan  GuangDong  52300\r
+                               CN\r
+\r
+A0-02-4A   (hex)               Zhejiang Hechuan Technology Co.,Ltd\r
+000000-0FFFFF     (base 16)            Zhejiang Hechuan Technology Co.,Ltd\r
+                               No. 9, Fucai Road, Longyou Industrial Zone, Quzhou City, Zhejiang Province, PRC\r
+                               Quzhou    324000\r
+                               CN\r
+\r
+A4-53-EE   (hex)               Beijing Lanke Science and Technology Co.,LTd.\r
+700000-7FFFFF     (base 16)            Beijing Lanke Science and Technology Co.,LTd.\r
+                               Room 607, building 6, No.1, Chaoqian Road, science and Technology Park, Changping District\r
+                               Beijing     102209\r
+                               CN\r
+\r
+A0-02-4A   (hex)               bitbee Inc\r
+D00000-DFFFFF     (base 16)            bitbee Inc\r
+                               #703, 361 Simindae-ro, Dongan-gu,\r
+                               anyang-si  gyeonggi-do  14057\r
+                               KR\r
+\r
+A0-02-4A   (hex)               SomaDetect Inc\r
+300000-3FFFFF     (base 16)            SomaDetect Inc\r
+                               241 Canada Street, Suite 10 \r
+                               Fredericton  New Brunswick  E3A 4A1\r
+                               CA\r
+\r
+78-D4-F1   (hex)               BONENG TRANSMISSION(SUZHOU)CO.,LTD\r
+A00000-AFFFFF     (base 16)            BONENG TRANSMISSION(SUZHOU)CO.,LTD\r
+                               100#Ruyuan Rd.,Xiangcheng District,\r
+                               Suzhou  Jiangsu  215131\r
+                               CN\r
+\r
+78-D4-F1   (hex)               Lyngsoe Systems\r
+200000-2FFFFF     (base 16)            Lyngsoe Systems\r
+                               101 Simona Dr Unit 2\r
+                               Bolton  Ontario  L7E 4E8\r
+                               CA\r
+\r
+78-D4-F1   (hex)               Blue Sparq, Inc.\r
+E00000-EFFFFF     (base 16)            Blue Sparq, Inc.\r
+                               928 NE 24th Lane, Unit 4\r
+                               Cape Coral  FL  33909\r
+                               US\r
+\r
+44-6F-D8   (hex)               SCAIME\r
+D00000-DFFFFF     (base 16)            SCAIME\r
+                               294 Rue Georges Charpak\r
+                               JUVIGNY  Select State  74100\r
+                               FR\r
+\r
 4C-4B-F9   (hex)               Shandong Linkotech Electronic Co., Ltd.\r
 600000-6FFFFF     (base 16)            Shandong Linkotech Electronic Co., Ltd.\r
                                22nd Floor, Building 2, Aosheng Building, No.1166 Xinyi Street, High-tech Zone\r
@@ -15491,18 +15701,18 @@ B0-B3-53   (hex)              Zenlayer
                                DIAMOND BAR  CA  91765\r
                                US\r
 \r
-90-E2-FC   (hex)               Beijing Lanxum Computer Technology CO.,LTD.\r
-D00000-DFFFFF     (base 16)            Beijing Lanxum Computer Technology CO.,LTD.\r
-                               3A Floor,BlockB,Technology Fortune Center,No 8 Xueqing Road,Haidian District,\r
-                               Beijing  Beijing  100192\r
-                               CN\r
-\r
 90-E2-FC   (hex)               ShenZhen Temwey Innovation Technology Co.,Ltd.\r
 200000-2FFFFF     (base 16)            ShenZhen Temwey Innovation Technology Co.,Ltd.\r
                                Room 1008, 10/F, Bld.B, Bantian International Centre, No. 5 South Huancheng Road, Bantian Street of Shenzhen Longgang District\r
                                SHENZHEN  GUANGDONG  518129\r
                                CN\r
 \r
+90-E2-FC   (hex)               Beijing Lanxum Computer Technology CO.,LTD.\r
+D00000-DFFFFF     (base 16)            Beijing Lanxum Computer Technology CO.,LTD.\r
+                               3A Floor,BlockB,Technology Fortune Center,No 8 Xueqing Road,Haidian District,\r
+                               Beijing  Beijing  100192\r
+                               CN\r
+\r
 90-E2-FC   (hex)               Dongguan Kangyong electronics technology Co. Ltd\r
 400000-4FFFFF     (base 16)            Dongguan Kangyong electronics technology Co. Ltd\r
                                No 9,Yincheng 1st Road, Xiabian Village, Chang’an Town\r
@@ -15533,6 +15743,12 @@ D00000-DFFFFF     (base 16)            VANTAGE INTEGRATED SECURITY SOLUTIONS PVT LTD
                                Wolverhampton  West Midlands  WV6 0JZ\r
                                GB\r
 \r
+64-62-66   (hex)               Pass & Seymour, Inc d/b/a Legrand\r
+600000-6FFFFF     (base 16)            Pass & Seymour, Inc d/b/a Legrand\r
+                               50 Boyd Ave\r
+                               Syracuse  NY  13209\r
+                               US\r
+\r
 64-62-66   (hex)               FaceHeart Inc.\r
 300000-3FFFFF     (base 16)            FaceHeart Inc.\r
                                Rm. 8, 19F., No.118, Ciyun Rd., East Dist.\r
@@ -15545,12 +15761,6 @@ A00000-AFFFFF     (base 16)            Sensoro Co., Ltd.
                                Beijing  Beijing  100102\r
                                CN\r
 \r
-64-62-66   (hex)               Pass & Seymour, Inc d/b/a Legrand\r
-600000-6FFFFF     (base 16)            Pass & Seymour, Inc d/b/a Legrand\r
-                               50 Boyd Ave\r
-                               Syracuse  NY  13209\r
-                               US\r
-\r
 94-CC-04   (hex)               Shandong free optical technology co., ltd.\r
 B00000-BFFFFF     (base 16)            Shandong free optical technology co., ltd.\r
                                195 East First Street, Industrial First Street, Economic Development Zone, Weifang, Weicheng District,\r
@@ -15614,6 +15824,18 @@ A00000-AFFFFF     (base 16)            Inveo
                                Beijing  Beijing  100000\r
                                CN\r
 \r
+94-FB-A7   (hex)               Skyring Smart Technologies(Shenzhen) Co., Ltd.\r
+E00000-EFFFFF     (base 16)            Skyring Smart Technologies(Shenzhen) Co., Ltd.\r
+                               6F GDC Building, 9Gaoxin Centeral Avenue 3rd, Nanshan District\r
+                               Shenzhen  Guangdong  518057\r
+                               CN\r
+\r
+94-FB-A7   (hex)               Inaxsys Security Systems inc.\r
+100000-1FFFFF     (base 16)            Inaxsys Security Systems inc.\r
+                               11685 Philippe-Panneton\r
+                               Montreal  Quebec  H1E 4M1\r
+                               CA\r
+\r
 94-FB-A7   (hex)               ELKRON \r
 A00000-AFFFFF     (base 16)            ELKRON \r
                                Via Bologna 188/C\r
@@ -15632,18 +15854,6 @@ D00000-DFFFFF     (base 16)            Macherey-Nagel GmbH & Co. KG
                                Düren  Deutschland  52355\r
                                DE\r
 \r
-94-FB-A7   (hex)               Skyring Smart Technologies(Shenzhen) Co., Ltd.\r
-E00000-EFFFFF     (base 16)            Skyring Smart Technologies(Shenzhen) Co., Ltd.\r
-                               6F GDC Building, 9Gaoxin Centeral Avenue 3rd, Nanshan District\r
-                               Shenzhen  Guangdong  518057\r
-                               CN\r
-\r
-94-FB-A7   (hex)               Inaxsys Security Systems inc.\r
-100000-1FFFFF     (base 16)            Inaxsys Security Systems inc.\r
-                               11685 Philippe-Panneton\r
-                               Montreal  Quebec  H1E 4M1\r
-                               CA\r
-\r
 38-F7-CD   (hex)               Polska Fabryka Wodomierzy i Ciep?omierzy FILA \r
 000000-0FFFFF     (base 16)            Polska Fabryka Wodomierzy i Ciep?omierzy FILA \r
                                ?eromskiego 30\r
@@ -15734,21 +15944,9 @@ D0-14-11   (hex)               EkkoSense Ltd
                                Triumph Road, Nottingham  UK Mainland  NG7 2TU\r
                                GB\r
 \r
-30-49-50   (hex)               IK Elektronik GmbH\r
-500000-5FFFFF     (base 16)            IK Elektronik GmbH\r
-                               Friedrichsgruener Str. 11-13\r
-                               Muldenhammer    08262\r
-                               DE\r
-\r
 D0-14-11   (hex)               Private\r
 100000-1FFFFF     (base 16)            Private\r
 \r
-5C-85-7E   (hex)               Sichuan C.H Control Technology Co., Ltd.\r
-100000-1FFFFF     (base 16)            Sichuan C.H Control Technology Co., Ltd.\r
-                               4F,B8,Tianfu Software Park, No. 99, Tianhua 1st Road\r
-                               Chengdu  Si chuan  610000\r
-                               CN\r
-\r
 5C-85-7E   (hex)               Nautech Electronics Ltd\r
 D00000-DFFFFF     (base 16)            Nautech Electronics Ltd\r
                                120 Cryers Road\r
@@ -15761,11 +15959,11 @@ D00000-DFFFFF     (base 16)           Nautech Electronics Ltd
                                Southborough  MA  01772\r
                                US\r
 \r
-5C-85-7E   (hex)               Zhejiang Jetron Ark Digital Technology Co., Ltd\r
-A00000-AFFFFF     (base 16)            Zhejiang Jetron Ark Digital Technology Co., Ltd\r
-                               Room 12-9, building B (Hongmao building), No. 338, Juxing West Road, Jiangbei District, Ningbo, ZheJiang, China\r
-                               Ningbo    315000\r
-                               CN\r
+30-49-50   (hex)               IK Elektronik GmbH\r
+500000-5FFFFF     (base 16)            IK Elektronik GmbH\r
+                               Friedrichsgruener Str. 11-13\r
+                               Muldenhammer    08262\r
+                               DE\r
 \r
 5C-85-7E   (hex)               Beijing HZFD Technology Co., Ltd\r
 700000-7FFFFF     (base 16)            Beijing HZFD Technology Co., Ltd\r
@@ -15773,16 +15971,22 @@ A00000-AFFFFF     (base 16)           Zhejiang Jetron Ark Digital Technology Co., Ltd
                                Beijing  Beiijng  100044\r
                                CN\r
 \r
+5C-85-7E   (hex)               Sichuan C.H Control Technology Co., Ltd.\r
+100000-1FFFFF     (base 16)            Sichuan C.H Control Technology Co., Ltd.\r
+                               4F,B8,Tianfu Software Park, No. 99, Tianhua 1st Road\r
+                               Chengdu  Si chuan  610000\r
+                               CN\r
+\r
 F4-69-D5   (hex)               Junchuang (Xiamen) Automation Technology Co.,Ltd\r
 100000-1FFFFF     (base 16)            Junchuang (Xiamen) Automation Technology Co.,Ltd\r
                                Room 705, building a, No. 96, Xiangxing Road, industrial zone, Xiamen Torch High tech Zone\r
                                Xiamen   Fujian  361101\r
                                CN\r
 \r
-4C-93-A6   (hex)               Wuhan Maiwe communication Co.,Ltd\r
-C00000-CFFFFF     (base 16)            Wuhan Maiwe communication Co.,Ltd\r
-                               Building 2,Area E, Phase ii, Optical valley core center, No.52, Liufang road, East Lake Hi-tech Development Zone,Wuhan,China\r
-                               Wuhan  Hubei  430000\r
+5C-85-7E   (hex)               Zhejiang Jetron Ark Digital Technology Co., Ltd\r
+A00000-AFFFFF     (base 16)            Zhejiang Jetron Ark Digital Technology Co., Ltd\r
+                               Room 12-9, building B (Hongmao building), No. 338, Juxing West Road, Jiangbei District, Ningbo, ZheJiang, China\r
+                               Ningbo    315000\r
                                CN\r
 \r
 F4-69-D5   (hex)               ITS Co., Ltd. \r
@@ -15791,11 +15995,11 @@ F4-69-D5   (hex)              ITS Co., Ltd.
                                Ulsan    44690\r
                                KR\r
 \r
-4C-93-A6   (hex)               Atrie Technology Fzc\r
-100000-1FFFFF     (base 16)            Atrie Technology Fzc\r
-                               ELOB office no E-44F-41, Hamriya Free zone\r
-                               Sharjah  Sharjah  10001\r
-                               AE\r
+4C-93-A6   (hex)               Wuhan Maiwe communication Co.,Ltd\r
+C00000-CFFFFF     (base 16)            Wuhan Maiwe communication Co.,Ltd\r
+                               Building 2,Area E, Phase ii, Optical valley core center, No.52, Liufang road, East Lake Hi-tech Development Zone,Wuhan,China\r
+                               Wuhan  Hubei  430000\r
+                               CN\r
 \r
 4C-93-A6   (hex)               Cantronic Systems (Canada) Inc\r
 D00000-DFFFFF     (base 16)            Cantronic Systems (Canada) Inc\r
@@ -15803,6 +16007,12 @@ D00000-DFFFFF     (base 16)            Cantronic Systems (Canada) Inc
                                Coquitlam  British Columbia  V3K 6V5\r
                                CA\r
 \r
+4C-93-A6   (hex)               Atrie Technology Fzc\r
+100000-1FFFFF     (base 16)            Atrie Technology Fzc\r
+                               ELOB office no E-44F-41, Hamriya Free zone\r
+                               Sharjah  Sharjah  10001\r
+                               AE\r
+\r
 28-B7-7C   (hex)               Anser Coding Inc.\r
 900000-9FFFFF     (base 16)            Anser Coding Inc.\r
                                34F., No. 99, Sec. 1, XinTai 5th Rd., Xizhi Dist.,\r
@@ -15815,18 +16025,6 @@ E00000-EFFFFF     (base 16)            Ray Pte Ltd
                                Singapore    049319\r
                                SG\r
 \r
-18-FD-CB   (hex)               Cabtronix AG\r
-200000-2FFFFF     (base 16)            Cabtronix AG\r
-                               Hohstrass 1\r
-                               Kloten  Zuerich  8302\r
-                               CH\r
-\r
-98-FC-84   (hex)               chiconypower\r
-B00000-BFFFFF     (base 16)            chiconypower\r
-                               23F, No.69, Sec. 2, Guangfu Rd., Sanchong Dist., New Taipei City 241, Taiwan (R.O.C.)\r
-                               New Taipei  Taiwan  241\r
-                               TW\r
-\r
 98-FC-84   (hex)               Guangdong DE at science and technology co., LTD\r
 800000-8FFFFF     (base 16)            Guangdong DE at science and technology co., LTD\r
                                Taide Technology Park,Jinfenghuang Industrial District, Fenggang Town,\r
@@ -15839,6 +16037,18 @@ C8-63-14   (hex)               Tymphany Acoustic Technology (Huizhou) Co.,  Ltd.
                                Huizhou  Guangdong  516223\r
                                CN\r
 \r
+98-FC-84   (hex)               chiconypower\r
+B00000-BFFFFF     (base 16)            chiconypower\r
+                               23F, No.69, Sec. 2, Guangfu Rd., Sanchong Dist., New Taipei City 241, Taiwan (R.O.C.)\r
+                               New Taipei  Taiwan  241\r
+                               TW\r
+\r
+18-FD-CB   (hex)               Cabtronix AG\r
+200000-2FFFFF     (base 16)            Cabtronix AG\r
+                               Hohstrass 1\r
+                               Kloten  Zuerich  8302\r
+                               CH\r
+\r
 58-20-8A   (hex)               SAMBO HITECH\r
 D00000-DFFFFF     (base 16)            SAMBO HITECH\r
                                469,Seokjung-ro,Namdong-Gu\r
@@ -15851,18 +16061,18 @@ D00000-DFFFFF     (base 16)           SAMBO HITECH
                                San Diego  CA  92123\r
                                US\r
 \r
-58-20-8A   (hex)               Infodev Electronic Designers Intl.\r
-B00000-BFFFFF     (base 16)            Infodev Electronic Designers Intl.\r
-                               1995 rue Frank-Carrel Suite 202\r
-                               Quebec  Quebec  G1N4H9\r
-                               CA\r
-\r
 58-20-8A   (hex)               Conductix-Wampfler\r
 A00000-AFFFFF     (base 16)            Conductix-Wampfler\r
                                10102 Fst\r
                                omaha  NE  68127\r
                                US\r
 \r
+58-20-8A   (hex)               Infodev Electronic Designers Intl.\r
+B00000-BFFFFF     (base 16)            Infodev Electronic Designers Intl.\r
+                               1995 rue Frank-Carrel Suite 202\r
+                               Quebec  Quebec  G1N4H9\r
+                               CA\r
+\r
 58-20-8A   (hex)               JIA HUANG JHAN YE CO.,LTD\r
 500000-5FFFFF     (base 16)            JIA HUANG JHAN YE CO.,LTD\r
                                1F., No. 19, Huanmei 2nd St., Donggang Township\r
@@ -15881,18 +16091,18 @@ A00000-AFFFFF     (base 16)           SCOPUS INTERNATIONAL-BELGIUM
                                Andamukkam, Kollam  Kerala  691 001\r
                                IN\r
 \r
-58-95-D8   (hex)               Epiphan Systems Inc\r
-700000-7FFFFF     (base 16)            Epiphan Systems Inc\r
-                               400 March Rd Suite 510\r
-                               Ottawa  Ontario  K2K3H4\r
-                               CA\r
-\r
 FC-CD-2F   (hex)               Spedos ADS a.s.\r
 C00000-CFFFFF     (base 16)            Spedos ADS a.s.\r
                                Hranická771\r
                                Valašské Mezi?í?í    75701\r
                                CZ\r
 \r
+58-95-D8   (hex)               Epiphan Systems Inc\r
+700000-7FFFFF     (base 16)            Epiphan Systems Inc\r
+                               400 March Rd Suite 510\r
+                               Ottawa  Ontario  K2K3H4\r
+                               CA\r
+\r
 58-95-D8   (hex)               SuZhou Ruishengwei Intelligent Technology Co.,Ltd\r
 B00000-BFFFFF     (base 16)            SuZhou Ruishengwei Intelligent Technology Co.,Ltd\r
                                Room 507?Building 1?ZhongXuXin Science Park?NO.91?Weixin Road?Suzhou Industrial Park\r
@@ -15917,18 +16127,6 @@ DC-4A-9E   (hex)               Dongguan Huili electroacoustic Industrial Co.,ltd
                                Dongguan  Guangdong  523770\r
                                CN\r
 \r
-84-11-C2   (hex)               Guangdong Creator&Flyaudio Electronic Technology Co.,LTD\r
-B00000-BFFFFF     (base 16)            Guangdong Creator&Flyaudio Electronic Technology Co.,LTD\r
-                               Block D1, No.3 Industrial Zone, Banxianshan, Hengli Town\r
-                               Dongguan  Guangdong  523460\r
-                               CN\r
-\r
-84-11-C2   (hex)               C TECH BILISIM TEKNOLOJILERI SAN. VE TIC. A.S.\r
-900000-9FFFFF     (base 16)            C TECH BILISIM TEKNOLOJILERI SAN. VE TIC. A.S.\r
-                               Teknopark ?stanbul, TGB, Sanayi Mah. Teknopark Bulvar?, No:1, Blok:1 Kat:2, Kurtköy-Pendik 34912, ?STANBUL\r
-                               Istanbul    34912\r
-                               TR\r
-\r
 84-11-C2   (hex)               Beijing Dayu Technology Co., Ltd.\r
 100000-1FFFFF     (base 16)            Beijing Dayu Technology Co., Ltd.\r
                                11B-660, Building 13, Wangjing Xiyuan, Chaoyang\r
@@ -15941,6 +16139,18 @@ B00000-BFFFFF     (base 16)            Guangdong Creator&Flyaudio Electronic Technology Co
                                Kashiwa-shi  Chiba  277-0804\r
                                JP\r
 \r
+84-11-C2   (hex)               C TECH BILISIM TEKNOLOJILERI SAN. VE TIC. A.S.\r
+900000-9FFFFF     (base 16)            C TECH BILISIM TEKNOLOJILERI SAN. VE TIC. A.S.\r
+                               Teknopark ?stanbul, TGB, Sanayi Mah. Teknopark Bulvar?, No:1, Blok:1 Kat:2, Kurtköy-Pendik 34912, ?STANBUL\r
+                               Istanbul    34912\r
+                               TR\r
+\r
+84-11-C2   (hex)               Guangdong Creator&Flyaudio Electronic Technology Co.,LTD\r
+B00000-BFFFFF     (base 16)            Guangdong Creator&Flyaudio Electronic Technology Co.,LTD\r
+                               Block D1, No.3 Industrial Zone, Banxianshan, Hengli Town\r
+                               Dongguan  Guangdong  523460\r
+                               CN\r
+\r
 84-11-C2   (hex)               Dangerous Music Group, LLC\r
 E00000-EFFFFF     (base 16)            Dangerous Music Group, LLC\r
                                701 South Mountain Road\r
@@ -15950,23 +16160,119 @@ E00000-EFFFFF     (base 16)          Dangerous Music Group, LLC
 8C-47-6E   (hex)               Private\r
 700000-7FFFFF     (base 16)            Private\r
 \r
-20-85-93   (hex)               Great Lite International\r
-700000-7FFFFF     (base 16)            Great Lite International\r
-                               11F., No.207-2, Sec. 3, Beixin Rd., Xindian Dist.,\r
-                               New Taipei City  Taiwan  23143\r
-                               TW\r
+8C-AE-49   (hex)               BERTIN TECHNOLOGIES\r
+300000-3FFFFF     (base 16)            BERTIN TECHNOLOGIES\r
+                               10 Avenue Ampère\r
+                               Montigny-le-Bretonneux  IDF  78180\r
+                               FR\r
 \r
-4C-4B-F9   (hex)               Tecnoplus Srl\r
-900000-9FFFFF     (base 16)            Tecnoplus Srl\r
-                               Via Cilavegna, 53\r
-                               Gravellona Lomellina  Pavia  27020\r
-                               IT\r
+8C-AE-49   (hex)               Gati Information Technolog(Kunshan)Co.,Ltd.\r
+500000-5FFFFF     (base 16)            Gati Information Technolog(Kunshan)Co.,Ltd.\r
+                               2-5 / F, room 7, No. 88, Baifu Road, Economic and Technological Development Zone\r
+                               Kunshan.  jiangsu  215300\r
+                               CN\r
 \r
-98-06-37   (hex)               Summa nv\r
-200000-2FFFFF     (base 16)            Summa nv\r
-                               Rochesterlaan 6\r
-                               Gistel    8470\r
-                               BE\r
+8C-AE-49   (hex)               SEVERIN Elektrogeräte GmbH\r
+200000-2FFFFF     (base 16)            SEVERIN Elektrogeräte GmbH\r
+                               Röhre 27\r
+                               Sundern  NRW  59846\r
+                               DE\r
+\r
+A4-53-EE   (hex)               SOS LAB Co., Ltd.\r
+C00000-CFFFFF     (base 16)            SOS LAB Co., Ltd.\r
+                               B-101, BI Center, GIST 123 Cheomdangwagi-ro\r
+                               Gwangju    61005\r
+                               KR\r
+\r
+A4-53-EE   (hex)               Williamson Corporation\r
+400000-4FFFFF     (base 16)            Williamson Corporation\r
+                               70 Domino Drive\r
+                               Concord  MA  01742\r
+                               US\r
+\r
+A4-53-EE   (hex)               Larva.io OÜ\r
+300000-3FFFFF     (base 16)            Larva.io OÜ\r
+                               Sidur 3\r
+                               Tallinn    11313\r
+                               EE\r
+\r
+A4-53-EE   (hex)               Foshan Yisihang Electrical Technology Co., Ltd.\r
+500000-5FFFFF     (base 16)            Foshan Yisihang Electrical Technology Co., Ltd.\r
+                               F4 Block A Lege Industrial Park, North Yucheng Road, Lunjiao Town, Shunde District\r
+                               Foshan  Guangdong  528308\r
+                               CN\r
+\r
+A0-02-4A   (hex)               IoTecha Corp\r
+E00000-EFFFFF     (base 16)            IoTecha Corp\r
+                               2555 Route 130, Suite 2\r
+                               Cranbury  NJ  08512\r
+                               US\r
+\r
+78-D4-F1   (hex)               TNB\r
+C00000-CFFFFF     (base 16)            TNB\r
+                               Ryazanskiy Prospekt, 24, k.2\r
+                               Moscow    109428\r
+                               RU\r
+\r
+78-D4-F1   (hex)               Burisch Elektronik Bauteile GmbH\r
+000000-0FFFFF     (base 16)            Burisch Elektronik Bauteile GmbH\r
+                               Leopoldauerstrasse 29\r
+                               Vienna    1210\r
+                               AT\r
+\r
+78-D4-F1   (hex)               Guangzhou Kingray information technology Co.,Ltd.\r
+600000-6FFFFF     (base 16)            Guangzhou Kingray information technology Co.,Ltd.\r
+                               No.8, Jinghu Road, Huadu Reg\r
+                               Guangzhou    510800\r
+                               CN\r
+\r
+78-D4-F1   (hex)               Ekoenergetyka - Polska S.A.\r
+300000-3FFFFF     (base 16)            Ekoenergetyka - Polska S.A.\r
+                               ul. Nowy Kisielin - Wysockiego 8\r
+                               Zielona Gora    66-002\r
+                               PL\r
+\r
+44-6F-D8   (hex)               Shenzhen Furuilian Electronic Co.,Ltd.\r
+100000-1FFFFF     (base 16)            Shenzhen Furuilian Electronic Co.,Ltd.\r
+                               3/F, No.5 Building Workshop, No.123, Shuitian Industrial Zone,Baoshi East Road, Shuitian Community, Shiyan Street, Bao'an District,\r
+                               Shenzhen    518000\r
+                               CN\r
+\r
+44-6F-D8   (hex)               lb Lautsprecher gmbH\r
+400000-4FFFFF     (base 16)            lb Lautsprecher gmbH\r
+                               Steinerstrasse 15 K\r
+                               Munich  Bavaria  81369\r
+                               DE\r
+\r
+44-6F-D8   (hex)               Beijing gpthink technology co.,LTD.\r
+B00000-BFFFFF     (base 16)            Beijing gpthink technology co.,LTD.\r
+                               Beijing fengtai guogongzhuang\r
+                               Beijing    100070\r
+                               CN\r
+\r
+44-6F-D8   (hex)               Global Telecom Engineering, Inc\r
+800000-8FFFFF     (base 16)            Global Telecom Engineering, Inc\r
+                               17901 Von Karman Ave, Suite 600\r
+                               Irvine  CA  92614\r
+                               US\r
+\r
+20-85-93   (hex)               Great Lite International\r
+700000-7FFFFF     (base 16)            Great Lite International\r
+                               11F., No.207-2, Sec. 3, Beixin Rd., Xindian Dist.,\r
+                               New Taipei City  Taiwan  23143\r
+                               TW\r
+\r
+4C-4B-F9   (hex)               Tecnoplus Srl\r
+900000-9FFFFF     (base 16)            Tecnoplus Srl\r
+                               Via Cilavegna, 53\r
+                               Gravellona Lomellina  Pavia  27020\r
+                               IT\r
+\r
+98-06-37   (hex)               Summa nv\r
+200000-2FFFFF     (base 16)            Summa nv\r
+                               Rochesterlaan 6\r
+                               Gistel    8470\r
+                               BE\r
 \r
 98-06-37   (hex)               Shanghai Jinnian information technology Co. Ltd\r
 E00000-EFFFFF     (base 16)            Shanghai Jinnian information technology Co. Ltd\r
@@ -19331,11 +19637,11 @@ B0-B3-53   (hex)              Sprocomm Technologies CO.,LTD.
                                shenzhen  guangdong  518000\r
                                CN\r
 \r
-B0-B3-53   (hex)               VOXISCOM\r
-800000-8FFFFF     (base 16)            VOXISCOM\r
-                               Rue Jules Ferry\r
-                               PORNIC    44210\r
-                               FR\r
+3C-FA-D3   (hex)               Mirico\r
+E00000-EFFFFF     (base 16)            Mirico\r
+                               30 DongSan Rd 9th floor Mirico\r
+                               Ansan  Gyunggi  15434\r
+                               KR\r
 \r
 B0-B3-53   (hex)               Innotas Elektronik GmbH\r
 400000-4FFFFF     (base 16)            Innotas Elektronik GmbH\r
@@ -19343,11 +19649,11 @@ B0-B3-53   (hex)              Innotas Elektronik GmbH
                                Zittau    D-02763\r
                                DE\r
 \r
-3C-FA-D3   (hex)               Mirico\r
-E00000-EFFFFF     (base 16)            Mirico\r
-                               30 DongSan Rd 9th floor Mirico\r
-                               Ansan  Gyunggi  15434\r
-                               KR\r
+B0-B3-53   (hex)               VOXISCOM\r
+800000-8FFFFF     (base 16)            VOXISCOM\r
+                               Rue Jules Ferry\r
+                               PORNIC    44210\r
+                               FR\r
 \r
 90-E2-FC   (hex)               Power Engineering & Manufacturing, Inc.\r
 A00000-AFFFFF     (base 16)            Power Engineering & Manufacturing, Inc.\r
@@ -19391,6 +19697,12 @@ C00000-CFFFFF     (base 16)            IO Industries Inc.
                                London  Ontario  N5V 0A4\r
                                CA\r
 \r
+90-E2-FC   (hex)               Fair Winds Digital srl\r
+700000-7FFFFF     (base 16)            Fair Winds Digital srl\r
+                               Via Italo Svevo 85\r
+                               Rome  Italy  00137\r
+                               IT\r
+\r
 14-AE-85   (hex)               AZ-TECHNOLOGY SDN BHD\r
 500000-5FFFFF     (base 16)            AZ-TECHNOLOGY SDN BHD\r
                                A108 & A109 BLOCK A KELANA BUSINESS CENTRE NO: 97 JALAN SS7/2 KELANA JAYA\r
@@ -19403,35 +19715,23 @@ C00000-CFFFFF     (base 16)           IO Industries Inc.
                                PADOVA  PADOVA  35129\r
                                IT\r
 \r
-90-E2-FC   (hex)               Fair Winds Digital srl\r
-700000-7FFFFF     (base 16)            Fair Winds Digital srl\r
-                               Via Italo Svevo 85\r
-                               Rome  Italy  00137\r
-                               IT\r
-\r
 14-AE-85   (hex)               TMG TE GmbH\r
 600000-6FFFFF     (base 16)            TMG TE GmbH\r
                                Zur Gießerei 10\r
                                Karlsruhe    776227\r
                                DE\r
 \r
-14-AE-85   (hex)               NTC SOFT\r
-B00000-BFFFFF     (base 16)            NTC SOFT\r
-                               B-805, Gwangmyeong SK Techno park, 60, Haan-ro,\r
-                               Gwangmyeong-si  Gyeonggi-do  14322\r
-                               KR\r
-\r
 14-AE-85   (hex)               Sercomm Corporation.\r
 E00000-EFFFFF     (base 16)            Sercomm Corporation.\r
                                3F,No.81,Yu-Yih Rd.,Chu-Nan Chen\r
                                Miao-Lih Hsuan    115\r
                                TW\r
 \r
-64-62-66   (hex)               Jiangsu Aisida Electronic Co.,Ltd\r
-C00000-CFFFFF     (base 16)            Jiangsu Aisida Electronic Co.,Ltd\r
-                               Aisida Industrial Park,Lanling Road,Danyang Development Zone\r
-                               DanYang  JiangSu  212300\r
-                               CN\r
+14-AE-85   (hex)               NTC SOFT\r
+B00000-BFFFFF     (base 16)            NTC SOFT\r
+                               B-805, Gwangmyeong SK Techno park, 60, Haan-ro,\r
+                               Gwangmyeong-si  Gyeonggi-do  14322\r
+                               KR\r
 \r
 94-CC-04   (hex)               Hangzhou Yongkong Technology Co., Ltd.\r
 000000-0FFFFF     (base 16)            Hangzhou Yongkong Technology Co., Ltd.\r
@@ -19439,6 +19739,12 @@ C00000-CFFFFF     (base 16)            Jiangsu Aisida Electronic Co.,Ltd
                                Hangzhou  Zhejiang  310000\r
                                CN\r
 \r
+64-62-66   (hex)               Jiangsu Aisida Electronic Co.,Ltd\r
+C00000-CFFFFF     (base 16)            Jiangsu Aisida Electronic Co.,Ltd\r
+                               Aisida Industrial Park,Lanling Road,Danyang Development Zone\r
+                               DanYang  JiangSu  212300\r
+                               CN\r
+\r
 94-CC-04   (hex)               Gowing Business And Contracting Wenzhou Co., LTD\r
 700000-7FFFFF     (base 16)            Gowing Business And Contracting Wenzhou Co., LTD\r
                                Room 101, No.4 Liming Industrial District, Lucheng, Wenzhou, China\r
@@ -19469,12 +19775,6 @@ C00000-CFFFFF     (base 16)            Jiangsu Aisida Electronic Co.,Ltd
                                North Andover  MA  01845\r
                                US\r
 \r
-94-05-BB   (hex)               Neurik AG\r
-300000-3FFFFF     (base 16)            Neurik AG\r
-                               Im alten Riet 143\r
-                               Schaan  SCHAAN  9494\r
-                               LI\r
-\r
 94-05-BB   (hex)               Dongguan Kingtron Electronics Tech Co., Ltd\r
 100000-1FFFFF     (base 16)            Dongguan Kingtron Electronics Tech Co., Ltd\r
                                No.3 Fumin North Rd,Shu'an Industrial Park, Humen Town\r
@@ -19487,6 +19787,12 @@ D00000-DFFFFF     (base 16)            Sunthink S&T Development Co.,Ltd
                                Shenzhen    518100\r
                                CN\r
 \r
+94-05-BB   (hex)               Neurik AG\r
+300000-3FFFFF     (base 16)            Neurik AG\r
+                               Im alten Riet 143\r
+                               Schaan  SCHAAN  9494\r
+                               LI\r
+\r
 DC-44-27   (hex)               Tesla,Inc.\r
 100000-1FFFFF     (base 16)            Tesla,Inc.\r
                                3500 Deer Creek Road\r
@@ -19499,30 +19805,24 @@ F4-90-CB   (hex)              ICE Gateway GmbH
                                Berlin  Berlin  12489\r
                                DE\r
 \r
-F4-90-CB   (hex)               DELEM BV\r
-100000-1FFFFF     (base 16)            DELEM BV\r
-                               LUCHTHAVEN WEG 42\r
-                               5657 EB EINDHOVEN    \r
-                               NL\r
-\r
 C0-9B-F4   (hex)               SHENZHEN WINS ELECTRONIC TECHNOLOGY CO., LTD\r
 800000-8FFFFF     (base 16)            SHENZHEN WINS ELECTRONIC TECHNOLOGY CO., LTD\r
                                Baoan Xixiang Xinbaoji Industry Park,Building A1-2\r
                                Shenzhen  Guangdong  518026\r
                                CN\r
 \r
+F4-90-CB   (hex)               DELEM BV\r
+100000-1FFFFF     (base 16)            DELEM BV\r
+                               LUCHTHAVEN WEG 42\r
+                               5657 EB EINDHOVEN    \r
+                               NL\r
+\r
 C0-9B-F4   (hex)               Hitachi High-Tech Materials Corporation\r
 200000-2FFFFF     (base 16)            Hitachi High-Tech Materials Corporation\r
                                Toranomon Hills Business Tower, 1-17-1 Toranomon, Minato-ku\r
                                Tokyo    105-6413\r
                                JP\r
 \r
-E8-B4-70   (hex)               Autocom Diagnostic Partner AB\r
-100000-1FFFFF     (base 16)            Autocom Diagnostic Partner AB\r
-                               Grafitvägen 23B\r
-                               TROLLHÄTTAN    46138\r
-                               SE\r
-\r
 E8-B4-70   (hex)               UNICACCES GROUPE\r
 E00000-EFFFFF     (base 16)            UNICACCES GROUPE\r
                                24 Chemin des Vieilles Vignes\r
@@ -19535,12 +19835,30 @@ B00000-BFFFFF     (base 16)           Digifocus Technology Inc.
                                Taipei City     11494\r
                                TW\r
 \r
+E8-B4-70   (hex)               Autocom Diagnostic Partner AB\r
+100000-1FFFFF     (base 16)            Autocom Diagnostic Partner AB\r
+                               Grafitvägen 23B\r
+                               TROLLHÄTTAN    46138\r
+                               SE\r
+\r
 94-FB-A7   (hex)               Silver-I Co.,LTD.\r
 800000-8FFFFF     (base 16)            Silver-I Co.,LTD.\r
                                2-14-4 Shinyokohama,kohoku-ku\r
                                Yokohama  Kanagawa  222-0033\r
                                JP\r
 \r
+38-F7-CD   (hex)               NORDI TELEKOMMUNIKATSIOONI OÜ\r
+400000-4FFFFF     (base 16)            NORDI TELEKOMMUNIKATSIOONI OÜ\r
+                               Valukoja 8\r
+                               Tallinn city  Estonian Republic  11415\r
+                               EE\r
+\r
+38-F7-CD   (hex)               Shanghai qinzhuo Electronic Co., Ltd.\r
+500000-5FFFFF     (base 16)            Shanghai qinzhuo Electronic Co., Ltd.\r
+                               No. W, floor 1, building 2, No. 258, Minfeng Road, Pudong New Area\r
+                               Shanghai  Shanghai  201209\r
+                               CN\r
+\r
 38-F7-CD   (hex)               RFbeam Microwave GmbH\r
 900000-9FFFFF     (base 16)            RFbeam Microwave GmbH\r
                                Schuppisstrasse 7\r
@@ -19553,47 +19871,29 @@ C00000-CFFFFF     (base 16)           Shenzhen MADIGI Electronic Technology Co., Ltd
                                Shenzhen  Guangdong  518000\r
                                CN\r
 \r
-38-F7-CD   (hex)               Shanghai qinzhuo Electronic Co., Ltd.\r
-500000-5FFFFF     (base 16)            Shanghai qinzhuo Electronic Co., Ltd.\r
-                               No. W, floor 1, building 2, No. 258, Minfeng Road, Pudong New Area\r
-                               Shanghai  Shanghai  201209\r
+70-69-79   (hex)               Faurecia Clarion Electronics (Dongguan) Co., Ltd\r
+900000-9FFFFF     (base 16)            Faurecia Clarion Electronics (Dongguan) Co., Ltd\r
+                               South of Dongkeng Avenue, Dongkeng Town, Dongguan City, Guangdong\r
+                               DONGGUAN  GUANGDONG  523455\r
                                CN\r
 \r
-38-F7-CD   (hex)               NORDI TELEKOMMUNIKATSIOONI OÜ\r
-400000-4FFFFF     (base 16)            NORDI TELEKOMMUNIKATSIOONI OÜ\r
-                               Valukoja 8\r
-                               Tallinn city  Estonian Republic  11415\r
-                               EE\r
-\r
 38-F7-CD   (hex)               BlastWave Inc.\r
 800000-8FFFFF     (base 16)            BlastWave Inc.\r
                                1987 Leghorn Street, Suite 100\r
                                Moutain View  CA  94043\r
                                US\r
 \r
-70-69-79   (hex)               Faurecia Clarion Electronics (Dongguan) Co., Ltd\r
-900000-9FFFFF     (base 16)            Faurecia Clarion Electronics (Dongguan) Co., Ltd\r
-                               South of Dongkeng Avenue, Dongkeng Town, Dongguan City, Guangdong\r
-                               DONGGUAN  GUANGDONG  523455\r
-                               CN\r
-\r
-70-69-79   (hex)               Beijing Security Union Information Technology Co.,Ltd\r
-600000-6FFFFF     (base 16)            Beijing Security Union Information Technology Co.,Ltd\r
-                               Beijing Security Union Information Technology Co.,Ltd \r
-                               Beijing  Beijing  100085\r
-                               CN\r
-\r
 70-69-79   (hex)               Intelitech SIA\r
 700000-7FFFFF     (base 16)            Intelitech SIA\r
                                2-22 Kruzes str.\r
                                Riga  Other  LV-1046\r
                                LV\r
 \r
-CC-C2-61   (hex)               Ebiologic Technology Co., Ltd.\r
-000000-0FFFFF     (base 16)            Ebiologic Technology Co., Ltd.\r
-                               9F., No.33, Ln. 3, Sec. 1, Zhongzheng E. Rd., Tamsui Dist., New Taipei City 251, Taiwan (R.O.C.)\r
-                               New Taipei City    251\r
-                               TW\r
+70-69-79   (hex)               Beijing Security Union Information Technology Co.,Ltd\r
+600000-6FFFFF     (base 16)            Beijing Security Union Information Technology Co.,Ltd\r
+                               Beijing Security Union Information Technology Co.,Ltd \r
+                               Beijing  Beijing  100085\r
+                               CN\r
 \r
 CC-C2-61   (hex)               Dspread Technology (Beijing) Inc.\r
 D00000-DFFFFF     (base 16)            Dspread Technology (Beijing) Inc.\r
@@ -19607,6 +19907,12 @@ CC-C2-61   (hex)               Viper Design, LLC
                                Goodlettsville  TN  37072\r
                                US\r
 \r
+CC-C2-61   (hex)               Ebiologic Technology Co., Ltd.\r
+000000-0FFFFF     (base 16)            Ebiologic Technology Co., Ltd.\r
+                               9F., No.33, Ln. 3, Sec. 1, Zhongzheng E. Rd., Tamsui Dist., New Taipei City 251, Taiwan (R.O.C.)\r
+                               New Taipei City    251\r
+                               TW\r
+\r
 CC-C2-61   (hex)               BYTERG LLC\r
 900000-9FFFFF     (base 16)            BYTERG LLC\r
                                1st Nagatinsky proezd 10 build.1\r
@@ -19631,18 +19937,18 @@ F0-D7-AF   (hex)              Anord Mardix (USA) Inc.
                                Sandston  VA  23150\r
                                US\r
 \r
-94-FB-A7   (hex)               Rosenberger Technologies Co.,Ltd.\r
-D00000-DFFFFF     (base 16)            Rosenberger Technologies Co.,Ltd.\r
-                               NO.6, ShenAn Rd, Dianshanhu Town\r
-                               Kunshan City  Jiangsu Province  215345\r
-                               CN\r
-\r
 F0-D7-AF   (hex)               SHEN ZHEN MICHIP TECHNOLOGIES CO.,LTD.\r
 800000-8FFFFF     (base 16)            SHEN ZHEN MICHIP TECHNOLOGIES CO.,LTD.\r
                                Fuxingda Indestrial park.Floor4?Building4\r
                                SHEN ZHEN  GUANG DONG  518126\r
                                CN\r
 \r
+94-FB-A7   (hex)               Rosenberger Technologies Co.,Ltd.\r
+D00000-DFFFFF     (base 16)            Rosenberger Technologies Co.,Ltd.\r
+                               NO.6, ShenAn Rd, Dianshanhu Town\r
+                               Kunshan City  Jiangsu Province  215345\r
+                               CN\r
+\r
 30-49-50   (hex)               Guangzhou Lian-med Technology Co.,Ltd.\r
 000000-0FFFFF     (base 16)            Guangzhou Lian-med Technology Co.,Ltd.\r
                                Room 501, Building G1,No. 31 Kefeng Road, Huangpu district\r
@@ -19655,12 +19961,6 @@ E00000-EFFFFF     (base 16)            IoTmaxx GmbH
                                Hannover    30159\r
                                DE\r
 \r
-D0-14-11   (hex)               Guangdong Shiqi Manufacture Co., Ltd.\r
-D00000-DFFFFF     (base 16)            Guangdong Shiqi Manufacture Co., Ltd.\r
-                               No. D10~11, Lunjiao intensive industrial Zone,  Licun  Village committee, Lunjiao street office, Shunde District\r
-                               Foshan  Guangdong  528300\r
-                               CN\r
-\r
 D0-14-11   (hex)               Ahnnet\r
 600000-6FFFFF     (base 16)            Ahnnet\r
                                B-313, Samhwan HIPEX, 230, Pangyoyeok-ro, Bundang-gu\r
@@ -19673,10 +19973,10 @@ D0-14-11   (hex)              Ahnnet
                                Warszawa    02-226\r
                                PL\r
 \r
-5C-85-7E   (hex)               Guoyi Liangzi (Hefei) Technology Co., Ltd(CIQTEK)\r
-E00000-EFFFFF     (base 16)            Guoyi Liangzi (Hefei) Technology Co., Ltd(CIQTEK)\r
-                               1-4th Floor, Building No.E2, Chuangxin Industrial Park, No.2800, Chuangxin Road Gaoxin District\r
-                               Hefei   Anhui  Hefei \r
+D0-14-11   (hex)               Guangdong Shiqi Manufacture Co., Ltd.\r
+D00000-DFFFFF     (base 16)            Guangdong Shiqi Manufacture Co., Ltd.\r
+                               No. D10~11, Lunjiao intensive industrial Zone,  Licun  Village committee, Lunjiao street office, Shunde District\r
+                               Foshan  Guangdong  528300\r
                                CN\r
 \r
 5C-85-7E   (hex)               Express LUCK Industrial Ltd.\r
@@ -19685,24 +19985,30 @@ E00000-EFFFFF     (base 16)           Guoyi Liangzi (Hefei) Technology Co., Ltd(CIQTEK)
                                Shenzhen  Guangdong  518100\r
                                CN\r
 \r
+5C-85-7E   (hex)               Guoyi Liangzi (Hefei) Technology Co., Ltd(CIQTEK)\r
+E00000-EFFFFF     (base 16)            Guoyi Liangzi (Hefei) Technology Co., Ltd(CIQTEK)\r
+                               1-4th Floor, Building No.E2, Chuangxin Industrial Park, No.2800, Chuangxin Road Gaoxin District\r
+                               Hefei   Anhui  Hefei \r
+                               CN\r
+\r
 F4-69-D5   (hex)               Nantong ZYDZ Electronic.,Co.Ltd\r
 D00000-DFFFFF     (base 16)            Nantong ZYDZ Electronic.,Co.Ltd\r
                                # F, High-Tech business Incubator, No.86 East Waihuan Road,\r
                                Nantong  Jiangsu  226300\r
                                CN\r
 \r
-F4-69-D5   (hex)               Stype CS d.o.o.\r
-400000-4FFFFF     (base 16)            Stype CS d.o.o.\r
-                               Velikopoljska 32\r
-                               Zagreb    10010\r
-                               HR\r
-\r
 4C-93-A6   (hex)               Hanwang Technology Co.,Ltd\r
 A00000-AFFFFF     (base 16)            Hanwang Technology Co.,Ltd\r
                                HANVON TOWER, BUILDING NO.5, ZHONGGUANCUN SOFTWARE PARK, HAIDIAN DISTRICT, BEIJING, CHINA  100193 \r
                                BEIJING  BEIJING  100193 \r
                                CN\r
 \r
+F4-69-D5   (hex)               Stype CS d.o.o.\r
+400000-4FFFFF     (base 16)            Stype CS d.o.o.\r
+                               Velikopoljska 32\r
+                               Zagreb    10010\r
+                               HR\r
+\r
 28-B7-7C   (hex)               AnyLink LLC\r
 C00000-CFFFFF     (base 16)            AnyLink LLC\r
                                100 N Washington St. Floor 6\r
@@ -19715,22 +20021,28 @@ C00000-CFFFFF     (base 16)           AnyLink LLC
                                Shanghai  Shanghai  201800\r
                                CN\r
 \r
+C0-61-9A   (hex)               LYAND ACOUSTIC TECHNOLOGY CO.,LTD.\r
+300000-3FFFFF     (base 16)            LYAND ACOUSTIC TECHNOLOGY CO.,LTD.\r
+                               No. 73 JinFu Road XiaoJinKou\r
+                               Huizhou city   GuangDong  516023\r
+                               CN\r
+\r
 28-B7-7C   (hex)               Enedo Finland Oy\r
 D00000-DFFFFF     (base 16)            Enedo Finland Oy\r
                                Martinkyläntie 43\r
                                Vantaa    01720\r
                                FI\r
 \r
-C0-61-9A   (hex)               JAM-Labs Corp\r
-C00000-CFFFFF     (base 16)            JAM-Labs Corp\r
-                               4109 Clipper Ct\r
-                               Fremont  CA  94538\r
+C0-61-9A   (hex)               KidKraft\r
+100000-1FFFFF     (base 16)            KidKraft\r
+                               4630 Olin Rd\r
+                               Dallas  TX  75244\r
                                US\r
 \r
-C0-61-9A   (hex)               LYAND ACOUSTIC TECHNOLOGY CO.,LTD.\r
-300000-3FFFFF     (base 16)            LYAND ACOUSTIC TECHNOLOGY CO.,LTD.\r
-                               No. 73 JinFu Road XiaoJinKou\r
-                               Huizhou city   GuangDong  516023\r
+C0-61-9A   (hex)               Zhejiang Haikang Science And Technology Co.,Ltd\r
+E00000-EFFFFF     (base 16)            Zhejiang Haikang Science And Technology Co.,Ltd\r
+                               No.797 Binkang Rd, Binjiang District\r
+                               Hangzhou    310053\r
                                CN\r
 \r
 C0-61-9A   (hex)               Paragon Robotics LLC\r
@@ -19739,22 +20051,10 @@ C0-61-9A   (hex)              Paragon Robotics LLC
                                Bedford Heights  OH  44146\r
                                US\r
 \r
-C0-61-9A   (hex)               Zhejiang Haikang Science And Technology Co.,Ltd\r
-E00000-EFFFFF     (base 16)            Zhejiang Haikang Science And Technology Co.,Ltd\r
-                               No.797 Binkang Rd, Binjiang District\r
-                               Hangzhou    310053\r
-                               CN\r
-\r
-98-FC-84   (hex)               go-e GmbH\r
-100000-1FFFFF     (base 16)            go-e GmbH\r
-                               Satellitenstrasse 1\r
-                               Feldkirchen  Kaernten  9560\r
-                               AT\r
-\r
-C0-61-9A   (hex)               KidKraft\r
-100000-1FFFFF     (base 16)            KidKraft\r
-                               4630 Olin Rd\r
-                               Dallas  TX  75244\r
+C0-61-9A   (hex)               JAM-Labs Corp\r
+C00000-CFFFFF     (base 16)            JAM-Labs Corp\r
+                               4109 Clipper Ct\r
+                               Fremont  CA  94538\r
                                US\r
 \r
 98-FC-84   (hex)               ZERONE CO., LTD.\r
@@ -19763,11 +20063,11 @@ C0-61-9A   (hex)              KidKraft
                                SEOUL    15843\r
                                KR\r
 \r
-98-FC-84   (hex)               Zymbit\r
-500000-5FFFFF     (base 16)            Zymbit\r
-                               53 Cass Place, Suite B\r
-                               Goleta  CA  93117\r
-                               US\r
+98-FC-84   (hex)               go-e GmbH\r
+100000-1FFFFF     (base 16)            go-e GmbH\r
+                               Satellitenstrasse 1\r
+                               Feldkirchen  Kaernten  9560\r
+                               AT\r
 \r
 18-FD-CB   (hex)               TRANSLITE GLOBAL LLC\r
 B00000-BFFFFF     (base 16)            TRANSLITE GLOBAL LLC\r
@@ -19775,11 +20075,11 @@ B00000-BFFFFF     (base 16)           TRANSLITE GLOBAL LLC
                                HOUSTON  TX  77091\r
                                US\r
 \r
-18-FD-CB   (hex)               Shenzhen Rui jiali Electronic Technology Co. Ltd.\r
-000000-0FFFFF     (base 16)            Shenzhen Rui jiali Electronic Technology Co. Ltd.\r
-                               306 ROOM,Building B, ShenZhaoYe Science Park, BaoLong 5 Road No. 1,Baolong Industrial City ,Pingshan District\r
-                               Shenzhen    518118\r
-                               CN\r
+98-FC-84   (hex)               Zymbit\r
+500000-5FFFFF     (base 16)            Zymbit\r
+                               53 Cass Place, Suite B\r
+                               Goleta  CA  93117\r
+                               US\r
 \r
 18-FD-CB   (hex)               CreyNox GmbH\r
 900000-9FFFFF     (base 16)            CreyNox GmbH\r
@@ -19793,6 +20093,12 @@ B00000-BFFFFF     (base 16)            TRANSLITE GLOBAL LLC
                                Seongnam-si  Gyeonggi-do, KOREA  13403\r
                                KR\r
 \r
+18-FD-CB   (hex)               Shenzhen Rui jiali Electronic Technology Co. Ltd.\r
+000000-0FFFFF     (base 16)            Shenzhen Rui jiali Electronic Technology Co. Ltd.\r
+                               306 ROOM,Building B, ShenZhaoYe Science Park, BaoLong 5 Road No. 1,Baolong Industrial City ,Pingshan District\r
+                               Shenzhen    518118\r
+                               CN\r
+\r
 18-FD-CB   (hex)               ENERGIE IP\r
 700000-7FFFFF     (base 16)            ENERGIE IP\r
                                48 rue du Château d’eau \r
@@ -19811,18 +20117,18 @@ CC-4F-5C   (hex)              Dtrovision
                                Fair Lawn  NJ  07410\r
                                US\r
 \r
-CC-4F-5C   (hex)               AZ-TECHNOLOGY SDN BHD\r
-A00000-AFFFFF     (base 16)            AZ-TECHNOLOGY SDN BHD\r
-                               A108 & A109 BLOCK A KELANA BUSINESS CENTRE NO: 97 JALAN SS7/2 KELANA JAYA\r
-                               PETALING JAYA  SELANGOR  47301\r
-                               MY\r
-\r
 CC-4F-5C   (hex)               Buttons (Beijing) Technology Limited\r
 E00000-EFFFFF     (base 16)            Buttons (Beijing) Technology Limited\r
                                Room 202, Floor 2, Building No. 3, No. 9 Xiaoying Road, Chaoyang District\r
                                Beijing    100101\r
                                CN\r
 \r
+CC-4F-5C   (hex)               AZ-TECHNOLOGY SDN BHD\r
+A00000-AFFFFF     (base 16)            AZ-TECHNOLOGY SDN BHD\r
+                               A108 & A109 BLOCK A KELANA BUSINESS CENTRE NO: 97 JALAN SS7/2 KELANA JAYA\r
+                               PETALING JAYA  SELANGOR  47301\r
+                               MY\r
+\r
 FC-CD-2F   (hex)               Shenzhen Smartbyte Technology Co., Ltd.\r
 D00000-DFFFFF     (base 16)            Shenzhen Smartbyte Technology Co., Ltd.\r
                                 6th Floor, Building D, Huiqing Science and Technology Park, No. 8 Dafu Industrial Zone, Guanlan Street, Longhua District, Shenzhen\r
@@ -19853,12 +20159,6 @@ FC-CD-2F   (hex)               Genitek Engineering sprl
                                shenzhen  guangdong  51800\r
                                CN\r
 \r
-58-95-D8   (hex)               elgris UG\r
-500000-5FFFFF     (base 16)            elgris UG\r
-                               Langerweher Str. 10\r
-                               Inden  Deutschland  52459\r
-                               DE\r
-\r
 CC-4F-5C   (hex)               Beijing Neutron Technology CO.,LTD.\r
 D00000-DFFFFF     (base 16)            Beijing Neutron Technology CO.,LTD.\r
                                Beijing Neutron Technology CO.,LTD. \r
@@ -19871,12 +20171,36 @@ B00000-BFFFFF     (base 16)           Maxvision Technology Corp.
                                Shenzhen.    518000\r
                                CN\r
 \r
+58-95-D8   (hex)               elgris UG\r
+500000-5FFFFF     (base 16)            elgris UG\r
+                               Langerweher Str. 10\r
+                               Inden  Deutschland  52459\r
+                               DE\r
+\r
 DC-4A-9E   (hex)               Annapurna labs\r
 200000-2FFFFF     (base 16)            Annapurna labs\r
                                Matam Scientific Industries Center,   Building 8.2\r
                                Mail box 15123  Haifa  3508409\r
                                IL\r
 \r
+68-79-12   (hex)               ShangHai Aigentoo Information Technology Co., Ltd\r
+800000-8FFFFF     (base 16)            ShangHai Aigentoo Information Technology Co., Ltd\r
+                               Room 1126,Building 1,Xin Ye Building,388 Tianlin Road,Xuhui District\r
+                               Shanghai    200080\r
+                               CN\r
+\r
+68-79-12   (hex)               PCTEL, Inc.\r
+000000-0FFFFF     (base 16)            PCTEL, Inc.\r
+                               471 Brighton Drive\r
+                               Bloomingdale  IL  60108\r
+                               US\r
+\r
+68-79-12   (hex)               APPOTRONICS CO., LTD\r
+600000-6FFFFF     (base 16)            APPOTRONICS CO., LTD\r
+                               4th Floor,SZICC,NO.1089,Chaguang Road,Nanshan District, Shenzhen, China\r
+                               Shenzhen  Guangdong  518000\r
+                               CN\r
+\r
 84-11-C2   (hex)               Provision-ISR\r
 C00000-CFFFFF     (base 16)            Provision-ISR\r
                                11 Atir Yeda St.\r
@@ -19889,41 +20213,17 @@ D00000-DFFFFF     (base 16)           Goldmund Switzerland
                                Vernier  Geneva  1214\r
                                CH\r
 \r
-84-11-C2   (hex)               AIBIoT GmbH\r
-500000-5FFFFF     (base 16)            AIBIoT GmbH\r
-                               Hornemannstr. 12\r
-                               Hildesheim  Lower Saxony  31137\r
-                               DE\r
-\r
 84-11-C2   (hex)               Ei3 Corporation\r
 700000-7FFFFF     (base 16)            Ei3 Corporation\r
                                2 Blue Hill Plaza, Ste 1544\r
                                Pearl River  NY  10965\r
                                US\r
 \r
-68-79-12   (hex)               Stephan Electronics SARL\r
-300000-3FFFFF     (base 16)            Stephan Electronics SARL\r
-                               Maupas 9\r
-                               Lausanne    1004\r
-                               CH\r
-\r
-68-79-12   (hex)               ShangHai Aigentoo Information Technology Co., Ltd\r
-800000-8FFFFF     (base 16)            ShangHai Aigentoo Information Technology Co., Ltd\r
-                               Room 1126,Building 1,Xin Ye Building,388 Tianlin Road,Xuhui District\r
-                               Shanghai    200080\r
-                               CN\r
-\r
-68-79-12   (hex)               APPOTRONICS CO., LTD\r
-600000-6FFFFF     (base 16)            APPOTRONICS CO., LTD\r
-                               4th Floor,SZICC,NO.1089,Chaguang Road,Nanshan District, Shenzhen, China\r
-                               Shenzhen  Guangdong  518000\r
-                               CN\r
-\r
-68-79-12   (hex)               PCTEL, Inc.\r
-000000-0FFFFF     (base 16)            PCTEL, Inc.\r
-                               471 Brighton Drive\r
-                               Bloomingdale  IL  60108\r
-                               US\r
+84-11-C2   (hex)               AIBIoT GmbH\r
+500000-5FFFFF     (base 16)            AIBIoT GmbH\r
+                               Hornemannstr. 12\r
+                               Hildesheim  Lower Saxony  31137\r
+                               DE\r
 \r
 8C-47-6E   (hex)               Shanghai Satellite Communication Technology Co.,Ltd\r
 300000-3FFFFF     (base 16)            Shanghai Satellite Communication Technology Co.,Ltd\r
@@ -19937,18 +20237,18 @@ D00000-DFFFFF     (base 16)           Goldmund Switzerland
                                San Francisco  CA  94103\r
                                US\r
 \r
+68-79-12   (hex)               Stephan Electronics SARL\r
+300000-3FFFFF     (base 16)            Stephan Electronics SARL\r
+                               Maupas 9\r
+                               Lausanne    1004\r
+                               CH\r
+\r
 8C-47-6E   (hex)               Faravid Communication&Data Analysis\r
 B00000-BFFFFF     (base 16)            Faravid Communication&Data Analysis\r
                                18th unit, No.2, Houman Alley Abbaspour Av., \r
                                Vanak Sq.  Tehran  1435633413\r
                                IR\r
 \r
-8C-47-6E   (hex)               Edge Networks Inc\r
-C00000-CFFFFF     (base 16)            Edge Networks Inc\r
-                               943 W. Overland Road, Suite 152\r
-                               Meridian  ID  83642\r
-                               US\r
-\r
 8C-47-6E   (hex)               TelWare Corporation\r
 100000-1FFFFF     (base 16)            TelWare Corporation\r
                                1824 Industrial Center Circle\r
@@ -19961,8 +20261,86 @@ C00000-CFFFFF     (base 16)            Edge Networks Inc
                                Shenzhen  Guangdong  518100\r
                                CN\r
 \r
+8C-47-6E   (hex)               Edge Networks Inc\r
+C00000-CFFFFF     (base 16)            Edge Networks Inc\r
+                               943 W. Overland Road, Suite 152\r
+                               Meridian  ID  83642\r
+                               US\r
+\r
 8C-47-6E   (hex)               Annapurna labs\r
 E00000-EFFFFF     (base 16)            Annapurna labs\r
                                Matam Scientific Industries Center,   Building 8.2\r
                                Mail box 15123  Haifa  3508409\r
                                IL\r
+\r
+8C-AE-49   (hex)               Ouman Oy\r
+000000-0FFFFF     (base 16)            Ouman Oy\r
+                               Voimatie 6\r
+                               Kempele    FIN-90440\r
+                               FI\r
+\r
+8C-AE-49   (hex)               Jiangsu Sixingda Information Technology Co., Ltd.\r
+400000-4FFFFF     (base 16)            Jiangsu Sixingda Information Technology Co., Ltd.\r
+                               Jiangsu Sixingda Information Technology Co., Ltd.\r
+                               Nanjing  Jiangsu  210000\r
+                               CN\r
+\r
+8C-AE-49   (hex)               Suzhou Guowang Electronics Technology Co., Ltd.\r
+B00000-BFFFFF     (base 16)            Suzhou Guowang Electronics Technology Co., Ltd.\r
+                               No. 99, Changli Road, 703, Wuzhong science and technology entrepreneurship Park\r
+                               Suzhou    215168\r
+                               CN\r
+\r
+A4-53-EE   (hex)               Viper Design, LLC\r
+B00000-BFFFFF     (base 16)            Viper Design, LLC\r
+                               85 Cude Lane\r
+                               Madison  TN  37115\r
+                               US\r
+\r
+A0-02-4A   (hex)               Donguan Amsamotion Automation Technology Co., Ltd\r
+500000-5FFFFF     (base 16)            Donguan Amsamotion Automation Technology Co., Ltd\r
+                               Block A, Zosun Intelligence Creation Zone, No.9 Yizhan Road, Yuanwubian Streeet Nancheng District,\r
+                               Dongguan  Gunagdong  523000\r
+                               CN\r
+\r
+A0-02-4A   (hex)               Guangdong Jinpeng Technology Co. LTD\r
+A00000-AFFFFF     (base 16)            Guangdong Jinpeng Technology Co. LTD\r
+                               Room 504, 5 / F, Self-built A3 Building, No. 50 Science Avenue, Huangpu District\r
+                               Guangzhou    510700\r
+                               CN\r
+\r
+A0-02-4A   (hex)               Beijing Lyratone Technology Co., Ltd\r
+800000-8FFFFF     (base 16)            Beijing Lyratone Technology Co., Ltd\r
+                               1st floor, Caigang building, No.40 Beiyuan Road\r
+                               Beijing    100020\r
+                               CN\r
+\r
+A0-02-4A   (hex)               Encroute AB\r
+C00000-CFFFFF     (base 16)            Encroute AB\r
+                               Box 2062\r
+                               Sundbyberg    17402\r
+                               SE\r
+\r
+A0-02-4A   (hex)               Vitec Imaging Solutions Spa\r
+100000-1FFFFF     (base 16)            Vitec Imaging Solutions Spa\r
+                               Via Valsugana 100\r
+                               Cassola  Vicenza  36022\r
+                               IT\r
+\r
+78-D4-F1   (hex)               Cartender\r
+100000-1FFFFF     (base 16)            Cartender\r
+                               Via della Meccanica 2a\r
+                               Padova  PD  35127\r
+                               IT\r
+\r
+78-D4-F1   (hex)               Jiangsu byzoro intelligent technology Co.,Ltd\r
+B00000-BFFFFF     (base 16)            Jiangsu byzoro intelligent technology Co.,Ltd\r
+                               Room 301, Building D, Yunmi City, No.19 Ningshuang Road, Yuhuatai District\r
+                               Nanjing  Jiangsu  210012\r
+                               CN\r
+\r
+44-6F-D8   (hex)               ITC\r
+700000-7FFFFF     (base 16)            ITC\r
+                               3030 Corporate Grove Drive\r
+                               Hudsonville  MI  49426\r
+                               US\r
index f7d37444cac068fca0f36d3880a6373385564f3b..18422c1ab19ef4af1329b56661049a3caf6785f7 100644 (file)
@@ -1733,12 +1733,6 @@ D1C000-D1CFFF     (base 16)              Specialised Imaging Limited
                                Pitstone  Bucks  LU7 9GX\r
                                GB\r
 \r
-70-B3-D5   (hex)               Viko Elektrik-Elektronik A.Ş.\r
-EC8000-EC8FFF     (base 16)            Viko Elektrik-Elektronik A.Ş.\r
-                               Abdurrahmangazi Mah. Ebubekir Cad. No:44 Sancaktepe\r
-                               Istanbul    34887\r
-                               TR\r
-\r
 70-B3-D5   (hex)               ATX Networks Corp\r
 9D9000-9D9FFF     (base 16)            ATX Networks Corp\r
                                1-501 Clements Road West\r
@@ -4745,6 +4739,138 @@ BF4000-BF4FFF     (base 16)             CreevX
                                London    E2 8AA\r
                                GB\r
 \r
+70-B3-D5   (hex)               EDF Lab\r
+BDC000-BDCFFF     (base 16)            EDF Lab\r
+                               7 Bd Gaspard Monge\r
+                               PALAISEAU    91120\r
+                               FR\r
+\r
+70-B3-D5   (hex)               EarTex\r
+627000-627FFF     (base 16)            EarTex\r
+                               41 Corsham Street\r
+                               London  England  N1 6DR\r
+                               GB\r
+\r
+70-B3-D5   (hex)               VALEO CDA\r
+51F000-51FFFF     (base 16)            VALEO CDA\r
+                               Hummendorfer Str 74\r
+                               Kronach    96317\r
+                               DE\r
+\r
+70-B3-D5   (hex)               PANASONIC LIFE SOLUTIONS ELEKTRİK SANAYİ VE TİCARE\r
+EC8000-EC8FFF     (base 16)            PANASONIC LIFE SOLUTIONS ELEKTRİK SANAYİ VE TİCARE\r
+                               Abdurrahmangazi Mah. Ebubekir Cad. No:44 Sancaktepe\r
+                               Istanbul    34887\r
+                               TR\r
+\r
+70-B3-D5   (hex)               Telco Antennas Pty Ltd\r
+256000-256FFF     (base 16)            Telco Antennas Pty Ltd\r
+                               5/1 Roebuck St\r
+                               Hemmant  QLD  4154\r
+                               AU\r
+\r
+70-B3-D5   (hex)               enders GmbH\r
+D3E000-D3EFFF     (base 16)            enders GmbH\r
+                               Sonnenstraße 39\r
+                               Ergolding    84030\r
+                               DE\r
+\r
+70-B3-D5   (hex)               DaiShin Information & Communications Co., Ltd\r
+560000-560FFF     (base 16)            DaiShin Information & Communications Co., Ltd\r
+                               DaiShin I&C Bldg., 205-28, Gasan digital 1-ro Geumcheon-gu\r
+                               Seoul  Seoul  08501\r
+                               KR\r
+\r
+70-B3-D5   (hex)               ULSee Inc\r
+1B7000-1B7FFF     (base 16)            ULSee Inc\r
+                               9F, No.97, Jingye 1st Road  Zhongshan Dist.,Taipei City 104451 Taiwan\r
+                               Taipei  Taipei  104451\r
+                               TW\r
+\r
+70-B3-D5   (hex)               Network Customizing Technologies Inc\r
+B4B000-B4BFFF     (base 16)            Network Customizing Technologies Inc\r
+                               29, Yuseong-daero 1184beon-gil, Yuseong-gu\r
+                               Daejeon    34109\r
+                               KR\r
+\r
+70-B3-D5   (hex)               Nexus Electric S.A.\r
+CD8000-CD8FFF     (base 16)            Nexus Electric S.A.\r
+                               Serú 63\r
+                               Mendoza  Mendoza  M5500FNA\r
+                               AR\r
+\r
+70-B3-D5   (hex)               SPE Smartico, LLC\r
+399000-399FFF     (base 16)            SPE Smartico, LLC\r
+                               82G, Oleksandra Polya Avenue\r
+                               Dnipro  Dnipropetrovsk  49000\r
+                               UA\r
+\r
+70-B3-D5   (hex)               Austco Marketing & Service (USA) ltd.\r
+316000-316FFF     (base 16)            Austco Marketing & Service (USA) ltd.\r
+                               9155 Sterling St Unit 100\r
+                               Irving  TX  75063\r
+                               US\r
+\r
+70-B3-D5   (hex)               ARKS Enterprises, Inc.\r
+43A000-43AFFF     (base 16)            ARKS Enterprises, Inc.\r
+                               4304 Alfriends Trail\r
+                               Virginia Beach  VA  23455-6102\r
+                               US\r
+\r
+70-B3-D5   (hex)               CT Company\r
+39F000-39FFFF     (base 16)            CT Company\r
+                               Godovikova , 9, Moscow\r
+                               Moscow  RUSSIA  129085\r
+                               RU\r
+\r
+70-B3-D5   (hex)               VONSCH\r
+491000-491FFF     (base 16)            VONSCH\r
+                               Budovatelska 13\r
+                               Brezno    97703\r
+                               SK\r
+\r
+70-B3-D5   (hex)               Thesycon Software Solutions GmbH & Co. KG\r
+919000-919FFF     (base 16)            Thesycon Software Solutions GmbH & Co. KG\r
+                               Werner-von-Siemens-Str. 2\r
+                               Ilmenau    98693\r
+                               DE\r
+\r
+70-B3-D5   (hex)               ZMBIZI APP LLC\r
+F49000-F49FFF     (base 16)            ZMBIZI APP LLC\r
+                               10000 Santa Monica Blvd, Suite 503\r
+                               LOS ANGELES  CA  90067\r
+                               US\r
+\r
+70-B3-D5   (hex)               N A Communications LLC\r
+B92000-B92FFF     (base 16)            N A Communications LLC\r
+                               3820 Ohio Ave Ste 12\r
+                               St Charles  IL  60174\r
+                               US\r
+\r
+70-B3-D5   (hex)               Bita-International Co., Ltd.\r
+1C6000-1C6FFF     (base 16)            Bita-International Co., Ltd.\r
+                               2F., NO. 36, PARK ST., NANGANG DIST.,\r
+                               TAIPEI    11560\r
+                               TW\r
+\r
+70-B3-D5   (hex)               nexgenwave\r
+5BD000-5BDFFF     (base 16)            nexgenwave\r
+                               1209 sicox tower, 484 Dunchon-daero, jungwon-gu\r
+                               Sungnam-si  gyeonggi-do  13229\r
+                               KR\r
+\r
+70-B3-D5   (hex)               EBZ SysTec GmbH\r
+1FA000-1FAFFF     (base 16)            EBZ SysTec GmbH\r
+                               Bleicherstraße 7\r
+                               Ravensburg  DE    88212\r
+                               DE\r
+\r
+70-B3-D5   (hex)               TRIOPTICS\r
+A11000-A11FFF     (base 16)            TRIOPTICS\r
+                               Strandbaddamm 6\r
+                               Wedel  Schleswig-Holstein  22880\r
+                               DE\r
+\r
 70-B3-D5   (hex)               EVCO SPA\r
 A80000-A80FFF     (base 16)            EVCO SPA\r
                                VIA FELTRE N. 81\r
@@ -8420,12 +8546,6 @@ C78000-C78FFF     (base 16)              NETA Elektronik AS
                                Istanbul  -  34775\r
                                TR\r
 \r
-70-B3-D5   (hex)               Farmobile\r
-5A8000-5A8FFF     (base 16)            Farmobile\r
-                               18132 Melrose Dr.\r
-                               Bucyrus  KS  66013\r
-                               \r
-\r
 70-B3-D5   (hex)               Nautel Limted\r
 EB0000-EB0FFF     (base 16)            Nautel Limted\r
                                10089 Peggy's Cove Road\r
@@ -9542,6 +9662,126 @@ FAC000-FACFFF     (base 16)             Integrated Protein Technologies, Inc.
                                Evanston  IL  60204\r
                                US\r
 \r
+70-B3-D5   (hex)               GETT Geraetetechnik GmbH\r
+290000-290FFF     (base 16)            GETT Geraetetechnik GmbH\r
+                               Mittlerer Ring 1\r
+                               Treuen    08233\r
+                               DE\r
+\r
+70-B3-D5   (hex)               ABB\r
+C47000-C47FFF     (base 16)            ABB\r
+                               Fulachstrasse 150\r
+                               Schaffhausen    8200\r
+                               CH\r
+\r
+70-B3-D5   (hex)               CREATIVE\r
+A65000-A65FFF     (base 16)            CREATIVE\r
+                               801 Chenil Bldg. 266 Hwagokro,\r
+                               Gangseogu  seoul  07673\r
+                               KR\r
+\r
+70-B3-D5   (hex)               Samwell International Inc\r
+B42000-B42FFF     (base 16)            Samwell International Inc\r
+                               No. 317-1, Sec.2, An Kang Rd., Hsintien Dist\r
+                               New Taipei City    231\r
+                               TW\r
+\r
+70-B3-D5   (hex)               BAE Systems\r
+AFC000-AFCFFF     (base 16)            BAE Systems\r
+                               1098 Clark Street\r
+                               Endicott  NY  13760\r
+                               US\r
+\r
+70-B3-D5   (hex)               DAYOUPLUS\r
+474000-474FFF     (base 16)            DAYOUPLUS\r
+                               3F 509, Dunchon-daero, Jungwon-gu, Seongnam-si, Gyeonggi-do, Republic of Korea\r
+                               Seongnam-si  Gyeonggi-do  13217\r
+                               KR\r
+\r
+70-B3-D5   (hex)               Guangzhou Xianhe Technology Engineering Co., Ltd\r
+C13000-C13FFF     (base 16)            Guangzhou Xianhe Technology Engineering Co., Ltd\r
+                               No. 30-6, Jiantai Road, Dongyong Town, Nansha District\r
+                               Guangzhou  Guangdong  511453\r
+                               CN\r
+\r
+70-B3-D5   (hex)               Lightside Instruments AS\r
+EC2000-EC2FFF     (base 16)            Lightside Instruments AS\r
+                               Thorvald Meyers gate 34A\r
+                               Oslo    0555\r
+                               NO\r
+\r
+70-B3-D5   (hex)               Farmobile, LLC\r
+5A8000-5A8FFF     (base 16)            Farmobile, LLC\r
+                               4001 West 114th Street  Suite 300\r
+                               Leawood  KS  66211\r
+                               US\r
+\r
+70-B3-D5   (hex)               i2-electronics\r
+59E000-59EFFF     (base 16)            i2-electronics\r
+                               Kitazakae 4-13-15-701\r
+                               Urayasu city  Chiba  2790002\r
+                               JP\r
+\r
+70-B3-D5   (hex)               EXATEL\r
+065000-065FFF     (base 16)            EXATEL\r
+                               Perkuna 46\r
+                               Warsaw  Mazowieckie  04-164\r
+                               PL\r
+\r
+70-B3-D5   (hex)               Shenzhen Shi Fang Communication Technology Co., Ltd\r
+E6B000-E6BFFF     (base 16)            Shenzhen Shi Fang Communication Technology Co., Ltd\r
+                               601-6 Mitehuapujing No.9 Jinxiu Mid Road Longtian Street Pingshan Distinct\r
+                               Shenzhen   Guangdong  518118\r
+                               CN\r
+\r
+70-B3-D5   (hex)               Kita Kirmizi Takim Bilgi Guvenligi Danismanlik ve Egitim A.S.\r
+998000-998FFF     (base 16)            Kita Kirmizi Takim Bilgi Guvenligi Danismanlik ve Egitim A.S.\r
+                               Sogutozu mah. Sogutözu cad. A Blok No:2A/47 Cankaya/ANKARA Maltepe V.D. 559 051 3252\r
+                               Ankara  Cankaya  06510\r
+                               TR\r
+\r
+70-B3-D5   (hex)               Octopus IoT srl\r
+AD7000-AD7FFF     (base 16)            Octopus IoT srl\r
+                               Via Acquasanta, 15\r
+                               Salerno  Salerno  84131\r
+                               IT\r
+\r
+70-B3-D5   (hex)               ACRIOS Systems s.r.o.\r
+CEE000-CEEFFF     (base 16)            ACRIOS Systems s.r.o.\r
+                               Tvaruzkova, 2738 \r
+                               Roznov pod  Radhostem  756 61\r
+                               CZ\r
+\r
+70-B3-D5   (hex)               SIANA Systems\r
+82F000-82FFFF     (base 16)            SIANA Systems\r
+                               8979 Carley circle\r
+                               San Diego  CA  92126\r
+                               US\r
+\r
+70-B3-D5   (hex)               Günther Spelsberg GmbH + Co. KG\r
+311000-311FFF     (base 16)            Günther Spelsberg GmbH + Co. KG\r
+                               Im Gewerbepark 1\r
+                               Schalksmühle  NRW  58579\r
+                               DE\r
+\r
+70-B3-D5   (hex)               Eneon sp. z o.o.\r
+E66000-E66FFF     (base 16)            Eneon sp. z o.o.\r
+                               Aleje Jerozolimskie 200\r
+                               Warsaw    02-486\r
+                               PL\r
+\r
+70-B3-D5   (hex)               ALFI\r
+B0D000-B0DFFF     (base 16)            ALFI\r
+                               Via Castelletto 20\r
+                               Borgo Ticino  NO  28040\r
+                               IT\r
+\r
+70-B3-D5   (hex)               WIZAPPLY CO.,LTD\r
+8D2000-8D2FFF     (base 16)            WIZAPPLY CO.,LTD\r
+                               1-3-13-5107, Benten\r
+                               Osaka-shi, Minato-ku  Osaka-fu  552-0007\r
+                               JP\r
+\r
 70-B3-D5   (hex)               System West dba ICS Electronics\r
 E06000-E06FFF     (base 16)            System West dba ICS Electronics\r
                                7034 Commerce Circle Suite A\r
@@ -13298,12 +13538,6 @@ FD1000-FD1FFF     (base 16)            RedRat Ltd
                                Des Plaines  IL  60090\r
                                US\r
 \r
-00-1B-C5   (hex)               OctoGate it Security Systems GmbH\r
-030000-030FFF     (base 16)            OctoGate it Security Systems GmbH\r
-                               Klingender Strasse 5\r
-                               Paderborn  NRW  33100\r
-                               DE\r
-\r
 00-1B-C5   (hex)               andersen lighting GmbH\r
 025000-025FFF     (base 16)            andersen lighting GmbH\r
                                Technologiezentrum\r
@@ -14357,6 +14591,18 @@ AB1000-AB1FFF     (base 16)            ISRV Zrt.
                                Budapest  PEST  1024 \r
                                HU\r
 \r
+70-B3-D5   (hex)               Boundary Technologies Ltd\r
+BBC000-BBCFFF     (base 16)            Boundary Technologies Ltd\r
+                               61 Dublin Street\r
+                               Edinburgh  Midlothian  EH3 6NL\r
+                               GB\r
+\r
+70-B3-D5   (hex)               Microvision\r
+5F5000-5F5FFF     (base 16)            Microvision\r
+                               272, Digital-ro, 1004ho Microvision.\r
+                               Guro-gu, Seoul, Republic of Korea    08848\r
+                               KR\r
+\r
 70-B3-D5   (hex)               Potter Electric Signal Co. LLC\r
 70C000-70CFFF     (base 16)            Potter Electric Signal Co. LLC\r
                                1609 Park 370 Place\r
@@ -14369,17 +14615,53 @@ C17000-C17FFF     (base 16)           Potter Electric Signal Co. LLC
                                Hazelwood  MO  63042\r
                                US\r
 \r
-70-B3-D5   (hex)               Boundary Technologies Ltd\r
-BBC000-BBCFFF     (base 16)            Boundary Technologies Ltd\r
-                               61 Dublin Street\r
-                               Edinburgh  Midlothian  EH3 6NL\r
+70-B3-D5   (hex)               Field Design Inc.\r
+8D1000-8D1FFF     (base 16)            Field Design Inc.\r
+                               BrightCore 4F, Kita-Shinagaw 5-5-15\r
+                               Shinagawa-ku  Tokyo  1410001\r
+                               JP\r
+\r
+70-B3-D5   (hex)               Alfa Elettronica srl\r
+BF0000-BF0FFF     (base 16)            Alfa Elettronica srl\r
+                               Via Amman, 35\r
+                               Cordenons  - - not required - -  33084\r
+                               IT\r
+\r
+70-B3-D5   (hex)               PREO INDUSTRIES FAR EAST LTD\r
+8E8000-8E8FFF     (base 16)            PREO INDUSTRIES FAR EAST LTD\r
+                               UNIT B, 26/F, AMIATA IND'L BLDG\r
+                               HONG KONG    NIL\r
+                               HK\r
+\r
+70-B3-D5   (hex)               Utopi Ltd\r
+80E000-80EFFF     (base 16)            Utopi Ltd\r
+                               3 Candymill Lane\r
+                               Hamilton    ML3 0FD\r
                                GB\r
 \r
-70-B3-D5   (hex)               Microvision\r
-5F5000-5F5FFF     (base 16)            Microvision\r
-                               272, Digital-ro, 1004ho Microvision.\r
-                               Guro-gu, Seoul, Republic of Korea    08848\r
-                               KR\r
+70-B3-D5   (hex)               Entec Solar S.L.\r
+887000-887FFF     (base 16)            Entec Solar S.L.\r
+                               C/ Bambú 4\r
+                               Madrid  Madrid  28036\r
+                               ES\r
+\r
+70-B3-D5   (hex)               Nxvi Microelectronics Technology (Jinan) Co., Ltd.\r
+D78000-D78FFF     (base 16)            Nxvi Microelectronics Technology (Jinan) Co., Ltd.\r
+                               2701, 27th floor, No. 7000, Hanyu Golden Valley Business Service Center, Jingshi Road, Jinan Area, Pilot Free Trade Zone, \r
+                               Jinan  Shandong   250102\r
+                               CN\r
+\r
+70-B3-D5   (hex)               Procon Electronics Pty Ltd\r
+527000-527FFF     (base 16)            Procon Electronics Pty Ltd\r
+                               P O Box 164\r
+                               Seven Hills  NSW  1730\r
+                               AU\r
+\r
+00-1B-C5   (hex)               OctoGate IT Security Systems GmbH\r
+030000-030FFF     (base 16)            OctoGate IT Security Systems GmbH\r
+                               Klingender Strasse 5\r
+                               Paderborn  NRW  33100\r
+                               DE\r
 \r
 70-B3-D5   (hex)               YUYAMA MFG Co.,Ltd\r
 BBB000-BBBFFF     (base 16)            YUYAMA MFG Co.,Ltd\r
@@ -17480,12 +17762,6 @@ A51000-A51FFF     (base 16)            RF Code
                                Genova  Italy  16152\r
                                IT\r
 \r
-70-B3-D5   (hex)               Road-iQ, LLC\r
-4DD000-4DDFFF     (base 16)            Road-iQ, LLC\r
-                               2183 Alpine Way\r
-                               Bellingham  WA  98226\r
-                               US\r
-\r
 70-B3-D5   (hex)               LLVISION TECHNOLOGY CO.,LTD\r
 E21000-E21FFF     (base 16)            LLVISION TECHNOLOGY CO.,LTD\r
                                Room302,Building A Fuxing,No.30 He Tao Yuan,Guan Dong Dian Bei Jie\r
@@ -19283,12 +19559,6 @@ C46000-C46FFF     (base 16)            eumig industrie-TV GmbH.
                                Viersen  NRW  41747\r
                                DE\r
 \r
-70-B3-D5   (hex)               EkspertStroyProekt LLC\r
-DE9000-DE9FFF     (base 16)            EkspertStroyProekt LLC\r
-                               office 400, str.61, d.2/4, Luzhnetskaya nab.\r
-                               Moscow  Moscow  119270\r
-                               RU\r
-\r
 70-B3-D5   (hex)               YDK Technologies Co.,Ltd\r
 7F0000-7F0FFF     (base 16)            YDK Technologies Co.,Ltd\r
                                Minami Shinjuku Hoshino Bldg.  5-23-13 Sendagaya\r
@@ -19307,6 +19577,108 @@ BEB000-BEBFFF     (base 16)           Potter Electric Signal Co. LLC
                                Hazelwood  MO  63042\r
                                US\r
 \r
+70-B3-D5   (hex)               EkspertStroyProekt LLC\r
+DE9000-DE9FFF     (base 16)            EkspertStroyProekt LLC\r
+                               office 400, str.61, d.2/4, Luzhnetskaya nab.\r
+                               Moscow  Moscow  119270\r
+                               RU\r
+\r
+70-B3-D5   (hex)               GSP Sprachtechnologie GmbH\r
+93C000-93CFFF     (base 16)            GSP Sprachtechnologie GmbH\r
+                               Teltowkanalstraße 1\r
+                               Berlin    12247\r
+                               DE\r
+\r
+70-B3-D5   (hex)               GUNMA ELECTRONICS CO LTD\r
+64F000-64FFFF     (base 16)            GUNMA ELECTRONICS CO LTD\r
+                               760 OOMAMA\r
+                               MIDORI-CITY  GUNMA  376-0101\r
+                               JP\r
+\r
+70-B3-D5   (hex)               Velvac Incorporated\r
+4DD000-4DDFFF     (base 16)            Velvac Incorporated\r
+                               2183 Alpine Way\r
+                               Bellingham  WA  98226\r
+                               US\r
+\r
+70-B3-D5   (hex)               Digitella Inc.\r
+D03000-D03FFF     (base 16)            Digitella Inc.\r
+                               2F, Banpodaero 99\r
+                               Seocho-gu  Seoul  06657\r
+                               KR\r
+\r
+70-B3-D5   (hex)               Twoway Communications, Inc.\r
+41C000-41CFFF     (base 16)            Twoway Communications, Inc.\r
+                               41 Wu Kung 6 Rd., New Taipei Industrial Park, New Taipei City,24891,Taiwan,R.O.C.\r
+                               New Taipei city  Taipei  24891\r
+                               TW\r
+\r
+70-B3-D5   (hex)               B2cloud lda\r
+29E000-29EFFF     (base 16)            B2cloud lda\r
+                               Urbanizacao do correlo 4,14\r
+                               Gandra  Paredes  4585-362\r
+                               PT\r
+\r
+70-B3-D5   (hex)               Elman srl\r
+B2C000-B2CFFF     (base 16)            Elman srl\r
+                               Via di Valle Caia, km 4.700\r
+                               Pomezia  Roma  00040\r
+                               IT\r
+\r
+70-B3-D5   (hex)               Power Electronics Espana, S.L.\r
+BDB000-BDBFFF     (base 16)            Power Electronics Espana, S.L.\r
+                               PI Pla de Carrases, CV-35 Salida 30Salida 30-\r
+                               lliria  Valencia  46160\r
+                               ES\r
+\r
+70-B3-D5   (hex)               AADONA Communication Pvt Ltd\r
+ED9000-ED9FFF     (base 16)            AADONA Communication Pvt Ltd\r
+                               1st Floor, Phoenix Tech Tower, Plot No. 14/46, IDA - Uppal\r
+                               Hyderabad  Telangana  500039\r
+                               IN\r
+\r
+70-B3-D5   (hex)               Eon\r
+E62000-E62FFF     (base 16)            Eon\r
+                               415, Heungan-daero, Dongan-gu, Anyang-si, Gyeonggi-do, Republic of Korea\r
+                               Anyang-si  Gyeonggi-do  KS009\r
+                               KR\r
+\r
+70-B3-D5   (hex)               ARINAX\r
+6CC000-6CCFFF     (base 16)            ARINAX\r
+                               259 rue du Rocher de Lorzier\r
+                               MOIRANS    38430\r
+                               FR\r
+\r
+70-B3-D5   (hex)               NOREYA Technology e.U.\r
+A79000-A79FFF     (base 16)            NOREYA Technology e.U.\r
+                               Parkring 1\r
+                               Raaba-Grambach  Styria  8074\r
+                               AT\r
+\r
+70-B3-D5   (hex)               Motohaus Powersports Limited\r
+98D000-98DFFF     (base 16)            Motohaus Powersports Limited\r
+                               Motohaus Powersports Limited, 1a Rose Estate Osborn Way\r
+                               Hook    RG27 9UT\r
+                               GB\r
+\r
+70-B3-D5   (hex)               IMMOLAS\r
+792000-792FFF     (base 16)            IMMOLAS\r
+                               Aleje Jerozolimskie 85/21\r
+                               Warszawa    02-001\r
+                               PL\r
+\r
+70-B3-D5   (hex)               EVPU Defence a.s.\r
+04F000-04FFFF     (base 16)            EVPU Defence a.s.\r
+                               Jaktare 1781\r
+                               Uherske Hradiste    686 01\r
+                               CZ\r
+\r
+70-B3-D5   (hex)               MB connect line GmbH Fernwartungssysteme\r
+5A4000-5A4FFF     (base 16)            MB connect line GmbH Fernwartungssysteme\r
+                               Winnettener Straße 6\r
+                               Dinkelsbuehl  Bavaria  91550\r
+                               DE\r
+\r
 70-B3-D5   (hex)               DISMUNTEL SAL\r
 92C000-92CFFF     (base 16)            DISMUNTEL SAL\r
                                Pol ind cotes\r
@@ -22649,12 +23021,6 @@ AA7000-AA7FFF     (base 16)            ATEME
                                Bievres  IDF  91470\r
                                \r
 \r
-70-B3-D5   (hex)               Farmobile\r
-13F000-13FFFF     (base 16)            Farmobile\r
-                               18132 Melrose Dr.\r
-                               Bucyrus  KS  66013\r
-                               \r
-\r
 70-B3-D5   (hex)               Code Blue Corporation\r
 C3F000-C3FFFF     (base 16)            Code Blue Corporation\r
                                259 Hedcor St\r
@@ -24064,3 +24430,84 @@ F5D000-F5DFFF     (base 16)            Potter Electric Signal Co. LLC
                                Wichrowa 1A\r
                                Poznan    60-446\r
                                PL\r
+\r
+70-B3-D5   (hex)               SOtM\r
+CC7000-CC7FFF     (base 16)            SOtM\r
+                               202 SSANGYONG-DONG 84/9 WOLBONG 4RO SEOBUK GU\r
+                               Cheonan  Chungnam  31171\r
+                               KR\r
+\r
+70-B3-D5   (hex)               MIJIENETRTECH CO.,LTD\r
+DCB000-DCBFFF     (base 16)            MIJIENETRTECH CO.,LTD\r
+                               402, Ilshin Techno Valley,555, Dalseo-daero Dalseo-gu\r
+                               Daegu    42709\r
+                               KR\r
+\r
+70-B3-D5   (hex)               Mitech Integrated Systems Inc.\r
+C28000-C28FFF     (base 16)            Mitech Integrated Systems Inc.\r
+                               219 Robert Hicks Dr\r
+                               Toronto  ON  M2R3R3\r
+                               CA\r
+\r
+70-B3-D5   (hex)               KMtronic ltd\r
+540000-540FFF     (base 16)            KMtronic ltd\r
+                               Dobri Czintulov 28A str.\r
+                                Gorna Oryahovica  VT  5100\r
+                               BG\r
+\r
+70-B3-D5   (hex)               Terratel Technology s.r.o.\r
+31A000-31AFFF     (base 16)            Terratel Technology s.r.o.\r
+                               Dukelska 2192\r
+                               Benesov  CZ  25601\r
+                               CZ\r
+\r
+70-B3-D5   (hex)               Teledyne API\r
+F9D000-F9DFFF     (base 16)            Teledyne API\r
+                               9970 Carroll Canyon Road\r
+                               San Diego  CA  92131-1106\r
+                               US\r
+\r
+70-B3-D5   (hex)               QIT Co., Ltd.\r
+81C000-81CFFF     (base 16)            QIT Co., Ltd.\r
+                               #713, ACE Gwanggyo Tower1, 17, Daehak 4-ro, Yeongtong-gu\r
+                               Suwon-si  Gyeonggi-do  16226\r
+                               KR\r
+\r
+70-B3-D5   (hex)               Farmobile, LLC\r
+13F000-13FFFF     (base 16)            Farmobile, LLC\r
+                               4001 West 114th Street  Suite 300\r
+                               Leawood  KS  66211\r
+                               US\r
+\r
+70-B3-D5   (hex)               PULOON Tech\r
+DB9000-DB9FFF     (base 16)            PULOON Tech\r
+                               23-10, Hyoryeong-ro 60 gil, Seocho-gu, Seoul, korea\r
+                               seoul    06721\r
+                               KR\r
+\r
+70-B3-D5   (hex)               Polskie Sady Nowe Podole Sp. z o.o.\r
+C30000-C30FFF     (base 16)            Polskie Sady Nowe Podole Sp. z o.o.\r
+                               Rzymowskiego 17/48\r
+                               Warsaw  Mazowieckie  02-297\r
+                               PL\r
+\r
+70-B3-D5   (hex)               Suzhou ZhiCai Co.,Ltd.\r
+E13000-E13FFF     (base 16)            Suzhou ZhiCai Co.,Ltd.\r
+                               Room 1902,Block A,Global Fortune Plaza,88 Suhui Road,Suzhou Industrial Park\r
+                               SuZhou  Jiangsu  215021\r
+                               CN\r
+\r
+70-B3-D5   (hex)               Private\r
+4DA000-4DAFFF     (base 16)            Private\r
+\r
+70-B3-D5   (hex)               devAIs s.r.l.\r
+A16000-A16FFF     (base 16)            devAIs s.r.l.\r
+                               Via Carlo Goldoni 1\r
+                               Milano  Milano  20129\r
+                               IT\r
+\r
+70-B3-D5   (hex)               Naval Group\r
+B27000-B27FFF     (base 16)            Naval Group\r
+                               40-42 Rue Du Docteur Finlay\r
+                               PARIS CEDEX 15    75732\r
+                               FR\r
index 5c77387a26130454dfe775e5ee7c5edb62827058..6fcb364acdd7a3d19ab5c55b404c8064453ad40d 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 # Those files right now are not supported by the grammar. Also,
 # they are very long but quite repetitive and the parser is not very fast.
@@ -42,12 +42,14 @@ if conf.get('ENABLE_HWDB') == 1
                      hwdb_files_test,
                      install_dir : udevhwdbdir)
 
-        meson.add_install_script('sh', '-c',
-                                 mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
+        if install_sysconfdir
+                meson.add_install_script('sh', '-c',
+                                         mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
 
-        meson.add_install_script('sh', '-c',
-                                 'test -n "$DESTDIR" || @0@/systemd-hwdb update'
-                                 .format(rootbindir))
+                meson.add_install_script('sh', '-c',
+                                         'test -n "$DESTDIR" || @0@/systemd-hwdb update'
+                                         .format(rootbindir))
+        endif
 
         if want_tests != 'false'
                 parse_hwdb_py = find_program('parse_hwdb.py')
index 025133416f6e23c23ce64f1dfad9bc96f0d84a76..d1ff4470de1cdd10af7da8cb4225faed2a8e24c1 100755 (executable)
@@ -32,8 +32,8 @@ try:
     from pyparsing import (Word, White, Literal, ParserElement, Regex, LineEnd,
                            OneOrMore, Combine, Or, Optional, Suppress, Group,
                            nums, alphanums, printables,
-                           stringEnd, pythonStyleComment, QuotedString,
-                           ParseBaseException)
+                           stringEnd, pythonStyleComment,
+                           ParseBaseException, __diag__)
 except ImportError:
     print('pyparsing is not available')
     sys.exit(77)
@@ -50,11 +50,16 @@ except ImportError:
     # don't do caching on old python
     lru_cache = lambda: (lambda f: f)
 
+__diag__.warn_multiple_tokens_in_named_alternation = True
+__diag__.warn_ungrouped_named_tokens_in_collection = True
+__diag__.warn_name_set_on_empty_Forward = True
+__diag__.warn_on_multiple_string_args_to_oneof = True
+__diag__.enable_debug_on_named_expressions = True
+
 EOL = LineEnd().suppress()
 EMPTYLINE = LineEnd()
 COMMENTLINE = pythonStyleComment + EOL
 INTEGER = Word(nums)
-STRING =  QuotedString('"')
 REAL = Combine((INTEGER + Optional('.' + Optional(INTEGER))) ^ ('.' + INTEGER))
 SIGNED_REAL = Combine(Optional(Word('-+')) + REAL)
 UDEV_TAG = Word(string.ascii_uppercase, alphanums + '_')
@@ -94,7 +99,8 @@ def hwdb_grammar():
     matchline = (matchline_typed | matchline_general) + EOL
 
     propertyline = (White(' ', exact=1).suppress() +
-                    Combine(UDEV_TAG - '=' - Word(alphanums + '_=:@*.!-;, "') - Optional(pythonStyleComment)) +
+                    Combine(UDEV_TAG - '=' - Optional(Word(alphanums + '_=:@*.!-;, "'))
+                            - Optional(pythonStyleComment)) +
                     EOL)
     propertycomment = White(' ', exact=1) + pythonStyleComment + EOL
 
@@ -111,9 +117,10 @@ def hwdb_grammar():
 def property_grammar():
     ParserElement.setDefaultWhitespaceChars(' ')
 
-    dpi_setting = (Optional('*')('DEFAULT') + INTEGER('DPI') + Suppress('@') + INTEGER('HZ'))('SETTINGS*')
+    dpi_setting = Group(Optional('*')('DEFAULT') + INTEGER('DPI') + Suppress('@') + INTEGER('HZ'))('SETTINGS*')
     mount_matrix_row = SIGNED_REAL + ',' + SIGNED_REAL + ',' + SIGNED_REAL
-    mount_matrix = (mount_matrix_row + ';' + mount_matrix_row + ';' + mount_matrix_row)('MOUNT_MATRIX')
+    mount_matrix = Group(mount_matrix_row + ';' + mount_matrix_row + ';' + mount_matrix_row)('MOUNT_MATRIX')
+    xkb_setting = Optional(Word(alphanums + '+-/@._'))
 
     props = (('MOUSE_DPI', Group(OneOrMore(dpi_setting))),
              ('MOUSE_WHEEL_CLICK_ANGLE', INTEGER),
@@ -138,9 +145,9 @@ def property_grammar():
              ('POINTINGSTICK_CONST_ACCEL', REAL),
              ('ID_INPUT_JOYSTICK_INTEGRATION', Or(('internal', 'external'))),
              ('ID_INPUT_TOUCHPAD_INTEGRATION', Or(('internal', 'external'))),
-             ('XKB_FIXED_LAYOUT', STRING),
-             ('XKB_FIXED_VARIANT', STRING),
-             ('XKB_FIXED_MODEL', STRING),
+             ('XKB_FIXED_LAYOUT', xkb_setting),
+             ('XKB_FIXED_VARIANT', xkb_setting),
+             ('XKB_FIXED_MODEL', xkb_setting),
              ('KEYBOARD_LED_NUMLOCK', Literal('0')),
              ('KEYBOARD_LED_CAPSLOCK', Literal('0')),
              ('ACCEL_MOUNT_MATRIX', mount_matrix),
index e1dc3da818b8dca8157323acde8e5860459ff4f8..05c6b5d2669a8c242743865f68a71aa02207e2cd 100644 (file)
@@ -1,8 +1,8 @@
 #
 #      List of PCI ID's
 #
-#      Version: 2020.10.11
-#      Date:    2020-10-11 03:15:01
+#      Version: 2020.11.14
+#      Date:    2020-11-14 03:15:02
 #
 #      Maintained by Albert Pool, Martin Mares, and other volunteers from
 #      the PCI ID Project at https://pci-ids.ucw.cz/.
@@ -70,6 +70,8 @@
 018a  LevelOne
        0106  FPC-0106TX misprogrammed [RTL81xx]
 01de  Oxide Computer Company
+# probably misprogrammed Intel Atom C2338 on Dell 0K8Y0N board
+0200  Dell (wrong ID)
 # 021b is not Compaq but there is a board misprogrammed
 021b  Compaq Computer Corporation
        8139  HNE-300 (RealTek RTL8139c) [iPaq Networking]
                1d49 0200  ThinkSystem 430-8i SAS/SATA 12Gb HBA
                1d49 0202  ThinkSystem 430-8e SAS/SATA 12Gb HBA
                1d49 0204  ThinkSystem 430-8i SAS/SATA 12Gb Dense HBA
+# PCIe switch SES management endpoint
+       00b2  PEX880xx PCIe Gen 4 Switch SES management endpoint
        00be  SAS3504 Fusion-MPT Tri-Mode RAID On Chip (ROC)
        00bf  SAS3404 Fusion-MPT Tri-Mode I/O Controller Chip (IOC)
        00c0  SAS3324 PCI-Express Fusion-MPT SAS-3
        67e9  Baffin [Polaris11]
        67eb  Baffin [Radeon Pro V5300X]
        67ef  Baffin [Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X]
+               1025 1367  RX560X 4GB
                1028 1703  RX 560D OEM OC 2 GB
                103c 3421  Radeon RX 460
                1043 0561  AREZ Radeon RX 560
                17aa 3643  Radeon R9 A375
                17aa 3801  Radeon R9 M275
                17aa 3824  Radeon R9 M375
+               1da2 e26a  Radeon R7 250
        6821  Venus XT [Radeon HD 8870M / R9 M270X/M370X]
                1002 031e  FirePro SX4000
                1028 05cc  FirePro M5100
                148c 9380  Radeon R9 380
 # Make naming scheme consistent
                174b e308  Radeon R9 380 Nitro 4G D5
+               174b e315  Radeon R9 285
        693b  Tonga PRO GL [FirePro W7100 / Barco MXRT-7600]
        694c  Polaris 22 XT [Radeon RX Vega M GH]
        694e  Polaris 22 XL [Radeon RX Vega M GL]
        7347  Navi 14 [Radeon Pro W5500M]
        734f  Navi 14 [Radeon Pro W5300M]
        7360  Navi 12 [Radeon Pro 5600M]
+       73bf  Navi 21 [Radeon RX 6800/6800 XT / 6900 XT]
+       73c3  Navi 22
+       73df  Navi 22
+       73ff  Navi 23
        7833  RS350 Host Bridge
        7834  RS350 [Radeon 9100 PRO/XT IGP]
        7835  RS350M [Mobility Radeon 9000 IGP]
                1682 211c  GeForce 6600 256MB DDR DUAL DVI TV
        00f3  NV43 [GeForce 6200]
        00f4  NV43 [GeForce 6600 LE]
-       00f5  G71 [GeForce 7800 GS AGP]
+       00f5  G70/G71 [GeForce 7800 GS AGP]
        00f6  NV43 [GeForce 6800 GS/XT]
                1682 217e  XFX GeForce 6800 XTreme 256MB DDR3 AGP
        00f8  NV45GL [Quadro FX 3400/4400]
        128a  GK208B
        128b  GK208B [GeForce GT 710]
                1043 85f7  GT710-SL-1GD5
+               1043 8770  GT710-4H-SL-2GD5
        128c  GK208B
        1290  GK208M [GeForce GT 730M]
                103c 2afa  GeForce GT 730A
        13fb  GM204GLM [Quadro M5500]
        1401  GM206 [GeForce GTX 960]
        1402  GM206 [GeForce GTX 950]
+       1404  GM206 [GeForce GTX 960 FAKE]
        1406  GM206 [GeForce GTX 960 OEM]
        1407  GM206 [GeForce GTX 750 v2]
        1427  GM206M [GeForce GTX 965M]
        1c30  GP106GL [Quadro P2000]
        1c31  GP106GL [Quadro P2200]
        1c35  GP106
+       1c36  GP106
        1c60  GP106BM [GeForce GTX 1060 Mobile 6GB]
                103c 8390  GeForce GTX 1060 Max-Q 6GB
        1c61  GP106BM [GeForce GTX 1050 Ti Mobile]
        1fd9  TU117BM [GeForce GTX 1650 Mobile Refresh]
        1ff9  TU117GLM [Quadro T1000 Mobile]
        20b0  GA100 [A100 SXM4 40GB]
+       20b1  GA100 [A100 PCIe 40GB]
        20be  GA100 [GRID A100A]
        20bf  GA100 [GRID A100B]
        20f1  GA100 [A100 PCIe 40GB]
        21c4  TU116 [GeForce GTX 1660 SUPER]
        21d1  TU116BM [GeForce GTX 1660 Ti Mobile]
        2204  GA102 [GeForce RTX 3090]
-       2206  GA102 [GeForce RTX 3080 10GB / 20GB]
+       2206  GA102 [GeForce RTX 3080]
                10de 146d  GA102 [GeForce RTX 3080 20GB]
                1462 3892  RTX 3080 10GB GAMING X TRIO
        222b  GA102 [GeForce RTX 3090 Engineering Sample]
        223f  GA102GL
        2482  GA104 [GeForce RTX 3070 Ti]
        2484  GA104 [GeForce RTX 3070]
+               10de 146b  GA104 [GeForce RTX 3070]
+               10de 14ae  GA104 [GeForce RTX 3070 16GB]
        2486  GA104 [GeForce RTX 3060 Ti]
-       249c  GA104M [GeForce RTX 3070 Mobile]
+       249c  GA104M [GeForce RTX 3070 Mobile / Max-Q 8GB/16GB]
        249d  GA104M [GeForce RTX 3070 Mobile / Max-Q]
+       24ac  GA104 [GeForce RTX 30x0 Engineering Sample]
+       24ad  GA104 [GeForce RTX 3060 Engineering Sample]
        24af  GA104 [GeForce RTX 3070 Engineering Sample]
        24bf  GA104 [GeForce RTX 3070 Engineering Sample]
+       24dc  GA104M [GeForce RTX 3070 Mobile 16GB]
+       24dd  GA104M [GeForce RTX 3070 Mobile / Max-Q]
        252f  GA106 [GeForce RTX 3060 Engineering Sample]
+       25af  GA107 [GeForce RTX 3050 Engineering Sample]
 10df  Emulex Corporation
        0720  OneConnect NIC (Skyhawk)
                103c 1934  FlexFabric 20Gb 2-port 650M Adapter
        5288  RTS5288 PCI Express Card Reader
        5289  RTL8411 PCI Express Card Reader
                1043 1457  K55A Laptop
+       5762  RTS5763DL NVMe SSD Controller
        8029  RTL-8029(AS)
                10b8 2011  EZ-Card (SMC1208)
                10ec 8029  RTL-8029(AS)
                1137 00ce  VIC 1225T PCIe Management Controller
                1137 012e  VIC 1227 PCIe Management Controller
                1137 014d  VIC 1385 PCIe Management Controller
+               1137 0217  VIC 1455 PCIe Management Controller
+               1137 0218  VIC 1457 PCIe Management Controller
        0043  VIC Ethernet NIC
                1137 0047  VIC P81E PCIe Ethernet NIC
                1137 0048  VIC M81KR Mezzanine Ethernet NIC
 125b  Asix Electronics Corporation
        1400  AX88141 Fast Ethernet Controller
                1186 1100  AX8814X Based PCI Fast Ethernet Adapter
+       9100  AX99100 PCIe to Multi I/O Controller
+               a000 1000  Serial Port
+               a000 2000  Parallel Port
+               a000 6000  SPI
+               a000 7000  Local Bus
 125c  Aurora Technologies, Inc.
        0101  Saturn 4520P
        0640  Aries 16000P
                0070 6902  WinTV HVR-4000-HD
                0070 7801  WinTV HVR-1800 MCE
                0070 9001  Nova-T DVB-T
+               0070 9002  Nova-T DVB-T Model 909
                0070 9200  Nova-SE2 DVB-S
                0070 9202  Nova-S-Plus DVB-S
                0070 9402  WinTV-HVR1100 DVB-T/Hybrid
 15b7  Sandisk Corp
        2001  Skyhawk Series NVME SSD
        5001  WD Black NVMe SSD
-       5002  WD Black 2018/PC SN720 NVMe SSD
-       5003  WD Black 2018/PC SN520 NVMe SSD
+       5002  WD Black 2018 / PC SN720 NVMe SSD
+       5003  WD Black 2018 / PC SN520 NVMe SSD
+       5004  PC SN520 NVMe SSD
+       5005  PC SN520 NVMe SSD
+       5006  WD Black 2019/PC SN750 NVMe SSD
+       5009  WD Blue SN550 NVMe SSD
+               15b7 5009  WD Blue SN550 NVMe SSD
+       500d  WD Ultrastar DC SN340 NVMe SSD
 15b8  ADDI-DATA GmbH
        1001  APCI1516 SP controller (16 digi outputs)
        1003  APCI1032 SP controller (32 digi inputs w/ opto coupler)
        0185  NT40A01 Network Adapter
        01a5  NT200A01 Network Adapter
        01c5  NT200A02 Network Adapter
+       01d5  NT50B01 Network Adapter
+       01e5  NT100A01 Network Adapter
 18f6  NextIO
        1000  [Nexsis] Switch Virtual P2P PCIe Bridge
        1001  [Texsis] Switch Virtual P2P PCIe Bridge
 1974  Star Electronics GmbH & Co. KG
        0009  FlexCard PMC-II
        0011  FlexCard PMC-II Ethernet
+       0018  FlexCard PXIe3
+       0019  FlexCard PCIe3
 1976  TRENDnet
 1977  Parsec
 197b  JMicron Technology Corp.
        0250  JMC250 PCI Express Gigabit Ethernet Controller
        0260  JMC260 PCI Express Fast Ethernet Controller
        0368  JMB368 IDE controller
+       0585  JMB58x AHCI SATA controller
        2360  JMB360 AHCI Controller
        2361  JMB361 AHCI/IDE
                1462 7235  P965 Neo MS-7235 mainboard
                19e5 d303  Hi1822 SP522 (2*8G FC)
                19e5 d306  Hi1822 SP523 (2*8G FC)
        1710  iBMA Virtual Network Adapter
-       1711  Hi1710 [iBMC Intelligent Management system chip w/VGA support]
+       1711  Hi171x Series [iBMC Intelligent Management system chip w/VGA support]
        1822  Hi1822 Family (4*25GE)
                19e5 d129  Hi1822 SP570 (4*25GE)
                19e5 d136  Hi1822 SP580 (4*25GE)
 1a4a  SLAC National Accelerator Lab TID-AIR
        1000  MCOR Power Supply Controller
        1010  AMC EVR - Stockholm Timing Board
-       1020  Cluster On Board (COB) Ethernet Switch
+       1030  PGPCard - Gen3 GIGe Interface
        2000  PGPCard - 4 Lane
        2001  PGPCard - 8 Lane Plus EVR
        2010  PCI-Express EVR
-# PC-260-101-03
-       2020  PGP-GEN3 PCIe
+       2011  PCI-Express EVR - TPR Version
+       2020  PGP-GEN3 PCIe - 8 Lane Plus EVR
        2030  AXI Stream DAQ PCIe card
+       2040  EXO PCIe TEM
+       3000  COB DTM V1
+       3001  COB DTM V2
 1a51  Hectronic AB
 1a55  Rohde & Schwarz DVS GmbH
        0010  SDStationOEM
 1b13  Jaton Corp
 1b1a  K&F Computing Research Co.
        0e70  GRAPE
+1b1c  Corsair
 1b21  ASMedia Technology Inc.
        0611  ASM1061 SATA IDE Controller
        0612  ASM1062 Serial ATA Controller
                1849 0612  Motherboard
+       1040  ASM1040 XHCI Controller
        1042  ASM1042 SuperSpeed USB Host Controller
                1043 1059  K53SM motherboard
                1043 8488  P8B WS Motherboard
 1b4b  Marvell Technology Group Ltd.
        0640  88SE9128 SATA III 6Gb/s RAID Controller
        2241  88NR2241 Non-Volatile memory controller
+               1028 2112  BOSS-N1 Monolithic
+               1028 2113  BOSS-N1 Modular
                1d49 0306  ThinkSystem M.2 NVMe 2-Bay RAID Enablement Kit
                1d49 0307  ThinkSystem 7mm NVMe 2-Bay Rear RAID Enablement Kit
        9120  88SE9120 SATA 6Gb/s Controller
 1b94  Signatec / Dynamic Signals Corp
        e400  PX14400 Dual Xilinx Virtex5 based Digitizer
 1b96  Western Digital
+       2200  Ultrastar DC SN630 NVMe SSD
+       2201  Ultrastar DC SN630 NVMe SSD
+       2300  Ultrastar DC SN840 NVMe SSD
+       2400  Ultrastar DC SN640 NVMe SSD
+       2401  Ultrastar DC SN640 NVMe SSD
+       2402  Ultrastar DC SN640 NVMe SSD
+       2404  Ultrastar DC SN640 NVMe SSD
+       2500  Ultrastar DC SN840 NVMe SSD
+       3714  PC SN730 NVMe SSD
+       3734  PC SN730 NVMe SSD
 1b9a  XAVi Technologies Corp.
 1baa  QNAP Systems, Inc.
 1bad  ReFLEX CES
        1285  PC300 NVMe Solid State Drive 1TB
        1327  BC501 NVMe Solid State Drive 512GB
        1504  SC300 512GB M.2 2280 SATA Solid State Drive
+       243b  PE6110 NVMe Solid State Drive
+               1c5c 0100  PE6110 NVMe Solid State Drive
        2839  PE8000 Series NVMe Solid State Drive
-               0100 1c5c  PE8000 Series NVMe Solid State Drive
+               1c5c 0100  PE8000 Series NVMe Solid State Drive
 1c5f  Beijing Memblaze Technology Co. Ltd.
        000d  PBlaze5 520/526 AIC
        003d  PBlaze5 920/926 AIC
        0305  Simulyzer-RT CompactPCI Serial CAN-1 card
 # supports 8x CAN (-FD) interfaces
        0306  Simulyzer-RT CompactPCI Serial CAN-2 card (CAN-FD)
+       0307  Simulyzer-RT CompactPCI Serial DIO-2 card [Xilinx Zynq UltraScale+]
 1cd7  Nanjing Magewell Electronics Co., Ltd.
        0010  Pro Capture Endpoint
        0014  PRO CAPTURE AIO 4K PLUS
                1d78 3105  D5457 U.2 3.2TB NVMe SSD
                1d78 3107  D5457 U.2 6.4TB NVMe SSD
 1d7c  Aerotech, Inc.
+# Fiber-optic HyperWire motion control bus from Aerotech.
+       0001  HyperWire Adapter
 1d82  NETINT Technologies Inc.
        0101  Codensity D400 SSD
        0102  Codensity D408 PCIe Gen4 NVMe SSD
        0011  IO Bridge
 1da1  Teko Telecom S.r.l.
 1da2  Sapphire Technology Limited
+       e26a  Radeon R7 250
 1da3  Habana Labs Ltd.
        0001  HL-1000 AI Inference Accelerator [Goya]
 # PCIe accelerator card for Deep Learning training tasks
                1028 210f  Dell Ent NVMe FIPS CM6 MU 3.2TB
                1028 2110  Dell Ent NVMe FIPS CM6 MU 6.4TB
                1e0f 0001  Generic NVMe CM6 RI 3.84TB
+       0009  NVMe SSD
+               1e0f 0001  Toshiba RC500 NVMe SSD 500GB
 1e17  Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
 1e24  Squirrels Research Labs
        0101  Acorn CLE-101
 1e26  Fujitsu Client Computing Limited
 1e36  Shanghai Enflame Technology Co. Ltd
        0001  T10 [CloudBlazer]
+       0002  T11 [CloudBlazer]
+       0003  T10s [CloudBlazer]
+       8011  I10 [CloudBlazer]
 # nee Thinci, Inc
 1e38  Blaize, Inc
        0102  Xplorer X1600
+1e3b  Shenzhen DAPU Microelectronics Co., Ltd
+       1098  Haishen NVMe SSD
+               1e3b 0001  Enterprise NVMe SSD U.2 0.8TB (H2100)
+               1e3b 0002  Enterprise NVMe SSD U.2 0.96TB (H2200)
+               1e3b 0004  Enterprise NVMe SSD U.2 1.6TB (H2100)
+               1e3b 0005  Enterprise NVMe SSD U.2 1.92TB (H2200)
+               1e3b 0009  Enterprise NVMe SSD U.2 0.8TB (H3100)
+               1e3b 000a  Enterprise NVMe SSD U.2 0.96TB (H3200)
+               1e3b 000c  Enterprise NVMe SSD U.2 1.6TB (H3100)
+               1e3b 000d  Enterprise NVMe SSD U.2 1.92TB (H3200)
+               1e3b 0014  Enterprise NVMe SSD U.2 3.2TB (H3100)
+               1e3b 0015  Enterprise NVMe SSD U.2 3.84TB (H3200)
+               1e3b 0021  Enterprise NVMe SSD U.2 6.4TB (H3100)
+               1e3b 0022  Enterprise NVMe SSD U.2 7.68TB (H3200)
+               1e3b 0061  Enterprise NVMe SSD HHHL 0.8TB (H2100)
+               1e3b 0062  Enterprise NVMe SSD HHHL 0.96TB (H2200)
+               1e3b 0064  Enterprise NVMe SSD HHHL 1.6TB (H2100)
+               1e3b 0065  Enterprise NVMe SSD HHHL 1.92TB (H2200)
+               1e3b 006c  Enterprise NVMe SSD HHHL 0.8TB (H3100)
+               1e3b 006d  Enterprise NVMe SSD HHHL 0.96TB (H3200)
+               1e3b 006f  Enterprise NVMe SSD HHHL 1.6TB (H3100)
+               1e3b 0070  Enterprise NVMe SSD HHHL 1.92TB (H3200)
+               1e3b 007c  Enterprise NVMe SSD HHHL 3.2TB (H3100)
+               1e3b 007d  Enterprise NVMe SSD HHHL 3.84TB (H3200)
+               1e3b 007f  Enterprise NVMe SSD HHHL 6.4TB (H3100)
+               1e3b 0080  Enterprise NVMe SSD HHHL 7.68TB (H3200)
 1e3d  Burlywood, Inc
 1e49  Yangtze Memory Technologies Co.,Ltd
 1e4b  MAXIO Technology (Hangzhou) Ltd.
        1202  NVMe SSD Controller MAP1202
        1601  NVMe SSD Controller MAP1601
 1e4c  GSI Technology
-# Associative Processing Unit chip
-       0010  Gemini [ Lida ]
+# Associative Processing Unit (APU)
+       0010  APU [Leda-G]
                1e4c 0120  SE120
 1e57  Beijing Panyi Technology Co., Ltd
        0100  The device has already been deleted.
                0000 0100  PY8800 64GB Accelerator
 1e6b  Axiado Corp.
+1e7b  Dataland
 1e7c  Brainchip Inc
        bca1  AKD1000 Neural Network Coprocessor [Akida]
 1e85  Heitec AG
 # aka SED Systems
 1e94  Calian SED
 1e95  Solid State Storage Technology Corporation
+1eab  Hefei DATANG Storage Technology Co.,LTD.
+1eae  XFX Limited
 1eb1  VeriSilicon Inc
        1001  Video Accelerator
 # nee Tumsan Oy
 2348  Racore
        2010  8142 100VG/AnyLAN
 2646  Kingston Technology Company, Inc.
-       2263  A2000, M.2, 500GB
+       2263  A2000 NVMe SSD
 270b  Xantel Corporation
 270f  Chaintech Computer Co. Ltd
 2711  AVID Technology Inc.
                1028 1fe7  Express Flash NVMe 3.2TB 2.5" U.2 (P4600)
                1028 1fe8  Express Flash NVMe 2.0TB HHHL AIC (P4600)
                1028 1fe9  Express Flash NVMe 4.0TB HHHL AIC (P4600)
+       0b26  Thunderbolt 4 Bridge [Goshen Ridge 2020]
+       0b27  Thunderbolt 4 USB Controller [Goshen Ridge 2020]
        0b60  NVMe DC SSD [3DNAND, Beta Rock Controller]
                1028 2060  NVMe SED MU U.2 1.6TB (P5600)
                1028 2061  NVMe SED MU U.2 3.2TB (P5600)
        123f  82466GX Integrated Hot-Plug Controller (IHPC)
        1240  82752 (752) AGP Graphics Accelerator
        124b  82380FB (MPCI2) Mobile Docking Controller
+       124c  Ethernet Connection E823-L for backplane
+       124d  Ethernet Connection E823-L for SFP
+       124e  Ethernet Connection E823-L/X557-AT 10GBASE-T
+       124f  Ethernet Connection E823-L 1GbE
        1250  430HX - 82439HX TXC [Triton II]
        1360  82806AA PCI64 Hub PCI Bridge
        1361  82806AA PCI64 Hub Controller (HRes)
        151b  CVL2510 Thunderbolt Controller [Light Peak 2C 2010]
        151c  82599 10 Gigabit TN Network Connection
                108e 7b13  Dual 10GBASE-T LP
+       151d  Ethernet Connection E823-L for QSFP
        1520  I350 Ethernet Controller Virtual Function
        1521  I350 Gigabit Network Connection
                1028 0602  Gigabit 2P I350-t LOM
                8086 0001  Ethernet Network Adapter I225-T1
                8086 0002  Ethernet Network Adapter I225-T1
        15f3  Ethernet Controller I225-V
+               8086 0003  Intel(R) Ethernet Controller (3) I225-V
        15f4  Ethernet Connection (15) I219-LM
        15f5  Ethernet Connection (15) I219-V
        15f6  I210 Gigabit Ethernet Connection
        163d  Broadwell-U Integrated Graphics
        163e  Broadwell-U Integrated Graphics
        1889  Ethernet Adaptive Virtual Function
+       1890  Ethernet Connection E822-C for backplane
+       1891  Ethernet Connection E822-C for QSFP
+       1892  Ethernet Connection E822-C for SFP
+       1893  Ethernet Connection E822-C/X557-AT 10GBASE-T
+       1894  Ethernet Connection E822-C 1GbE
+       1897  Ethernet Connection E822-L for backplane
+       1898  Ethernet Connection E822-L for SFP
+       1899  Ethernet Connection E822-L/X557-AT 10GBASE-T
+       189a  Ethernet Connection E822-L 1GbE
        18a0  C4xxx Series QAT
        18a1  C4XXX Series QAT Virtual Function
        1900  Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers
        1f26  Atom processor C2000 RAID SATA2 Controller
        1f27  Atom processor C2000 RAID SATA2 Controller
        1f2c  Atom processor C2000 USB Enhanced Host Controller
+               0200 1028  Atom C2338 on Dell 0K8Y0N motherboard
        1f2e  Atom processor C2000 RAID SATA2 Controller
        1f2f  Atom processor C2000 RAID SATA2 Controller
        1f30  Atom processor C2000 2-Port IDE SATA3 Controller
        250f  82820 820 (Camino) Chipset AGP Bridge
        2520  82805AA MTH Memory Translator Hub
        2521  82804AA MRH-S Memory Repeater Hub for SDRAM
+       2522  NVMe Optane Memory Series
+               8086 3806  Optane Memory 16GB
+               8086 3810  Optane Memory M10 16GB
        2526  Wireless-AC 9260
        2530  82850 850 (Tehama) Chipset Host Bridge (MCH)
                1028 00c7  Dimension 8100
        3e30  8th/9th Gen Core 8-core Desktop Processor Host Bridge/DRAM Registers [Coffee Lake S]
        3e33  8th/9th Gen Core Processor Host Bridge/DRAM Registers [Coffee Lake]
        3e34  Coffee Lake HOST and DRAM Controller
+       3e35  Coffee Lake Host Bridge/DRAM Registers
        3e81  8th Gen Core Processor PCIe Controller (x16)
        3e85  8th Gen Core Processor PCIe Controller (x8)
        3e89  8th Gen Core Processor PCIe Controller (x4)
        9a0b  Volume Management Device NVMe RAID Controller
        9a13  Tiger Lake-LP Thunderbolt USB Controller
        9a14  11th Gen Core Processor Host Bridge/DRAM Registers
+       9a17  Tiger Lake-H Thunderbolt USB Controller
        9a1b  Tiger Lake-LP Thunderbolt NHI #0
        9a1d  Tiger Lake-LP Thunderbolt NHI #1
+       9a1f  Tiger Lake-H Thunderbolt NHI #0
+       9a21  Tiger Lake-H Thunderbolt NHI #1
        9a23  Tiger Lake-LP Thunderbolt PCI Express Root Port #0
        9a25  Tiger Lake-LP Thunderbolt PCI Express Root Port #1
        9a27  Tiger Lake-LP Thunderbolt PCI Express Root Port #2
        9a29  Tiger Lake-LP Thunderbolt PCI Express Root Port #3
+       9a2b  Tiger Lake-H Thunderbolt PCI Express Root Port #0
+       9a2d  Tiger Lake-H Thunderbolt PCI Express Root Port #1
+       9a2f  Tiger Lake-H Thunderbolt PCI Express Root Port #2
+       9a31  Tiger Lake-H Thunderbolt PCI Express Root Port #3
        9a33  Tiger Lake Trace Hub
-       9a49  UHD Graphics
+       9a49  Iris Xe Graphics
        9b41  UHD Graphics
        9b44  10th Gen Core Processor Host Bridge/DRAM Registers
        9b54  10th Gen Core Processor Host Bridge/DRAM Registers
                152d 8a24  QS-8236-16i
                152d 8a36  QS-8240-24i
                152d 8a37  QS-8242-24i
+               193d 1104  RAID P2404-Mf-4i-2GB
+               193d 1105  RAID P4408-Mf-8i-2GB
+               193d 1106  RAID P2404-Mf-4i-1GB
+               193d 1107  RAID P4408-Mf-8i-4GB
                193d 8460  HBA H460-M1
                193d 8461  HBA H460-B1
                193d c460  RAID P460-M2
                9005 0805  SmartRAID 3102-8i
                9005 0806  SmartRAID 3100
                9005 0807  SmartRAID 3162-8i
+               9005 0808  SmartRAID 3101E-4i
+               9005 0809  SmartRAID 3102E-8i
                9005 0900  SmartHBA 2100-8i
                9005 0901  SmartHBA 2100-4i
                9005 0902  HBA 1100-8i
                9005 1202  SmartRAID 3154-8i8e
                9005 1280  HBA 1100-16i
                9005 1281  HBA 1100-16e
+               9005 1282  SmartHBA 2100-16i
                9005 1300  HBA 1100-8i8e
                9005 1301  HBA 1100-24i
                9005 1302  SmartHBA 2100-8i8e
        1202  STAR1200I NVMe SSD
        1203  STAR1200L NVMe SSD
        1204  STAR1200E NVMe SSD
+a000  Asix Electronics Corporation (Wrong ID)
 a0a0  AOPEN Inc.
 a0f1  UNISYS Corporation
 a200  NEC Corporation
@@ -33116,6 +33252,9 @@ C 08  Generic system peripheral
        05  SD Host controller
        06  IOMMU
        80  System peripheral
+       99  Timing Card
+# PTP Grandmaster Source Clock
+               01  TAP Timing Card
 C 09  Input device controller
        00  Keyboard controller
        01  Digitizer Pen
index a62adc33e6400f0a6fba474368bfa2e501e654da..797a79691ed88bea69d9b02809a0370f0b2abdd4 100644 (file)
  <tr class="even"><td>Meta View, Inc.</td><td>CFR</td><td>07/15/2020</td> </tr>
  <tr class="odd"><td>MILCOTS</td><td>MLC</td><td>07/15/2020</td> </tr>
  <tr class="even"><td>NZXT (PNP same EDID)_</td><td>NXT</td><td>07/15/2020</td> </tr>
+ <tr class="odd"><td>Unicompute Technology Co., Ltd.</td><td>UTC</td><td>10/19/2020</td> </tr>
       </tbody>
     </table>
   </body>
index 8caeb56a5fb01876df5d11162e0da0088aedab5d..6134b27d0381584f159730345de06a1aaa3555fb 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="binfmt.d" conditional='ENABLE_BINFMT'
     xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 6db048b63be3035a10081922308a541a5313052a..878f24742e8e3f54c28ff4cab764800254880100 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="bootctl" conditional='ENABLE_EFI'
     xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -17,7 +17,7 @@
 
   <refnamediv>
     <refname>bootctl</refname>
-    <refpurpose>Control the firmware and boot manager settings</refpurpose>
+    <refpurpose>Control EFI firmware boot settings and manage boot loader</refpurpose>
   </refnamediv>
 
   <refsynopsisdiv>
   <refsect1>
     <title>Description</title>
 
-    <para><command>bootctl</command> can check the EFI boot loader status, list available boot loaders and boot loader
-    entries, and install, update, or remove the
-    <citerefentry><refentrytitle>systemd-boot</refentrytitle><manvolnum>7</manvolnum></citerefentry> boot loader on the
-    current system.</para>
+    <para><command>bootctl</command> can check the EFI firmware and boot loader status, list and manage
+    available boot loaders and boot loader entries, and install, update, or remove the
+    <citerefentry><refentrytitle>systemd-boot</refentrytitle><manvolnum>7</manvolnum></citerefentry> boot
+    loader on the current system.</para>
   </refsect1>
 
   <refsect1>
-    <title>Commands</title>
-    <variablelist>
+    <title>Generic EFI Firmware/Boot Loader Commands</title>
+
+    <para>These commands are available on any EFI system, regardless of the boot loader used.</para>
 
+    <variablelist>
       <varlistentry>
         <term><option>status</option></term>
 
         loaders and the current default boot loader entry. If no command is specified, this is the implied
         default.</para></listitem>
       </varlistentry>
+    </variablelist>
+
+    <varlistentry>
+      <term><option>reboot-to-firmware</option> <optional><replaceable>BOOL</replaceable></optional></term>
+
+      <listitem><para>Query or set the "Reboot-Into-Firmware-Setup" flag of the EFI firmware. Takes a
+      boolean argument which controls whether to show the firmware setup on next system reboot. If the
+      argument is omitted shows the current status of the flag, or whether the flag is supported. This
+      controls the same flag as <command>systemctl reboot --firmware-setup</command>, but is more
+      low-level and allows setting the flag independently from actually requesting a
+      reboot.</para></listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><option>systemd-efi-options</option> <optional><replaceable>STRING</replaceable></optional></term>
+
+      <listitem><para>When called without the optional argument, prints the current value of the
+      <literal>SystemdOptions</literal> EFI variable. When called with an argument, sets the
+      variable to that value. See
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+      for the meaning of that variable.</para></listitem>
+    </varlistentry>
+  </refsect1>
+
+  <refsect1>
+    <title>Boot Loader Specification Commands</title>
+
+    <para>These commands are available for all boot loaders that implement the <ulink
+    url="https://systemd.io/BOOT_LOADER_SPECIFICATION">Boot Loader Specification</ulink> and/or the <ulink
+    url="https://systemd.io/BOOT_LOADER_INTERFACE">Boot Loader Interface</ulink>, such as
+    <command>systemd-boot</command>.</para>
+
+    <variablelist>
 
+      <varlistentry>
+        <term><option>list</option></term>
+
+        <listitem><para>Shows all available boot loader entries implementing the <ulink
+        url="https://systemd.io/BOOT_LOADER_SPECIFICATION">Boot Loader Specification</ulink>, as well as any
+        other entries discovered or automatically generated by a boot loader implementing the <ulink
+        url="https://systemd.io/BOOT_LOADER_INTERFACE">Boot Loader
+        Interface</ulink>.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>set-default</option> <replaceable>ID</replaceable></term>
+        <term><option>set-oneshot</option> <replaceable>ID</replaceable></term>
+
+        <listitem><para>Sets the default boot loader entry. Takes a single boot loader entry ID string as
+        argument. The <option>set-oneshot</option> command will set the default entry only for the next boot,
+        the <option>set-default</option> will set it persistently for all future boots.</para></listitem>
+
+        <listitem><para>Optionally, the boot loader entry ID may be specified as one of: <option>@default</option>,
+        <option>@oneshot</option> or <option>@current</option>, which correspond to the current default boot loader
+        entry for all future boots, the current default boot loader entry for the next boot, and the currently booted
+        boot loader entry. These special IDs are resolved to the current values of the EFI variables
+        <varname>LoaderEntryDefault</varname>, <varname>LoaderEntryOneShot</varname> and <varname>LoaderEntrySelected</varname>,
+        see <ulink url="https://systemd.io/BOOT_LOADER_SPECIFICATION">Boot Loader Specification</ulink> for details.
+        These special IDs are primarily useful as a quick way to persistently make the currently booted boot loader
+        entry the default choice, or to upgrade the default boot loader entry for the next boot to the default boot
+        loader entry for all future boots, but may be used for other operations too.
+        When an empty string ("") is specified as an ID, then the corresponding EFI variable will be unset.
+        </para></listitem>
+      </varlistentry>
+
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+    <title><command>systemd-boot</command> Commands</title>
+
+    <para>These commands manage the <command>systemd-boot</command> EFI boot loader, and do not work in
+    conjunction with other boot loaders.</para>
+
+    <variablelist>
       <varlistentry>
         <term><option>install</option></term>
 
         information.</para></listitem>
       </varlistentry>
 
-      <varlistentry>
-        <term><option>systemd-efi-options</option> <optional><replaceable>STRING</replaceable></optional></term>
-
-        <listitem><para>When called without the optional argument, prints the current value of the
-        <literal>SystemdOptions</literal> EFI variable. When called with an argument, sets the
-        variable to that value. See
-        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-        for the meaning of that variable.</para></listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>reboot-to-firmware</option> <optional><replaceable>BOOL</replaceable></optional></term>
-
-        <listitem><para>Query or set the "Reboot-Into-Firmware-Setup" flag of the EFI firmware. Takes a
-        boolean argument which controls whether to show the firmware setup on next system reboot. If the
-        argument is omitted shows the current status of the flag, or whether the flag is supported. This
-        controls the same flag as <command>systemctl reboot --firmware-setup</command>, but is more
-        low-level and allows setting the flag independently from actually requesting a
-        reboot.</para></listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>list</option></term>
-
-        <listitem><para>Shows all available boot loader entries implementing the <ulink
-        url="https://systemd.io/BOOT_LOADER_SPECIFICATION">Boot Loader
-        Specification</ulink>, as well as any other entries discovered or automatically generated by the boot
-        loader.</para></listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><option>set-default</option> <replaceable>ID</replaceable></term>
-        <term><option>set-oneshot</option> <replaceable>ID</replaceable></term>
-
-        <listitem><para>Sets the default boot loader entry. Takes a single boot loader entry ID string as argument. The
-        <option>set-oneshot</option> command will set the default entry only for the next boot, the
-        <option>set-default</option> will set it persistently for all future boots.</para></listitem>
-      </varlistentry>
-
     </variablelist>
   </refsect1>
 
index 0c2edfc8a582bfab205a90876f7b184ba7ba3746..781e539191ed4f86f24a45fbfcf475d98102cfd2 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="bootup">
 
index 06d17b201a89afbb31049b8539c5fdc83318af70..912f30264144ef9b3983de40ba7d1b2e340f61e4 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="busctl"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 46da7741c97e5cf7abcb63cf460f1d31199f31ee..942a31db7454336bcf82f1b9f51d4c3fbefce9c9 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="coredump.conf" conditional="ENABLE_COREDUMP"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 150d410c24cc5d4ad681627aeadfc1cf3cd4f78d..62dbb314c9be16f538d3bbffe93589614db19990 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="coredumpctl" conditional='ENABLE_COREDUMP'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index c6498700baa7e5e7ef2a82e1382a560d482db2d0..0c0f091025de4310852ecfe44be969b0297d7162 100644 (file)
@@ -3,7 +3,7 @@
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   This is based on crypttab(5) from Fedora's initscripts package, which in
   turn is based on Debian's version.
     it is opened as a LUKS device; otherwise, it is assumed to be in
     raw dm-crypt (plain mode) format.</para>
 
-    <para>The first field contains the name of the resulting encrypted volume; its block device is set up
-    below <filename>/dev/mapper/</filename>.</para>
+    <para>The four fields of <filename>/etc/crypttab</filename> are defined as follows:</para>
 
-    <para>The second field contains a path to the underlying block
-    device or file, or a specification of a block device via
-    <literal>UUID=</literal> followed by the UUID.</para>
+    <orderedlist>
 
-    <para>The third field specifies an absolute path to a file with the encryption key. Optionally,
-    the path may be followed by <literal>:</literal> and an fstab device specification (e.g. starting with
-    <literal>LABEL=</literal> or similar); in which case the path is taken relative to the device file system
-    root. If the field is not present or is <literal>none</literal> or <literal>-</literal>, a key file
-    named after the volume to unlock (i.e. the first column of the line), suffixed with
-    <filename>.key</filename> is automatically loaded from the <filename>/etc/cryptsetup-keys.d/</filename>
-    and <filename>/run/cryptsetup-keys.d/</filename> directories, if present. Otherwise, the password has to
-    be manually entered during system boot. For swap encryption, <filename>/dev/urandom</filename> may be
-    used as key file.</para>
+      <listitem><para>The first field contains the name of the resulting volume with decrypted data; its
+      block device is set up below <filename>/dev/mapper/</filename>.</para></listitem>
 
-    <para>The fourth field, if present, is a comma-delimited list of
-    options. The following options are recognized:</para>
+      <listitem><para>The second field contains a path to the underlying block
+      device or file, or a specification of a block device via
+      <literal>UUID=</literal> followed by the UUID.</para></listitem>
+
+      <listitem><para>The third field specifies an absolute path to a file with the encryption
+      key. Optionally, the path may be followed by <literal>:</literal> and an fstab device specification
+      (e.g. starting with <literal>LABEL=</literal> or similar); in which case the path is taken relative to
+      the device file system root. If the field is not present or is <literal>none</literal> or
+      <literal>-</literal>, a key file named after the volume to unlock (i.e. the first column of the line),
+      suffixed with <filename>.key</filename> is automatically loaded from the
+      <filename>/etc/cryptsetup-keys.d/</filename> and <filename>/run/cryptsetup-keys.d/</filename>
+      directories, if present. Otherwise, the password has to be manually entered during system boot. For
+      swap encryption, <filename>/dev/urandom</filename> may be used as key file, resulting in a randomized
+      key.</para>
+
+      <para>If the specified key file path refers to an <constant>AF_UNIX</constant> stream socket in the
+      file system, the key is acquired by connecting to the socket and reading it from the connection. This
+      allows the implementation of a service to provide key information dynamically, at the moment when it is
+      needed. For details see below.</para></listitem>
+
+      <listitem><para>The fourth field, if present, is a comma-delimited list of options. The supported
+      options are listed below.</para></listitem>
+    </orderedlist>
 
     <variablelist class='fstab-options'>
 
         relevant for LUKS devices. See
         <citerefentry project='die-net'><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
         for possible values and the default value of this
-        option.</para></listitem>
+        option.</para>
+
+        <para>Optionally, the path may be followed by <literal>:</literal> and an fstab device specification
+        (e.g. starting with <literal>UUID=</literal> or similar); in which case, the path is relative to the
+        device file system root. The device gets mounted automatically for LUKS device activation duration only.
+        </para></listitem>
       </varlistentry>
 
       <varlistentry>
     <citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
   </refsect1>
 
+  <refsect1>
+    <title><constant>AF_UNIX</constant> Key Files</title>
+
+    <para>If the key file path (as specified in the third column of <filename>/etc/crypttab</filename>
+    entries, see above) refers to an <constant>AF_UNIX</constant> stream socket in the file system, the key
+    is acquired by connecting to the socket and reading the key from the connection. The connection is made
+    from an <constant>AF_UNIX</constant> socket name in the abstract namespace, see <citerefentry
+    project='man-pages'><refentrytitle>unix</refentrytitle><manvolnum>7</manvolnum></citerefentry> for
+    details. The source socket name is chosen according the following format:</para>
+
+    <programlisting><constant>NUL</constant> <replaceable>RANDOM</replaceable> <literal>/cryptsetup/</literal> <replaceable>VOLUME</replaceable></programlisting>
+
+    <para>In other words: a <constant>NUL</constant> byte (as required for abstract namespace sockets),
+    followed by a random string (consisting of alphabenumeric characters only), followed by the literal
+    string <literal>/cryptsetup/</literal>, followed by the name of the volume to acquire they key
+    for. Example (for a volume <literal>myvol</literal>):</para>
+
+    <example><programlisting>\0d7067f78d9827418/cryptsetup/myvol</programlisting></example>
+
+    <para>Services listening on the <constant>AF_UNIX</constant> stream socket may query the source socket
+    name with <citerefentry
+    project='man-pages'><refentrytitle>getpeername</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
+    and use it to determine which key to send, allowing a single listening socket to serve keys for a
+    multitude of volumes. If the PKCS#11 logic is used (see below) the socket source name is picked in
+    identical fashion, except that the literal string <literal>/cryptsetup-pkcs11/</literal> is used. This is
+    done so that services providing key material know that not a secret key is requested but an encrypted key
+    that will be decrypted via the PKCS#11 logic to acquire the final secret key.</para>
+  </refsect1>
   <refsect1>
     <title>Examples</title>
     <example>
@@ -524,7 +568,6 @@ external   /dev/sda3       keyfile:LABEL=keydev keyfile-timeout=10s,cipher=xchac
 <para>A few notes on the above:</para>
 
 <itemizedlist>
-  <listitem><para>We use RSA (and not ECC), since Yubikeys support PKCS#11 Decrypt() only for RSA keys</para></listitem>
   <listitem><para>We use RSA2048, which is the longest key size current Yubikeys support</para></listitem>
   <listitem><para>LUKS key size must be shorter than 2048bit due to RSA padding, hence we use 128 bytes</para></listitem>
   <listitem><para>We use Yubikey key slot 9d, since that's apparently the keyslot to use for decryption purposes,
index dc4b242fc373fe8dd7d71b05b7b911c085ee7bf5..9963322fc9a88945000aec6eeb5609633a4d147c 100644 (file)
@@ -11,3 +11,5 @@
 <!ENTITY KILL_USER_PROCESSES @KILL_USER_PROCESSES_YES_NO@>
 <!ENTITY DEBUGTTY @DEBUGTTY@>
 <!ENTITY RC_LOCAL_PATH @RC_LOCAL_PATH@>
+<!ENTITY fedora_latest_version "33">
+<!ENTITY fedora_cloud_release "1.2">
index 57a9cc97d258b754e1b2439766715437efc9489c..6e4dc27f5dc134dabbfaec3f174f9b93cddfbb31 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 
index d9af519d324b73dc8bbffd882bc120c2954f617a..2ed361fcc2b5617928270d26a6af01a07a77a0fa 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 -->
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
index b5ae08473dc21f8ca9699633aa9157930b26da2c..db95d2f75b52e1170cd69d4e204dc283723b4b4d 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="daemon">
 
index e0063e051d6d9114e737482b6d2db98a4432968f..addb0effdb375a4cb8f10fff57f96866694332cc 100644 (file)
@@ -1,4 +1,4 @@
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.directives">
   <refentryinfo>
index 8b6394e927117692c2503e020878a91c5348e2a1..25c6ce2c616a9d9133113b6cfc754873c24714f2 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="dnssec-trust-anchors.d" conditional='ENABLE_RESOLVE'
     xmlns:xi="http://www.w3.org/2001/XInclude">
     and follow the same overriding rules. They are text files with the
     <filename>.negative</filename> suffix. Empty lines and lines whose first character is
     <literal>;</literal> are ignored. Each line specifies one domain name which is the root of a DNS
-    subtree where validation shall be disabled.</para>
+    subtree where validation shall be disabled. For example:</para>
+
+    <programlisting># Reverse IPv4 mappings
+10.in-addr.arpa
+16.172.in-addr.arpa
+168.192.in-addr.arpa
+...
+# Some custom domains
+prod
+stag
+</programlisting>
 
     <para>Negative trust anchors are useful to support private DNS
     subtrees that are not referenced from the Internet DNS hierarchy,
index 4db44616a733aa1cac798b73b70b8c66b77536a1..272211cbd4222e64b62a3ec99d3981b7e6c8c5ad 100644 (file)
@@ -3,7 +3,7 @@
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   Copyright © 2016 Red Hat, Inc.
 -->
index 996876f48a379bcae1390bf7921144f6e9d4d3b4..6c64b726f0f31fa9d239475fb94cbbeffcdbfbf0 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="file-hierarchy">
 
index f811b1034848c7c9dcf1c1ee919a55d574561328..4b3beb80b799aeb6aaba2cba01514cf40de454a6 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="halt"
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 8afe993dac1bef87fe66598b3c14ea7d34fb8293..a9cf2f8550ec8cb6079006aa1472842f420f4865 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="homectl" conditional='ENABLE_HOMED'
     xmlns:xi="http://www.w3.org/2001/XInclude">
         <term><option>--realm=</option><replaceable>REALM</replaceable></term>
 
         <listitem><para>The realm for the user. The realm associates a user with a specific organization or
-        installation, and allows distuingishing users of the same name defined in different contexts. The
+        installation, and allows distinguishing users of the same name defined in different contexts. The
         realm can be any string that also qualifies as valid DNS domain name, and it is recommended to use
         the organization's or installation's domain name for this purpose, but this is not enforced nor
         required. On each system only a single user of the same name may exist, and if a user with the same
index d43a83de3eb81f688b660f83ebaccdef6e7cb607..7e99aa61919030b21830e9b9b6100e2b46c269a5 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="homed.conf" conditional='ENABLE_HOMED'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index bb880c336ca89afb79e91bb6b0d90b117a228f9c..edbeef8f4af6dd877b30991a28c7a8d3674174fb 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="hostname">
   <refentryinfo>
index 7ca62f48105a7ab822e6807ac6c502118d33612f..8c00867e739ab9926168e331508dc1ddc4e89f5c 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="hostnamectl" conditional='ENABLE_HOSTNAMED'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 4e3bfbaace9a10620deeb59b520fa86c822fa456..2c1e502dcd4053c49e77e09446262fb9f28b585c 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="hwdb" conditional="ENABLE_HWDB">
   <refentryinfo>
       they are combined by OR. Every match line must start at the first character of the
       line.</para>
 
+      <para>Match patterns consist of literal characters, and shell-style wildcards:</para>
+      <itemizedlist>
+        <listitem><para>Asterisk <literal>*</literal> matches any number of characters
+        </para></listitem>
+        <listitem><para>Question mark <literal>?</literal> matches a single character
+        </para></listitem>
+        <listitem><para>Character list <literal>[<replaceable>chars</replaceable>]</literal> matches one of
+        the characters <replaceable>chars</replaceable> listed between <literal>[</literal> and
+        <literal>]</literal>. A range may be specified as with a dash as
+        <literal>[<replaceable>first</replaceable>-<replaceable>last</replaceable>]</literal>. The match may
+        be inverted with a caret <literal>[^…]</literal>.</para></listitem>
+      </itemizedlist>
+
       <para>The match lines are followed by one or more key-value pair lines, which are
       recognized by a leading space character. The key name and value are separated by
       <literal>=</literal>. An empty line signifies the end of a record. Lines beginning
 # it defines, and the ordering convention.
 
 # A record with three matches and one property
-mouse:*:name:*Trackball*:
-mouse:*:name:*trackball*:
-mouse:*:name:*TrackBall*:
+mouse:*:name:*Trackball*:*
+mouse:*:name:*trackball*:*
+mouse:*:name:*TrackBall*:*
+ ID_INPUT_TRACKBALL=1
+
+# The rule above could be also be written in a form that
+# matches Tb, tb, TB, tB:
+mouse:*:name:*[tT]rack[bB]all*:*
  ID_INPUT_TRACKBALL=1
 
 # A record with a single match and five properties
-mouse:usb:v046dp4041:name:Logitech MX Master:
+mouse:usb:v046dp4041:name:Logitech MX Master:*
  MOUSE_DPI=1000@166
  MOUSE_WHEEL_CLICK_ANGLE=15
  MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL=26
@@ -98,26 +116,30 @@ mouse:usb:v046dp4041:name:Logitech MX Master:
       <title>Overriding of properties</title>
 
       <programlisting># /usr/lib/udev/hwdb.d/60-keyboard.hwdb
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn*:*
  KEYBOARD_KEY_a1=help
  KEYBOARD_KEY_a2=setup
  KEYBOARD_KEY_a3=battery
 
-evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pn123*
+# Match vendor name "Acer" and any product name starting with "X123"
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer:pnX123*:*
  KEYBOARD_KEY_a2=wlan
 
 # /etc/udev/hwdb.d/70-keyboard.hwdb
 # disable wlan key on all at keyboards
 evdev:atkbd:*
- KEYBOARD_KEY_a2=reserved</programlisting>
+ KEYBOARD_KEY_a2=reserved
+ PROPERTY_WITH_SPACES=some string</programlisting>
 
       <para>If the hwdb consists of those two files, a keyboard with the lookup string
-      <literal>evdev:atkbd:dmi:bvnAcer:bdXXXXX:bd08/05/2010:svnAcer:pn123</literal>
+      <literal>evdev:atkbd:dmi:bvnAcer:bdXXXXX:bd08/05/2010:svnAcer:pnX123</literal>
       will match all three records, and end up with the following properties:</para>
 
       <programlisting>KEYBOARD_KEY_a1=help
 KEYBOARD_KEY_a2=reserved
-KEYBOARD_KEY_a3=battery</programlisting>
+KEYBOARD_KEY_a3=battery
+PROPERTY_WITH_SPACES=some string</programlisting>
+
     </example>
   </refsect1>
 
index f6a9f1565e4b799b0c7b61ece28d95d7a15be90c..3f69f30df32f6259a16de6fb249625e7351df697 100644 (file)
@@ -3,7 +3,7 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   Copyright © 2015 Chris Morgan
 -->
index 2a67e6fd055ad86e4dfbe1947f72f888b23752ce..403eb57c69bed7b21e8c9fa38f3afa759071fd2e 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="journal-upload.conf" conditional='HAVE_MICROHTTPD'
           xmlns:xi="http://www.w3.org/2001/XInclude">
index fa230484a15c18dae10f391c2c44cb5668409f2a..379344170d1add7e17efed24a85d70d99443e93f 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
   <refentry id="journalctl"
             xmlns:xi="http://www.w3.org/2001/XInclude">
index 2281e069d50917e395c0155f5f88ddd9247d786f..959815a8f183c38d6db4fbba06a19dded3fbccb7 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="journald.conf"
     xmlns:xi="http://www.w3.org/2001/XInclude">
 
         <listitem><para>The maximum line length to permit when converting stream logs into record logs. When a systemd
         unit's standard output/error are connected to the journal via a stream socket, the data read is split into
-        individual log records at newline (<literal>\n</literal>, ASCII 10) and NUL characters. If no such delimiter is
+        individual log records at newline (<literal>\n</literal>, ASCII 10) and <constant>NUL</constant> characters. If no such delimiter is
         read for the specified number of bytes a hard log record boundary is artificially inserted, breaking up overly
         long lines into multiple log records. Selecting overly large values increases the possible memory usage of the
         Journal daemon for each stream client, as in the worst case the journal daemon needs to buffer the specified
index 8f61188a63d1b455f33d5e17bc3a305a157428fb..7a4109916c154b7f87a9158234ba7e79f66e6533 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="kernel-command-line">
 
index 3de95f70881087142bbee98b0b196213c0639f03..37eefe256e90b309256d19f4f0a71e11dfbfde2a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="kernel-install"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 08e513c99f8e9d52f5db5dfc0ec988bc0337f856..3b32673f39edef901a53f5cc1020b4cafe9825e0 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refsect1>
   <title>Environment</title>
       the invoking terminal is determined to be UTF-8 compatible).</para></listitem>
     </varlistentry>
 
+    <varlistentry id='lesssecure'>
+      <term><varname>$SYSTEMD_PAGERSECURE</varname></term>
+
+      <listitem><para>Takes a boolean argument. When true, the "secure" mode of the pager is enabled; if
+      false, disabled. If <varname>$SYSTEMD_PAGERSECURE</varname> is not set at all, secure mode is enabled
+      if the effective UID is not the same as the owner of the login session, see <citerefentry
+      project='man-pages'><refentrytitle>geteuid</refentrytitle><manvolnum>2</manvolnum></citerefentry> and
+      <citerefentry><refentrytitle>sd_pid_get_owner_uid</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
+      In secure mode, <option>LESSSECURE=1</option> will be set when invoking the pager, and the pager shall
+      disable commands that open or create new files or start new subprocesses. When
+      <varname>$SYSTEMD_PAGERSECURE</varname> is not set at all, pagers which are not known to implement
+      secure mode will not be used. (Currently only
+      <citerefentry><refentrytitle>less</refentrytitle><manvolnum>1</manvolnum></citerefentry> implements
+      secure mode.)</para>
+
+      <para>Note: when commands are invoked with elevated privileges, for example under <citerefentry
+      project='man-pages'><refentrytitle>sudo</refentrytitle><manvolnum>8</manvolnum></citerefentry> or
+      <citerefentry
+      project='die-net'><refentrytitle>pkexec</refentrytitle><manvolnum>1</manvolnum></citerefentry>, care
+      must be taken to ensure that unintended interactive features are not enabled. "Secure" mode for the
+      pager may be enabled automatically as describe above. Setting <varname>SYSTEMD_PAGERSECURE=0</varname>
+      or not removing it from the inherited environment allows the user to invoke arbitrary commands. Note
+      that if the <varname>$SYSTEMD_PAGER</varname> or <varname>$PAGER</varname> variables are to be
+      honoured, <varname>$SYSTEMD_PAGERSECURE</varname> must be set too. It might be reasonable to completely
+      disable the pager using <option>--no-pager</option> instead.</para></listitem>
+    </varlistentry>
+
     <varlistentry id='colors'>
       <term><varname>$SYSTEMD_COLORS</varname></term>
 
index e378c4dd7cd5403fe7b20e1f90f55684bf523cf6..e3b0634c9f09ecb62492555a4f133e3475b2c5a5 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refsect1>
   <title>Notes</title>
index c35bc292ed3b349757fb2eff1bec68ff0f22ce35..4b87962fc0d231dcdc88abb96ebd0832d2f03747 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="libudev"
   xmlns:xi="http://www.w3.org/2001/XInclude">
index 4b01a93bd06758436b2c963ceee2411df2af2a53..29315ceb1743a3353460a5a1aa42749c881f9018 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="loader.conf" conditional='ENABLE_EFI'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index a92cf50a8d73b3321d412966e1db03f38d1b7a64..b24ad9cf2eb5a3c9a1fe31ca5fc0b123dff570fd 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="locale.conf">
   <refentryinfo>
index 5efb5fec7c56aca9143559caf6693dfe9d1600fd..7f7e5775c00128b3eb9d1a91bfada428606ab347 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="localectl" conditional='ENABLE_LOCALED'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 0f1652ee2e5e5e859a1b752cca75a63f33986ea5..73c1b8e5a30f95a6419fabb8ac191c88a8684cde 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="localtime">
   <refentryinfo>
index acc5aa9a6f2a0eb2b6b988f8a12f4a19959e1381..d3745ce52d64eaccf22a7719b43ed38881a689e1 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="loginctl" conditional='ENABLE_LOGIND'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 7857073acacaa00d7c3c49922f93f10c361ef237..be62b6b572307cf1ec9f96f3ce0e2a227896e067 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="logind.conf" conditional='ENABLE_LOGIND'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index cf759f2a0e7aa30d78ca7ad3a5c75178bcbb9134..f61634fde54e867e2e11cea0657bc7853a24f819 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="machine-id">
   <refentryinfo>
 
     <para>For operating system images which are created once and used on multiple
     machines, for example for containers or in the cloud,
-    <filename>/etc/machine-id</filename> should be an empty file in the generic file
-    system image. An ID will be generated during boot and saved to this file if
-    possible. Having an empty file in place is useful because it allows a temporary file
-    to be bind-mounted over the real file, in case the image is used read-only.</para>
+    <filename>/etc/machine-id</filename> should be either missing or an empty file in the generic file
+    system image (the difference between the two options is described under "First Boot Semantics" below). An
+    ID will be generated during boot and saved to this file if possible. Having an empty file in place is
+    useful because it allows a temporary file to be bind-mounted over the real file, in case the image is
+    used read-only.</para>
 
     <para><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     may be used to initialize <filename>/etc/machine-id</filename> on mounted (but not
     early boot but become writable later on.</para>
   </refsect1>
 
+  <refsect1>
+    <title>First Boot Semantics</title>
+
+    <para><filename>/etc/machine-id</filename> is used to decide whether a boot is the first one.  The rules
+    are as follows:</para>
+
+    <orderedlist>
+      <listitem><para>If <filename>/etc/machine-id</filename> does not exist, this is a first boot.  During
+      early boot, <command>systemd</command> will write <literal>uninitialized\n</literal> to this file and overmount
+      a temporary file which contains the actual machine ID.  Later (after <filename>first-boot-complete.target</filename>
+      has been reached), the real machine ID will be written to disk.</para></listitem>
+
+      <listitem><para>If <filename>/etc/machine-id</filename> contains the string <literal>uninitialized</literal>,
+      a boot is also considered the first boot.  The same mechanism as above applies.</para></listitem>
+
+      <listitem><para>If <filename>/etc/machine-id</filename> exists and is empty, a boot is
+      <emphasis>not</emphasis> considered the first boot.  <command>systemd</command> will still bind-mount a file
+      containing the actual machine-id over it and later try to commit it to disk (if <filename>/etc/</filename> is
+      writable).</para></listitem>
+
+      <listitem><para>If <filename>/etc/machine-id</filename> already contains a valid machine-id, this is
+      not a first boot.</para></listitem>
+    </orderedlist>
+
+    <para>If by any of the above rules, a first boot is detected, units with <varname>ConditionFirstBoot=yes</varname>
+    will be run.</para>
+  </refsect1>
+
   <refsect1>
     <title>Relation to OSF UUIDs</title>
 
index 7a0a396a1ebabcbe4387d9cba7773e12b9d4e482..c42f6e22113456d22df014008d9d53f8972528ac 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="machine-info">
   <refentryinfo>
index 5f940459840728620edfa3d47037e01d718a7485..9026849559b57ba4c1f6380948a8d9fb7752e9ad 100644 (file)
@@ -1,7 +1,10 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
+]>
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="machinectl" conditional='ENABLE_MACHINED'
     xmlns:xi="http://www.w3.org/2001/XInclude">
 
     <example>
       <title>Download a Fedora image, set a root password in it, start
-      it as service</title>
+      it as service</title>
 
-      <programlisting># machinectl pull-raw --verify=no https://dl.fedoraproject.org/pub/fedora/linux/releases/27/CloudImages/x86_64/images/Fedora-Cloud-Base-27-1.6.x86_64.raw.xz
-# systemd-nspawn -M Fedora-Cloud-Base-27-1.6.x86_64
+      <programlisting># machinectl pull-raw --verify=no \
+      https://download.fedoraproject.org/pub/fedora/linux/releases/&fedora_latest_version;/Cloud/x86_64/images/Fedora-Cloud-Base-&fedora_latest_version;-&fedora_cloud_release;.x86_64.raw.xz \
+      Fedora-Cloud-Base-&fedora_latest_version;-&fedora_cloud_release;.x86-64
+# systemd-nspawn -M Fedora-Cloud-Base-&fedora_latest_version;-&fedora_cloud_release;.x86-64
 # passwd
 # exit
-# machinectl start Fedora-Cloud-Base-27-1.6.x86_64
-# machinectl login Fedora-Cloud-Base-27-1.6.x86_64</programlisting>
+# machinectl start Fedora-Cloud-Base-&fedora_latest_version;-&fedora_cloud_release;.x86-64
+# machinectl login Fedora-Cloud-Base-&fedora_latest_version;-&fedora_cloud_release;.x86-64</programlisting>
 
       <para>This downloads the specified <filename>.raw</filename>
       image with verification disabled. Then, a shell is opened in it
index 3c2c7023ed08f325a22b3ed50b4cabba367176e4..f555d629dfa5df11d0ba430fe1014eedf0db0184 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 # This is lame, I know, but meson has no other include mechanism
 subdir('rules')
@@ -207,7 +207,7 @@ if dbus_docs.length() > 0
                            '@INPUT@'],
                 input : dbus_docs)
 
-        if conf.get('DEVELOPER_MODE') == 1
+        if conf.get('BUILD_MODE') == 'BUILD_MODE_DEVELOPER'
                 test('dbus-docs-fresh',
                      update_dbus_docs_py,
                      args : ['--build-dir=@0@'.format(project_build_root),
index d126634e731f600c157973fc552dbecf40aa10ae..cd0c00687a54f3b2662328fffc2dba5c4b6088ff 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="modules-load.d" conditional='HAVE_KMOD'
     xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 9b50912765b348e0ba1c0136a28c74ce7342f3a9..466bba47ff35cbfb6ffb86bf6fb6c8c0f0c4e058 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="networkctl" conditional='ENABLE_NETWORKD'
           xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -301,8 +301,8 @@ s - Service VLAN, m - Two-port MAC Relay (TPMR)
         </term>
         <listitem><para>Reconfigure network interfaces. Takes interface name or index number. Note that
         this does not reload <filename>.netdev</filename> or <filename>.network</filename>
-        corresponding to the the specified interface. So, if you edit config files, it is necessary to
-        call <command>networkctl reload</command> first to apply new settings.</para></listitem>
+        corresponding to the specified interface. So, if you edit config files, it is necessary to call
+        <command>networkctl reload</command> first to apply new settings.</para></listitem>
       </varlistentry>
 
       <varlistentry>
index 821212c343a728beb8812552eb91361a5a9b107d..65aecb62567724a20938d0dcf55d301d96ecfcaf 100644 (file)
@@ -3,7 +3,7 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   Copyright © 2014 Vinay Kulkarni
 -->
index e12d9bf5b2b41495a308ae963b0bea132aa067e0..8d5b549c3b142798a0f3afc389f49e5d15e8bcea 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="nss-myhostname" conditional='ENABLE_NSS_MYHOSTNAME'>
 
index 56ee073c8a357ec508ec8c3966f4fababa170b07..b2785df410c19992e840fd7e7eca5fe50864a2fc 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="nss-mymachines" conditional='ENABLE_NSS_MYMACHINES'>
 
index e6963e5812a93e18c7bc0bac35c73a294d5c1fd3..78c92030aca4cc9cecb462b603447c72b12c943f 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="nss-resolve" conditional='ENABLE_NSS_RESOLVE'>
 
index 6285b8da9da332a7fa8b8dcadb83c259be9bb452..1fee8cc8ba051bbf1e9841adcc3139b98f750d6c 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="nss-systemd" conditional='ENABLE_NSS_SYSTEMD'>
 
diff --git a/man/oomctl.xml b/man/oomctl.xml
new file mode 100644 (file)
index 0000000..b5e8a44
--- /dev/null
@@ -0,0 +1,86 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
+
+<refentry id="oomctl" conditional='ENABLE_OOMD'
+  xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>oomctl</title>
+    <productname>systemd</productname>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>oomctl</refentrytitle>
+    <manvolnum>1</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>oomctl</refname>
+    <refpurpose>Analyze the state stored in <command>systemd-oomd</command></refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>oomctl</command>
+      <arg choice="opt" rep="repeat">OPTIONS</arg>
+      <arg choice="req">COMMAND</arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><command>oomctl</command> may be used to get information about the various contexts read in by
+    the <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> userspace
+    out-of-memory (OOM) killer,
+    <citerefentry><refentrytitle>systemd-oomd</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
+
+  </refsect1>
+
+  <refsect1>
+    <title>Commands</title>
+
+    <para>The following commands are understood:</para>
+
+    <variablelist>
+      <varlistentry>
+        <term><command>dump</command></term>
+
+        <listitem><para>Show the current state of the cgroup(s) and system context(s) stored by
+        <command>systemd-oomd</command>.</para></listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </refsect1>
+
+  <refsect1>
+    <title>Options</title>
+
+    <para>The following options are understood:</para>
+
+    <variablelist>
+      <xi:include href="standard-options.xml" xpointer="help" />
+      <xi:include href="standard-options.xml" xpointer="version" />
+      <xi:include href="standard-options.xml" xpointer="no-pager" />
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+    <title>Exit status</title>
+
+    <para>On success, 0 is returned, a non-zero failure code otherwise.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+    <para>
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd-oomd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>oomd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+    </para>
+  </refsect1>
+
+</refentry>
diff --git a/man/oomd.conf.xml b/man/oomd.conf.xml
new file mode 100644 (file)
index 0000000..35a0686
--- /dev/null
@@ -0,0 +1,88 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
+
+<refentry id="oomd.conf" conditional='ENABLE_OOMD'
+    xmlns:xi="http://www.w3.org/2001/XInclude">
+  <refentryinfo>
+    <title>oomd.conf</title>
+    <productname>systemd</productname>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>oomd.conf</refentrytitle>
+    <manvolnum>5</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>oomd.conf</refname>
+    <refname>oomd.conf.d</refname>
+    <refpurpose>Global <command>systemd-oomd</command> configuration files</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <para><filename>/etc/systemd/oomd.conf</filename></para>
+    <para><filename>/etc/systemd/oomd.conf.d/*.conf</filename></para>
+    <para><filename>/usr/lib/systemd/oomd.conf.d/*.conf</filename></para>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para>These files configure the various parameters of the
+    <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry> userspace
+    out-of-memory (OOM) killer,
+    <citerefentry><refentrytitle>systemd-oomd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
+    See <citerefentry><refentrytitle>systemd.syntax</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+    for a general description of the syntax.</para>
+
+  </refsect1>
+
+  <xi:include href="standard-conf.xml" xpointer="main-conf" />
+
+  <refsect1>
+    <title>[OOM] Section Options</title>
+
+    <para>The following options are available in the [OOM] section:</para>
+
+    <variablelist class='config-directives'>
+      <varlistentry>
+        <term><varname>SwapUsedLimitPercent=</varname></term>
+
+        <listitem><para>Sets the limit for swap usage on the system before <command>systemd-oomd</command> will
+        take action. If the percentage of swap used on the system is more than what is defined here,
+        <command>systemd-oomd</command> will act on eligible descendant cgroups, starting from the ones with the
+        highest swap usage to the lowest swap usage. Which cgroups are monitored and what
+        action gets taken depends on what the unit has configured for <varname>ManagedOOMSwap=</varname>.
+        Takes a percentage value between 0% and 100%, inclusive. Defaults to 90%.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><varname>DefaultMemoryPressureLimitPercent=</varname></term>
+
+        <listitem><para>Sets the limit for memory pressure on the unit's cgroup before <command>systemd-oomd</command>
+        will take action. A unit can override this value with <varname>ManagedOOMMemoryPressureLimitPercent=</varname>.
+        The memory pressure for this property represents the fraction of time in a 10 second window in which all tasks
+        in the cgroup were delayed. For each monitored cgroup, if the memory pressure on that cgroup exceeds the
+        limit set for more than 30 seconds, <command>systemd-oomd</command> will act on eligible descendant cgroups,
+        starting from the ones with the most reclaim activity to the least reclaim activity. Which cgroups are
+        monitored and what action gets taken depends on what the unit has configured for
+        <varname>ManagedOOMMemoryPressure=</varname>. Takes a percentage value between 0% and 100%, inclusive.
+        Defaults to 60%.</para></listitem>
+      </varlistentry>
+
+    </variablelist>
+  </refsect1>
+
+  <refsect1>
+      <title>See Also</title>
+      <para>
+        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+        <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+        <citerefentry><refentrytitle>systemd-oomd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+        <citerefentry><refentrytitle>oomctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+      </para>
+  </refsect1>
+
+</refentry>
index 1fdfb8943a6feaeff77be4711ccbbc4f18e827f2..da6dd7628e281732e7ccfc2f48a820c00e9bd317 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" >
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="org.freedesktop.LogControl1"
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 8d3defbfe035c986412fc6ce4e5931e921ab010f..b977e1b46f6d3ec43055ae882eb6162f33ddf218 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" >
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="org.freedesktop.home1" conditional='ENABLE_HOMED'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 6b2341e48c08217531e872ee809cb2ecf4195325..f8e199ceaafd2102bfd04688bc6bcfbca046e28d 100644 (file)
@@ -5,7 +5,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="org.freedesktop.hostname1" conditional='ENABLE_HOSTNAMED'
     xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -260,7 +260,8 @@ node /org/freedesktop/hostname1 {
       <interfacename>org.freedesktop.hostname1.set-hostname</interfacename>. For
       <function>SetStaticHostname()</function> and <function>SetPrettyHostname()</function> it is
       <interfacename>org.freedesktop.hostname1.set-static-hostname</interfacename>. For
-      <function>SetIconName()</function> and <function>SetChassis()</function> it is
+      <function>SetIconName()</function>, <function>SetChassis()</function>, <function>SetDeployment()</function>
+      and <function>SetLocation()</function> it is
       <interfacename>org.freedesktop.hostname1.set-machine-info</interfacename>.</para>
     </refsect2>
   </refsect1>
index 472b9f999e879753fa8c53701ee30c665c743bfb..9558ee138f8ab70c903d0e181b209693239f68c2 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" >
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="org.freedesktop.import1" conditional='ENABLE_IMPORTD'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 3956eaf8a7b8c1f58189a4bb3d2461f3562ba1e4..1da386d6a7d2b8d3cdcf9666c96a79efabc303c8 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" >
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="org.freedesktop.locale1" conditional='ENABLE_LOCALED'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 03f0107c72d0c5599c0a98b4ac79778129cddc44..ad27b226b8ab2c8b8010ee3a94de42231dd1bcde 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" >
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="org.freedesktop.login1" conditional='ENABLE_LOGIND'
     xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -509,8 +509,7 @@ node /org/freedesktop/login1 {
       and a boolean for controlling polkit interactivity (see below). Device assignments are persistently
       stored on disk. To create a new seat, simply specify a previously unused seat id. For more information
       about the seat assignment logic see
-      <ulink url="https://www.freedesktop.org/wiki/Software/systemd/multiseat">Multi-Seat for Linux</ulink>.
-      </para>
+      <citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
 
       <para><function>FlushDevices()</function> removes all explicit seat assignments for devices, resetting
       all assignments to the automatic defaults. The only argument it takes is the polkit interactivity
index da4738b615e485e18a28aa173bec59008344d6ec..284c3d60e4658a0f4831222210dc5169b6344882 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" >
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="org.freedesktop.machine1" conditional='ENABLE_MACHINED'
     xmlns:xi="http://www.w3.org/2001/XInclude">
diff --git a/man/org.freedesktop.oom1.xml b/man/org.freedesktop.oom1.xml
new file mode 100644 (file)
index 0000000..ab0725e
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version='1.0'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" >
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
+
+<refentry id="org.freedesktop.oom1" conditional='ENABLE_OOMD'
+    xmlns:xi="http://www.w3.org/2001/XInclude">
+  <refentryinfo>
+    <title>org.freedesktop.oom1</title>
+    <productname>systemd</productname>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>org.freedesktop.oom1</refentrytitle>
+    <manvolnum>5</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>org.freedesktop.oom1</refname>
+    <refpurpose>The D-Bus interface of systemd-oomd</refpurpose>
+  </refnamediv>
+
+  <refsect1>
+    <title>Introduction</title>
+
+    <para>
+    <citerefentry><refentrytitle>systemd-oomd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+    is a system service which implements a userspace out-of-memory (OOM) killer. This page describes the
+    D-Bus interface.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>The Manager Object</title>
+
+    <para>The service exposes the following interfaces on the Manager object on the bus:</para>
+
+    <programlisting executable="systemd-oomd" node="/org/freedesktop/oom1" interface="org.freedesktop.oom1.Manager">
+node /org/freedesktop/oom1 {
+  interface org.freedesktop.oom1.Manager {
+    methods:
+      DumpByFileDescriptor(out h fd);
+  };
+  interface org.freedesktop.DBus.Peer { ... };
+  interface org.freedesktop.DBus.Introspectable { ... };
+  interface org.freedesktop.DBus.Properties { ... };
+};
+    </programlisting>
+
+    <!--method DumpByFileDescriptor is not documented!-->
+
+    <!--Autogenerated cross-references for systemd.directives, do not edit-->
+
+    <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.oom1.Manager"/>
+
+    <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.oom1.Manager"/>
+
+    <variablelist class="dbus-method" generated="True" extra-ref="DumpByFileDescriptor()"/>
+
+    <!--End of Autogenerated section-->
+
+    <refsect2>
+      <title>Methods</title>
+
+      <para>...</para>
+    </refsect2>
+  </refsect1>
+
+  <refsect1>
+    <title>Versioning</title>
+
+    <para>These D-Bus interfaces follow <ulink url="http://0pointer.de/blog/projects/versioning-dbus.html">
+    the usual interface versioning guidelines</ulink>.</para>
+  </refsect1>
+</refentry>
index 6a6d9de6b98cd6a2b0c43e7ce1875db92424ce87..41562360a012524cc95d9c24a0894d5d0d8ef117 100644 (file)
@@ -5,7 +5,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="org.freedesktop.resolve1" conditional='ENABLE_RESOLVE'
     xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -156,12 +156,6 @@ node /org/freedesktop/resolve1 {
 };
     </programlisting>
 
-    <!--method SetLinkDNSEx is not documented!-->
-
-    <!--method SetLinkDefaultRoute is not documented!-->
-
-    <!--method SetLinkDNSOverTLS is not documented!-->
-
     <!--method RegisterService is not documented!-->
 
     <!--method UnregisterService is not documented!-->
@@ -170,28 +164,8 @@ node /org/freedesktop/resolve1 {
 
     <!--method ResetServerFeatures is not documented!-->
 
-    <!--property LLMNR is not documented!-->
-
-    <!--property MulticastDNS is not documented!-->
-
-    <!--property DNSOverTLS is not documented!-->
-
-    <!--property DNSEx is not documented!-->
-
-    <!--property FallbackDNS is not documented!-->
-
-    <!--property FallbackDNSEx is not documented!-->
-
-    <!--property CurrentDNSServer is not documented!-->
-
-    <!--property CurrentDNSServerEx is not documented!-->
-
-    <!--property DNSSEC is not documented!-->
-
     <!--property DNSSECNegativeTrustAnchors is not documented!-->
 
-    <!--property DNSStubListener is not documented!-->
-
     <!--Autogenerated cross-references for systemd.directives, do not edit-->
 
     <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.resolve1.Manager"/>
@@ -281,26 +255,28 @@ node /org/freedesktop/resolve1 {
     <refsect2>
       <title>Methods</title>
 
-      <para><function>ResolveHostname()</function> takes a hostname and resolves it to one or more IP addresses.
-      As parameters it takes the Linux network interface index to execute the query on, or 0 if it may be
-      done on any suitable interface. The <varname>name</varname> parameter specifies the hostname to
-      resolve. Note that if required, IDNA conversion is applied to this name unless it is resolved via LLMNR or MulticastDNS. The <varname>family</varname> parameter
-      limits the results to a specific address family. It may be <constant>AF_INET</constant>,
-      <constant>AF_INET6</constant> or <constant>AF_UNSPEC</constant>. If <constant>AF_UNSPEC</constant> is specified (recommended), both kinds are retrieved, subject
-      to local network configuration (i.e. if no local, routable IPv6 address is found, no IPv6 address is
-      retrieved; and similarly for IPv4). A 64-bit <varname>flags</varname> field may be used to alter the
-      behaviour of the resolver operation (see below). The method returns an array of address records. Each
-      address record consists of the interface index the address belongs to, an address family as well as a
-      byte array with the actual IP address data (which either has 4 or 16 elements, depending on the address
-      family). The returned address family will be one of <constant>AF_INET</constant> or
-      <constant>AF_INET6</constant>. For IPv6, the returned address interface index should be used to
-      initialize the .sin6_scope_id field of a <structname>struct sockaddr_in6</structname> instance to permit
-      support for resolution to link-local IP addresses. The address array is followed by the canonical name
-      of the host, which may or may not be identical to the resolved hostname. Finally, a 64-bit
-      <varname>flags</varname> field is returned that is defined similarly to the <varname>flags</varname>
-      field that was passed in, but contains information about the resolved data (see below). If the hostname
-      passed in is an IPv4 or IPv6 address formatted as string, it is parsed, and the result is returned. In
-      this case, no network communication is done.</para>
+      <para><function>ResolveHostname()</function> takes a hostname and resolves it to one or more IP
+      addresses.  As parameters it takes the Linux network interface index to execute the query on, or 0 if
+      it may be done on any suitable interface. The <varname>name</varname> parameter specifies the hostname
+      to resolve. Note that if required, IDNA conversion is applied to this name unless it is resolved via
+      LLMNR or MulticastDNS. The <varname>family</varname> parameter limits the results to a specific address
+      family. It may be <constant>AF_INET</constant>, <constant>AF_INET6</constant> or
+      <constant>AF_UNSPEC</constant>. If <constant>AF_UNSPEC</constant> is specified (recommended), both
+      kinds are retrieved, subject to local network configuration (i.e. if no local, routable IPv6 address is
+      found, no IPv6 address is retrieved; and similarly for IPv4). A 64-bit <varname>flags</varname> field
+      may be used to alter the behaviour of the resolver operation (see below). The method returns an array
+      of address records. Each address record consists of the interface index the address belongs to, an
+      address family as well as a byte array with the actual IP address data (which either has 4 or 16
+      elements, depending on the address family). The returned address family will be one of
+      <constant>AF_INET</constant> or <constant>AF_INET6</constant>. For IPv6, the returned address interface
+      index should be used to initialize the .sin6_scope_id field of a
+      <structname>struct sockaddr_in6</structname> instance to permit support for resolution to link-local IP
+      addresses. The address array is followed by the canonical name of the host, which may or may not be
+      identical to the resolved hostname. Finally, a 64-bit <varname>flags</varname> field is returned that
+      is defined similarly to the <varname>flags</varname> field that was passed in, but contains information
+      about the resolved data (see below). If the hostname passed in is an IPv4 or IPv6 address formatted as
+      string, it is parsed, and the result is returned. In this case, no network communication is
+      done.</para>
 
       <para><function>ResolveAddress()</function> executes the reverse operation: it takes an IP address and
       acquires one or more hostnames for it. As parameters it takes the interface index to execute the query
@@ -387,15 +363,19 @@ node /org/freedesktop/resolve1 {
       <constant>AF_INET6</constant>), followed by a 4-byte or 16-byte array with the raw address data. This
       method is a one-step shortcut for retrieving the Link object for a network interface using
       <function>GetLink()</function> (see above) and then invoking the <function>SetDNS()</function> method
-      (see below) on it.
+      (see below) on it.</para>
+
+      <para><function>SetLinkDNSEx()</function> is similar to <function>SetLinkDNS()</function>, but allows
+      an IP port (instead of the default 53) and DNS name to be specified for each DNS server. The server
+      name is used for Server Name Indication (SNI), which is useful when DNS-over-TLS is
+      used. C.f. <varname>DNS=</varname> in
+      <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
       </para>
 
-      <para>Network management software integrating with <filename>systemd-resolved</filename> should
-      call this method (and the five below) after the interface appeared in the kernel (and thus after a
-      network interface index has been assigned), but before the network interfaces is activated
-      (<constant>IFF_UP</constant> set) so that all settings take effect during the full time the network
-      interface is up. It is safe to alter settings while the interface is up, however. Use
-      <function>RevertLink()</function> (described below) to reset all per-interface settings.</para>
+      <para><function>SetLinkDefaultRoute()</function> specifies whether the link shall be used as the
+      default route for name queries. See the description of name routing in
+      <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+      for details.</para>
 
       <para>The <function>SetLinkDomains()</function> method sets the search and routing domains to use on a
       specific network interface for DNS look-ups. It takes a network interface index and an array of domains,
@@ -432,8 +412,22 @@ node /org/freedesktop/resolve1 {
       Negative Trust Anchors (NTAs) for a specific network interface. It takes a network interface index and a
       list of domains as arguments.</para>
 
-      <para>The <function>RevertLink()</function> method may be used to revert all per-link settings done with
-      the six methods described above to the defaults again.</para>
+      <para>The <function>SetLinkDNSOverTLS()</function> method enables or disables DNS-over-TLS.
+      C.f. <varname>DNSOverTLS=</varname> in
+      <citerefentry><refentrytitle>systemd-resolved.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+      for details.</para>
+
+      <para>Network management software integrating with <filename>systemd-resolved</filename> should call
+      <function>SetLinkDNS()</function> or <function>SetLinkDNSEx()</function>,
+      <function>SetLinkDefaultRoute()</function>, <function>SetLinkDomains()</function> and others after the
+      interface appeared in the kernel (and thus after a network interface index has been assigned), but
+      before the network interfaces is activated (<constant>IFF_UP</constant> set) so that all settings take
+      effect during the full time the network interface is up. It is safe to alter settings while the
+      interface is up, however. Use <function>RevertLink()</function> (described below) to reset all
+      per-interface settings.</para>
+
+      <para>The <function>RevertLink()</function> method may be used to revert all per-link settings
+      described above to the defaults.</para>
 
       <refsect3>
         <title>The Flags Parameter</title>
@@ -458,11 +452,11 @@ node /org/freedesktop/resolve1 {
         classic unicast DNS, LLMNR via IPv4/UDP and IPv6/UDP respectively, as well as MulticastDNS via
         IPv4/UDP and IPv6/UDP. If all of these five bits are off on input (which is strongly recommended) the
         look-up will be done via all suitable protocols for the specific look-up. Note that these flags
-        operate as filter only, but cannot force a look-up to be done via a protocol. Specifically, <filename>systemd-resolved</filename>
-        will only route look-ups within the .local TLD to MulticastDNS (plus some reverse look-up address
-        domains), and single-label names to LLMNR (plus some reverse address lookup domains). It will route
-        neither of these to Unicast DNS servers. Also, it will do LLMNR and Multicast DNS only on interfaces
-        suitable for multicast.</para>
+        operate as filter only, but cannot force a look-up to be done via a protocol. Specifically,
+        <filename>systemd-resolved</filename> will only route look-ups within the .local TLD to MulticastDNS
+        (plus some reverse look-up address domains), and single-label names to LLMNR (plus some reverse
+        address lookup domains). It will route neither of these to Unicast DNS servers. Also, it will do
+        LLMNR and Multicast DNS only on interfaces suitable for multicast.</para>
 
         <para>On output, these five flags indicate which protocol was used to execute the operation, and hence
         where the data was found.</para>
@@ -498,34 +492,50 @@ node /org/freedesktop/resolve1 {
         the data is "rightfully" unauthenticated (which includes cases where the underlying protocol or server
         does not support authenticating data).</para>
       </refsect3>
-
-  </refsect2>
+    </refsect2>
 
     <refsect2>
       <title>Properties</title>
 
+      <para>The <varname>LLMNR</varname> and <varname>MulticastDNS</varname> properties report whether LLMNR
+      and MulticastDNS are (globally) enabled. Each may be one of <literal>yes</literal>,
+      <literal>no</literal>, and <literal>resolve</literal>. See <function>SetLinkLLMNR()</function>
+      and <function>SetLinkMulticastDNS()</function> above.</para>
+
       <para><varname>LLMNRHostname</varname> contains the hostname currently exposed on the network via
       LLMNR. It usually follows the system hostname as may be queried via
       <citerefentry project="man-pages"><refentrytitle>gethostname</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       but may differ if a conflict is detected on the network.</para>
 
-      <para><varname>DNS</varname> contains an array of all DNS servers currently used by
-      <filename>systemd-resolved</filename>. It contains similar information as the DNS server data written to
-      /run/systemd/resolve/resolv.conf. Each structure in the array consists of a numeric network interface
-      index, an address family, and a byte array containing the DNS server address (either 4 bytes in length
-      for IPv4 or 16 bytes in lengths for IPv6). The array contains DNS servers configured system-wide,
-      including those possibly read from a foreign <filename>/etc/resolv.conf</filename> or the
-      <varname>DNS=</varname> setting in <filename>/etc/systemd/resolved.conf</filename>, as well as
-      per-interface DNS server information either retrieved from
+      <para><varname>DNS</varname> and <varname>DNSEx</varname> contain arrays of all DNS servers currently
+      used by <filename>systemd-resolved</filename>. <varname>DNS</varname> contains information similar to
+      the DNS server data in <filename>/run/systemd/resolve/resolv.conf</filename>. Each structure in the
+      array consists of a numeric network interface index, an address family, and a byte array containing the
+      DNS server address (either 4 bytes in length for IPv4 or 16 bytes in lengths for IPv6).
+      <varname>DNSEx</varname> is similar, but additionally contains the IP port and server name (used for
+      Server Name Indication, SNI). Both arrays contain DNS servers configured system-wide, including those
+      possibly read from a foreign <filename>/etc/resolv.conf</filename> or the <varname>DNS=</varname>
+      setting in <filename>/etc/systemd/resolved.conf</filename>, as well as per-interface DNS server
+      information either retrieved from
       <citerefentry><refentrytitle>systemd-networkd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-      or configured by external software via <function>SetLinkDNS()</function> (see above). The network
-      interface index will be 0 for the system-wide configured services and non-zero for the per-link
-      servers.</para>
+      or configured by external software via <function>SetLinkDNS()</function> or
+      <function>SetLinkDNSEx()</function> (see above). The network interface index will be 0 for the
+      system-wide configured services and non-zero for the per-link servers.</para>
+
+      <para><varname>FallbackDNS</varname> and <varname>FallbackDNSEx</varname> contain arrays of all DNS
+      servers configured as fallback servers, if any, using the same format as <varname>DNS</varname> and
+      <varname>DNSEx</varname> described above. See the description of <varname>FallbackDNS=</varname> in
+      <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> for
+      the description of when those servers are used.</para>
 
-      <para>Similarly, the <varname>Domains</varname> property contains an array of all search and
-      routing domains currently used by <filename>systemd-resolved</filename>. Each entry consists of a network interface index (again, 0
-      encodes system-wide entries), the actual domain name, and whether the entry is used only for routing
-      (true) or for both routing and searching (false).</para>
+      <para><varname>CurrentDNSServer</varname> and <varname>CurrentDNSServerEx</varname> specify the server
+      that is currently used for query resolution, in the same format as a single entry in the
+      <varname>DNS</varname> and <varname>DNSEx</varname> arrays described above.</para>
+
+      <para>Similarly, the <varname>Domains</varname> property contains an array of all search and routing
+      domains currently used by <filename>systemd-resolved</filename>. Each entry consists of a network
+      interface index (again, 0 encodes system-wide entries), the actual domain name, and whether the entry
+      is used only for routing (true) or for both routing and searching (false).</para>
 
       <para>The <varname>TransactionStatistics</varname> property contains information about the number of
       transactions <filename>systemd-resolved</filename> has processed. It contains a pair of unsigned 64-bit counters, the first
@@ -540,7 +550,14 @@ node /org/freedesktop/resolve1 {
       operations so far. It exposes three 64-bit counters: the first being the total number of current cache
       entries (both positive and negative), the second the number of cache hits, and the third the number of
       cache misses. The latter counters may be reset using <function>ResetStatistics()</function> (see
-      above). </para>
+      above).</para>
+
+      <para>The <varname>DNSSEC</varname> property specifies current status of DNSSEC validation. It is one
+      of <literal>yes</literal> (validation is enforced), <literal>no</literal> (no validation is done),
+      <literal>allow-downgrade</literal> (validation is done if the current DNS server supports it). See the
+      description of <varname>DNSSEC=</varname> in
+      <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+      </para>
 
       <para>The <varname>DNSSECStatistics</varname> property contains information about the DNSSEC
       validations executed so far. It contains four 64-bit counters: the number of secure, insecure, bogus,
@@ -559,12 +576,20 @@ node /org/freedesktop/resolve1 {
       DNSSEC is supported by DNS servers until it verifies that this is not the case. Thus, the reported
       value may initially be true, until the first transactions are executed.</para>
 
+      <para>The <varname>DNSOverTLS</varname> boolean property reports whether DNS-over-TLS is enabled.
+      </para>
+
       <para>The <varname>ResolvConfMode</varname> property exposes how <filename>/etc/resolv.conf</filename>
       is managed on the host. Currently, the values <literal>uplink</literal>, <literal>stub</literal>,
       <literal>static</literal> (these three correspond to the three different files
       <filename>systemd-resolved.service</filename> provides), <literal>foreign</literal> (the file is
       managed by admin or another service, <filename>systemd-resolved.service</filename> just consumes it),
       <literal>missing</literal> (<filename>/etc/resolv.conf</filename> is missing).</para>
+
+      <para>The <varname>DNSStubListener</varname> property reports whether the stub listener on port 53 is
+      enabled. Possible values are <literal>yes</literal> (enabled), <literal>no</literal> (disabled),
+      <literal>udp</literal> (only the UDP listener is enabled), and <literal>tcp</literal> (only the TCP
+      listener is enabled).</para>
     </refsect2>
   </refsect1>
 
@@ -619,40 +644,6 @@ node /org/freedesktop/resolve1/link/_1 {
 };
     </programlisting>
 
-    <!--method SetDNSEx is not documented!-->
-
-    <!--method SetDomains is not documented!-->
-
-    <!--method SetDefaultRoute is not documented!-->
-
-    <!--method SetLLMNR is not documented!-->
-
-    <!--method SetMulticastDNS is not documented!-->
-
-    <!--method SetDNSOverTLS is not documented!-->
-
-    <!--method SetDNSSEC is not documented!-->
-
-    <!--method SetDNSSECNegativeTrustAnchors is not documented!-->
-
-    <!--method Revert is not documented!-->
-
-    <!--property DNSEx is not documented!-->
-
-    <!--property CurrentDNSServer is not documented!-->
-
-    <!--property CurrentDNSServerEx is not documented!-->
-
-    <!--property DefaultRoute is not documented!-->
-
-    <!--property LLMNR is not documented!-->
-
-    <!--property MulticastDNS is not documented!-->
-
-    <!--property DNSOverTLS is not documented!-->
-
-    <!--property DNSSEC is not documented!-->
-
     <!--property DNSSECNegativeTrustAnchors is not documented!-->
 
     <!--Autogenerated cross-references for systemd.directives, do not edit-->
@@ -721,8 +712,13 @@ node /org/freedesktop/resolve1/link/_1 {
       <function>SetLinkDNS()</function> on the Manager object, the main difference being that the later
       expects an interface index to be specified. Invoking the methods on the Manager interface has the
       benefit of reducing roundtrips, as it is not necessary to first request the Link object path via
-      <function>GetLink()</function> before invoking the methods. For further details on these methods see
-      the <interfacename>Manager</interfacename> documentation above.</para>
+      <function>GetLink()</function> before invoking the methods. The same relationship holds for
+      <function>SetDNSEx()</function>, <function>SetDomains()</function>,
+      <function>SetDefaultRoute()</function>, <function>SetLLMNR()</function>,
+      <function>SetMulticastDNS()</function>, <function>SetDNSOverTLS()</function>,
+      <function>SetDNSSEC()</function>, <function>SetDNSSECNegativeTrustAnchors()</function>, and
+      <function>Revert()</function>. For further details on these methods see the
+      <interfacename>Manager</interfacename> documentation above.</para>
     </refsect2>
 
     <refsect2>
@@ -744,8 +740,12 @@ node /org/freedesktop/resolve1/link/_1 {
       assumed available until it is detected that the configured server does not actually support it. Thus,
       this property may initially report that DNSSEC is supported on an interface.</para>
 
+      <para><varname>DefaultRoute</varname> exposes a boolean field that indicates whether the interface will
+      be used as default route for name queries. See <function>SetLinkDefaultRoute()</function> above.</para>
+
       <para>The other properties reflect the state of the various configuration settings for the link which
-      may be set with the various methods calls such as SetDNS() or SetLLMNR().</para>
+      may be set with the various methods calls such as <function>SetDNS()</function> or
+      <function>SetLLMNR()</function>.</para>
     </refsect2>
   </refsect1>
 
index 02f72932881d12f82b60d5a0b372e442e8ccb295..78fd0b3378d58c084c33836d82305cf8231e1c04 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" >
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="org.freedesktop.systemd1" xmlns:xi="http://www.w3.org/2001/XInclude">
   <refentryinfo>
@@ -2414,6 +2414,12 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
       readonly as IPEgressFilterPath = ['...', ...];
       @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
       readonly as DisableControllers = ['...', ...];
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
+      readonly s ManagedOOMSwap = '...';
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
+      readonly s ManagedOOMMemoryPressure = '...';
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
+      readonly s ManagedOOMMemoryPressureLimitPercent = '...';
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
       readonly as Environment = ['...', ...];
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
@@ -2928,6 +2934,12 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
 
     <!--property DisableControllers is not documented!-->
 
+    <!--property ManagedOOMSwap is not documented!-->
+
+    <!--property ManagedOOMMemoryPressure is not documented!-->
+
+    <!--property ManagedOOMMemoryPressureLimitPercent is not documented!-->
+
     <!--property EnvironmentFiles is not documented!-->
 
     <!--property PassEnvironment is not documented!-->
@@ -3478,6 +3490,12 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice {
 
     <variablelist class="dbus-property" generated="True" extra-ref="DisableControllers"/>
 
+    <variablelist class="dbus-property" generated="True" extra-ref="ManagedOOMSwap"/>
+
+    <variablelist class="dbus-property" generated="True" extra-ref="ManagedOOMMemoryPressure"/>
+
+    <variablelist class="dbus-property" generated="True" extra-ref="ManagedOOMMemoryPressureLimitPercent"/>
+
     <variablelist class="dbus-property" generated="True" extra-ref="Environment"/>
 
     <variablelist class="dbus-property" generated="True" extra-ref="EnvironmentFiles"/>
@@ -3950,6 +3968,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2esocket {
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
       readonly b PassPacketInfo = ...;
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
+      readonly s Timestamping = '...';
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
       readonly b RemoveOnStop = ...;
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
       readonly a(ss) Listen = [...];
@@ -4121,6 +4141,12 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2esocket {
       readonly as IPEgressFilterPath = ['...', ...];
       @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
       readonly as DisableControllers = ['...', ...];
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
+      readonly s ManagedOOMSwap = '...';
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
+      readonly s ManagedOOMMemoryPressure = '...';
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
+      readonly s ManagedOOMMemoryPressureLimitPercent = '...';
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
       readonly as Environment = ['...', ...];
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
@@ -4499,6 +4525,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2esocket {
 
     <!--property PassPacketInfo is not documented!-->
 
+    <!--property Timestamping is not documented!-->
+
     <!--property RemoveOnStop is not documented!-->
 
     <!--property Listen is not documented!-->
@@ -4661,6 +4689,12 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2esocket {
 
     <!--property DisableControllers is not documented!-->
 
+    <!--property ManagedOOMSwap is not documented!-->
+
+    <!--property ManagedOOMMemoryPressure is not documented!-->
+
+    <!--property ManagedOOMMemoryPressureLimitPercent is not documented!-->
+
     <!--property EnvironmentFiles is not documented!-->
 
     <!--property PassEnvironment is not documented!-->
@@ -5035,6 +5069,8 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2esocket {
 
     <variablelist class="dbus-property" generated="True" extra-ref="PassPacketInfo"/>
 
+    <variablelist class="dbus-property" generated="True" extra-ref="Timestamping"/>
+
     <variablelist class="dbus-property" generated="True" extra-ref="RemoveOnStop"/>
 
     <variablelist class="dbus-property" generated="True" extra-ref="Listen"/>
@@ -5211,6 +5247,12 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2esocket {
 
     <variablelist class="dbus-property" generated="True" extra-ref="DisableControllers"/>
 
+    <variablelist class="dbus-property" generated="True" extra-ref="ManagedOOMSwap"/>
+
+    <variablelist class="dbus-property" generated="True" extra-ref="ManagedOOMMemoryPressure"/>
+
+    <variablelist class="dbus-property" generated="True" extra-ref="ManagedOOMMemoryPressureLimitPercent"/>
+
     <variablelist class="dbus-property" generated="True" extra-ref="Environment"/>
 
     <variablelist class="dbus-property" generated="True" extra-ref="EnvironmentFiles"/>
@@ -5780,6 +5822,12 @@ node /org/freedesktop/systemd1/unit/home_2emount {
       readonly as IPEgressFilterPath = ['...', ...];
       @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
       readonly as DisableControllers = ['...', ...];
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
+      readonly s ManagedOOMSwap = '...';
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
+      readonly s ManagedOOMMemoryPressure = '...';
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
+      readonly s ManagedOOMMemoryPressureLimitPercent = '...';
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
       readonly as Environment = ['...', ...];
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
@@ -6250,6 +6298,12 @@ node /org/freedesktop/systemd1/unit/home_2emount {
 
     <!--property DisableControllers is not documented!-->
 
+    <!--property ManagedOOMSwap is not documented!-->
+
+    <!--property ManagedOOMMemoryPressure is not documented!-->
+
+    <!--property ManagedOOMMemoryPressureLimitPercent is not documented!-->
+
     <!--property EnvironmentFiles is not documented!-->
 
     <!--property PassEnvironment is not documented!-->
@@ -6720,6 +6774,12 @@ node /org/freedesktop/systemd1/unit/home_2emount {
 
     <variablelist class="dbus-property" generated="True" extra-ref="DisableControllers"/>
 
+    <variablelist class="dbus-property" generated="True" extra-ref="ManagedOOMSwap"/>
+
+    <variablelist class="dbus-property" generated="True" extra-ref="ManagedOOMMemoryPressure"/>
+
+    <variablelist class="dbus-property" generated="True" extra-ref="ManagedOOMMemoryPressureLimitPercent"/>
+
     <variablelist class="dbus-property" generated="True" extra-ref="Environment"/>
 
     <variablelist class="dbus-property" generated="True" extra-ref="EnvironmentFiles"/>
@@ -7151,6 +7211,8 @@ node /org/freedesktop/systemd1/unit/systemd_2dtmpfiles_2dclean_2etimer {
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
       readonly t RandomizedDelayUSec = ...;
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
+      readonly b FixedRandomDelay = ...;
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
       readonly b Persistent = ...;
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
       readonly b WakeSystem = ...;
@@ -7176,6 +7238,8 @@ node /org/freedesktop/systemd1/unit/systemd_2dtmpfiles_2dclean_2etimer {
 
     <!--property RandomizedDelayUSec is not documented!-->
 
+    <!--property FixedRandomDelay is not documented!-->
+
     <!--property Persistent is not documented!-->
 
     <!--property WakeSystem is not documented!-->
@@ -7216,6 +7280,8 @@ node /org/freedesktop/systemd1/unit/systemd_2dtmpfiles_2dclean_2etimer {
 
     <variablelist class="dbus-property" generated="True" extra-ref="RandomizedDelayUSec"/>
 
+    <variablelist class="dbus-property" generated="True" extra-ref="FixedRandomDelay"/>
+
     <variablelist class="dbus-property" generated="True" extra-ref="Persistent"/>
 
     <variablelist class="dbus-property" generated="True" extra-ref="WakeSystem"/>
@@ -7404,6 +7470,12 @@ node /org/freedesktop/systemd1/unit/dev_2dsda3_2eswap {
       readonly as IPEgressFilterPath = ['...', ...];
       @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
       readonly as DisableControllers = ['...', ...];
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
+      readonly s ManagedOOMSwap = '...';
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
+      readonly s ManagedOOMMemoryPressure = '...';
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
+      readonly s ManagedOOMMemoryPressureLimitPercent = '...';
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
       readonly as Environment = ['...', ...];
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
@@ -7860,6 +7932,12 @@ node /org/freedesktop/systemd1/unit/dev_2dsda3_2eswap {
 
     <!--property DisableControllers is not documented!-->
 
+    <!--property ManagedOOMSwap is not documented!-->
+
+    <!--property ManagedOOMMemoryPressure is not documented!-->
+
+    <!--property ManagedOOMMemoryPressureLimitPercent is not documented!-->
+
     <!--property EnvironmentFiles is not documented!-->
 
     <!--property PassEnvironment is not documented!-->
@@ -8316,6 +8394,12 @@ node /org/freedesktop/systemd1/unit/dev_2dsda3_2eswap {
 
     <variablelist class="dbus-property" generated="True" extra-ref="DisableControllers"/>
 
+    <variablelist class="dbus-property" generated="True" extra-ref="ManagedOOMSwap"/>
+
+    <variablelist class="dbus-property" generated="True" extra-ref="ManagedOOMMemoryPressure"/>
+
+    <variablelist class="dbus-property" generated="True" extra-ref="ManagedOOMMemoryPressureLimitPercent"/>
+
     <variablelist class="dbus-property" generated="True" extra-ref="Environment"/>
 
     <variablelist class="dbus-property" generated="True" extra-ref="EnvironmentFiles"/>
@@ -8859,6 +8943,12 @@ node /org/freedesktop/systemd1/unit/system_2eslice {
       readonly as IPEgressFilterPath = ['...', ...];
       @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
       readonly as DisableControllers = ['...', ...];
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
+      readonly s ManagedOOMSwap = '...';
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
+      readonly s ManagedOOMMemoryPressure = '...';
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
+      readonly s ManagedOOMMemoryPressureLimitPercent = '...';
   };
   interface org.freedesktop.DBus.Peer { ... };
   interface org.freedesktop.DBus.Introspectable { ... };
@@ -8989,6 +9079,12 @@ node /org/freedesktop/systemd1/unit/system_2eslice {
 
     <!--property DisableControllers is not documented!-->
 
+    <!--property ManagedOOMSwap is not documented!-->
+
+    <!--property ManagedOOMMemoryPressure is not documented!-->
+
+    <!--property ManagedOOMMemoryPressureLimitPercent is not documented!-->
+
     <!--Autogenerated cross-references for systemd.directives, do not edit-->
 
     <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.systemd1.Unit"/>
@@ -9123,6 +9219,12 @@ node /org/freedesktop/systemd1/unit/system_2eslice {
 
     <variablelist class="dbus-property" generated="True" extra-ref="DisableControllers"/>
 
+    <variablelist class="dbus-property" generated="True" extra-ref="ManagedOOMSwap"/>
+
+    <variablelist class="dbus-property" generated="True" extra-ref="ManagedOOMMemoryPressure"/>
+
+    <variablelist class="dbus-property" generated="True" extra-ref="ManagedOOMMemoryPressureLimitPercent"/>
+
     <!--End of Autogenerated section-->
 
     <refsect2>
@@ -9276,6 +9378,12 @@ node /org/freedesktop/systemd1/unit/session_2d1_2escope {
       readonly as IPEgressFilterPath = ['...', ...];
       @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
       readonly as DisableControllers = ['...', ...];
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
+      readonly s ManagedOOMSwap = '...';
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
+      readonly s ManagedOOMMemoryPressure = '...';
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
+      readonly s ManagedOOMMemoryPressureLimitPercent = '...';
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
       readonly s KillMode = '...';
       @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
@@ -9422,6 +9530,12 @@ node /org/freedesktop/systemd1/unit/session_2d1_2escope {
 
     <!--property DisableControllers is not documented!-->
 
+    <!--property ManagedOOMSwap is not documented!-->
+
+    <!--property ManagedOOMMemoryPressure is not documented!-->
+
+    <!--property ManagedOOMMemoryPressureLimitPercent is not documented!-->
+
     <!--property KillMode is not documented!-->
 
     <!--property KillSignal is not documented!-->
@@ -9582,6 +9696,12 @@ node /org/freedesktop/systemd1/unit/session_2d1_2escope {
 
     <variablelist class="dbus-property" generated="True" extra-ref="DisableControllers"/>
 
+    <variablelist class="dbus-property" generated="True" extra-ref="ManagedOOMSwap"/>
+
+    <variablelist class="dbus-property" generated="True" extra-ref="ManagedOOMMemoryPressure"/>
+
+    <variablelist class="dbus-property" generated="True" extra-ref="ManagedOOMMemoryPressureLimitPercent"/>
+
     <variablelist class="dbus-property" generated="True" extra-ref="KillMode"/>
 
     <variablelist class="dbus-property" generated="True" extra-ref="KillSignal"/>
index 325c3acfb1e078bc8634281c9a5864ccb4165048..52efa68935d1cd8315b46317346d1ebb7e06bc37 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" >
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="org.freedesktop.timedate1" conditional='ENABLE_TIMEDATED'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index cd5b5bf1589a0a1e75b5f8f06eaf9c5f972e7843..674180679b54f0d234377a8e486735b84f8e876c 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="os-release">
   <refentryinfo>
index 609743be6b2f24b34725c76daa11d3bf146d9d16..21a2581b2466d621e45f536e69a5e197293a6af3 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="pam_systemd" conditional='HAVE_PAM'>
 
     <title>Session limits</title>
 
     <para>PAM modules earlier in the stack, that is those that come before <command>pam_systemd.so</command>,
-    can set session scope limits using the PAM context objects. The data for these objects is provided as NUL-terminated C strings
+    can set session scope limits using the PAM context objects. The data for these objects is provided as <constant>NUL</constant>-terminated C strings
     and maps directly to the respective unit resource control directives. Note that these limits apply to individual sessions of the user,
     they do not apply to all user processes as a combined whole. In particular, the per-user <command>user@.service</command> unit instance,
     which runs the <command>systemd --user</command> manager process and its children, and is tracked outside of any session, being shared
index ab02f98337202e60dbc21d42e27de819796e3c9b..93e84358058830e06f3abc6f31914dfcb0783ad7 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="pam_systemd_home" conditional='ENABLE_PAM_HOME'>
 
index d24c010e2ce49564ee7457bf17446cf7fc2f2074..3653207d727ec6fc5c18a79e8a6d368e3ad3653c 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="portablectl" conditional='ENABLE_PORTABLED'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 501171e78a887f245756cfce1206ef43c6a02816..ef3226c5a6fd36b04192bca0dc8877c9f27c8159 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="pstore.conf" conditional="ENABLE_PSTORE"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 5cc978b873fef7dd261718e445839a4e7074315f..6e31843a08321569c01eb05e7c918b10642ccbab 100644 (file)
                 <entry>Verity data for the ia64 root file system partition</entry>
               </row>
 
+              <row>
+                <entry><constant>root-riscv32</constant></entry>
+                <entry>Root file system partition for the RISC-V 32-bit architecture</entry>
+              </row>
+
+              <row>
+                <entry><constant>root-riscv32-verity</constant></entry>
+                <entry>Verity data for the RISC-V 32-bit root file system partition</entry>
+              </row>
+
+              <row>
+                <entry><constant>root-riscv64</constant></entry>
+                <entry>Root file system partition for the RISC-V 64-bit architecture</entry>
+              </row>
+
+              <row>
+                <entry><constant>root-riscv64-verity</constant></entry>
+                <entry>Verity data for the RISC-V 64-bit root file system partition</entry>
+              </row>
+
               <row>
                 <entry><constant>usr</constant></entry>
                 <entry><filename>/usr/</filename> file system partition type appropriate for the local architecture (an alias for an architecture <filename>/usr/</filename> file system partition type listed below, e.g. <constant>usr-x86-64</constant>)</entry>
                 <entry><constant>usr-ia64-verity</constant></entry>
                 <entry>Verity data for the ia64 <filename>/usr/</filename> file system partition</entry>
               </row>
+
+              <row>
+                <entry><constant>usr-riscv32</constant></entry>
+                <entry><filename>/usr/</filename> file system partition for the RISC-V 32-bit architecture</entry>
+              </row>
+
+              <row>
+                <entry><constant>usr-riscv32-verity</constant></entry>
+                <entry>Verity data for the RISC-V 32-bit <filename>/usr/</filename> file system partition</entry>
+              </row>
+
+              <row>
+                <entry><constant>usr-riscv64</constant></entry>
+                <entry><filename>/usr/</filename> file system partition for the RISC-V 64-bit architecture</entry>
+              </row>
+
+              <row>
+                <entry><constant>usr-riscv64-verity</constant></entry>
+                <entry>Verity data for the RISC-V 64-bit <filename>/usr/</filename> file system partition</entry>
+              </row>
+
+
             </tbody>
           </tgroup>
         </table>
index a4bd8f52d774d40bc487aaf6b57b6c9c1547cdf8..fb6cae7b9b6a6bd447c3afdfe02381ddbacaf6d3 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="resolvectl" conditional='ENABLE_RESOLVE'
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 2cefc4094905bf274e18092314d20f0fd4414cf8..3fdf5de58b0f543526467e7e247e2af48dcfff4b 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="resolved.conf" conditional='ENABLE_RESOLVE'
     xmlns:xi="http://www.w3.org/2001/XInclude">
         domains (TLDs) that are not known by the DNS root server. This
         logic does not work in all private zone setups.</para>
 
-        <para>Defaults to <literal>allow-downgrade</literal></para>
+        <para>Defaults to <literal>allow-downgrade</literal>.</para>
         </listitem>
       </varlistentry>
 
         resolver is not capable of authenticating the server, so it is
         vulnerable to "man-in-the-middle" attacks.</para>
 
-        <para>In addition to this global DNSOverTLS setting
+        <para>In addition to this global <varname>DNSOverTLS=</varname> setting
         <citerefentry><refentrytitle>systemd-networkd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
-        also maintains per-link DNSOverTLS settings. For system DNS
-        servers (see above), only the global DNSOverTLS setting is in
-        effect. For per-link DNS servers the per-link
-        setting is in effect, unless it is unset in which case the
-        global setting is used instead.</para>
+        also maintains per-link <varname>DNSOverTLS=</varname> settings. For system DNS servers (see above), only the global
+        <varname>DNSOverTLS=</varname> setting is in effect. For per-link DNS servers the per-link setting is in effect, unless
+        it is unset in which case the global setting is used instead.</para>
 
         <para>Defaults to off.</para>
         </listitem>
         request. Be aware that turning off caching comes at a performance penalty, which is particularly high
         when DNSSEC is used. If <literal>no-negative</literal>, only positive answers are cached.</para>
 
-        <para>Note that caching is turned off implicitly if the configured DNS server is on a host-local IP address
-        (such as 127.0.0.1 or ::1), in order to avoid duplicate local caching.</para></listitem>
+        <para>Note that caching is turned off by default for host-local DNS servers.
+        See <varname>CacheFromLocalhost=</varname> for details.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><varname>CacheFromLocalhost=</varname></term>
+        <listitem><para>Takes a boolean as argument. If <literal>no</literal> (the default), and response cames from
+        host-local IP address (such as 127.0.0.1 or ::1), the result wouldn't be cached in order to avoid
+        potential duplicate local caching.</para>
+        </listitem>
       </varlistentry>
 
       <varlistentry>
index 00cd57420e806afe29dccb2b0715508d193f6667..97136fe75857b0bde8223c42058787a53128990b 100644 (file)
@@ -45,6 +45,8 @@ manpages = [
  ['nss-mymachines', '8', ['libnss_mymachines.so.2'], 'ENABLE_NSS_MYMACHINES'],
  ['nss-resolve', '8', ['libnss_resolve.so.2'], 'ENABLE_NSS_RESOLVE'],
  ['nss-systemd', '8', ['libnss_systemd.so.2'], 'ENABLE_NSS_SYSTEMD'],
+ ['oomctl', '1', [], 'ENABLE_OOMD'],
+ ['oomd.conf', '5', ['oomd.conf.d'], 'ENABLE_OOMD'],
  ['org.freedesktop.LogControl1', '5', [], ''],
  ['org.freedesktop.home1', '5', [], 'ENABLE_HOMED'],
  ['org.freedesktop.hostname1', '5', [], 'ENABLE_HOSTNAMED'],
@@ -52,6 +54,7 @@ manpages = [
  ['org.freedesktop.locale1', '5', [], 'ENABLE_LOCALED'],
  ['org.freedesktop.login1', '5', [], 'ENABLE_LOGIND'],
  ['org.freedesktop.machine1', '5', [], 'ENABLE_MACHINED'],
+ ['org.freedesktop.oom1', '5', [], 'ENABLE_OOMD'],
  ['org.freedesktop.resolve1', '5', [], 'ENABLE_RESOLVE'],
  ['org.freedesktop.systemd1', '5', [], ''],
  ['org.freedesktop.timedate1', '5', [], 'ENABLE_TIMEDATED'],
@@ -526,11 +529,13 @@ manpages = [
   ''],
  ['sd_event_add_time',
   '3',
-  ['sd_event_source_get_time',
+  ['sd_event_add_time_relative',
+   'sd_event_source_get_time',
    'sd_event_source_get_time_accuracy',
    'sd_event_source_get_time_clock',
    'sd_event_source_set_time',
    'sd_event_source_set_time_accuracy',
+   'sd_event_source_set_time_relative',
    'sd_event_time_handler_t'],
   ''],
  ['sd_event_exit', '3', ['sd_event_get_exit_code'], ''],
@@ -577,6 +582,10 @@ manpages = [
    'SD_EVENT_PRIORITY_NORMAL',
    'sd_event_source_get_priority'],
   ''],
+ ['sd_event_source_set_ratelimit',
+  '3',
+  ['sd_event_source_get_ratelimit', 'sd_event_source_is_ratelimited'],
+  ''],
  ['sd_event_source_set_userdata', '3', ['sd_event_source_get_userdata'], ''],
  ['sd_event_source_unref',
   '3',
@@ -907,6 +916,7 @@ manpages = [
  ['systemd-networkd.service', '8', ['systemd-networkd'], 'ENABLE_NETWORKD'],
  ['systemd-notify', '1', [], ''],
  ['systemd-nspawn', '1', [], ''],
+ ['systemd-oomd.service', '8', ['systemd-oomd'], 'ENABLE_OOMD'],
  ['systemd-path', '1', [], ''],
  ['systemd-portabled.service', '8', ['systemd-portabled'], 'ENABLE_PORTABLED'],
  ['systemd-pstore.service', '8', ['systemd-pstore'], 'ENABLE_PSTORE'],
index 75a572cb00ec831e0fd9ad01add75de36cad1e28..f5e1e00da444e156bd9cc7ef4359902d0c51fcc8 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="runlevel" conditional='HAVE_SYSV_COMPAT'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index e5590c81c74cd1fbbd4eeed843c48f6487810a88..a69efe03f01f1bcdafa18058be391400cfb6965f 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd-bus-errors"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 199a4a81e998c36f547c86739d479e05288c50f1..05fce44acf0d76d66c735c141c91a5dc0ebb2e75 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd-bus" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index a01ec5878690ca5a30d18028c022c7c41fe1816d..5dee3e893c834e97b89645c2879ae3e1ff8eaaa1 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd-daemon"
   xmlns:xi="http://www.w3.org/2001/XInclude">
index afdafff5dad1990ac72cac7e2875dae69f2e4f4f..1bcf4e32a5b2d653280f0b3180619cfa96fd531e 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd-event" xmlns:xi="http://www.w3.org/2001/XInclude">
 
@@ -56,6 +56,7 @@
     <citerefentry><refentrytitle>sd_event_source_get_pending</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
     <citerefentry><refentrytitle>sd_event_source_set_description</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
     <citerefentry><refentrytitle>sd_event_source_set_prepare</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+    <citerefentry><refentrytitle>sd_event_source_set_ratelimit</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
     <citerefentry><refentrytitle>sd_event_wait</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
     <citerefentry><refentrytitle>sd_event_get_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
     <citerefentry><refentrytitle>sd_event_set_watchdog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_source_get_pending</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_source_set_description</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_source_set_prepare</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_source_set_ratelimit</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_wait</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_get_fd</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_set_watchdog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
index 13552e584603e1d8af6390b0a36d73a434d089b3..254c218ac636bfc01a86fa16d893fc5de6bbc7d1 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd-hwdb" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 22d5e0e3ed718fb2ba2ef23c67cc179a57aaf3cd..40a3cc59aea13a222450d7ea3fd2c0d664de998f 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd-id128"
   xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -85,8 +85,8 @@
 
     <programlisting>#define SD_MESSAGE_COREDUMP SD_ID128_MAKE(fc,2e,22,bc,6e,e6,47,b6,b9,07,29,ab,34,a2,50,b1)</programlisting>
 
-    <para><function>SD_ID128_NULL</function> may be used to refer to the 128bit ID consisting of only NUL
-    bytes.</para>
+    <para><constant>SD_ID128_NULL</constant> may be used to refer to the 128bit ID consisting of only
+    <constant>NUL</constant> bytes.</para>
 
     <para><function>SD_ID128_MAKE_STR()</function> is similar to <function>SD_ID128_MAKE()</function>, but creates a
     <type>const char*</type> expression that can be conveniently used in message formats and such:</para>
@@ -107,9 +107,8 @@ int main(int argc, char **argv) {
         puts("Match for coredumps: %s", SD_ID128_CONST_STR(SD_MESSAGE_COREDUMP));
 }</programlisting>
 
-    <para><function>SD_ID128_FORMAT_STR()</function> and
-    <function>SD_ID128_FORMAT_VAL()</function> may be used to format a
-    128-bit ID in a
+    <para><constant>SD_ID128_FORMAT_STR</constant> and <function>SD_ID128_FORMAT_VAL()</function> may
+    be used to format a 128-bit ID in a
     <citerefentry project='man-pages'><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>
     format string, as shown in the following example:</para>
 
@@ -120,8 +119,8 @@ int main(int argc, char **argv) {
         return 0;
 }</programlisting>
 
-    <para><function>SD_ID128_UUID_FORMAT_STR()</function> is similar to
-    <function>SD_ID128_FORMAT_STR()</function> but includes separating hyphens to conform to the
+    <para><constant>SD_ID128_UUID_FORMAT_STR</constant> is similar to
+    <constant>SD_ID128_FORMAT_STR</constant> but includes separating hyphens to conform to the
     "<ulink url="https://en.wikipedia.org/wiki/Universally_unique_identifier#Format">canonical representation</ulink>".
     </para>
 
@@ -137,7 +136,8 @@ int main(int argc, char **argv) {
         return 0;
 }</programlisting>
 
-    <para>Use <function>sd_id128_is_null()</function> to check if an 128bit ID consists of only NUL bytes:</para>
+    <para>Use <function>sd_id128_is_null()</function> to check if an 128bit ID consists of only
+    <constant>NUL</constant> bytes:</para>
 
     <programlisting>int main(int argc, char *argv[]) {
         assert(sd_id128_is_null(SD_ID128_NULL));
index a3ee1ea9e1e7b283a0e01958d68cd0c14b0bed87..4609868c11354a96fac55d0e2a610bb076a24c5b 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd-journal"
   xmlns:xi="http://www.w3.org/2001/XInclude">
index 8c6c973a4d36682b4166d2916be64fb05e73b6dd..0127b691f55311d1e53a719ee2871e036011db89 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd-login" conditional='HAVE_PAM'
   xmlns:xi="http://www.w3.org/2001/XInclude">
 
     <para>
       <ulink url="https://www.freedesktop.org/wiki/Software/systemd/multiseat">Multi-Seat on Linux</ulink>
-      for an introduction to multi-seat support on Linux and the background for this set of APIs.
+      may also be of historical interest.
     </para>
   </refsect1>
-
 </refentry>
index 6a6a6206334d412cd364e1115f7c206221aaaf21..d9b3ddc83eafcf206f2fbbac97c3b326ad1c6b25 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_booted"
   xmlns:xi="http://www.w3.org/2001/XInclude">
index 071060dde6987d98e3fb459858b61065c35c12f5..1ce1c1367482cc635d0bad57decc3e6198abca0f 100644 (file)
@@ -3,7 +3,7 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   Copyright © 2016 Julian Orth
 -->
index fd11e46fcb930eeb391ed1110683166c34578f04..da3989ef94b367429bbb0c82fdc56ef1f1f83d12 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_add_node_enumerator"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index bce71bd11a121d0954dc9b5dd1a8cb8838cad256..00e4110739df3b44301a9a9da2ec3fe1a3286b0b 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_add_object"
           xmlns:xi="http://www.w3.org/2001/XInclude">
     attached to the request object path, interface and member. Finally, the property callbacks
     attached to the request object path, interface and member are called. If the final callback
     returns zero, an error reply is sent back to the caller indicating no matching object for the
-    request was found. Note that you can return a positive integer from a callback without
+    request was found.</para>
+
+    <para>Note that you can return a positive integer from a callback without
     immediately sending a reply. This informs sd-bus this callback will take responsibility for
     replying to the request without forcing the callback to produce a reply immediately. This allows
-    a callback to perform any number of asynchronous operations required to construct a reply. Note
-    that if producing a reply takes too long, the method call will time out at the caller.</para>
+    a callback to perform any number of asynchronous operations required to construct a reply.
+    However, if producing a reply takes too long, the method call will time out at the caller.</para>
 
     <para>If a callback was invoked to handle a request that expects a reply and the callback
     returns a negative value, the value is interpreted as a negative errno-style error code and sent
           with the message the callback was invoked with. Parameter <replaceable>flags</replaceable> is a
           combination of flags, see below.</para>
 
-          <constant>SD_BUS_METHOD_WITH_ARGS()</constant> is a shorthand for calling
-          <constant>SD_BUS_METHOD_WITH_ARGS_OFFSET()</constant> with an offset of zero.
+          <para><constant>SD_BUS_METHOD_WITH_ARGS()</constant> is a shorthand for calling
+          <constant>SD_BUS_METHOD_WITH_ARGS_OFFSET()</constant> with an offset of zero.</para>
           </listitem>
         </varlistentry>
 
         <varlistentry>
           <term><constant>SD_BUS_SIGNAL_WITH_ARGS()</constant></term>
 
-          <listitem><para>>Declare a D-Bus signal with the name <replaceable>member</replaceable> and
+          <listitem><para>Declare a D-Bus signal with the name <replaceable>member</replaceable> and
           arguments <replaceable>args</replaceable>. <replaceable>args</replaceable> expects a sequence of
           argument type/name pairs wrapped in the <constant>SD_BUS_ARGS()</constant> macro. The elements at
           even indices in this list describe the types of the signal's arguments. The signal's parameter
         <varlistentry>
           <term><constant>-EPROTOTYPE</constant></term>
 
-          <listitem><para><function>sd_bus_add_object_vtable</function> and
-          <function>sd_bus_add_fallback_vtable</function> have been both called for the same bus
+          <listitem><para><function>sd_bus_add_object_vtable()</function> and
+          <function>sd_bus_add_fallback_vtable()</function> have been both called for the same bus
           object path, which is not allowed.</para></listitem>
         </varlistentry>
 
index cc442d161cdb611802d60344eb276a7fbfc24622..df2704ac99116040010d199990cea252486e5ed4 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_add_object_manager"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 2a207d28487b2ec0134da56a37a9cc4ec926aa78..bb34d4a7b920a630c63cc0a7a3f22b8010a17dc9 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_attach_event"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index f47f9c8526e57032e52594801860f6219c5c6896..1f7dfc2e827828a3b58d0888a7c29346bce0a960 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_call"
           xmlns:xi="http://www.w3.org/2001/XInclude">
     input parameter; it can be used to propagate errors from the callback handler, it will not receive any
     error that was received as method reply.)</para>
 
+    <para>The message <parameter>m</parameter> passed to the callback is only borrowed, that is, the callback should
+    not call <citerefentry><refentrytitle>sd_bus_message_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    on it. If the callback wants to hold on to the message beyond the lifetime of the callback, it needs to call
+    <citerefentry><refentrytitle>sd_bus_message_ref</refentrytitle><manvolnum>3</manvolnum></citerefentry> to create a
+    new reference.</para>
+
     <para>If <parameter>usec</parameter> is zero, the default D-Bus method call timeout is used. See
     <citerefentry><refentrytitle>sd_bus_get_method_call_timeout</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
     </para>
     <refsect2 id='errors'>
       <title>Errors</title>
 
+      <para>When <function>sd_bus_call()</function> internally receives a D-Bus error reply, it will set
+      <parameter>ret_error</parameter> if it is not <constant>NULL</constant>, and will return a negative
+      value mapped from the error reply, see
+      <citerefentry><refentrytitle>sd_bus_error_get_errno</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
+      </para>
+
       <para>Returned errors may indicate the following problems:</para>
 
       <variablelist>
       <citerefentry><refentrytitle>sd_bus_call_method</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_call_method_async</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_bus_message_new_method_call</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+      <citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_bus_error</refentrytitle><manvolnum>3</manvolnum></citerefentry>
     </para>
   </refsect1>
 
index ac9cf143ad18ae92271ae1e38c6a7ef41a275c61..762ea11c01067531c11e309005de21edaa930b6d 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_call_method"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index ba2a180ee2d0f6c51facc091bd145a6f884fc56d..632d9bc4ee9c508167aaafd2d83a04a185a8ab5b 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_can_send"
           xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -37,7 +37,7 @@
   <refsect1>
     <title>Description</title>
 
-    <para><function>sd_bus_can_send</function> is mostly used for checking if file descriptor
+    <para><function>sd_bus_can_send()</function> is mostly used for checking if file descriptor
     passing is available on the given bus. <parameter>type</parameter> can be any of the
     <constant>SD_BUS_TYPE</constant> constants.</para>
   </refsect1>
index 42db1074700de4ea82b1f6d4a495ffb6549e6dd7..95427bd7f94a8f1eba5955ac5e844ad7275445c3 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_close"
           xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -72,7 +72,7 @@
     is provided that combines them into one.</para>
 
     <para><function>sd_bus_default_flush_close()</function> is similar to
-    <function>sd_bus_flush_close_unref</function>, but does not take a bus pointer argument and
+    <function>sd_bus_flush_close_unref()</function>, but does not take a bus pointer argument and
     instead iterates over any of the "default" buses opened by
     <citerefentry><refentrytitle>sd_bus_default</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
     <citerefentry><refentrytitle>sd_bus_default_user</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
index a3e8079c5187a930675a1ff3722c3bcb4aeed770..8f5b94e53114099d280c16a88462c9816d413604 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_creds_get_pid" xmlns:xi="http://www.w3.org/2001/XInclude">
 
 
     <para>All functions that take a <parameter>const
     char**</parameter> parameter will store the answer there as an
-    address of a NUL-terminated string. It will be valid as long as
+    address of a <constant>NUL</constant>-terminated string. It will be valid as long as
     <parameter>c</parameter> remains valid, and should not be freed or
     modified by the caller.</para>
 
     <para>All functions that take a <parameter>char***</parameter>
     parameter will store the answer there as an address of an array
-    of strings. Each individual string is NUL-terminated, and the
-    array is NULL-terminated as a whole. It will be valid as long as
+    of strings. Each individual string is <constant>NUL</constant>-terminated, and the
+    array is <constant>NULL</constant>-terminated as a whole. It will be valid as long as
     <parameter>c</parameter> remains valid, and should not be freed or
     modified by the caller.</para>
   </refsect1>
index d1a168a23b7d368d291f9ffce5e28ef2dbc8e6d5..ea3acc447e9a5851f6d97df5af455478d8d12b0b 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_creds_new_from_pid" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 06ce1386ac79b380490a7b9ede40dafe025ba4a9..4ae26414ebd356d9f451cb5f7000f3d691cafd20 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_default" xmlns:xi="http://www.w3.org/2001/XInclude">
 
       <para>Returned errors may indicate the following problems:</para>
 
       <variablelist>
-
         <varlistentry>
           <term><constant>-EINVAL</constant></term>
 
           <listitem><para>The specified parameters are invalid.</para></listitem>
         </varlistentry>
 
+        <varlistentry>
+          <term><constant>-ENOMEDIUM</constant></term>
+
+          <listitem><para>The requested bus type is not available because of invalid environment (for example
+          the user session bus is not available because <varname>$XDG_RUNTIME_DIR</varname> is not set).
+          </para></listitem>
+        </varlistentry>
+
         <varlistentry>
           <term><constant>-ENOMEM</constant></term>
 
index 26ec7d1d708f2403e6baba799dd290f289770497..08d5be400ed27f93651bde28e221f78e0e750955 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_emit_signal"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index f948b5914f54bcb42a3377b34be07729dfec633a..82b91cbe3c72f9feab12b1de5713b838120751dc 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_enqueue_for_read"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 3ce375bb2bee1fd012079cffd821d23faaf4860c..af2238e74d7ef0cdcd89ce1af258815a08c44856 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_error" xmlns:xi="http://www.w3.org/2001/XInclude">
 
     but additional domain-specific errors may be defined by
     applications. The <structfield>message</structfield> field usually
     contains a human-readable string describing the details, but might
-    be NULL. An unset <structname>sd_bus_error</structname> structure
-    should have both fields initialized to NULL. Set an error
+    be <constant>NULL</constant>. An unset <structname>sd_bus_error</structname> structure
+    should have both fields initialized to <constant>NULL</constant>. Set an error
     structure to <constant>SD_BUS_ERROR_NULL</constant> in order to
-    reset both fields to NULL. When no longer necessary, resources
+    reset both fields to <constant>NULL</constant>. When no longer necessary, resources
     held by the <structname>sd_bus_error</structname> structure should
     be destroyed with <function>sd_bus_error_free()</function>.</para>
 
     for a list of well-known error names. Additional error mappings
     may be defined with
     <citerefentry><refentrytitle>sd_bus_error_add_map</refentrytitle><manvolnum>3</manvolnum></citerefentry>. If
-    <parameter>e</parameter> is NULL, no error structure is initialized,
+    <parameter>e</parameter> is <constant>NULL</constant>, no error structure is initialized,
     but the error is still converted into an
     <varname>errno</varname>-style error. If
     <parameter>name</parameter> is <constant>NULL</constant>, it is
     assumed that no error occurred, and 0 is returned. This means that
     this function may be conveniently used in a
     <function>return</function> statement. If
-    <parameter>message</parameter> is NULL, no message is set. This
+    <parameter>message</parameter> is <constant>NULL</constant>, no message is set. This
     call can fail if no memory may be allocated for the name and
     message strings, in which case an
     <constant>SD_BUS_ERROR_NO_MEMORY</constant> error might be set
     will not be deallocated, and must be <citerefentry
     project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>d
     by the caller if necessary. The function may also be called safely
-    on unset errors (error structures with both fields set to NULL),
+    on unset errors (error structures with both fields set to <constant>NULL</constant>),
     in which case it performs no operation. This call will reset the
     error structure after freeing the data, so that all fields are set
-    to NULL. The structure may be reused afterwards.</para>
+    to <constant>NULL</constant>. The structure may be reused afterwards.</para>
   </refsect1>
 
   <refsect1>
index 1dfc7259e2368f277dc77685e486fd153e4ce56e..f62b43fd7d78d7210f7f6c407363dfbf0332f56f 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_error_add_map"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 0a1843a849c7c4da21ae0c7ad767f6cdc0d2d7ef..c3756b83e0791ed1b8fbc9ed070c28755cc89141 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_get_current_handler" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 466606118bd465e53875d7fac7df8c47cee1f761..689bba6f38d6fd8fb01f6d58aa6120a511f14d61 100644 (file)
@@ -3,7 +3,7 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   Copyright © 2016 Julian Orth
 -->
index f949c936c21403432eadc29c361921ce666cbf10..c9978d8ba760709792ca34641c02f53b78a19b03 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_get_n_queued_read">
 
index 37313365738fbe5317700ffb9a0a4965a4291e5b..6f0541d97ad61d5937b324c25fb1a7b863478a6a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_get_name_creds" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 8f3ce6436dce2ecb998bef379cf495253a6e1230..8249485f254efe8d7949bb9212e2a4d81de0ae5a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_get_name_machine_id" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index a72024e5a7eb8f4812bb8beaf06aa4a8d3a71e73..81a3fad0e234aea8fa03a4ec141eef730d0bdd89 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_interface_name_is_valid" xmlns:xi="http://www.w3.org/2001/XInclude">
   <refentryinfo>
@@ -65,7 +65,7 @@
     <title>Return Value</title>
 
     <para>Those functions return 1 if the argument is a valid interface / service / member name or object
-    path, and 0 if it is not. If the argument is NULL, an error is returned.</para>
+    path, and 0 if it is not. If the argument is <constant>NULL</constant>, an error is returned.</para>
 
     <refsect2>
       <title>Errors</title>
index 4a21189c1d2a5f4cd6fb8f2645b485ef3e16aa84..8e0aed29b3319c6768a1d99f703507215cb6eecd 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_is_open"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index ad7ecd00e3d373358c3ec6fd44e291280002570b..d8f7e60b7dc220be7bfac13c4f76a004eff3f5f1 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_list_names"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 7f9235954f47aba033efdc637019d69dbd06bef4..a1c87366de031d73e3191a5723fd7711f8b5c72c 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_append"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index d81ddc558f0ddff107a21b0260e6235969b4650a..cc8e0db5254bfd5f923e1dc8f2fbb29dd332ae8a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_append_array"
           xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -57,6 +57,7 @@
 
       <funcprototype>
         <funcdef>int sd_bus_message_append_array_space</funcdef>
+        <paramdef>sd_bus_message *<parameter>m</parameter></paramdef>
         <paramdef>char <parameter>type</parameter></paramdef>
         <paramdef>size_t <parameter>size</parameter></paramdef>
         <paramdef>void **<parameter>ptr</parameter></paramdef>
index a180046b963e1f512e8fa686518c7418d297650a..aca4d1fe7a885f5c2c29101a83c889339cefcb82 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_append_basic" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index c59b8a4284271a0fdf4e472554c680ac4bc20738..8559c60ba87c6d4fa14bad524d00c743d130ce65 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_append_string_memfd"
           xmlns:xi="http://www.w3.org/2001/XInclude">
     <title>Description</title>
 
     <para>The functions
-    <function>sd_bus_message_append_string_memfd</function> and
-    <function>sd_bus_message_append_string_iovec</function> can be
+    <function>sd_bus_message_append_string_memfd()</function> and
+    <function>sd_bus_message_append_string_iovec()</function> can be
     used to append a single string (item of type <literal>s</literal>)
     to message <parameter>m</parameter>.</para>
 
     <para>In case of
-    <function>sd_bus_message_append_string_memfd</function>, the
+    <function>sd_bus_message_append_string_memfd()</function>, the
     contents of <parameter>memfd</parameter> are the string. They must
     satisfy the same constraints as described for the
     <literal>s</literal> type in
     <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
 
     <para>In case of
-    <function>sd_bus_message_append_string_iovec</function>, the
+    <function>sd_bus_message_append_string_iovec()</function>, the
     payload of <parameter>iov</parameter> is the string. It must
     satisfy the same constraints as described for the
     <literal>s</literal> type in
@@ -84,9 +84,9 @@
     after this call.</para>
 
     <para>The
-    <function>sd_bus_message_append_string_space</function> function appends
+    <function>sd_bus_message_append_string_space()</function> function appends
     space for a string to message <parameter>m</parameter>. It behaves
-    similar to <function>sd_bus_message_append_basic</function> with
+    similar to <function>sd_bus_message_append_basic()</function> with
     type <literal>s</literal>, but instead of copying a string into
     the message, it returns a pointer to the destination area to
     the caller in pointer <parameter>p</parameter>. Space for the string
index 2ce321633d51971c5af12ebd24411c03cd312d02..67ba404137f693236f62e59b3fcaca0fe0d68161 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_append_strv"
           xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -37,7 +37,7 @@
   <refsect1>
     <title>Description</title>
 
-    <para>The <function>sd_bus_message_append</function> function can be
+    <para>The <function>sd_bus_message_append()</function> function can be
     used to append an array of strings to message
     <parameter>m</parameter>. The parameter <parameter>l</parameter>
     shall point to a <constant>NULL</constant>-terminated array of pointers
index ce21c7e748acbb6a1f1a336c22bf5b2be0435663..9cff48a2bae9e8118f085259f3c39b7c173ac08f 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_at_end" xmlns:xi="http://www.w3.org/2001/XInclude">
   <refentryinfo>
index cd8ad72e46e34122b617a3c20a9864066ef0309e..278bc354596ab4a86078941e2c6d8410d0657057 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_copy" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 720b114273d21d9cb34cea1cb0199e0f25fe4c59..eac0541ca4acdf385b1332bc142dd9b64d936160 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_dump"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 7b9408c049b688a57c03902f568bf2212a13ad3b..148bda5feb099bd43dc67fe4176b684b44c16497 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_get_cookie"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 958b832534f83d7439ebd8c5c995c53cd5a62166..605e2b4afe760cd7d2bf5ce5bae465099602a2e7 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_get_monotonic_usec"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index e3f41346b657b2734c67929f22826b60a071a254..203145bcdd007974502d35cc35ecb3d52d9e8147 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_get_signature" xmlns:xi="http://www.w3.org/2001/XInclude">
   <refentryinfo>
index 442c763a4924c22f7fc198ca0413cee0959d0991..dd86316832fd8def38426ac4a1eac2b073fcb376 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_get_type" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 7eb2c49fcca23ff9fd54efa7d7a0638af1bb6f54..4907c5a7559c66572d28634fe768f4507f790974 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_new" xmlns:xi="http://www.w3.org/2001/XInclude">
   <refentryinfo>
index cfb13af51fafec2da1834d6f178c6d9618a462d3..f6278e3c738e742ced2b48efb6e8b0fe8dd55997 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_new_method_call"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 39bb24c3a53613b10f0f7d45b050f68ee1dffae1..92c4ac680e443b284d3c4e5981f5e680dcb74832 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_new_method_error"
           xmlns:xi="http://www.w3.org/2001/XInclude">
           <para>Message <parameter>call</parameter> is not a method call
           message.</para>
 
-          <para>The error <parameter>error</parameter> parameter to
-          <function>sd_bus_message_new_method_error</function> is not set, see
+          <para>The error <parameter>e</parameter> parameter to
+          <function>sd_bus_message_new_method_error()</function> is not set, see
           <citerefentry><refentrytitle>sd_bus_error_is_set</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
           </para>
           </listitem>
index 5ac35e7a3a6dcbf7455f0c7b89f515d71414a904..17862deb0b1a4aebfe17cb70d1de2aec56a9d7cf 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_new_signal"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 64fda41b12113112d2fe64cd5796f2b711648ce6..89c75f0e91edc88481648ec8bfdbc76dce6dafbd 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_open_container"
           xmlns:xi="http://www.w3.org/2001/XInclude">
   <refsect1>
     <title>Return Value</title>
 
-    <para>On success, these functions return a non-negative integer. On failure, they return a negative
-    errno-style error code.</para>
+    <para>On success, these functions return a non-negative integer.
+    <function>sd_bus_message_open_container()</function> and <function>sd_bus_message_close_container()</function>
+    return 0.
+    <function>sd_bus_message_enter_container()</function> returns 1 if it successfully opened a new container, and 0 if
+    that was not possible because the end of the currently open container or message was reached.
+    <function>sd_bus_message_exit_container()</function> returns 1 on success.
+    On failure, all of these functions return a negative errno-style error code.</para>
 
     <refsect2>
       <title>Errors</title>
index 2b5f1000be7c1d1ce8fac81ba56fd65f0a5e059e..12a2c77ea829e9cc652f8ac80e5e01d0f3edbeb0 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_read"
           xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -44,6 +44,7 @@
 
       <funcprototype>
         <funcdef>int <function>sd_bus_message_peek_type</function></funcdef>
+        <paramdef>sd_bus_message *<parameter>m</parameter></paramdef>
         <paramdef>char *<parameter>type</parameter></paramdef>
         <paramdef>const char **<parameter>contents</parameter></paramdef>
       </funcprototype>
index 7f9f9703b63c2a550dea320c6f5eaccb66e8c1da..daff9097da9591ea7b941ec692fa8ebd5bbb36f9 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_read_array">
 
   <refsect1>
     <title>Description</title>
 
-    <para><function>sd_bus_message_read_array()</function> gives access to an element array in
-    message <parameter>m</parameter>. The "read pointer" in the message must be right before an
-    array of type <parameter>type</parameter>. As a special case, <parameter>type</parameter> may be
-    <constant>NUL</constant>, in which case any type is acceptable. A pointer to the array data is
-    returned in the parameter <parameter>ptr</parameter> and the size of array data (in bytes) is
-    returned in the parameter <parameter>size</parameter>. If <parameter>size</parameter> is 0, a
-    valid non-null pointer will be returned, but it may not be dereferenced. The data is aligned as
-    appropriate for the data type. The data is part of the message — it may not be modified and is
-    valid only as long as the message is referenced. After this function returns, the "read pointer"
-    points at the next element after the array.</para>
+    <para><function>sd_bus_message_read_array()</function> provides access to an array elements in the
+    bus message <parameter>m</parameter>. The "read pointer" in the message must be right before an array of type
+    <parameter>type</parameter>. As a special case, <parameter>type</parameter> may be
+    <constant>NUL</constant>, in which case any trivial type is acceptable. A pointer to the array data is returned
+    in the parameter <parameter>ptr</parameter> and the size of array data (in bytes) is returned in the
+    parameter <parameter>size</parameter>. If the returned <parameter>size</parameter> parameter is 0, a
+    valid non-null pointer will be returned as <parameter>ptr</parameter>, but it may not be
+    dereferenced. The data is aligned as appropriate for the data type. The data is part of the message — it
+    may not be modified and is valid only as long as the message is referenced. After this function returns,
+    the "read pointer" points at the next element after the array.</para>
 
     <para>Note that this function only supports arrays of trivial types, i.e. arrays of booleans, the various
     integer types, as well as floating point numbers. In particular it may not be used for arrays of strings,
     <title>Return Value</title>
 
     <para>
-      On success, <function>sd_bus_message_read_array()</function> returns 0 or
-      a positive integer. On failure, it returns a negative errno-style error
-      code.
+      On success and when an array was read, <function>sd_bus_message_read_array()</function> returns an
+      integer greater than zero. If invoked while inside a container element (such as an array, e.g. when
+      operating on an array of arrays) and the final element of the outer container has been read already and
+      the read pointer is thus behind the last element of the outer container this call returns 0 (and the
+      returned pointer will be <constant>NULL</constant> and the size will be 0). On failure, it returns a
+      negative errno-style error code.
     </para>
 
     <refsect2>
index dc9f960618cf0788c83e2bbc1c0e7a62f651aa1e..443fcdaad0bfe590f566d7b38d0d3e24eb03080c 100644 (file)
@@ -3,7 +3,7 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   Copyright © 2016 Julian Orth
 -->
     <title>Return Value</title>
 
     <para>
-      On success, <function>sd_bus_message_read_basic()</function> returns 0 or
-      a positive integer. On failure, it returns a negative errno-style error
-      code.
+      On success, <function>sd_bus_message_read_basic()</function> returns a positive integer.
+      If the end of the currently opened array has been reached, it returns 0.
+      On failure, it returns a negative errno-style error code.
     </para>
 
     <refsect2 id='errors'>
index a86bbe45d8911bb9cea4e547d5410a115248fb97..a90ae84098395122209936ea8094155bf02cac1a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_read_strv">
 
index cbfa2511d23b564f4723ed14e5cd6c0f10502a60..5640d2821a3f478a509239c2568c87b31fc4613f 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_rewind"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 03783d927918d1c877e1ef07e1b605b63b64e928..53d3a218bbea3e54f9f47b1d34987e3363e0c90e 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_seal"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 8f3e8aeb8eb0e5ef9e646fb0a4a5f852812347eb..f9539659830985b25572cda761ac1c8147792495 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_sensitive" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 51da5ff3b89e4a81da4153e3ca33e85fc6c2ba14..6308b5e23c98bc90dcd8500e3aa7ed4f23f9ca4f 100644 (file)
@@ -1,6 +1,6 @@
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_set_destination" xmlns:xi="http://www.w3.org/2001/XInclude">
   <refentryinfo>
index 43a94c83c78aad59926018b9d2b52e1b93803d06..dccb99ad8104029dda5975961a5ba3e228126469 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_set_expect_reply" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 0e740ab26152aedca449ece013d809ced121e6d9..7a227c4a2779a80ac264418ffdcc8b2763bc29dd 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_skip" xmlns:xi="http://www.w3.org/2001/XInclude">
   <refentryinfo>
index e03a253885d80dcd039e5f383957a2b6c98b4838..9f3a34790ae8bd621441306b01f2e83d6473f50d 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_message_verify_type" xmlns:xi="http://www.w3.org/2001/XInclude">
   <refentryinfo>
index 340049fc972e384418d9633783a494ba56096762..a4893b62e79facc3c0af62bdff03920fcb32daab 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_negotiate_fds" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index ceca3350fc44ce8f58907095135bdb46112219a1..355b34bad8e14be987d895cbcdd2d6bbf7ba97d2 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_new" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index ade11bc15e1537d8a8cd8b9f57b315d2808a19cf..5cdb1d77a1dd6892783bba461d44f5cfe65a0d99 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_path_encode" xmlns:xi="http://www.w3.org/2001/XInclude">
 
     will be stored there. Each <literal>%</literal> character will
     only match the current label. It will never match across labels.
     Furthermore, only a single directive is allowed per label.
-    If <literal>NULL</literal> is passed as output storage, the
+    If <constant>NULL</constant> is passed as output storage, the
     label is verified but not returned to the caller.</para>
   </refsect1>
 
     argument. On success, <function>sd_bus_path_decode()</function>
     returns a positive value if the prefixed matched, or 0 if it
     did not. If the prefix matched, the external identifier is returned
-    in the return parameter. If it did not match, NULL is returned in
+    in the return parameter. If it did not match, <constant>NULL</constant> is returned in
     the return parameter. On failure, a negative errno-style error
     number is returned by either function. The returned strings must
     be
index 8f35388da3f0977f0e18ee19425f13559b3456b1..09b3c50ddef674ed47ca2761973838227a35280b 100644 (file)
@@ -3,7 +3,7 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   Copyright © 2016 Julian Orth
 -->
     <parameter>ret</parameter> is not <constant>NULL</constant> and the call processed a message,
     <parameter>*ret</parameter> is set to this message.  The caller owns a reference to this message and should call
     <citerefentry><refentrytitle>sd_bus_message_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry> when the
-    message is no longer needed. If <parameter>ret</parameter> is not NULL, progress was made, but no message was
+    message is no longer needed. If <parameter>ret</parameter> is not <constant>NULL</constant>, progress was made, but no message was
     processed, <parameter>*ret</parameter> is set to <constant>NULL</constant>.</para>
 
-    <para>If the bus object is connected to an
+    <para>If the bus object is connected to an
     <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry> event loop (with
     <citerefentry><refentrytitle>sd_bus_attach_event</refentrytitle><manvolnum>3</manvolnum></citerefentry>), it is not
     necessary to call <function>sd_bus_process()</function> directly as it is invoked automatically when
index 54cd81771733d2c2ea2c47204c1ca9600639773e..d0769e8c85b0c83586bc46066bb394738b6f928d 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_query_sender_creds" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index dcf9ee299fbe79d53b134d3fd75ccbd07610efe6..c9553a06b5402b60e707f2f34a4198e152ea4781 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_reply_method_error"
           xmlns:xi="http://www.w3.org/2001/XInclude">
 
           <para>Message <parameter>call</parameter> is not attached to a bus.</para>
 
-          <para>The error parameter <parameter>error</parameter> to
-          <function>sd_bus_reply_method_error</function> is not set, see
+          <para>The error parameter <parameter>e</parameter> to
+          <function>sd_bus_reply_method_error()</function> is not set, see
           <citerefentry><refentrytitle>sd_bus_error_is_set</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
           </para>
           </listitem>
index a6052c61fd89af2bdd7e765abc6bedfe4e5ed578..76e4adecd5e1d08caf9a4f42a1fdcd1407f5cc7e 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_reply_method_return"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index f8a49c006b242900886302050b24c8784c0da0fa..ea4ea2279d98855fc987f2a54cf94acff1d76f1b 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_request_name"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 233dd7c4fa69293186f5ce6d9159da222c09f6c0..c4c623a1e85e8f78c3128040bc6dca11c8feb871 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_send"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 8404da53f1e6aaab02e6185e3082f76b1b029c0d..21742bdf5fe8426971fd080fbc7eb97998febb8b 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_set_address"
           xmlns:xi="http://www.w3.org/2001/XInclude">
     <citerefentry><refentrytitle>sd_bus_open</refentrytitle><manvolnum>3</manvolnum></citerefentry> and
     similar calls, based on environment variables or built-in defaults.</para>
 
-    <para><function>sd_bus_set_exec</function> is a shorthand function for setting a
+    <para><function>sd_bus_set_exec()</function> is a shorthand function for setting a
     <literal>unixexec</literal> address that spawns the given executable with the given arguments.
     If <parameter>argv</parameter> is <constant>NULL</constant>, the given executable is spawned
     without any extra arguments.</para>
index 64ca35644398cd21e507e30420140e7286964452..cf3bbae0b552c56d49bdf1e01e896db2465890ea 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_set_close_on_exit"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index b025112b6393e7503a8a86922344c6b0b4732c20..b2dfcf0cf9cc15010d1143a303666ca8554c1641 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_set_connected_signal"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index bd3ec78864b251f63814fe8a44bfabc1f25f5182..bbd3835f01d64306149104d2603259632bf2687e 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_set_description" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 8bd904ba40779cb3757a380b63d290a0b78651ab..a694aef4f24e7181c05181a1d5c41470d2e48c83 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_set_exit_on_disconnect"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 006020aae709ff4a1253c28a0781a3a97b8cd0f0..0db13e22ae147c2cc62c6dc5332baf4534ff1d78 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_set_method_call_timeout" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 411ccad28c9ffef2de173bff49379f06c3748961..66477b3500a58933d2e8469d08eeb013ba2e3a32 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_set_property"
           xmlns:xi="http://www.w3.org/2001/XInclude">
 
       <para>See the
       <citerefentry><refentrytitle>sd_bus_call_method</refentrytitle><manvolnum>3</manvolnum></citerefentry>
-      man page for a list of possible errors</para>
+      man page for a list of possible errors.</para>
     </refsect2>
   </refsect1>
 
index b3f67d9f917a97c892449946c39c3c19a2db38c7..c6e07acc979737344c4039e307ed5ea1c7d7a307 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_set_sender"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 625dfd44687b40a7677b9d8c62ffa6bee581baf4..e2cd74da90caa6f4901a3952110f2fd651b3c7f5 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_set_server"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 5638cdc0a62e4cbc503e2976457ac601b6352304..20f6f53a2c8a0a8235519c3db147d25f014ecebe 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_set_watch_bind"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 26541a9d97b410b188f6ac2fe7561de6f6099048..48400ad15a5708d3c99903364588ebf90a07d2b4 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_slot_get_bus" xmlns:xi="http://www.w3.org/2001/XInclude">
   <refentryinfo>
index ef144ece6d4ae4ac0b5dd2fd278355161e12786e..c200bc4a5a9d89703731dc4e3287b50e2de08d9f 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_slot_ref" xmlns:xi="http://www.w3.org/2001/XInclude">
   <refentryinfo>
index 9bc2ba859257299903542697b3889ca16b6fa820..4a8df0cc48eece40a87f9b8db993d536de057c2f 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_slot_set_description" xmlns:xi="http://www.w3.org/2001/XInclude">
   <refentryinfo>
index c2a0876e212506cd0f3d8b9e8476e21874ba418a..4de77d2baad3fe14706687f9bceed7a9edaddd6e 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_slot_set_destroy_callback"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index ecfc07951415536cbc86328e9a43b6d77b2da213..dd3a9500cf3285c6e657b77d0b69f5dc919ac67a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_slot_set_floating" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index f0456b4413427451dd79b69ffde41fa40ae3560e..9fa5f3a97838a746f65d664df6508c4314cf27a8 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_slot_set_userdata" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 0be07f4777880d89936c66f7bb78a2ce7efaa62d..68fe3e0e220ad67b49db4d01ba918482183fbf20 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_start"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 29501adf57da062154409e3074d2ae567df9cefb..ae90e4488230c533b704ad6d9ee30344033033b6 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_track_add_name" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 9b79eb4c2dad4673ef60e85592ccf9b1b1ce0a3b..2147ad16dd0350b1e984094bbf36bdc4e9b949e6 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_bus_track_new" xmlns:xi="http://www.w3.org/2001/XInclude">
 
     <function>sd_bus_track_add_sender()</function>. They may be dropped again via
     <function>sd_bus_track_remove_name()</function> and
     <function>sd_bus_track_remove_sender()</function>. Alternatively, references on peers are removed automatically
-    when they disconnect from the bus.  If non-NULL the <parameter>handler</parameter> may specify a function that is
-    invoked whenever the last reference is dropped, regardless whether the reference is dropped explicitly via
-    <function>sd_bus_track_remove_name()</function> or implicitly because the peer disconnected from the bus. The final
-    argument <parameter>userdata</parameter> may be used to attach a generic user data pointer to the object. This
-    pointer is passed to the handler callback when it is invoked.</para>
+    when they disconnect from the bus.  If non-<constant>NULL</constant> the <parameter>handler</parameter> may specify
+    a function that is invoked whenever the last reference is dropped, regardless whether the reference is dropped
+    explicitly via <function>sd_bus_track_remove_name()</function> or implicitly because the peer disconnected from the
+    bus. The final argument <parameter>userdata</parameter> may be used to attach a generic user data pointer to the
+    object. This pointer is passed to the handler callback when it is invoked.</para>
 
     <para><function>sd_bus_track_ref()</function> creates a new reference to a bus peer tracking object. This object
     will not be destroyed until <function>sd_bus_track_unref()</function> has been called as many times plus once
index 7b97dc02fdd9be397cad8c682256d78972fe99e6..005602d04e0c32ff26d3abaaf3df2770608c0903 100644 (file)
@@ -3,7 +3,7 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   Copyright © 2016 Julian Orth
 -->
index 74ebe6d2641a5edb9e7ff085c38cb36d8599723c..2961b3ee5e3c27ff1793cd1f6b3b49d89bd274d4 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_add_child" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index d1d6d980ee9d04fd3ae70f94229a73e4a9a86e66..54e8823000eb70d093b331fe863ddc6e31465bcc 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_add_defer" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 27d43853e65facf73d982c6a0959912689118516..1681143eb15d4855298054f007df6b0943306897 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_add_inotify" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 51238f47555bb90e786af8f784d5ffa03a236831..323e57c79d0d19415c938c8d1432fad2b270d8a5 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_add_io" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 85de53120f1e57349658040d1aac2b7abda3f9b3..1f0854f6cb0912d52c6300a6cb25b4f23be6b3cd 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_add_signal" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 24a316f9edd7b6317e70dd7ee47d4f4f729458d8..3e8927f9666d8f193ef4d7e539d0d03026a03556 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_add_time" xmlns:xi="http://www.w3.org/2001/XInclude">
 
 
   <refnamediv>
     <refname>sd_event_add_time</refname>
+    <refname>sd_event_add_time_relative</refname>
     <refname>sd_event_source_get_time</refname>
     <refname>sd_event_source_set_time</refname>
+    <refname>sd_event_source_set_time_relative</refname>
     <refname>sd_event_source_get_time_accuracy</refname>
     <refname>sd_event_source_set_time_accuracy</refname>
     <refname>sd_event_source_get_time_clock</refname>
index 53aed7001267a89ea5f366d53c8354b856d1c38e..e13cbe18ab9d499942c47d3fac94931edd855fa4 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_exit" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 3e78182137542ba7418121257aa696cc3e8f55d9..a3b11e41ee3cd0af78ba3126b00ba0a429a293f0 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_get_fd" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 0e572c40ee46a60a2ab6e35437dd4b53ed083738..352137ec098fe8236fb20a111fa48bfac1b48b81 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_new" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 2d2b085015f5597954479271de2218841884db37..789b9e028847ac6c4b3f9e5fa52bf6eb950cb692 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_now" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 5c33d61fdf05d6d3518f0a2905f4df057087ad09..81c51b7060393416f65a6f4bdf2fbf1d06c0aee6 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_run" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index cacc683b578814f8d22034943f8fe2aa1388e3a8..28d647c7bcdea49f72e234871e793d15b4fa506f 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_set_watchdog" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 2b059a35231aeab013baab0b89f0d457340f804c..a850583100eafae6f967e74ebdbce83eb9f6536f 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_source_get_event" xmlns:xi="http://www.w3.org/2001/XInclude">
 
@@ -51,7 +51,7 @@
 
     <para>On success, <function>sd_event_source_get_event()</function>
     returns the associated event loop object. On failure, it returns
-    NULL.</para>
+    <constant>NULL</constant>.</para>
   </refsect1>
 
   <xi:include href="libsystemd-pkgconfig.xml" />
index 603d4ad3775abc8d152cbda024bb6f28d9c3d5e6..5906930b3c3be64cc4f6b16c1df042115eeba570 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_source_get_pending" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 717cc5be9e6adef9d031f74d62f4229f93f52800..bea3e71914e571f71be5a0befb4e8389d6d14f46 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_source_set_description" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 3df926b8634f02728fa71ed3078e850fa177c8fb..4e39f21020d053b1519523bd680d7768f0f89039 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_source_set_destroy_callback"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 6a7a39b4276c6617b34e725f882b88a06dec55df..c8ae169c177e0d023aa5364953d86cedd4cee797 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_source_set_enabled" xmlns:xi="http://www.w3.org/2001/XInclude">
 
       <citerefentry><refentrytitle>sd_event_add_child</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_add_inotify</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>sd_event_add_defer</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>sd_event_source_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+      <citerefentry><refentrytitle>sd_event_source_unref</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_source_set_ratelimit</refentrytitle><manvolnum>3</manvolnum></citerefentry>
     </para>
   </refsect1>
 
index f9d87488c476447af07bca989fed4936d1dc5046..6f839cddc0aa9018cb538537c40ad3f1a0ccada0 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_source_set_exit_on_failure" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 89341d18c4309592c68c7c7648d13754b24cc8c6..7f3ed86a6585ff0bfe9a4b58f08485ef28379a56 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_source_set_floating" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 63c33ca19e41f9a5c3f04480fa0c367ca709ece2..d52c55b3db950c42bb563a9d00cb1fb8d7f3a68d 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_source_set_prepare" xmlns:xi="http://www.w3.org/2001/XInclude">
 
@@ -52,7 +52,7 @@
     when the event source was created. The event source will be disabled
     if the callback function returns a negative error code. The callback
     function may be used to reconfigure the precise events to wait for.
-    If the <parameter>callback</parameter> parameter is passed as NULL
+    If the <parameter>callback</parameter> parameter is passed as <constant>NULL</constant>
     the callback function is reset. </para>
 
     <para>Event source objects have no preparation callback associated
index d1cb416dcb220afcc87deff1c17fb9fb46443a6d..2616c12e3fc7aed942fef68d89439d0e1348f714 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_source_set_priority" xmlns:xi="http://www.w3.org/2001/XInclude">
 
diff --git a/man/sd_event_source_set_ratelimit.xml b/man/sd_event_source_set_ratelimit.xml
new file mode 100644 (file)
index 0000000..754bfbe
--- /dev/null
@@ -0,0 +1,148 @@
+<?xml version='1.0'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
+
+<refentry id="sd_event_source_set_ratelimit" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+  <refentryinfo>
+    <title>sd_event_source_set_ratelimit</title>
+    <productname>systemd</productname>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>sd_event_source_set_ratelimit</refentrytitle>
+    <manvolnum>3</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>sd_event_source_set_ratelimit</refname>
+    <refname>sd_event_source_get_ratelimit</refname>
+    <refname>sd_event_source_is_ratelimited</refname>
+
+    <refpurpose>Configure rate limiting on event sources</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcsynopsisinfo>#include &lt;systemd/sd-event.h&gt;</funcsynopsisinfo>
+
+      <funcprototype>
+        <funcdef>int <function>sd_event_source_set_ratelimit</function></funcdef>
+        <paramdef>sd_event_source *<parameter>source</parameter></paramdef>
+        <paramdef>uint64_t <parameter>interval_usec</parameter></paramdef>
+        <paramdef>unsigned <parameter>burst</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>sd_event_source_get_ratelimit</function></funcdef>
+        <paramdef>sd_event_source *<parameter>source</parameter></paramdef>
+        <paramdef>uint64_t* <parameter>ret_interval_usec</parameter></paramdef>
+        <paramdef>unsigned* <parameter>ret_burst</parameter></paramdef>
+      </funcprototype>
+
+      <funcprototype>
+        <funcdef>int <function>sd_event_source_is_ratelimited</function></funcdef>
+        <paramdef>sd_event_source *<parameter>source</parameter></paramdef>
+      </funcprototype>
+
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><function>sd_event_source_set_ratelimit()</function> may be used to enforce rate limiting on an
+    event source. When used an event source will be temporarily turned off when it fires more often then a
+    specified burst number within a specified time interval. This is useful as simple mechanism to avoid
+    event source starvation if high priority event sources fire very frequently.</para>
+
+    <para>Pass the event source to operate on as first argument, a time interval in microseconds as second
+    argument and a maximum dispatch limit ("burst") as third parameter. Whenever the event source is
+    dispatched more often than the specified burst within the specified interval it is placed in a mode
+    similar to being disabled with
+    <citerefentry><refentrytitle>sd_event_source_set_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    and the <constant>SD_EVENT_OFF</constant> parameter. However it is disabled only temporarily – once the
+    specified interval is over regular operation resumes. It is again disabled temporarily once the specified rate
+    limiting is hit the next time. If either the interval or the burst value are specified as zero, rate
+    limiting is turned off. By default event sources do not have rate limiting enabled. Note that rate
+    limiting and disabling via <function>sd_event_source_set_enabled()</function> are independent of each
+    other, and an event source will only effect event loop wake-ups and is dispatched while it both is
+    enabled and rate limiting is not in effect.</para>
+
+    <para><function>sd_event_source_get_ratelimit()</function> may be used to query the current rate limiting
+    parameters set on the event source object <parameter>source</parameter>. The previously set interval and
+    burst vales are returned in the second and third argument.</para>
+
+    <para><function>sd_event_source_is_ratelimited()</function> may be used to query whether the event source
+    is currently affected by rate limiting, i.e. it has recently hit the rate limit and is currently
+    temporarily disabled due to that.</para>
+
+    <para>Rate limiting is currently implemented for I/O, timer, signal, defer and inotify event
+    sources.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Return Value</title>
+
+    <para>On success, <function>sd_event_source_set_ratelimit()</function> and
+    <function>sd_event_source_get_ratelimit()</function> return a non-negative integer. On failure, they
+    return a negative errno-style error code. <function>sd_event_source_is_ratelimited</function> returns
+    zero if rate limiting is currently not in effect and greater than zero if it is in effect; it returns a
+    negative errno-style error code on failure.</para>
+
+    <refsect2>
+      <title>Errors</title>
+
+      <para>Returned errors may indicate the following problems:</para>
+
+      <variablelist>
+        <varlistentry>
+          <term><constant>-EINVAL</constant></term>
+
+          <listitem><para><parameter>source</parameter> is not a valid pointer to an
+          <structname>sd_event_source</structname> object.
+          </para></listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term><constant>-ECHILD</constant></term>
+
+          <listitem><para>The event loop has been created in a different process.</para></listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term><constant>-EDOM</constant></term>
+
+          <listitem><para>It was attempted to use the rate limiting feature on an event source type that does
+          not support rate limiting.</para></listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term><constant>-ENOEXEC</constant></term>
+
+          <listitem><para><function>sd_event_source_get_ratelimit()</function> was called on a event source
+          that doesn't have rate limiting configured.</para></listitem>
+        </varlistentry>
+
+      </variablelist>
+    </refsect2>
+  </refsect1>
+
+  <xi:include href="libsystemd-pkgconfig.xml" />
+
+  <refsect1>
+    <title>See Also</title>
+
+    <para>
+      <citerefentry><refentrytitle>sd-event</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_io</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_time</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_signal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_inotify</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_add_defer</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>sd_event_source_set_enabled</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+    </para>
+  </refsect1>
+
+</refentry>
index fe315845fa277096de307032b62b38e63749c7bc..e8e5dc144486b79aacc3015b68a26c8b9639509a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_source_set_userdata" xmlns:xi="http://www.w3.org/2001/XInclude">
 
@@ -70,7 +70,7 @@
     <function>sd_event_source_set_userdata()</function> and
     <function>sd_event_source_get_userdata()</function> return the
     previously set user data pointer. On failure, they return
-    NULL.</para>
+    <constant>NULL</constant>.</para>
   </refsect1>
 
   <xi:include href="libsystemd-pkgconfig.xml" />
index 81131fa737f373b8f85612dc75d0b8212a5bbbad..a7699e354782a8e0e7ee87604e4a34b435185913 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_source_unref" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 210a0c948d02d8b36a9b4b1b74cbd75d701d55b6..25e21b9d5cfbf52b00538343f171c65b42d2db61 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_event_wait" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index ed4b77b3ea5ccf00bb9d90440ed09b00734fb5bc..818f9684c30240cb89defd4f4647c0a0bb562d38 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_get_seats" conditional='HAVE_PAM'
           xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -56,7 +56,7 @@
 
     <para><function>sd_get_seats()</function> may be used to determine
     all currently available local seats. Returns the number of seat
-    identifiers and if the input pointer is non-NULL, a
+    identifiers and if the input pointer is non-<constant>NULL</constant>, a
     <constant>NULL</constant>-terminated array of seat identifiers
     is stored at the address.
     The returned array and all strings it references need to be freed
index dbaaf6292cff8620b09aa9894f77351e05bc0786..6a6594f3f8a1a2a0355933b88633627aa8cff5f4 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_hwdb_get" xmlns:xi="http://www.w3.org/2001/XInclude">
   <refentryinfo>
@@ -84,7 +84,7 @@
     <citerefentry><refentrytitle>hwdb</refentrytitle><manvolnum>7</manvolnum></citerefentry> for
     details.</para>
 
-    <para>The <function>SD_HWDB_FOREACH_PROPERTY</function> macro combines
+    <para>The <function>SD_HWDB_FOREACH_PROPERTY()</function> macro combines
     <function>sd_hwdb_seek()</function> and <function>sd_hwdb_enumerate()</function>. No error handling is
     performed and iteration simply stops on error. See the example below.</para>
   </refsect1>
index 8f1c01b7314bde75c720ade641030110956288ee..c071599ae6a33fcdabfab3f0f1a761eefac53abc 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_hwdb_new" xmlns:xi="http://www.w3.org/2001/XInclude">
   <refentryinfo>
index bb85d8839f4daa6de6567347aa3aeb5e91a5598c..2df4496f19248e6703e8871d25aea7d7c0bb7028 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_id128_get_machine" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 9cf55ddab03fcd2ac4ab6f4c5aa3e6e5e49b8ef9..cf6ca7726f1b7187824489b43febc66983f354be 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_id128_randomize" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 4f585e35a0b6090ba566ee33effcbfafb82af683..54cab1af5ad3dc1d1a678b37fc7dcce91bdff0d0 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_id128_to_string" xmlns:xi="http://www.w3.org/2001/XInclude">
 
@@ -50,8 +50,9 @@
     <para><function>sd_id128_from_string()</function> implements the reverse operation: it takes a 33 character string
     with 32 hexadecimal digits (either lowercase or uppercase, terminated by <constant>NUL</constant>) and parses them
     back into a 128-bit ID returned in <parameter>ret</parameter>. Alternatively, this call can also parse a
-    37-character string with a 128-bit ID formatted as RFC UUID. If <parameter>ret</parameter> is passed as NULL the
-    function will validate the passed ID string, but not actually return it in parsed form.</para>
+    37-character string with a 128-bit ID formatted as RFC UUID. If <parameter>ret</parameter> is passed as
+    <constant>NULL</constant> the function will validate the passed ID string, but not actually return it in parsed
+    form.</para>
 
     <para>For more information about the <literal>sd_id128_t</literal>
     type see
@@ -63,9 +64,8 @@
     easier to use a format string for
     <citerefentry project='man-pages'><refentrytitle>printf</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
     This is easily done using the
-    <function>SD_ID128_FORMAT_STR</function> and
-    <function>SD_ID128_FORMAT_VAL()</function> macros. For more
-    information see
+    <constant>SD_ID128_FORMAT_STR</constant> and <function>SD_ID128_FORMAT_VAL()</function> macros. For
+    more information see
     <citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
   </refsect1>
 
@@ -74,7 +74,7 @@
 
     <para><function>sd_id128_to_string()</function> always succeeds
     and returns a pointer to the string array passed in.
-    <function>sd_id128_from_string</function> returns 0 on success, in
+    <function>sd_id128_from_string()</function> returns 0 on success, in
     which case <parameter>ret</parameter> is filled in, or a negative
     errno-style error code.</para>
   </refsect1>
index 339bb327079bd071c774997bcfaee5645f704a27..99f152400422d1a536cd37d49140cdb67b199e54 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_is_fifo"
   xmlns:xi="http://www.w3.org/2001/XInclude">
index 83f7fe9242d840df42a72ce586b07cf84dd72023..f7f5ee364ad99a5cacc498eafaa97eeb36542a02 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_journal_add_match" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 791d1c74695cf79536973db444c3161f1338c9d2..e074906980c94c4c2663eab2f9baeddd29a4d964 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_journal_enumerate_fields" xmlns:xi="http://www.w3.org/2001/XInclude">
 
@@ -91,7 +91,7 @@
   <refsect1>
     <title>Examples</title>
 
-    <para>Use the <function>SD_JOURNAL_FOREACH_FIELD</function> macro to iterate through all field names in use in the
+    <para>Use the <function>SD_JOURNAL_FOREACH_FIELD()</function> macro to iterate through all field names in use in the
     current journal.</para>
 
     <programlisting>#include &lt;stdio.h&gt;
index 8c7058a132f640f997f40b78a6bcf6ec1ccc26e0..ad5992f0ba37c42b7bdd705ea9ed90ed1f52a6a1 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_journal_get_catalog" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 851bfde816d26303c63cafe26792c736e77c7fb3..acaba069607bcc90c09aea917bdfe1383e5b483a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_journal_get_cursor" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index a76855feaa669cabc2817d564c431f3af1cad9c7..445130e1cb36bd1e39314aa973e140fc0f20ca03 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_journal_get_cutoff_realtime_usec" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 209f5deaa1dde53b989b7aa11e6361c4ca647a5f..2955cd264b66e551c01e5710cbfba039b71fb4d7 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_journal_get_data" xmlns:xi="http://www.w3.org/2001/XInclude">
 
     <function>sd_journal_get_data()</function>.</para>
 
     <para>Use the
-    <function>SD_JOURNAL_FOREACH_DATA</function> macro to
+    <function>SD_JOURNAL_FOREACH_DATA()</function> macro to
     iterate through all fields of the current journal
     entry:</para>
 
index fc55bbd5ff5aa97b15f74f81368ce573d7cd069a..52360c76c334d0ef83d2e9685c89bd0c884f6d2a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_journal_get_fd" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index f8150ded194b66ce3e43a042959f95a9a48220fa..025b6a1a5aaefea8f98a716a4c216d7170524286 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_journal_get_realtime_usec"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 63683715627646e30f6657db3111c4432b6caaab..e6fcd67df14ca99c0d72cc7b56a9e9ede649b8e7 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_journal_get_usage" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 02fdc12473e57176acb2adb03b923f11fd15fb4c..e452b49e82a4087345765e1b960518bb217799c0 100644 (file)
@@ -3,7 +3,7 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 -->
 
 <refentry id="sd_journal_has_runtime_files" xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -57,7 +57,7 @@
     <title>Return value</title>
     <para>Both <function>sd_journal_has_runtime_files()</function>
     and <function>sd_journal_has_persistent_files()</function> return -EINVAL
-    if their argument is NULL.
+    if their argument is <constant>NULL</constant>.
     </para>
   </refsect1>
 
index 20d153db6487d3862f97e4fdc747605fa5bf10e5..56083317371cd6d94c1d0478e17fc4a75296a3cf 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_journal_next" xmlns:xi="http://www.w3.org/2001/XInclude">
 
@@ -78,9 +78,9 @@
     the read pointer back one entry.</para>
 
     <para><function>sd_journal_next_skip()</function> and
-    <function>sd_journal_previous_skip()</function> advance/set back
-    the read pointer by multiple entries at once, as specified in the
-    <varname>skip</varname> parameter.</para>
+    <function>sd_journal_previous_skip()</function> advance/set back the read pointer by multiple
+    entries at once, as specified in the <varname>skip</varname> parameter. The <varname>skip</varname>
+    parameter must be less than or equal to 2147483647 (2^31-1).</para>
 
     <para>The journal is strictly ordered by reception time, and hence
     advancing to the next entry guarantees that the entry then
index bdece26ccca971d85f6af06a22443f8c2a135f95..8f62c966eafefd079578813a2d1eb8288404c1b9 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_journal_open"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 84adab5c7b22bcfb9e66aca34a480ab19be73139..68a4a0a5c0e4b6afa9ad7523daba8d1b7dc22bc4 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_journal_print" xmlns:xi="http://www.w3.org/2001/XInclude">
 
@@ -192,10 +192,10 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
     <constant>SD_JOURNAL_SUPPRESS_LOCATION</constant> before including <filename>sd-journal.h</filename>.
     </para>
 
-    <para><function>sd_journal_print_with_location</function>,
-    <function>sd_journal_printv_with_location</function>, <function>sd_journal_send_with_location</function>,
-    <function>sd_journal_sendv_with_location</function>, and
-    <function>sd_journal_perror_with_location</function> are similar to their counterparts without
+    <para><function>sd_journal_print_with_location()</function>,
+    <function>sd_journal_printv_with_location()</function>, <function>sd_journal_send_with_location()</function>,
+    <function>sd_journal_sendv_with_location()</function>, and
+    <function>sd_journal_perror_with_location()</function> are similar to their counterparts without
     <literal>_with_location</literal>, but accept additional parameters to explicitly set the source file
     name, function, and line. Those arguments must contain valid journal entries including the variable name,
     e.g. <literal>CODE_FILE=src/foo.c</literal>, <literal>CODE_LINE=666</literal>,
@@ -243,10 +243,10 @@ sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(
     <citerefentry project='man-pages'><refentrytitle>signal-safety</refentrytitle><manvolnum>7</manvolnum></citerefentry>.
     </para>
 
-    <para><function>sd_journal_print</function>,
-    <function>sd_journal_printv</function>,
-    <function>sd_journal_send</function>,
-    <function>sd_journal_perror</function>,
+    <para><function>sd_journal_print()</function>,
+    <function>sd_journal_printv()</function>,
+    <function>sd_journal_send()</function>,
+    <function>sd_journal_perror()</function>,
     and their counterparts with <literal>_with_location</literal>
     are not async signal safe.</para>
   </refsect1>
index 88beaa6460cd4f05904a656de68395f6db583481..26188f9e7e1710485d154caf1aca3f96e59ea493 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_journal_query_unique" xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <refsect1>
     <title>Examples</title>
 
-    <para>Use the <function>SD_JOURNAL_FOREACH_UNIQUE</function> macro to iterate through all values a field
+    <para>Use the <function>SD_JOURNAL_FOREACH_UNIQUE()</function> macro to iterate through all values a field
     of the journal can take (and which can be accessed on the given architecture and are not compressed with
     an unsupported mechanism). The following example lists all unit names referenced in the journal:</para>
 
index 8e505f91e4d1f2e3118b9c8d8345e7305e78fca6..869889a4bf665c94267238f1ad3675606e6b04c0 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_journal_seek_head" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index bdb27cc8ac8d08da5123fe523e9886a6757d0392..af2234e77d69c1db6f9cd6594c2bfa4450fcc249 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_journal_stream_fd" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 4973718ef6b5f6cf68b125ec73f9b070289ad715..9ddd129aae690e85459b62eec7606341ce8122f4 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_listen_fds"
   xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -94,7 +94,7 @@
     <function>sd_listen_fds()</function>, but optionally also returns
     an array of strings with identification names for the passed file
     descriptors, if that is available and the
-    <parameter>names</parameter> parameter is non-NULL. This
+    <parameter>names</parameter> parameter is non-<constant>NULL</constant>. This
     information is read from the <varname>$LISTEN_FDNAMES</varname>
     variable, which may contain a colon-separated list of names. For
     socket-activated services, these names may be configured with the
     <function>sd_is_socket()</function> and related calls is not
     sufficient. Note that the names used are not unique in any
     way. The returned array of strings has as many entries as file
-    descriptors have been received, plus a final NULL pointer
+    descriptors have been received, plus a final <constant>NULL</constant> pointer
     terminating the array. The caller needs to free the array itself
     and each of its elements with libc's <function>free()</function>
     call after use. If the <parameter>names</parameter> parameter is
-    NULL, the call is entirely equivalent to
+    <constant>NULL</constant>, the call is entirely equivalent to
     <function>sd_listen_fds()</function>.</para>
 
     <para>Under specific conditions, the following automatic file
index d1c83e2d20080a3f8e025f4e370588a0378c4e55..57d22f9f6524b75a4223990e021ef83b14b25f9d 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_login_monitor_new" conditional='HAVE_PAM'
           xmlns:xi="http://www.w3.org/2001/XInclude">
index a8db371230b956111f75ac6d98ad0d1e49cb9cee..6e5fe9e23dc9c0c839bd6e2cccd0a818df440d2e 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_machine_get_class" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 3721ed91ef83d1d3655f41f8d22eecc618795f78..69e1b024ade54761a218255c52538749b8601486 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_notify"
   xmlns:xi="http://www.w3.org/2001/XInclude">
index 9316090cceeaa49b7e090bcf74c3a1c8e3884b70..01fb1ed8f158352fb6b66b624c8cad18f85451a1 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_path_lookup" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index f684c03aeba4576bd69868d0fdb5350a9ab9f728..3e30acad8db7bf5274b78557d6b6a2f673ae0312 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_pid_get_owner_uid" conditional='HAVE_PAM'
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 94401caa7280335d5e9fcaee8cbae92f4ba590d7..110862c5df3c701dac1fc2f87ae26347b46337e5 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_seat_get_active" conditional='HAVE_PAM'
           xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -99,7 +99,7 @@
     <para> On success, <function>sd_seat_get_active()</function> returns 0 or a positive integer. On success,
     <function>sd_seat_get_sessions()</function> returns the number of entries in the session identifier
     array. If the test succeeds,
-    <function>sd_seat_can_tty</function> and <function>sd_seat_can_graphical</function> return a positive
+    <function>sd_seat_can_tty()</function> and <function>sd_seat_can_graphical()</function> return a positive
     integer, if it fails 0. On failure, these calls return a negative errno-style error code.</para>
 
     <refsect2>
index d4a12f533c04cfafe4a129a4d773ec1fb7f45184..9941a05a86fe98203c9e46d5b5dc56112ad57582 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_session_is_active" conditional='HAVE_PAM'
           xmlns:xi="http://www.w3.org/2001/XInclude">
index ed38559bb37f80709c1307478c475dec6b9b4e9b..2d6fb0c8a347eedadd6cc60fceecfe59cd816570 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_uid_get_state" conditional='HAVE_PAM'
           xmlns:xi="http://www.w3.org/2001/XInclude">
         <varlistentry>
           <term><constant>-EINVAL</constant></term>
 
-          <listitem><para>An input parameter was invalid (out of range, or NULL, where that is not
-          accepted). This is also returned if the passed user ID is <constant>0xFFFF</constant> or
-          <constant>0xFFFFFFFF</constant>, which are undefined on Linux.</para></listitem>
+          <listitem><para>An input parameter was invalid (out of range, or <constant>NULL</constant>,
+          where that is not accepted). This is also returned if the passed user ID is
+          <constant>0xFFFF</constant> or <constant>0xFFFFFFFF</constant>, which are undefined on Linux.
+          </para></listitem>
         </varlistentry>
 
         <varlistentry>
index 0aa5609a3525f8694d74c92bbe79dbfa5882eb3a..1abc2f805164c713b94fd58e7828f4706af90938 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="sd_watchdog_enabled"
   xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -63,7 +63,7 @@
     <function>sd_watchdog_enabled()</function> will also return with
     zero.</para>
 
-    <para>If the <parameter>usec</parameter> parameter is non-NULL,
+    <para>If the <parameter>usec</parameter> parameter is non-<constant>NULL</constant>,
     <function>sd_watchdog_enabled()</function> will write the timeout
     in µs for the watchdog logic to it.</para>
 
index bc2fa6074499a8ccb763a3c0dd2289a4ea708802..f29010f6b653f910363810a44d9219564fbd2c77 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="shutdown"
     xmlns:xi="http://www.w3.org/2001/XInclude">
index ee8cc7bc0a11b050127416007fd3a22ba6e03fab..69cd7b0c0f060d2e6c00f06bcb1ba10263ac2692 100644 (file)
@@ -3,7 +3,7 @@
           "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
   Copyright © 2014 Josh Triplett
 -->
 
index 6a61d9ec079a82a6a31a9606269a5f9c73406a95..64274ce8f31e032ffc74d3e8ebd41328c197a34a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <variablelist>
   <varlistentry id='help'>
index 5b73043ce2d424b53ac629a33c05175bc5fdbfe7..40bb6cc3ea00a57f23e59e346741cc9f0fd23390 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <tbody>
   <row id='b'>
index 15e048b12d99ca519ea25c186fd0b21632ed8a5b..61cdf468d97b381579f9d97b6e4556c376258681 100644 (file)
@@ -2,7 +2,7 @@
 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 -->
 
 <refsect1>
index d34879506311397165cf2bc9586bfbc98f41dd37..4d810e6c0c47f4d2655fe9777cc999da68a6859b 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="sysctl.d"
     xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 94aa08bd6dd6d36cea2855c2fddd89793daf552d..afd3d32bc5aea309c2eb585e116f92923704ef2c 100644 (file)
@@ -2,7 +2,7 @@
 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 -->
 
 <refsect1>
index 7c2d43441ef8b98a7152a5e93054a681d0d7477f..c83c9c49af626933a5e41a27d741923e459525ee 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemctl"
           xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -1060,6 +1060,14 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
     <refsect2>
       <title>Environment Commands</title>
 
+      <para><command>systemd</command> supports an environment block that is passed to processes the manager
+      spawns. The names of the variables can contain ASCII letters, digits, and the underscore
+      character. Variable names cannot be empty or start with a digit. In variable values, most characters
+      are allowed, but non-printable characters are currently rejected. The total length of the environment
+      block is limited to <constant>_SC_ARG_MAX</constant> value defined by
+      <citerefentry project='man-pages'><refentrytitle>sysconf</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
+      </para>
+
       <variablelist>
         <varlistentry>
           <term><command>show-environment</command></term>
@@ -1091,8 +1099,9 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
           <term><command>set-environment <replaceable>VARIABLE=VALUE</replaceable>…</command></term>
 
           <listitem>
-            <para>Set one or more systemd manager environment variables,
-            as specified on the command line.</para>
+            <para>Set one or more systemd manager environment variables, as specified on the command
+            line. This command will fail if variable names and values do not conform to the rules listed
+            above.</para>
           </listitem>
         </varlistentry>
         <varlistentry>
@@ -1113,13 +1122,11 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
           </term>
 
           <listitem>
-            <para>Import all, one or more environment variables set on
-            the client into the systemd manager environment block. If
-            no arguments are passed, the entire environment block is
-            imported. Otherwise, a list of one or more environment
-            variable names should be passed, whose client-side values
-            are then imported into the manager's environment
-            block.</para>
+            <para>Import all, one or more environment variables set on the client into the systemd manager
+            environment block. If no arguments are passed, the entire environment block is imported.
+            Otherwise, a list of one or more environment variable names should be passed, whose client-side
+            values are then imported into the manager's environment block. This command will silently ignore
+            any assignments which do not conform to the rules listed above.</para>
           </listitem>
         </varlistentry>
       </variablelist>
@@ -2303,6 +2310,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
     <xi:include href="less-variables.xml" xpointer="pager"/>
     <xi:include href="less-variables.xml" xpointer="less"/>
     <xi:include href="less-variables.xml" xpointer="lesscharset"/>
+    <xi:include href="less-variables.xml" xpointer="lesssecure"/>
     <xi:include href="less-variables.xml" xpointer="colors"/>
     <xi:include href="less-variables.xml" xpointer="urlify"/>
   </refsect1>
index c7f72abc455feec7008cc79b905d6fe84c81d68f..01df7da1931f56375efec96131cf516f5acb8aa3 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-analyze" conditional='ENABLE_ANALYZE'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index ba8fe7e9280ac352355cd6d4227e90d0a0afc3b3..03b7317cd3506c187b3ff5b6cf4d89796def4ad8 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-ask-password-console.service">
 
   <refentryinfo>
index f696623ee7bee066b0690ec56bee359271b8797f..433260475dc2d9bf39cc42b316405fbbea829e2c 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-ask-password"
     xmlns:xi="http://www.w3.org/2001/XInclude">
         cached key will have a timeout of 2.5min set, after which it
         will be purged from the kernel keyring. Note that it is
         possible to cache multiple passwords under the same keyname,
-        in which case they will be stored as NUL-separated list of
+        in which case they will be stored as <constant>NUL</constant>-separated list of
         passwords. Use
         <citerefentry project='die-net'><refentrytitle>keyctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
         to access the cached key via the kernel keyring
index 682c52efb1d3c53551362fd755da175d9aacdbf5..7294910ca38696a06946bff1833d150cfffe0429 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-backlight@.service" conditional='ENABLE_BACKLIGHT'>
 
   <refentryinfo>
index 41a8247c5f400b5c46a508a333093eb056b86ad0..25c5e6dcc262cd5cc0d8f48fa8cce48c9367b1fb 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-binfmt.service" conditional='ENABLE_BINFMT'
     xmlns:xi="http://www.w3.org/2001/XInclude">
 
index 8275838bce0f3cba40a6241d754796eb05b0fd72..e945ee8c73cf8e823654da52600aa93708aef22f 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-bless-boot-generator" conditional='ENABLE_EFI'>
 
   <refentryinfo>
index 1787d7216fa4c5c325a5901442109eae6670692e..53d7e4afdc1644b3ad9431c882d6dccbc5904eaf 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-bless-boot.service" conditional='ENABLE_EFI'
           xmlns:xi="http://www.w3.org/2001/XInclude">
index e92fdd63c0119753a420082c0573a6eafe433390..39a2aa80c9822bc5e9bc4df52f477d325faaf169 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-boot-check-no-failures.service"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index b2948a5c4b5dc38528d7ff0fa4810ad919dc982e..b94665bfca0dd0a50082f4aa4fb7acc3464f5fa7 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-boot-system-token.service" conditional='ENABLE_EFI'
           xmlns:xi="http://www.w3.org/2001/XInclude">
index ee6ad1d533304f107871ab84972a85f6f108b9e8..09f2854d83a2a7d3931d92a2e46ab18e440aa7d7 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-boot" conditional='ENABLE_EFI'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 96d3072a1f350c793672be9a6e23fa66bd941e1d..aff295bd8717dfb041d221397164827e8f7eee09 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-cat"
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 2d209ab323d339865549d18aa8643500d5214396..da853ec5aa0d21074a2374a8e14f84286c992545 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-cgls"
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 5beeb586d7c1e269751f585b5fd12d5e15027416..a6d9671952b4e7dbec98512e4810158224a67d09 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-cgtop"
     xmlns:xi="http://www.w3.org/2001/XInclude">
         <term><option>-r</option></term>
         <term><option>--raw</option></term>
 
-        <listitem><para>Format byte counts (as in memory usage and I/O metrics)
+        <listitem><para>Format byte counts (as in memory usage and I/O metrics) and CPU time
         with raw numeric values rather than human-readable
         numbers.</para></listitem>
       </varlistentry>
index 1ab7e598a7c46583145372829da01014c35c624b..4ac6de1ee2591e3204302b0b6787458613ea3120 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-coredump" conditional='ENABLE_COREDUMP'
           xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -73,8 +73,8 @@
 
   <refsect1>
     <title>Configuration</title>
-    <para>For programs started by <command>systemd</command> process resource limits can be set by directive
-    <varname>LimitCore=</varname>, see
+    <para>For programs started by <command>systemd</command>, process resource limits can be set by directive
+    <varname>LimitCORE=</varname>, see
     <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
     </para>
 
     <citerefentry><refentrytitle>systemd-sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
     </para>
 
-    <para>In order to by used in the <option>--backtrace</option> mode, an appropriate backtrace
+    <para>In order to be used in the <option>--backtrace</option> mode, an appropriate backtrace
     handler must be installed on the sender side. For example, in case of
     <citerefentry project='die-net'><refentrytitle>python</refentrytitle><manvolnum>1</manvolnum></citerefentry>, this
-    means a <varname>sys.excepthook</varname> must installed, see
+    means a <varname>sys.excepthook</varname> must be installed, see
     <ulink url="https://github.com/keszybz/systemd-coredump-python">systemd-coredump-python</ulink>.
     </para>
 
index e3c17d64d8c4d1fc80b848832a2036bf5396b5cb..4284f78c4e0c9cbbe61343465d1a32f4af0b81f5 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-cryptsetup-generator" conditional='HAVE_LIBCRYPTSETUP'>
 
   <refentryinfo>
         LUKS device given by the UUID appear under the provided
         name.</para>
 
+        <para>This parameter is the analogue of the first <citerefentry><refentrytitle>crypttab</refentrytitle>
+        <manvolnum>5</manvolnum></citerefentry> field <replaceable>volume-name</replaceable>.</para>
+
         <para><varname>rd.luks.name=</varname> is honored only by
         initial RAM disk (initrd) while <varname>luks.name=</varname>
         is honored by both the main system and the initrd.</para>
       </varlistentry>
 
       <varlistentry>
-        <term><varname>luks.options=</varname></term>
-        <term><varname>rd.luks.options=</varname></term>
+        <term><varname>luks.data=</varname></term>
+        <term><varname>rd.luks.data=</varname></term>
 
-        <listitem><para>Takes a LUKS super block UUID followed by an
-        <literal>=</literal> and a string of options separated by
-        commas as argument. This will override the options for the
-        given UUID.</para>
-        <para>If only a list of options, without an UUID, is
-        specified, they apply to any UUIDs not specified elsewhere,
-        and without an entry in
-        <filename>/etc/crypttab</filename>.</para><para>
-        <varname>rd.luks.options=</varname> is honored only by initial
-        RAM disk (initrd) while <varname>luks.options=</varname> is
-        honored by both the main system and the initrd.</para>
+        <listitem><para>Takes a LUKS super block UUID followed by a <literal>=</literal> and a block device
+        specification for device hosting encrypted data.</para>
+
+        <para>For those entries specified with <varname>rd.luks.uuid=</varname> or
+        <varname>luks.uuid=</varname>, the data device will be set to the one specified by
+        <varname>rd.luks.data=</varname> or <varname>luks.data=</varname> of the corresponding UUID.</para>
+
+        <para>LUKS data device parameter is useful for specifying encrypted data devices with detached headers specified in
+        <varname>luks.options</varname> entry containing <literal>header=</literal> argument. For example,
+        <varname>rd.luks.uuid=</varname>b40f1abf-2a53-400a-889a-2eccc27eaa40
+        <varname>rd.luks.options=</varname>b40f1abf-2a53-400a-889a-2eccc27eaa40=header=/path/to/luks.hdr
+        <varname>rd.luks.data=</varname>b40f1abf-2a53-400a-889a-2eccc27eaa40=/dev/sdx.
+        Hence, in this case, we will attempt to unlock LUKS device assembled from data device <literal>/dev/sdx</literal>
+        and LUKS header (metadata) put in <literal>/path/to/luks.hdr</literal> file. This syntax is for now
+        only supported on a per-device basis, i.e. you have to specify LUKS device UUID.</para>
+
+        <para>This parameter is the analogue of the second <citerefentry><refentrytitle>crypttab</refentrytitle>
+        <manvolnum>5</manvolnum></citerefentry> field <replaceable>encrypted-device</replaceable>.</para>
+
+        <para><varname>rd.luks.data=</varname> is honored only by initial RAM disk (initrd) while
+        <varname>luks.data=</varname> is honored by both the main system and the initrd.</para>
         </listitem>
       </varlistentry>
 
         This syntax is for now only supported on a per-device basis,
         i.e. you have to specify LUKS device UUID.</para>
 
+        <para>This parameter is the analogue of the third <citerefentry><refentrytitle>crypttab</refentrytitle>
+        <manvolnum>5</manvolnum></citerefentry> field <replaceable>key-file</replaceable>.</para>
+
         <para><varname>rd.luks.key=</varname>
         is honored only by initial RAM disk
         (initrd) while
         the initrd.</para>
         </listitem>
       </varlistentry>
+
+      <varlistentry>
+        <term><varname>luks.options=</varname></term>
+        <term><varname>rd.luks.options=</varname></term>
+
+        <listitem><para>Takes a LUKS super block UUID followed by an
+        <literal>=</literal> and a string of options separated by
+        commas as argument. This will override the options for the
+        given UUID.</para>
+        <para>If only a list of options, without an UUID, is
+        specified, they apply to any UUIDs not specified elsewhere,
+        and without an entry in
+        <filename>/etc/crypttab</filename>.</para>
+
+        <para>This parameter is the analogue of the fourth <citerefentry><refentrytitle>crypttab</refentrytitle>
+        <manvolnum>5</manvolnum></citerefentry> field <replaceable>options</replaceable>.</para>
+
+        <para>It is possible to specify an external device which
+        should be mounted before we attempt to unlock the LUKS device.
+        systemd-cryptsetup will assemble LUKS device by combining
+        data device specified in <varname>luks.data</varname> with
+        detached LUKS header found in <literal>header=</literal>
+        argument. For example,
+        <varname>rd.luks.uuid=</varname>b40f1abf-2a53-400a-889a-2eccc27eaa40
+        <varname>rd.luks.options=</varname>b40f1abf-2a53-400a-889a-2eccc27eaa40=header=/luks.hdr:LABEL=hdrdev
+        <varname>rd.luks.data=</varname>b40f1abf-2a53-400a-889a-2eccc27eaa40=/dev/sdx.
+        Hence, in this case, we will attempt to mount file system
+        residing on the block device with label <literal>hdrdev</literal>, and look
+        for <literal>luks.hdr</literal> on that file system. Said header will be used
+        to unlock (decrypt) encrypted data stored on /dev/sdx.
+        This syntax is for now only supported on a per-device basis,
+        i.e. you have to specify LUKS device UUID.</para>
+
+        <para><varname>rd.luks.options=</varname> is honored only by initial
+        RAM disk (initrd) while <varname>luks.options=</varname> is
+        honored by both the main system and the initrd.</para>
+        </listitem>
+      </varlistentry>
     </variablelist>
   </refsect1>
 
index 164fc2ed849ea225843347d933048357a0d4bd88..216db7467c4d264ca2b1fb35b7b2a0836cd72084 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-cryptsetup@.service" conditional='HAVE_LIBCRYPTSETUP'>
 
   <refentryinfo>
index 305dc2ff371bb92020e90673d5426ecb88f7361f..531209bec2519c23975b113e1189abba47a7d9c8 100644 (file)
@@ -5,7 +5,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-debug-generator">
 
   <refentryinfo>
index 381add7f0c4ff52205bc2c2b591a96a63d019082..7a83bc9fca369e1d650e81f0890c4f4efdedd029 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-delta"
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 36c4602d6965159ed86e0af79caa3e4a31ca3c79..09491f7f112b55305973b0082c422efa65e2d7d6 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-detect-virt"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 1c761c4996b5121f3f6251174f792be68a0c2d68..ed2153f765bfe613f34aea13c4376dd26cc12071 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-dissect" conditional='HAVE_BLKID'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 708db01b4a61ca6c82709073fcfea7011a341f30..a9b6b987dea922977d65b836b673738e6a521cf8 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-environment-d-generator" conditional='ENABLE_ENVIRONMENT_D'>
 
   <refentryinfo>
index 86ef175ab8308d4c5330a2d034f588624289aa47..f5d78be4884d892613a63c631fab431a74e2c049 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-escape"
     xmlns:xi="http://www.w3.org/2001/XInclude">
index e60bfa0eb0b306d27c65551e41c5523fa943f628..a1607abb84a17ba875880f2a8dd62335fee12498 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-firstboot" conditional='ENABLE_FIRSTBOOT'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 16fad1ae04d118017a7b7ee675bc4390aa0ced34..035382913f3ea48eba837b73788dbea3f9cc1e01 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-fsck@.service">
 
   <refentryinfo>
index e842f3f9bc84e1a6b47a953ecbe87c9e3936b341..ec8f5c988e10b1225bc1b89e8a21917dee2cd9f9 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-fstab-generator">
 
   <refentryinfo>
index efd490bf3a5bae77f6faf3948e90d74cfbbb189f..507a001ca592e2c03ce739c657995437eddcb847 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-getty-generator">
 
   <refentryinfo>
index 7476edcffc6c4e007145fae044adb6e7b8097dbb..4a21540c702d0c1a9988da8f3551c71d84c7c483 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-gpt-auto-generator" conditional='HAVE_BLKID'>
 
             <entry><filename>/</filename></entry>
             <entry>On Itanium systems, the first Itanium root partition on the disk the EFI ESP is located on is mounted to the root directory <filename>/</filename>.</entry>
           </row>
+          <row>
+            <entry>60d5a7fe-8e7d-435c-b714-3dd8162144e1</entry>
+            <entry><filename>Root Partition (RISCV-V 32)</filename></entry>
+            <entry><filename>/</filename></entry>
+            <entry>On RISC-V 32-bit systems, the first RISCV-V 32-bit root partition on the disk the EFI ESP is located on is mounted to the root directory <filename>/</filename>.</entry>
+          </row>
+          <row>
+            <entry>72ec70a6-cf74-40e6-bd49-4bda08e8f224</entry>
+            <entry><filename>Root Partition (RISCV-V 64)</filename></entry>
+            <entry><filename>/</filename></entry>
+            <entry>On RISC-V 64-bit systems, the first RISCV-V 64-bit root partition on the disk the EFI ESP is located on is mounted to the root directory <filename>/</filename>.</entry>
+          </row>
           <row>
             <entry>933ac7e1-2eb4-4f13-b844-0e14e2aef915</entry>
             <entry>Home Partition</entry>
index 2b102cc94073f81aabc5f0d15195e372cb7b6a78..96072ae7fbac167f58a547d9bd7a34a202fd0a9d 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-halt.service">
 
index 60d66b201da6105cf9192e0b75f2e75be13145e8..910fcaeb2508ef664cfcd80f3a06d311a504ccdb 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-hibernate-resume-generator" conditional='ENABLE_HIBERNATE'>
 
   <refentryinfo>
index 88858ef6c88ad3e1467c5ac84ef6d1304f964648..c460393d9eaf107db55bdc4158e897065b7d3a53 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-hibernate-resume@.service" conditional='ENABLE_HIBERNATE'>
 
   <refentryinfo>
index d6a239bc96e1a5cce33fee9a505c63e56cfcdcd4..2bc1dba3754f910d6654aa09c91031ae9de0b7d2 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-homed.service" conditional='ENABLE_HOMED'>
 
index 1aa32a61cedc3b9a0291d2349e482fed407d1b3f..c0c46b66094c3a18f622f7d629fd8f870b7c3178 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-hostnamed.service" conditional='ENABLE_HOSTNAMED'>
 
index 15a2c0130a0bc8f8f3ef32866a8a9b3914975a8a..70c052ef8d7dac4d391f471c09d6ccffe700fb02 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-hwdb" conditional="ENABLE_HWDB"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 747b703653209cc1f9df20d9f15eaea9464b4f6e..21cbf1604f0fc1629c5bc6555611611767dec926 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-id128" xmlns:xi="http://www.w3.org/2001/XInclude">
 
index fa3c3a812f05e035fad9c5c80d1d67194c8b249d..19cc69f1a53d590cb3f380df71a46fac61253e3a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-importd.service" conditional='ENABLE_IMPORTD'>
 
index e0399ebbb1c055045af0cc5cc72213faadd9be0a..2fee0ede8458bf1d4a554ce424dc54aaecb4562e 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-inhibit"
     xmlns:xi="http://www.w3.org/2001/XInclude">
index ea93efd3f0153f6147455435f94e521ed8bf28cc..b435800c394f64ffa1960dfcb3491a8d891c6f14 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-initctl.service" conditional='HAVE_SYSV_COMPAT'>
 
index a7c50f382f0fe8a538259ad434a99de081aeefd1..43ceb97032cb43e2097b872dfe85a25f57dcc100 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-journal-gatewayd.service" conditional='HAVE_MICROHTTPD'
           xmlns:xi="http://www.w3.org/2001/XInclude">
@@ -68,8 +68,8 @@
         <term><option>--key=</option></term>
 
         <listitem><para>Specify the path to a file or <constant>AF_UNIX</constant> stream socket to read the
-        server key corresponding to the certificate specified with <option>--cert=</option> from. The key
-        must be in PEM format.</para></listitem>
+        secret server key corresponding to the certificate specified with <option>--cert=</option> from. The
+        key must be in PEM format.</para></listitem>
       </varlistentry>
 
       <varlistentry>
index 1db0128f746d780315e425096ca51bc91f7c9f0f..bea0936d6669892528793b20b9094b077b4c45f7 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-journal-remote" conditional='HAVE_MICROHTTPD'
           xmlns:xi="http://www.w3.org/2001/XInclude">
       <varlistentry>
         <term><option>--key=</option></term>
 
-        <listitem><para> Takes a path to a SSL key file in PEM format. Defaults to
+        <listitem><para>Takes a path to a SSL secret key file in PEM format. Defaults to
         <filename>&CERTIFICATE_ROOT;/private/journal-remote.pem</filename>. This option can be used with
         <option>--listen-https=</option>. If the path refers to an <constant>AF_UNIX</constant> stream socket
         in the file system a connection is made to it and the key read from it.</para></listitem>
index 174bef803f45401f3d231f5df968abea3b9d262d..e2b39bf96e693efda217765b9dd46190cbd3765d 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-journal-upload" conditional='HAVE_MICROHTTPD'
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 1ed36dace9fd3b9572ba50e7f73facafb46aaf89..35cfbde86c8b94e728657ad7f8aa3f64c6e5b5cc 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-journald.service">
 
index 49eeeffee6e368e55c977d2dfc07eb06f50ef418..b0a4a9fb037aa38753a4ccec5d947b11793c6363 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-localed.service" conditional='ENABLE_LOCALED'>
 
index bbfcad4af6b354303b00cdcec9d27dc9d9e1930f..746c9163b47c667552221e5904860218f7c61fe8 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-logind.service" conditional='ENABLE_LOGIND'>
 
index 40c9f436cf4a45017b94caf7da2e0f48005a7a47..cffc3e58ee41c95667e99c87aee9a3e6b70b5751 100644 (file)
@@ -3,7 +3,7 @@
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   Copyright © 2014 Didier Roche
 -->
index 0454c11c8cf4e03f73ce42abe6f94b4e466056f6..2c2a0964932b7325758d9dd3772da3061a7dbb30 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-machine-id-setup"
     xmlns:xi="http://www.w3.org/2001/XInclude">
index a6b1aa0f1389cda4d6872062dc4782dc3bc5979f..1b4318fdbb8f8386e54eed9d8978ff10eec2fc6f 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-machined.service" conditional='ENABLE_MACHINED'>
 
index 9aa058588edeb3c64aa0e54715ddd9662acdb6c5..5ea200cc5cce4fee47cfb1acc41116195a0a111e 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-makefs@.service">
 
   <refentryinfo>
index b849b81939d0815c244652347878774269b88a73..0144650e8708e8bb8a5dd4e6f8a82c3caefa15e9 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-modules-load.service" conditional='HAVE_KMOD'>
 
   <refentryinfo>
index 3641c90248aa30c06629fd5456e0b4ddeb743eec..1cde3ab00cd6fe0c0d247a722ed1ab91fe5a9ce2 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-mount"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 4a3f78a9e57915e18ef427a19487baced68ed262..67567c4099efb8a998591d57e67441cf445bb359 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-network-generator.service" conditional='ENABLE_NETWORKD'>
 
index e2f1eb0e831b9c61478b078b2e11496b48d8139c..6d2c71d8c7bf3f001e92478806d501b3a82bb8d5 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-networkd-wait-online.service" conditional='ENABLE_NETWORKD'
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 2913bb953df0f68ae86dd61679202aa4c0fe1357..df6e180ffcde40af0e4b52de49d48e91045b976f 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-networkd.service" conditional='ENABLE_NETWORKD'>
 
index f61bfd9980925c6bc00ae1db484239dcfeedf25d..3fed92ef0eedf40a2526fda18e290f83dd21fa60 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-notify"
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 8152cf0f1351316009fe53bdeff8f4ed12968d48..588924ee61b595bc692241c809809907b0a1d24f 100644 (file)
@@ -1,10 +1,10 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
-<!ENTITY fedora_latest_version "32">
-<!ENTITY fedora_cloud_release "1.6">
+<!ENTITY % entities SYSTEM "custom-entities.ent" >
+%entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-nspawn"
     xmlns:xi="http://www.w3.org/2001/XInclude">
diff --git a/man/systemd-oomd.service.xml b/man/systemd-oomd.service.xml
new file mode 100644 (file)
index 0000000..9cb9c60
--- /dev/null
@@ -0,0 +1,98 @@
+<?xml version='1.0'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
+
+<refentry id="systemd-oomd.service" conditional='ENABLE_OOMD'>
+
+  <refentryinfo>
+    <title>systemd-oomd.service</title>
+    <productname>systemd</productname>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>systemd-oomd.service</refentrytitle>
+    <manvolnum>8</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>systemd-oomd.service</refname>
+    <refname>systemd-oomd</refname>
+    <refpurpose>A userspace out-of-memory (OOM) killer</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <para><filename>systemd-oomd.service</filename></para>
+    <para><filename>/usr/lib/systemd/systemd-oomd</filename></para>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para><command>systemd-oomd</command> is a system service that uses cgroups-v2 and pressure stall information (PSI)
+    to monitor and take action on processes before an OOM occurs in kernel space.</para>
+
+    <para>You can enable monitoring and actions on units by setting <varname>ManagedOOMSwap=</varname> and/or
+    <varname>ManagedOOMMemoryPressure=</varname> to the appropriate value. <command>systemd-oomd</command> will
+    periodically poll enabled units' cgroup data to detect when corrective action needs to occur. When an action needs
+    to happen, it will only be performed on the descendant cgroups of the enabled units. More precisely, only cgroups with
+    <filename>memory.oom.group</filename> set to <constant>1</constant> and leaf cgroup nodes are eligible candidates.
+    Action will be taken recursively on all of the processes under the chosen candidate.</para>
+
+    <para>See
+    <citerefentry><refentrytitle>oomd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+    for more information about the configuration of this service.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Setup Information</title>
+
+    <para>The system must be running systemd with a full unified cgroup hierarchy for the expected cgroups-v2 features.
+    Furthermore, resource accounting must be turned on for all units monitored by <command>systemd-oomd</command>.
+    The easiest way to turn on resource accounting is by ensuring the values for <varname>DefaultCPUAccounting</varname>,
+    <varname>DefaultIOAccounting</varname>, <varname>DefaultMemoryAccounting</varname>, and
+    <varname>DefaultTasksAccounting</varname> are set to <constant>true</constant> in
+    <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
+
+    <para>You will need a kernel compiled with PSI support. This is available in Linux 4.20 and above.</para>
+
+    <para>The system must also have swap enabled for <command>systemd-oomd</command> to function correctly. With swap
+    enabled, the system spends enough time swapping pages to let <command>systemd-oomd</command> react.
+    Without swap, the system enters a livelocked state much more quickly and may prevent <command>systemd-oomd</command>
+    from responding in a reasonable amount of time. See
+    <ulink url="https://chrisdown.name/2018/01/02/in-defence-of-swap.html">"In defence of swap: common misconceptions"</ulink>
+    for more details on swap.</para>
+
+    <para>Be aware that if you intend to enable monitoring and actions on <filename>user.slice</filename>,
+    <filename>user-$UID.slice</filename>, or their ancestor cgroups, it is highly recommended that your programs be
+    managed by the systemd user manager to prevent running too many processes under the same session scope (and thus
+    avoid a situation where memory intensive tasks trigger <command>systemd-oomd</command> to kill everything under the
+    cgroup). If you're using a desktop environment like GNOME, it already spawns many session components with the
+    systemd user manager.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Usage Recommendations</title>
+
+    <para><varname>ManagedOOMSwap=</varname> works with the system-wide swap values, so setting it on the root slice
+    <filename>-.slice</filename>, and allowing all descendant cgroups to be eligible candidates may make the most
+    sense.</para>
+
+    <para><varname>ManagedOOMMemoryPressure=</varname> tends to work better on the cgroups below the root slice
+    <filename>-.slice</filename>. For units which tend to have processes that are less latency sensitive (e.g.
+    <filename>system.slice</filename>), a higher limit like the default of 60% may be acceptable, as those processes
+    can usually ride out slowdowns caused by lack of memory without serious consequences. However, something like
+    <filename>user@$UID.service</filename> may prefer a much lower value like 40%.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+    <para>
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>oomd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>oomctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+    </para>
+  </refsect1>
+</refentry>
index 91a8786abdb7082a7b4043758459d924c7dd862f..f2ca87d36843dbf06e337f38691b6c052deeea14 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-path"
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 3363a1d946179eecc6c6c9782025bde3a457f75c..ce91b4fcbb09b4389b97a778ac4e6eaec3c16102 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-portabled.service" conditional='ENABLE_PORTABLED'>
 
index 335a3b3d183e1b67d3e14cebb6140e61390ef8c5..306f1099b04544783e34bc9ceb7b5f9a63c3f1bb 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-pstore" conditional='ENABLE_PSTORE'
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 9ba9f3950b73bae81e1ca95bdd22e7d16b554226..4e2a5a43eb9eb408ff5691336027a87e94db837d 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-quotacheck.service" conditional='ENABLE_QUOTACHECK'>
 
   <refentryinfo>
index a9e322425f5dfe2fdafa597249def2446afb6a61..3137ed0c81d6282100826587f1738201c3959348 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-random-seed.service" conditional='ENABLE_RANDOMSEED'>
 
   <refentryinfo>
index b51f50a1e14779ba28b4f2ad6f27dc2c3692a89d..9e175247fd3468cb62e3c1f24d64ce55fed1bbf0 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-rc-local-generator" conditional='HAVE_SYSV_COMPAT'>
   <refentryinfo>
index 4f89156264a2e521eb658d7c728b10d01038286a..be74307f9b960ac4fb970be99cdf53b55f70d272 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-remount-fs.service">
 
   <refentryinfo>
index b234cfe94969bbf4f42c4e67b36fb624421908db..16add32b2d46b7005084d24fdc040cbeff248613 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-repart" conditional='ENABLE_REPART'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 6137a6d836540255449e571afd260206d835f239..12aefd5a892f5296dc8fbc66f134ae587a9ed7b8 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-resolved.service" conditional='ENABLE_RESOLVE'>
 
   <refsect1>
     <title>Synthetic Records</title>
 
-    <para><command>systemd-resolved</command> synthesizes DNS resource records (RRs) for the following
+    <para><command>systemd-resolved</command> synthetizes DNS resource records (RRs) for the following
     cases:</para>
 
     <itemizedlist>
       <listitem><para>The local, configured hostname is resolved to all locally configured IP addresses
       ordered by their scope, or — if none are configured — the IPv4 address 127.0.0.2 (which is on the local
-      loopback) and the IPv6 address ::1 (which is the local host).</para></listitem>
+      loopback interface) and the IPv6 address ::1 (which is the local host).</para></listitem>
 
       <listitem><para>The hostnames <literal>localhost</literal> and <literal>localhost.localdomain</literal>
-      (as well as any hostname ending in <literal>.localhost</literal> or
-      <literal>.localhost.localdomain</literal>) are resolved to the IP addresses 127.0.0.1 and ::1.
+      as well as any hostname ending in <literal>.localhost</literal> or
+      <literal>.localhost.localdomain</literal> are resolved to the IP addresses 127.0.0.1 and ::1.
       </para></listitem>
 
       <listitem><para>The hostname <literal>_gateway</literal> is resolved to all current default routing
     according to the following rules:</para>
 
     <itemizedlist>
-      <listitem><para>Names for which synthetic records are generated (as listed in the previous section) are
-      never routed to the network and a reply is sent immediately. In particular this means that lookups for
-      <literal>localhost</literal> are never routed to the network.</para></listitem>
-
-      <listitem><para>Single-label names are routed to all local interfaces capable of IP multicasting, where
-      LLMNR is not disabled, using the LLMNR protocol. Lookups for IPv4 addresses are only sent via LLMNR on
-      IPv4, and lookups for IPv6 addresses are only sent via LLMNR on IPv6. Lookups for the locally
-      configured hostname and the <literal>_gateway</literal> hostname are never routed to LLMNR.
-      </para></listitem>
-
-      <listitem><para>Multi-label names with the domain suffix <literal>.local</literal> are routed to all
-      local interfaces capable of IP multicasting, where MulticastDNS is not disabled, using the MulticastDNS
-      protocol. As with LLMNR, IPv4 address lookups are sent via IPv4 and IPv6 address lookups are sent via
-      IPv6.</para></listitem>
-
-      <listitem><para>Resolution of address records (A and AAAA) via unicast DNS (i.e. not LLMNR or
-      MulticastDNS) for non-synthesized single-label names is allowed for non-top-level domains. This means
-      that such records can be resolved when search domains are defined. For any interface which defines
-      search domains, such look-ups are routed to that interface, suffixed with each of the search domains
-      defined on that interface in turn. When global search domains are defined, such look-ups are routed to
-      all interfaces, suffixed by each of the global search domains in turn. Additionally, lookup of
-      single-label names via unicast DNS may be enabled with the
-      <varname>ResolveUnicastSingleLabel=yes</varname> setting. The details of which servers are queried and
-      how the final reply is chosen are described below. Note that this means that address queries for
-      single-label names are never sent out to remote DNS servers by default, and if no search domains are
-      defined, resolution will fail.</para></listitem>
-
-      <listitem><para>Other multi-label names are routed to all local interfaces that have a DNS server
-      configured, plus the globally configured DNS servers if there are any. Note that by default, lookups for
-      domains with the <literal>.local</literal> suffix are not routed to DNS servers, unless the domain is
-      specified explicitly as routing or search domain for the DNS server and interface. This means that on
-      networks where the <literal>.local</literal> domain is defined in a site-specific DNS server, explicit
-      search or routing domains need to be configured to make lookups within this DNS domain work. Note that
-      these days, it's generally recommended to avoid defining <literal>.local</literal> in a DNS server, as
-      <ulink url="https://tools.ietf.org/html/rfc6762">RFC6762</ulink> reserves this domain for exclusive
+      <listitem><para>Names for which synthetic records are generated (the local hostname,
+      <literal>localhost</literal> and <literal>localdomain</literal>, local gateway, as listed in the
+      previous section) and addresses configured in <filename>/etc/hosts</filename> are never routed to the
+      network and a reply is sent immediately.</para></listitem>
+
+      <listitem><para>Single-label names are resolved using LLMNR on all local interfaces where LLMNR is
+      enabled. Lookups for IPv4 addresses are only sent via LLMNR on IPv4, and lookups for IPv6 addresses are
+      only sent via LLMNR on IPv6. Note that lookups for single-label synthetized names are not routed to
+      LLMNR, MulticastDNS or unicast DNS.</para></listitem>
+
+      <listitem><para>Queries for the address records (A and AAAA) of single-label non-synthetized names are
+      resolved via unicast DNS using search domains. For any interface which defines search domains, such
+      look-ups are routed to that interface, suffixed with each of the search domains defined on that
+      interface in turn. When global search domains are defined, such look-ups are routed to all interfaces,
+      suffixed by each of the global search domains in turn. Additionally, lookup of single-label names via
+      unicast DNS may be enabled with the <varname>ResolveUnicastSingleLabel=yes</varname> setting. The
+      details of which servers are queried and how the final reply is chosen are described below. Note that
+      this means that address queries for single-label names are never sent out to remote DNS servers by
+      default, and resoulution is only possible if search domains are defined.</para></listitem>
+
+      <listitem><para>Multi-label names with the domain suffix <literal>.local</literal> are resolved using
+      MulticastDNS on all local interfaces where MulticastDNS is enabled. As with LLMNR, IPv4 address lookups
+      are sent via IPv4 and IPv6 address lookups are sent via IPv6.</para></listitem>
+
+      <listitem><para>Queries for multi-label names are routed via unicast DNS on local interfaces that have
+      a DNS server configured, plus the globally configured DNS servers if there are any. Which interfaces
+      are used is determined by the routing logic based on search and route-only domains, described below.
+      Note that by default, lookups for domains with the <literal>.local</literal> suffix are not routed to
+      DNS servers, unless the domain is specified explicitly as routing or search domain for the DNS server
+      and interface. This means that on networks where the <literal>.local</literal> domain is defined in a
+      site-specific DNS server, explicit search or routing domains need to be configured to make lookups work
+      within this DNS domain. Note that these days, it's generally recommended to avoid defining
+      <literal>.local</literal> in a DNS server, as <ulink
+      url="https://tools.ietf.org/html/rfc6762">RFC6762</ulink> reserves this domain for exclusive
       MulticastDNS use.</para></listitem>
 
-      <listitem><para>Address lookups are routed similarly to multi-label names, with the exception that
-      addresses from the link-local address range are never routed to unicast DNS and are only resolved using
-      LLMNR and MulticastDNS (when enabled).</para></listitem>
+      <listitem><para>Address lookups (reverse lookups) are routed similarly to multi-label names, with the
+      exception that addresses from the link-local address range are never routed to unicast DNS and are only
+      resolved using LLMNR and MulticastDNS (when enabled).</para></listitem>
     </itemizedlist>
 
     <para>If lookups are routed to multiple interfaces, the first successful response is returned (thus
     effectively merging the lookup zones on all matching interfaces). If the lookup failed on all interfaces,
     the last failing response is returned.</para>
 
-    <para>Routing of lookups may be influenced by configuring per-interface domain names and other
-    settings. See
+    <para>Routing of lookups is determined by the per-interface routing domains (search and route-only) and
+    global search domains. See
     <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry> and
-    <citerefentry><refentrytitle>resolvectl</refentrytitle><manvolnum>1</manvolnum></citerefentry> for
-    details. The following query routing logic applies for unicast DNS traffic:</para>
+    <citerefentry><refentrytitle>resolvectl</refentrytitle><manvolnum>1</manvolnum></citerefentry> for a
+    description how those settings are set dynamically and the discussion of <varname>Domains=</varname> in
+    <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> for a
+    description of globally configured DNS settings.</para>
+
+    <para>The following query routing logic applies for unicast DNS traffic:</para>
 
     <itemizedlist>
       <listitem><para>If a name to look up matches (that is: is equal to or has as suffix) any of the
-      configured search or route-only domains of any link (see
-      <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>),
-      or the globally configured DNS settings (see the discussion of <varname>Domains=</varname> in
-      <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>),
-      "best matching" search/route-only domain is determined: the matching one with the most labels. The
-      query is then sent to all DNS servers of any links or the globally configured DNS servers associated
-      with this "best matching" search/route-only domain. (Note that more than one link might have this same
-      "best matching" search/route-only domain configured, in which case the query is sent to all of them in
-      parallel).</para>
+      configured routing domains (search or route-only) of any link, or the globally configured DNS settings,
+      "best matching" routing domain is determined: the matching one with the most labels. The query is then
+      sent to all DNS servers of any links or the globally configured DNS servers associated with this "best
+      matching" routing domain. (Note that more than one link might have this same "best matching" routing
+      domain configured, in which case the query is sent to all of them in parallel).</para>
 
       <para>In case of single-label names, when search domains are defined, the same logic applies, except
-      that the name is first suffixed by the search domain.</para></listitem>
+      that the name is first suffixed by each of the search domains in turn. Note that this search logic
+      doesn't apply to any names with at least one dot. Also see the discussion about compatibility with
+      the traditional glibc resolver below.</para></listitem>
 
-      <listitem><para>If a query does not match any configured search/route-only domain (neither per-link nor
-      global), it is sent to all DNS servers that are configured on links with the "DNS default route" option
-      set, as well as the globally configured DNS server.</para></listitem>
+      <listitem><para>If a query does not match any configured routing domain (either per-link or global), it
+      is sent to all DNS servers that are configured on links with the <varname>DefaultRoute=</varname>
+      option set, as well as the globally configured DNS server.</para></listitem>
 
-      <listitem><para>If there is no link configured as "DNS default route" and no global DNS server
-      configured, the compiled-in fallback DNS server is used.</para></listitem>
+      <listitem><para>If there is no link configured as <varname>DefaultRoute=</varname> and no global DNS
+      server configured, one of the compiled-in fallback DNS servers is used.</para></listitem>
 
-      <listitem><para>Otherwise the query is failed as no suitable DNS servers could be determined.
+      <listitem><para>Otherwise the unicast DNS query fails, as no suitable DNS servers can be determined.
       </para></listitem>
     </itemizedlist>
 
-    <para>The "DNS default route" option is a boolean setting configurable with <command>resolvectl</command>
-    or in <filename>.network</filename> files. If not set, it is implicitly determined based on the
-    configured DNS domains for a link: if there's any route-only domain (not matching <literal>~.</literal>)
-    it defaults to false, otherwise to true.</para>
+    <para>The <varname>DefaultRoute=</varname> option is a boolean setting configurable with
+    <command>resolvectl</command> or in <filename>.network</filename> files. If not set, it is implicitly
+    determined based on the configured DNS domains for a link: if there's a route-only domain other than
+    <literal>~.</literal>, it defaults to false, otherwise to true.</para>
 
     <para>Effectively this means: in order to support single-label non-synthetized names, define appropriate
-    search domains. In order to preferably route all DNS queries not explicitly matched by search/route-only
-    domain configuration to a specific link, configure a <literal>~.</literal> route-only domain on it. This
-    will ensure that other links will not be considered for these queries (unless they too carry such a
-    route-only domain). In order to route all such DNS queries to a specific link only if no other link
-    is preferable, set the "DNS default route" option for the link to true and do not configure a
+    search domains. In order to preferably route all DNS queries not explicitly matched by routing domain
+    configuration to a specific link, configure a <literal>~.</literal> route-only domain on it. This will
+    ensure that other links will not be considered for these queries (unless they too carry such a routing
+    domain). In order to route all such DNS queries to a specific link only if no other link is preferred,
+    set the <varname>DefaultRoute=</varname> option for the link to true and do not configure a
     <literal>~.</literal> route-only domain on it. Finally, in order to ensure that a specific link never
-    receives any DNS traffic not matching any of its configured search/route-only domains, set the "DNS
-    default route" option for it to false.</para>
+    receives any DNS traffic not matching any of its configured routing domains, set the
+    <varname>DefaultRoute=</varname> option for it to false.</para>
 
     <para>See
     <citerefentry><refentrytitle>org.freedesktop.resolve1</refentrytitle><manvolnum>5</manvolnum></citerefentry>
     for information about the D-Bus APIs <filename>systemd-resolved</filename> provides.</para>
   </refsect1>
 
+  <refsect1>
+    <title>Compatibility with the traditional glibc stub resolver</title>
+
+    <para>This section provides a short summary of differences in the stub resolver implemented by
+    <citerefentry><refentrytitle>nss-resolve</refentrytitle><manvolnum>8</manvolnum></citerefentry> together
+    with <command>systemd-resolved</command> and the tranditional stub resolver implemented in
+    <citerefentry><refentrytitle>nss-dns</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
+
+    <itemizedlist>
+      <listitem><para>Some names are always resolved internally (see Synthetic Records above). Traditionally
+      they would be resolved by <filename>nss-files</filename>, and only if provided in
+      <filename>/etc/hosts</filename>.</para></listitem>
+
+      <listitem><para>Single-label names are not resolved for A and AAAA records using unicast DNS (unless
+      overridden with <varname>ResolveUnicastSingleLabel=</varname>, see
+      <citerefentry><refentrytitle>resolved.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
+      This is similar to the <option>no-tld-query</option> option being set in
+      <citerefentry><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+      </para></listitem>
+
+      <listitem><para>Search domains are not used for <emphasis>suffixing</emphasis> of multi-label names.
+      (Search domains are nevertheless used for lookup <emphasis>routing</emphasis>, for names that were
+      originally specified as single-label or multi-label.) Any name with at least one dot is always
+      interpreted as a FQDN. <filename>nss-dns</filename> would resolve names both as relative (using search
+      domains) and absolute FQDN names. Some names would be resolved as relative first, and after that query
+      has failed, as absolute, while other names would be resolved in opposite order. The
+      <varname>ndots</varname> option in <filename>/etc/resolv.conf</filename> was used to control how many
+      dots the name needs to have to be resolved as relative first. This stub resolver does not implement
+      this at all: multi-label names are only resolved as FQDNs. (There are currently more than 1500
+      top-level domain names defined, and new ones are added regularly, often using "attractive" names that
+      are also likely to be used locally. Not looking up multi-label names in this fashion avoids fragility
+      in both directions: a valid global name could be obscured by a local name, and resolution of a relative
+      local name could suddenly break when a new top-level domain is created, or when a new subdomain of a
+      top-level domain in registered. Resolving any given name as either relative or absolute avoids this
+      ambiguity.)</para></listitem>
+
+      <listitem><para>This resolver has a notion of the special <literal>.local</literal> domain used for
+      MulticastDNS, and will not route queries with that suffix to unicast DNS servers unless explicitly
+      configured, see above. Also, reverse lookups for link-local addresses are not sent to unicast DNS
+      servers.</para></listitem>
+
+      <listitem><para>This resolver reads and caches <filename>/etc/hosts</filename> internally. (In other
+      words, <filename>nss-resolve</filename> replaces <filename>nss-files</filename> in addition to
+      <filename>nss-dns</filename>). Entries in <filename>/etc/hosts</filename> have highest priority.</para>
+      </listitem>
+
+      <listitem><para>This resolver also implements LLMNR and MulticastDNS in addition to the classic unicast
+      DNS protocol, and will resolve single-label names using LLMNR (when enabled) and names ending in
+      <literal>.local</literal> using MulticastDNS (when enabled).</para></listitem>
+
+      <listitem><para>Environment variables <varname>$LOCALDOMAIN</varname> and
+      <varname>$RES_OPTIONS</varname> described in
+      <citerefentry><refentrytitle>resolv.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> are not
+      supported currently.</para></listitem>
+    </itemizedlist>
+  </refsect1>
+
   <refsect1>
     <title><filename>/etc/resolv.conf</filename></title>
 
         synchronous way.</para></listitem>
       </varlistentry>
     </variablelist>
-
   </refsect1>
 
   <refsect1>
index bc3322cf2d36ced276adb6d9cfdb73924a4fe3fd..d89eb91d435ba91aceeba54547bd0fb93acaffea 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-rfkill.service" conditional='ENABLE_RFKILL'>
 
   <refentryinfo>
index db84cf73a82164f759d3af0c748b284c6b2c9ce5..02924b45f148dfb230ad484846c180be7cd5f4bc 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-run-generator">
 
   <refentryinfo>
index c1471e108f2d77baa0fc0e585a5b746b3d6fbf7b..fc8716ea79d304ce2f0d4e5b655f9d7ab601d866 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-run"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index a3714f52ae62345666d3df315c65ceebd0ae1ca2..d117a212acdafca9f25ea52422d89afd473a3035 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-sleep.conf"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 20a557219257d5db8ff9165a2a902fe5c3ecfdb0..a9d00dce21e40f8c82b7d850614c1fc551bb75d5 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-socket-activate"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index a4e18989fc106900eeada51dd70a153490c1166e..e512a4334e95752b1097b150c67b3210c86d0998 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-socket-proxyd"
     xmlns:xi="http://www.w3.org/2001/XInclude">
 
index e57000e09ad91443e04fe66892ed3e9a19f93b4e..e4a6de548f915c70dfaea6895053ee9a4d6831f8 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-suspend.service"
     xmlns:xi="http://www.w3.org/2001/XInclude">
index fa1cbef586b1f0eccb63dba95795c04bd87cca18..751aa2b09e07563579dd9e24156d37c51ed0ffe1 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-sysctl.service"
     xmlns:xi="http://www.w3.org/2001/XInclude">
 
index d816c0b2c8d8aef3f4918223d5f660ba70ffd8ac..8711be26e34939ae32088cfb58dab911ca915517 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-system-update-generator">
 
   <refentryinfo>
index c64e57c2777ef4d36b7192748110ecf19ac34ed3..0dea50f2fe87591faef8201034399c927f0864cf 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-system.conf"
     xmlns:xi="http://www.w3.org/2001/XInclude">
         <listitem><para>Configure the default value for the per-unit <varname>TasksMax=</varname> setting. See
         <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>
         for details. This setting applies to all unit types that support resource control settings, with the exception
-        of slice units. Defaults to 15%, which equals 4915 with the kernel's defaults on the host, but might be smaller
-        in OS containers.</para></listitem>
+        of slice units. Defaults to 15% of the sysctl setting <varname>kernel.pid_max=</varname> or root cgroup <varname>pids.max</varname>.
+        Kernel has a default value for <varname>kernel.pid_max=</varname> and an algorithm of counting in case of more than 32 cores.
+        For example with the default <varname>kernel.pid_max=</varname>, <varname>DefaultTasksMax=</varname> defaults to 4915,
+        but might be greater in other systems or smaller in OS containers.</para></listitem>
       </varlistentry>
 
       <varlistentry>
index 1e5853a55b8e86469d8f0a5a2b6c3b8a4b9afd5a..950a8b4499bbb9e306cbacd2bf94468929b9026c 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-sysusers"
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 7396d4ab606e4950fb203065cb0b783a4dff7738..14ab932fedb6b7531493c9e3070675166aa4d859 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-sysv-generator" conditional="HAVE_SYSV_COMPAT">
 
   <refentryinfo>
index 685fe74339e999067ac3ed65f34d20ff1efc8bcc..28f55a184e18d2bc3ab5cc3fab3f8cb2f184231b 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-time-wait-sync.service" conditional='ENABLE_TIMESYNCD'>
 
index 93cfdf511803a06c109101e6450aa8b0905f1fc3..112bdf3040d7e30c68ecf3a81ff344f69ed54e55 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-timedated.service" conditional='ENABLE_TIMEDATED'>
 
index 3dff63779bd56e44ee23cb3cde30838488668f88..ff14c40665b3bca1389d7597555b2cb5a739f64d 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-timesyncd.service" conditional='ENABLE_TIMESYNCD'>
 
index b6011c344a8a5205c1b43eb32e177e4328212bb9..90c2626685edd526106b0673a7ee9a8a1e9a568b 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-tmpfiles"
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 36089dff83c11332e626d9bce07cdc5a4ddf3836..995657683b663e33cb06c0faf0f09bfe1b864716 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-tty-ask-password-agent"
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 3698bfaf19a9ed831210a3d24c990942e7efffb1..2852f314660be3da8bda6c44f0c7d77dc207858e 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-udev-settle.service"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index e49690dc74b2c78d7ec78be06a11b41b581f9c23..5df4cd6a223ef98018c6883cc7ef82335c4f1ee5 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-udevd.service"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index f26da5102abdbaf7f9df8eccc2e9d7583bd1aa6c..3393010ff639b4f3b9f59b9899d275098ae7a71a 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-update-done.service">
 
   <refentryinfo>
index e1059ec733f07aeab9c96a973d3865e0f0218d1e..ff01893b94f5896994e778d5357a2cff31a1b607 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-update-utmp.service" conditional="ENABLE_UTMP">
 
   <refentryinfo>
index ab33d469a20d204df1d1fc9d892a852249f0ca8e..f05e4e3222632d2e69675480df0dcdb26981f5fa 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-user-sessions.service" conditional='HAVE_PAM'>
 
   <refentryinfo>
index 9d5841c0f01ca55546cc56cf352c448043fa3a6d..a6234be214c3db54929937433ce7ceb098efa413 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd-userdbd.service" conditional='ENABLE_USERDB'>
 
index 7e763837201b054ca441be0bca96a6a6819c71b6..80577edba0513b3a6063b219b108527340f3c941 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-vconsole-setup.service" conditional='ENABLE_VCONSOLE'>
 
   <refentryinfo>
index bcacd59cf965ddf1c7f28174e16ee5ef59f96b2f..d2736a7fd518dd2cfe7b3bc217da54897638b86c 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-veritysetup-generator" conditional='HAVE_LIBCRYPTSETUP'>
 
   <refentryinfo>
index 2c71c3e70bf88094eae3aff2e553269632466b78..c9554b087aebb35bfd0a33670f459e36d83c5c93 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-veritysetup@.service" conditional='HAVE_LIBCRYPTSETUP'>
 
   <refentryinfo>
index 0b1f39e34d0e13841681436cd2fcb565af195372..d591da2f779e27d60cc837d7ccafc23bcfa2661b 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-volatile-root.service">
 
   <refentryinfo>
index 07b6e455f703e794cb63ebb501e18688c9692a30..4d153c30403afff7c9166f4115e4722cab0061de 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd-xdg-autostart-generator" conditional="ENABLE_XDG_AUTOSTART">
 
   <refentryinfo>
@@ -21,7 +21,7 @@
   </refnamediv>
 
   <refsynopsisdiv>
-    <para><filename>/usr/lib/systemd/system-generators/systemd-xdg-autostart-generator</filename></para>
+    <para><filename>/usr/lib/systemd/user-generators/systemd-xdg-autostart-generator</filename></para>
   </refsynopsisdiv>
 
   <refsect1>
index 29b9bb14e14fc659a36a30d0b626f90c3fafe1bc..a592fd3af2f6a4d73af1ff378fa696a4eacc622b 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.automount">
   <refentryinfo>
index 49b59ebf13013ae06f3c10b837a0b5e671018877..255ca3373bbcb354856066011f361f13c29a16f5 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.device">
   <refentryinfo>
index c4f7ef6e6bcf757a4ebd18a5c1ad2f5cf618364b..96a14b1ba542063cc7e21878092e42c2f6d1bda5 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.dnssd"
           xmlns:xi="http://www.w3.org/2001/XInclude"
index 4ffe89065d1fdcf5993dedf250e800650e9b9847..663d7dcddf944cb54ea8c16edf14f43cd53a224c 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.environment-generator" conditional='ENABLE_ENVIRONMENT_D'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 9da919c3795b61edff4fd3e9f2a204cf69170217..4b85f914f42d2467c689ee46ca60b8f1a958eb0a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.exec" xmlns:xi="http://www.w3.org/2001/XInclude">
   <refentryinfo>
@@ -885,7 +885,7 @@ CapabilityBoundingSet=~CAP_B CAP_C</programlisting>
         <citerefentry><refentrytitle>umask</refentrytitle><manvolnum>2</manvolnum></citerefentry> for
         details. Defaults to 0022 for system units. For user units the default value is inherited from the
         per-user service manager (whose default is in turn inherited from the system service manager, and
-        thus typically also is 0022 — unless overriden by a PAM module). In order to change the per-user mask
+        thus typically also is 0022 — unless overridden by a PAM module). In order to change the per-user mask
         for all user services, consider setting the <varname>UMask=</varname> setting of the user's
         <filename>user@.service</filename> system service instance. The per-user umask may also be set via
         the <varname>umask</varname> field of a user's <ulink url="https://systemd.io/USER_RECORD">JSON User
@@ -1918,9 +1918,9 @@ RestrictNamespaces=~cgroup net</programlisting>
         but without the <constant>CAP_SYS_ADMIN</constant> capability (e.g. setting
         <varname>User=nobody</varname>), <varname>NoNewPrivileges=yes</varname> is implied. This feature
         makes use of the Secure Computing Mode 2 interfaces of the kernel ('seccomp filtering') and is useful
-        for enforcing a minimal sandboxing environment. Note that the <function>execve</function>,
-        <function>exit</function>, <function>exit_group</function>, <function>getrlimit</function>,
-        <function>rt_sigreturn</function>, <function>sigreturn</function> system calls and the system calls
+        for enforcing a minimal sandboxing environment. Note that the <function>execve()</function>,
+        <function>exit()</function>, <function>exit_group()</function>, <function>getrlimit()</function>,
+        <function>rt_sigreturn()</function>, <function>sigreturn()</function> system calls and the system calls
         for querying time and sleeping are implicitly allow-listed and do not need to be listed
         explicitly. This option may be specified more than once, in which case the filter masks are
         merged. If the empty string is assigned, the filter is reset, all prior assignments will have no
@@ -1932,7 +1932,7 @@ RestrictNamespaces=~cgroup net</programlisting>
         <varname>SystemCallArchitectures=native</varname> or similar.</para>
 
         <para>Note that strict system call filters may impact execution and error handling code paths of the service
-        invocation. Specifically, access to the <function>execve</function> system call is required for the execution
+        invocation. Specifically, access to the <function>execve()</function> system call is required for the execution
         of the service binary — if it is blocked service invocation will necessarily fail. Also, if execution of the
         service binary fails for some reason (for example: missing service executable), the error handling logic might
         require access to an additional set of system calls in order to process and log this failure correctly. It
@@ -1943,9 +1943,9 @@ RestrictNamespaces=~cgroup net</programlisting>
         encountered will take precedence and will dictate the default action (termination or approval of a
         system call). Then the next occurrences of this option will add or delete the listed system calls
         from the set of the filtered system calls, depending of its type and the default action. (For
-        example, if you have started with an allow list rule for <function>read</function> and
-        <function>write</function>, and right after it add a deny list rule for <function>write</function>,
-        then <function>write</function> will be removed from the set.)</para>
+        example, if you have started with an allow list rule for <function>read()</function> and
+        <function>write()</function>, and right after it add a deny list rule for <function>write()</function>,
+        then <function>write()</function> will be removed from the set.)</para>
 
         <para>As the number of possible system calls is large, predefined sets of system calls are provided.  A set
         starts with <literal>@</literal> character, followed by name of the set.
@@ -2186,13 +2186,18 @@ SystemCallErrorNumber=EPERM</programlisting>
       <varlistentry>
         <term><varname>Environment=</varname></term>
 
-        <listitem><para>Sets environment variables for executed processes. Takes a space-separated list of variable
-        assignments. This option may be specified more than once, in which case all listed variables will be set. If
-        the same variable is set twice, the later setting will override the earlier setting. If the empty string is
-        assigned to this option, the list of environment variables is reset, all prior assignments have no
-        effect. Variable expansion is not performed inside the strings, however, specifier expansion is possible. The $
-        character has no special meaning. If you need to assign a value containing spaces or the equals sign to a
-        variable, use double quotes (") for the assignment.</para>
+        <listitem><para>Sets environment variables for executed processes. Takes a space-separated list of
+        variable assignments. This option may be specified more than once, in which case all listed variables
+        will be set. If the same variable is set twice, the later setting will override the earlier
+        setting. If the empty string is assigned to this option, the list of environment variables is reset,
+        all prior assignments have no effect. Variable expansion is not performed inside the strings,
+        however, specifier expansion is possible. The <literal>$</literal> character has no special
+        meaning. If you need to assign a value containing spaces or the equals sign to a variable, use double
+        quotes (") for the assignment.</para>
+
+        <para>The names of the variables can contain ASCII letters, digits, and the underscore
+        character. Variable names cannot be empty or start with a digit. In variable values, most characters
+        are allowed, but non-printable characters are currently rejected.</para>
 
         <para>Example:
         <programlisting>Environment="VAR1=word1 word2" VAR2=word3 "VAR3=$word 5 6"</programlisting>
@@ -2701,15 +2706,16 @@ StandardInputData=SWNrIHNpdHplIGRhIHVuJyBlc3NlIEtsb3BzLAp1ZmYgZWVtYWwga2xvcHAncy
         credential plus a file system path. The ID must be a short ASCII string suitable as filename in the
         filesystem, and may be chosen freely by the user. If the specified path is absolute it is opened as
         regular file and the credential data is read from it. If the absolute path refers to an
-        <constant>AF_UNIX</constant> stream socket in the file system a connection is made to it and the
-        credential data read from the connection, providing an easy IPC integration point for dynamically
-        providing credentials from other services. If the specified path is not absolute and itself qualifies
-        as valid credential identifier it is understood to refer to a credential that the service manager
-        itself received via the <varname>$CREDENTIALS_DIRECTORY</varname> environment variable, which may be
-        used to propagate credentials from an invoking environment (e.g. a container manager that invoked the
-        service manager) into a service. The contents of the file/socket may be arbitrary binary or textual
-        data, including newline characters and NUL bytes. This option may be used multiple times, each time
-        defining an additional credential to pass to the unit.</para>
+        <constant>AF_UNIX</constant> stream socket in the file system a connection is made to it (only once
+        at unit start-up) and the credential data read from the connection, providing an easy IPC integration
+        point for dynamically providing credentials from other services. If the specified path is not
+        absolute and itself qualifies as valid credential identifier it is understood to refer to a
+        credential that the service manager itself received via the <varname>$CREDENTIALS_DIRECTORY</varname>
+        environment variable, which may be used to propagate credentials from an invoking environment (e.g. a
+        container manager that invoked the service manager) into a service. The contents of the file/socket
+        may be arbitrary binary or textual data, including newline characters and <constant>NUL</constant>
+        bytes. This option may be used multiple times, each time defining an additional credential to pass to
+        the unit.</para>
 
         <para>The credential files/IPC sockets must be accessible to the service manager, but don't have to
         be directly accessible to the unit's processes: the credential data is read and copied into separate,
@@ -2723,7 +2729,22 @@ StandardInputData=SWNrIHNpdHplIGRhIHVuJyBlc3NlIEtsb3BzLAp1ZmYgZWVtYWwga2xvcHAncy
         e.g. <literal>ExecStart=cat ${CREDENTIALS_DIRECTORY}/mycred</literal>.</para>
 
         <para>Currently, an accumulated credential size limit of 1M bytes per unit is
-        enforced.</para></listitem>
+        enforced.</para>
+
+        <para>If referencing an <constant>AF_UNIX</constant> stream socket to connect to, the connection will
+        originate from an abstract namespace socket, that includes information about the unit and the
+        credential ID in its socket name. Use <citerefentry
+        project='man-pages'><refentrytitle>getpeername</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+        to query this information. The returned socket name is formatted as <constant>NUL</constant>
+        <replaceable>RANDOM</replaceable> <literal>/unit/</literal> <replaceable>UNIT</replaceable>
+        <literal>/</literal> <replaceable>ID</replaceable>, i.e. a <constant>NUL</constant> byte (as required
+        for abstract namespace socket names), followed by a random string (consisting of alphadecimal
+        characters), followed by the literal string <literal>/unit/</literal>, followed by the requesting
+        unit name, followed by the literal character <literal>/</literal>, followed by the textual credential
+        ID requested. Example: <literal>\0adf9d86b6eda275e/unit/foobar.service/credx</literal> in case the
+        credential <literal>credx</literal> is requested for a unit <literal>foobar.service</literal>. This
+        functionality is useful for using a single listening socket to serve credentials to multiple
+        consumers.</para></listitem>
       </varlistentry>
 
       <varlistentry>
@@ -2736,7 +2757,7 @@ StandardInputData=SWNrIHNpdHplIGRhIHVuJyBlc3NlIEtsb3BzLAp1ZmYgZWVtYWwga2xvcHAncy
         user IDs, public key material and similar non-sensitive data. For everything else use
         <varname>LoadCredential=</varname>. In order to embed binary data into the credential data use
         C-style escaping (i.e. <literal>\n</literal> to embed a newline, or <literal>\x00</literal> to embed
-        a NUL byte).</para>
+        a <constant>NUL</constant> byte).</para>
 
         <para>If a credential of the same ID is listed in both <varname>LoadCredential=</varname> and
         <varname>SetCredential=</varname>, the latter will act as default if the former cannot be
index b8d0cd578aa3939861ec5a001586c3841658a857..b1936bed4db45216f932ece8698c29ccbd0e3e7e 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.generator">
   <refentryinfo>
index 73e3039d6e394ee6701e1cb8573a5910fca63c10..578e074f578215e72a8fad6d941256d2de28a876 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.journal-fields">
 
           <para>Only applies to <literal>_TRANSPORT=stdout</literal> records: indicates that the log message
           in the standard output/error stream was not terminated with a normal newline character
           (<literal>\n</literal>, i.e. ASCII 10). Specifically, when set this field is one of
-          <option>nul</option> (in case the line was terminated by a NUL byte), <option>line-max</option> (in
+          <option>nul</option> (in case the line was terminated by a <constant>NUL</constant> byte), <option>line-max</option> (in
           case the maximum log line length was reached, as configured with <varname>LineMax=</varname> in
           <citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>),
           <option>eof</option> (if this was the last log record of a stream and the stream ended without a
index 73f61c80e4fdf28c5c9a5bf9f2a3556b8f334e9c..57eb6403c734c787d2beb7b46424e4606337afa3 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.kill">
   <refentryinfo>
index 9a9ff6bd3b3dbc771a3f7b6fba8691b8bf649d64..24271ea65a06119796bde5f3695317e946b1146a 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.link">
   <refentryinfo>
             <varlistentry>
               <term><option>none</option></term>
               <listitem>
-                <para>Keeps the MAC address assigned by the kernel.</para>
+                <para>Keeps the MAC address assigned by the kernel. Or use the MAC address specified in
+                <varname>MACAddress=</varname>.</para>
               </listitem>
             </varlistentry>
           </variablelist>
+
+          <para>An empty string assignment is equivalent to setting <literal>none</literal>.</para>
         </listitem>
       </varlistentry>
       <varlistentry>
         <term><varname>MACAddress=</varname></term>
         <listitem>
-          <para>The MAC address to use, if no
-          <varname>MACAddressPolicy=</varname>
-          is specified.</para>
+          <para>The interface MAC address to use. For this setting to take effect,
+          <varname>MACAddressPolicy=</varname> must either be unset, empty, or <literal>none</literal>.
+          </para>
         </listitem>
       </varlistentry>
       <varlistentry>
index e9e2f6840844d1d1a08e2d774e64df59ef1f9ae6..8b71c96ab5e369a67f52cf705ee5dd6f0fa41d8c 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.mount">
   <refentryinfo>
index 324c94dbd9fe3a95380916f4bdbc2d72dfb6694c..054de92c0b4bd70ebfff156d30979af638c812d1 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.net-naming-scheme">
   <refentryinfo>
           <para>SR-IOV virtual devices are named based on the name of the parent interface, with a suffix of
           <constant>v</constant> and the virtual device number, with any leading zeros removed. The bus
           number is ignored.</para>
+
+          <para>In some configurations a parent PCI bridge of a given network controller may be associated
+          with a slot. In such case we don't generate this device property to avoid possible naming conflicts.</para>
           </listitem>
         </varlistentry>
 
   <refsect1>
     <title>History</title>
 
-    <para>The following "naming schemes" have been defined:</para>
+    <para>The following "naming schemes" have been defined (which may be chosen at system boot-up time via
+    the <varname>net.naming-scheme=</varname> kernel command line switch, see above:</para>
 
     <variablelist>
         <varlistentry>
           multiple similarly named containers (who only differ in container name suffix) should be less
           likely (but still possible, since the 24bit hash value is very small).</para></listitem>
         </varlistentry>
+
+        <varlistentry>
+          <term><constant>v247</constant></term>
+
+          <listitem><para>If the PCI slot is associated with PCI bridge and that has multiple child network
+          controllers then all of them might derive the same value of <varname>ID_NET_NAME_SLOT</varname>
+          property. That could cause naming conflict if the property is selected as a device name. Now, we detect the
+          situation, slot - bridge relation, and we don't produce the <varname>ID_NET_NAME_SLOT</varname> property to
+          avoid possible naming conflict.</para></listitem>
+        </varlistentry>
+
       </variablelist>
 
     <para>Note that <constant>latest</constant> may be used to denote the latest scheme known (to this
index a95beb6f9fa14b57616202301e7e829b9d276fd0..fffef93aa23f3fae5b3d122797207c78bbdd6faa 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.netdev" conditional='ENABLE_NETWORKD'>
 
@@ -84,7 +84,7 @@
         </row></thead>
         <tbody>
           <row><entry><varname>bond</varname></entry>
-          <entry>A bond device is an aggregation of all its slave devices. See <ulink url="https://www.kernel.org/doc/Documentation/networking/bonding.txt">Linux Ethernet Bonding Driver HOWTO</ulink> for details.Local configuration</entry></row>
+          <entry>A bond device is an aggregation of all its slave devices. See <ulink url="https://www.kernel.org/doc/Documentation/networking/bonding.txt">Linux Ethernet Bonding Driver HOWTO</ulink> for details.</entry></row>
 
           <row><entry><varname>bridge</varname></entry>
           <entry>A bridge device is a software switch, and each of its slave devices and the bridge itself are ports of the switch.</entry></row>
           This setting is compulsory.</para>
         </listitem>
       </varlistentry>
+      <varlistentry>
+        <term><varname>Protocol=</varname></term>
+        <listitem>
+          <para>Allows setting the protocol used for the VLAN interface. Takes <literal>802.1q</literal> or,
+          <literal>802.1ad</literal>, and defaults to unset and kernel's default is used.</para>
+        </listitem>
+      </varlistentry>
       <varlistentry>
         <term><varname>GVRP=</varname></term>
         <listitem>
       <varlistentry>
         <term><varname>Id=</varname></term>
         <listitem>
-          <para>Specifies the Virtual Network Identifier (VNI) to use. Ranges [0-16777215]. This field is mandatory.</para>
+          <para>Specifies the Virtual Network Identifier (VNI) to use, a number between 0 and 16777215. This
+          field is mandatory.</para>
         </listitem>
       </varlistentry>
       <varlistentry>
       <varlistentry>
         <term><varname>TOS=</varname></term>
         <listitem>
-          <para>Specifies the TOS value to use in outgoing packets. Ranges [1-255].</para>
+          <para>Specifies the TOS value to use in outgoing packets. Takes a number between 1 and 255.</para>
         </listitem>
       </varlistentry>
       <varlistentry>
       <varlistentry>
         <term><varname>Independent=</varname></term>
         <listitem>
-          <para>Takes a boolean. When true, the vxlan interface is created without underlying interfaces.
-          Defaults to <literal>false</literal>.</para>
+          <para>Takes a boolean. When true, the vxlan interface is created without any underlying network
+          interface. Defaults to false, which means that a .network file that requests this tunnel using
+          <varname>Tunnel=</varname> is required for the tunnel to be created.</para>
         </listitem>
       </varlistentry>
     </variablelist>
       <varlistentry>
         <term><varname>Independent=</varname></term>
         <listitem>
-          <para>Takes a boolean. When true tunnel does not require .network file. Created as "tunnel@NONE".
-          Defaults to <literal>false</literal>.
-          </para>
+          <para>Takes a boolean. When false (the default), the tunnel is always created over some network
+          device, and a .network file that requests this tunnel using <varname>Tunnel=</varname> is required
+          for the tunnel to be created. When true, the tunnel is created independently of any network as
+          "tunnel@NONE".</para>
         </listitem>
       </varlistentry>
       <varlistentry>
       <varlistentry>
         <term><varname>AdActorSystem=</varname></term>
         <listitem>
-          <para>Specifies the 802.3ad system mac address. This can not be either NULL or Multicast.</para>
+          <para>Specifies the 802.3ad system MAC address. This cannot be a null or multicast address.
+          </para>
         </listitem>
       </varlistentry>
 
       <varlistentry>
         <term><varname>Independent=</varname></term>
         <listitem>
-          <para>Takes a boolean. If set to <literal>no</literal>, the xfrm interface should have an
-          underlying device which can be used for hardware offloading. Defaults to <literal>no</literal>.
-          See <citerefentry><refentrytitle>systemd.network</refentrytitle><manvolnum>5</manvolnum></citerefentry>
-          for how to configure the underlying device.</para>
+          <para>Takes a boolean. If false (the default), the xfrm interface must have an underlying device
+          which can be used for hardware offloading.</para>
         </listitem>
       </varlistentry>
     </variablelist>
index 512d657138f93c3d6ba2cf99bea95fefdc46b8a1..27263c34ebb6fcba460e4904fb47cdad550c9efc 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.network" conditional='ENABLE_NETWORKD'
           xmlns:xi="http://www.w3.org/2001/XInclude">
         <varlistentry>
           <term><varname>LinkLocalAddressing=</varname></term>
           <listitem>
-            <para>Enables link-local address autoconfiguration. Accepts <literal>yes</literal>,
-            <literal>no</literal>, <literal>ipv4</literal>, <literal>ipv6</literal>,
-            <literal>fallback</literal>, or <literal>ipv4-fallback</literal>. If
-            <literal>fallback</literal> or <literal>ipv4-fallback</literal> is specified, then an IPv4
-            link-local address is configured only when DHCPv4 fails. If <literal>fallback</literal>,
-            an IPv6 link-local address is always configured, and if <literal>ipv4-fallback</literal>,
-            the address is not configured. Note that, the fallback mechanism works only when DHCPv4
-            client is enabled, that is, it requires <literal>DHCP=yes</literal> or
-            <literal>DHCP=ipv4</literal>. If <varname>Bridge=</varname> is set, defaults to
-            <literal>no</literal>, and if not, defaults to <literal>ipv6</literal>.
-            </para>
+            <para>Enables link-local address autoconfiguration. Accepts <option>yes</option>,
+            <option>no</option>, <option>ipv4</option>, and <option>ipv6</option>. An IPv6 link-local address
+            is configured when <option>yes</option> or <option>ipv6</option>. An IPv4 link-local address is
+            configured when <option>yes</option> or <option>ipv4</option> and when DHCPv4 autoconfiguration
+            has been unsuccessful for some time. (IPv4 link-local address autoconfiguration will usually
+            happen in parallel with repeated attempts to acquire a DHCPv4 lease).</para>
+
+            <para>Defaults to <option>no</option> when <varname>Bridge=yes</varname> is set, and
+            <option>ipv6</option> otherwise.</para>
           </listitem>
         </varlistentry>
         <varlistentry>
@@ -810,17 +808,23 @@ IPv6Token=prefixstable:2002:da8:1::</programlisting></para>
         </para></listitem>
         </varlistentry>
         <varlistentry>
-          <term><varname>IPv6PrefixDelegation=</varname></term>
-          <listitem><para>Whether to enable or disable Router Advertisement sending on a link.  Allowed
-          values are <literal>static</literal> which distributes prefixes as defined in the
-          [IPv6PrefixDelegation] and any [IPv6Prefix] sections, <literal>dhcpv6</literal> which requests
-          prefixes using a DHCPv6 client configured for another link and any values configured in the
-          [IPv6PrefixDelegation] section while ignoring all static prefix configuration sections,
-          <literal>yes</literal> which uses both static configuration and DHCPv6, and
-          <literal>false</literal> which turns off IPv6 prefix delegation altogether. Defaults to
-          <literal>false</literal>. See the [IPv6PrefixDelegation] and the [IPv6Prefix] sections for more
+          <term><varname>IPv6SendRA=</varname></term>
+          <listitem><para>Whether to enable or disable Router Advertisement sending on a link. Takes a
+          boolean value. When enabled, prefixes configured in [IPv6Prefix] sections and routes
+          configured in [IPv6RoutePrefix] sections are distributed as defined in the [IPv6SendRA]
+          section. If <varname>DHCPv6PrefixDelegation=</varname> is enabled, then the delegated
+          prefixes are also distributed. See <varname>DHCPv6PrefixDelegation=</varname> setting and the
+          [IPv6SendRA], [IPv6Prefix], [IPv6RoutePrefix], and [DHCPv6PrefixDelegation] sections for more
           configuration options.</para></listitem>
         </varlistentry>
+        <varlistentry>
+          <term><varname>DHCPv6PrefixDelegation=</varname></term>
+          <listitem><para>Takes a boolean value. When enabled, requests prefixes using a DHCPv6 client
+          configured on another link. By default, an address within each delegated prefix will be
+          assigned, and the prefixes will be announced through IPv6 Router Advertisement when
+          <varname>IPv6SendRA=</varname> is enabled. Such default settings can be configured in
+          [DHCPv6PrefixDelegation] section. Defaults to disabled.</para></listitem>
+        </varlistentry>
         <varlistentry>
           <term><varname>IPv6MTUBytes=</varname></term>
           <listitem><para>Configures IPv6 maximum transmission unit (MTU).
@@ -1116,7 +1120,7 @@ IPv6Token=prefixstable:2002:da8:1::</programlisting></para>
       <para>An [IPv6AddressLabel] section accepts the following keys. Specify several [IPv6AddressLabel]
       sections to configure several address labels. IPv6 address labels are used for address selection. See
       <ulink url="https://tools.ietf.org/html/rfc3484">RFC 3484</ulink>. Precedence is managed by userspace,
-      and only the label itself is stored in the kernel</para>
+      and only the label itself is stored in the kernel.</para>
 
       <variablelist class='network-directives'>
         <varlistentry>
@@ -1164,7 +1168,9 @@ IPv6Token=prefixstable:2002:da8:1::</programlisting></para>
         <varlistentry>
           <term><varname>FirewallMark=</varname></term>
           <listitem>
-            <para>Specifies the iptables firewall mark value to match (a number between 1 and 4294967295).</para>
+            <para>Specifies the iptables firewall mark value to match (a number between 1 and
+            4294967295). Optionally, the firewall mask (also a number between 1 and 4294967295) can be
+            suffixed with a slash (<literal>/</literal>), e.g., <literal>7/255</literal>.</para>
           </listitem>
         </varlistentry>
         <varlistentry>
@@ -1283,9 +1289,8 @@ IPv6Token=prefixstable:2002:da8:1::</programlisting></para>
           <term><varname>Gateway=</varname></term>
           <listitem>
             <para>Takes the gateway address or the special values <literal>_dhcp4</literal> and
-            <literal>_dhcp6</literal>. If <literal>_dhcp4</literal> or <literal>_dhcp6</literal> is
-            set, then the gateway address provided by DHCP (or in the IPv6 case, provided by IPv6 RA)
-            is used.</para>
+            <literal>_ipv6ra</literal>. If <literal>_dhcp4</literal> or <literal>_ipv6ra</literal> is
+            set, then the gateway address provided by DHCPv4 or IPv6 RA is used.</para>
           </listitem>
         </varlistentry>
          <varlistentry>
@@ -1657,9 +1662,10 @@ IPv6Token=prefixstable:2002:da8:1::</programlisting></para>
           <term><varname>MaxAttempts=</varname></term>
           <listitem>
             <para>Specifies how many times the DHCPv4 client configuration should be attempted. Takes a
-            number or <literal>infinity</literal>. Defaults to <literal>infinity</literal>.
-            Note that the time between retries is increased exponentially, so the network will not be
-            overloaded even if this number is high.</para>
+            number or <literal>infinity</literal>. Defaults to <literal>infinity</literal>. Note that the
+            time between retries is increased exponentially, up to approximately one per minute, so the
+            network will not be overloaded even if this number is high. The default is suitable in most
+            circumstances.</para>
           </listitem>
         </varlistentry>
 
@@ -1939,7 +1945,7 @@ IPv6Token=prefixstable:2002:da8:1::</programlisting></para>
             <ulink url="https://en.wikipedia.org/wiki/Escape_sequences_in_C#Table_of_escape_sequences">C-style
             escapes</ulink>. This setting can be specified multiple times. If an empty string is specified,
             then all options specified earlier are cleared. Takes a whitespace-separated list of strings. Note that
-            currently NUL bytes are not allowed.</para>
+            currently <constant>NUL</constant> bytes are not allowed.</para>
           </listitem>
         </varlistentry>
 
@@ -1958,9 +1964,9 @@ IPv6Token=prefixstable:2002:da8:1::</programlisting></para>
 
   <refsect1>
     <title>[DHCPv6PrefixDelegation] Section Options</title>
-    <para>The [DHCPv6PrefixDelegation] section configures delegated prefix assigned by DHCPv6 server.
-    The settings in this section are used only when <varname>IPv6PrefixDelegation=</varname> setting is
-    enabled, or set to <literal>dhcpv6</literal>.</para>
+    <para>The [DHCPv6PrefixDelegation] section configures delegated prefixes assigned by DHCPv6 server.
+    The settings in this section are used only when <varname>DHCPv6PrefixDelegation=</varname> setting
+    is enabled.</para>
 
     <variablelist class='network-directives'>
       <varlistentry>
@@ -1970,9 +1976,16 @@ IPv6Token=prefixstable:2002:da8:1::</programlisting></para>
           delegation. You can either set "auto" (the default) or a specific subnet ID (as defined in
           <ulink url="https://tools.ietf.org/html/rfc4291#section-2.5.4">RFC 4291</ulink>, section
           2.5.4), in which case the allowed value is hexadecimal, from 0 to 0x7fffffffffffffff
-          inclusive. This option is only effective when used together with
-          <varname>IPv6PrefixDelegation=</varname> and the corresponding configuration on the upstream
-          interface.</para>
+          inclusive.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><varname>Announce=</varname></term>
+        <listitem>
+          <para>Takes a boolean. When enabled, and <varname>IPv6SendRA=</varname> in [Network] section
+          is enabled, the delegated prefixes are distributed through the IPv6 Router Advertisement.
+          Defaults to yes.</para>
         </listitem>
       </varlistentry>
 
@@ -1980,19 +1993,22 @@ IPv6Token=prefixstable:2002:da8:1::</programlisting></para>
         <term><varname>Assign=</varname></term>
         <listitem>
           <para>Takes a boolean. Specifies whether to add an address from the delegated prefixes which
-          are received from the WAN interface by the <varname>IPv6PrefixDelegation=</varname>. When
-          true (on LAN interfce), the EUI-64 algorithm will be used to form an interface identifier
-          from the delegated prefixes. Defaults to true.</para>
+          are received from the WAN interface by the DHCPv6 Prefix Delegation. When true (on LAN
+          interfce), the EUI-64 algorithm will be used by default to form an interface identifier from
+          the delegated prefixes. See also <varname>Token=</varname> setting below. Defaults to yes.
+          </para>
         </listitem>
       </varlistentry>
 
       <varlistentry>
         <term><varname>Token=</varname></term>
         <listitem>
-          <para>Specifies an optional address generation mode for <varname>Assign=</varname>. Takes an
-          IPv6 address. When set, the lower bits of the supplied address are combined with the upper
-          bits of a delegatad prefix received from the WAN interface by the
-          <varname>IPv6PrefixDelegation=</varname> prefixes to form a complete address.</para>
+          <para>Specifies an optional address generation mode for assigning an address in each
+          delegated prefix. Takes an IPv6 address. When set, the lower bits of the supplied address is
+          combined with the upper bits of each delegatad prefix received from the WAN interface by the
+          DHCPv6 Prefix Delegation to form a complete address. When <varname>Assign=</varname> is
+          disabled, this setting is ignored. When unset, the EUI-64 algorithm will be used to form
+          addresses. Defaults to unset.</para>
         </listitem>
       </varlistentry>
     </variablelist>
@@ -2071,9 +2087,11 @@ IPv6Token=prefixstable:2002:da8:1::</programlisting></para>
         <varlistentry>
           <term><varname>DHCPv6Client=</varname></term>
           <listitem>
-            <para>Takes a boolean, or the special value <literal>always</literal>. When true (the default), the DHCPv6 client will be started when the
-            RA has the managed or other information flag. If set to <literal>always</literal>, the DHCPv6 client will be started even if there is no
-            managed or other information flag in the RA.</para>
+            <para>Takes a boolean, or the special value <literal>always</literal>. When true or
+            <literal>always</literal>, the DHCPv6 client will be started when the RA has the managed or
+            other information flag. If set to <literal>always</literal>, the DHCPv6 client will also be
+            started in managed mode when neither managed nor other information flag is set in the RA.
+            Defaults to true.</para>
           </listitem>
         </varlistentry>
       </variablelist>
@@ -2214,10 +2232,11 @@ IPv6Token=prefixstable:2002:da8:1::</programlisting></para>
   </refsect1>
 
   <refsect1>
-    <title>[IPv6PrefixDelegation] Section Options</title>
-    <para>The [IPv6PrefixDelegation] section contains settings for sending IPv6 Router Advertisements and
-    whether to act as a router, if enabled via the <varname>IPv6PrefixDelegation=</varname> option described
-    above. IPv6 network prefixes are defined with one or more [IPv6Prefix] sections.</para>
+    <title>[IPv6SendRA] Section Options</title>
+    <para>The [IPv6SendRA] section contains settings for sending IPv6 Router Advertisements and whether
+    to act as a router, if enabled via the <varname>IPv6SendRA=</varname> option described above. IPv6
+    network prefixes or routes are defined with one or more [IPv6Prefix] or [IPv6RoutePrefix] sections.
+    </para>
 
     <variablelist class='network-directives'>
 
@@ -2238,9 +2257,8 @@ IPv6Token=prefixstable:2002:da8:1::</programlisting></para>
       <varlistentry>
         <term><varname>RouterLifetimeSec=</varname></term>
 
-        <listitem><para>Takes a timespan. Configures the IPv6 router lifetime in seconds. If set,
-        this host also announces itself in Router Advertisements as an IPv6
-        router for the network link. When unset, the host is not acting as a router.</para>
+        <listitem><para>Takes a timespan. Configures the IPv6 router lifetime in seconds. When set to
+        0, the host is not acting as a router. Defaults to 30 minutes.</para>
         </listitem>
       </varlistentry>
 
@@ -3587,10 +3605,13 @@ DHCP=ipv6</programlisting>
 Name=enp2s0
 
 [Network]
-IPv6PrefixDelegation=dhcpv6</programlisting>
+IPv6SendRA=yes
+DHCPv6PrefixDelegation=yes</programlisting>
 
-      <para>This will enable IPv6 PD on the interface enp1s0 as an upstream interface where the
-      DHCPv6 client is running and enp2s0 as a downstream interface where the prefix is delegated to.</para>
+      <para>This will enable DHCPv6-PD on the interface enp1s0 as an upstream interface where the
+      DHCPv6 client is running and enp2s0 as a downstream interface where the prefix is delegated to.
+      The delegated prefixes are distributed by IPv6 Router Advertisement on the downstream network.
+      </para>
     </example>
 
     <example>
index 4b37c5dc4400b9cb24b18d927e2f63e299d3a8fc..0125b71e349589d33eb4641a2c0dc525a219e4b4 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.nspawn">
 
index 242448aa041346bfb2959bb1dc11dd72b2eda9bb..ef02d6f931d40208620d125e4b2c5d9474b6c698 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.offline-updates">
   <refentryinfo>
index 604bf494ba71a6222a4df753a18e3be622a5ebe5..bca1514b3368a4b4439032adc4e9549e43776486 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.path">
   <refentryinfo>
index 092c186738a23850608b942b5e24911015d2ddae..5697e50be7c6de411eb298d203cb1c4b27033957 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="systemd.preset">
 
   <refentryinfo>
index d72f9048e7c00ab3d8f72d07c4ae7132d433ca74..6c513ed57ea848e4aa734fb8cde4c7ababe0a66b 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.resource-control" xmlns:xi="http://www.w3.org/2001/XInclude">
   <refentryinfo>
@@ -869,6 +869,49 @@ DeviceAllow=/dev/loop-control
           <xi:include href="supported-controllers.xml"  xpointer="controllers-text" />
         </listitem>
       </varlistentry>
+
+      <varlistentry>
+        <term><varname>ManagedOOMSwap=auto|kill</varname></term>
+        <term><varname>ManagedOOMMemoryPressure=auto|kill</varname></term>
+
+        <listitem>
+          <para>Specifies how
+          <citerefentry><refentrytitle>systemd-oomd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+          will act on this unit's cgroups. Defaults to <option>auto</option>.</para>
+
+          <para>When set to <option>kill</option>, <command>systemd-oomd</command> will actively monitor this unit's
+          cgroup metrics to decide whether it needs to act. If the cgroup passes the limits set by
+          <citerefentry><refentrytitle>oomd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> or its
+          overrides, <command>systemd-oomd</command> will send a <constant>SIGKILL</constant> to all of the processes
+          under the chosen candidate cgroup. Note that only descendant cgroups can be eligible candidates for killing;
+          the unit that set its property to <option>kill</option> is not a candidate (unless one of its ancestors set
+          their property to <option>kill</option>). You can find more details on candidates and kill behavior at
+          <citerefentry><refentrytitle>systemd-oomd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+          and <citerefentry><refentrytitle>oomd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>. Setting
+          either of these properties to <option>kill</option> will also automatically acquire
+          <varname>After=</varname> and <varname>Wants=</varname> dependencies on
+          <filename>systemd-oomd.service</filename> unless <varname>DefaultDependencies=no</varname>.
+        </para>
+
+          <para>When set to <option>auto</option>, <command>systemd-oomd</command> will not actively use this cgroup's
+          data for monitoring and detection. However, if an ancestor cgroup has one of these properties set to
+          <option>kill</option>, a unit with <option>auto</option> can still be an eligible candidate for
+          <command>systemd-oomd</command> to act on.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><varname>ManagedOOMMemoryPressureLimitPercent=</varname></term>
+
+        <listitem>
+          <para>Overrides the default memory pressure limit set by
+          <citerefentry><refentrytitle>oomd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> for this unit
+          (cgroup). Takes a percentage value between 0% and 100%, inclusive. This property is ignored unless
+          <varname>ManagedOOMMemoryPressure=</varname><option>kill</option>. Defaults to 0%, which means use the
+          default set by <citerefentry><refentrytitle>oomd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+          </para>
+        </listitem>
+      </varlistentry>
     </variablelist>
   </refsect1>
 
@@ -1030,6 +1073,7 @@ DeviceAllow=/dev/loop-control
       <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd-oomd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       The documentation for control groups and specific controllers in the Linux kernel:
       <ulink url="https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html">Control Groups v2</ulink>.
     </para>
index 449b90b48455733f35df7712862adf1c1ae90dcf..7d7b32df46d7f3c9c1da68994660f3bc61046863 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.scope">
   <refentryinfo>
index a020214ac62a2b234df2a3b084a43572078f27d4..5da6d132eecafdf48262afa97aba5b45551a5fe1 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.service">
   <refentryinfo>
             has <varname>RemainAfterExit=</varname> not set) it will not show up as started afterwards, but
             as dead.</para></listitem>
 
-            <listitem><para>Behavior of <option>dbus</option> is similar to <option>simple</option>; however, it is
-            expected that the service acquires a name on the D-Bus bus, as configured by
-            <varname>BusName=</varname>. systemd will proceed with starting follow-up units after the D-Bus bus name
-            has been acquired. Service units with this option configured implicitly gain dependencies on the
-            <filename>dbus.socket</filename> unit. This type is the default if <varname>BusName=</varname> is
-            specified.</para></listitem>
+            <listitem><para>Behavior of <option>dbus</option> is similar to <option>simple</option>; however,
+            it is expected that the service acquires a name on the D-Bus bus, as configured by
+            <varname>BusName=</varname>. systemd will proceed with starting follow-up units after the D-Bus
+            bus name has been acquired. Service units with this option configured implicitly gain
+            dependencies on the <filename>dbus.socket</filename> unit. This type is the default if
+            <varname>BusName=</varname> is specified. A service unit of this type is considered to be in the
+            activating state until the specified bus name is acquired. It is considered activated while the
+            bus name is taken. Once the bus name is released the service is considered being no longer
+            functional which has the effect that the service manager attempts to terminate any remaining
+            processes belonging to the service. Services that drop their bus name as part of their shutdown
+            logic thus should be prepared to receive a <constant>SIGTERM</constant> (or whichever signal is
+            configured in <varname>KillSignal=</varname>) as result.</para></listitem>
 
             <listitem><para>Behavior of <option>notify</option> is similar to <option>exec</option>; however, it is
             expected that the service sends a notification message via
index 928c9905e105e2214fe37be8eb868c0e03419969..0d3616f8b11af8a1eb2635101662a506a933a60b 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.slice">
   <refentryinfo>
index 079cdf00523617ba8ef109b7e38929a8a9ee32dd..520a90624971a168985039f928358f0d4ae38fa2 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.socket">
   <refentryinfo>
 
       <varlistentry>
         <term><varname>ListenFIFO=</varname></term>
-        <listitem><para>Specifies a file system FIFO to listen on.
-        This expects an absolute file system path as argument.
-        Behavior otherwise is very similar to the
-        <varname>ListenDatagram=</varname> directive
-        above.</para></listitem>
+        <listitem><para>Specifies a file system FIFO (see <citerefentry
+        project='man-pages'><refentrytitle>fifo</refentrytitle><manvolnum>7</manvolnum></citerefentry> for
+        details) to listen on.  This expects an absolute file system path as argument.  Behavior otherwise is
+        very similar to the <varname>ListenDatagram=</varname> directive above.</para></listitem>
       </varlistentry>
 
       <varlistentry>
 
       <varlistentry>
         <term><varname>ListenMessageQueue=</varname></term>
-        <listitem><para>Specifies a POSIX message queue name to listen
-        on. This expects a valid message queue name (i.e. beginning
-        with /). Behavior otherwise is very similar to the
-        <varname>ListenFIFO=</varname> directive above. On Linux
-        message queue descriptors are actually file descriptors and
-        can be inherited between processes.</para></listitem>
+        <listitem><para>Specifies a POSIX message queue name to listen on (see <citerefentry
+        project='man-pages'><refentrytitle>mq_overview</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+        for details). This expects a valid message queue name (i.e. beginning with
+        <literal>/</literal>). Behavior otherwise is very similar to the <varname>ListenFIFO=</varname>
+        directive above. On Linux message queue descriptors are actually file descriptors and can be
+        inherited between processes.</para></listitem>
       </varlistentry>
 
       <varlistentry>
       <varlistentry>
         <term><varname>PassPacketInfo=</varname></term>
         <listitem><para>Takes a boolean value. This controls the <constant>IP_PKTINFO</constant>,
-        <constant>IPV6_RECVPKTINFO</constant> and <constant>NETLINK_PKTINFO</constant> socket options, which
-        enable reception of additional per-packet metadata as ancillary message, on
-        <constant>AF_INET</constant>, <constant>AF_INET6</constant> and <constant>AF_UNIX</constant> sockets.
-        Defaults to <option>false</option>.</para></listitem>
+        <constant>IPV6_RECVPKTINFO</constant>, <constant>NETLINK_PKTINFO</constant> or
+        <constant>PACKET_AUXDATA</constant> socket options, which enable reception of additional per-packet
+        metadata as ancillary message, on <constant>AF_INET</constant>, <constant>AF_INET6</constant>,
+        <constant>AF_UNIX</constant> and <constant>AF_PACKET</constant> sockets.  Defaults to
+        <option>false</option>.</para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><varname>Timestamping=</varname></term>
+        <listitem><para>Takes one of <literal>off</literal>, <literal>us</literal> (alias:
+        <literal>usec</literal>, <literal>µs</literal>) or <literal>ns</literal> (alias:
+        <literal>nsec</literal>). This controls the <constant>SO_TIMESTAMP</constant> or
+        <constant>SO_TIMESTAMPNS</constant> socket options, and enables whether ingress network traffic shall
+        carry timestamping metadata. Defaults to <option>off</option>.</para></listitem>
       </varlistentry>
 
       <varlistentry>
index e43d765c9fb3ff69d0587abb1ef5e2d864e8924a..a70e9ee0cae83b5b88fa64b921bfc1d03b377a7c 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.special">
 
@@ -32,6 +32,7 @@
     <filename>emergency.target</filename>,
     <filename>exit.target</filename>,
     <filename>final.target</filename>,
+    <filename>first-boot-complete.target</filename>,
     <filename>getty.target</filename>,
     <filename>getty-pre.target</filename>,
     <filename>graphical.target</filename>,
             stopped.</para>
           </listitem>
         </varlistentry>
+        <varlistentry>
+          <term><filename>first-boot-complete.target</filename></term>
+          <listitem>
+            <para>This passive target is intended as a synchronization point for units that need to run once
+            during the first boot.  Only after all units ordered before this target have finished, will the
+            <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+            be committed to disk, marking the first boot as completed.  If the boot is aborted at any time
+            before that, the next boot will re-run any units with <varname>ConditionFirstBoot=yes</varname>.
+            </para>
+          </listitem>
+        </varlistentry>
         <varlistentry>
           <term><filename>getty-pre.target</filename></term>
           <listitem>
         </varlistentry>
       </variablelist>
     </refsect2>
+
+    <refsect2>
+      <title>Special User Slice Units</title>
+
+      <para>There are four <literal>.slice</literal> units which form the basis of the user hierarchy for
+      assignment of resources for user applications and services. See
+      <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+      for details about slice units and the documentation about
+      <ulink url="https://systemd.io/DESKTOP_ENVIRONMENTS">Desktop Environments</ulink>
+      for further information.</para>
+
+      <variablelist>
+        <varlistentry>
+          <term><filename>-.slice</filename></term>
+          <listitem>
+            <para>The root slice is the root of the user's slice hierarchy.
+            It usually does not contain units directly, but may be used to set defaults for the whole tree.</para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term><filename>app.slice</filename></term>
+          <listitem>
+            <para>By default, all user services and applications managed by
+            <command>systemd</command> are found in this slice.
+            All interactively launched applications like web browsers and text editors
+            as well as non-critical services should be placed into this slice.</para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term><filename>session.slice</filename></term>
+          <listitem>
+            <para>All essential services and applications required for the
+            session should use this slice.
+            These are services that either cannot be restarted easily
+            or where latency issues may affect the interactivity of the system and applications.
+            This includes the display server, screen readers and other services such as DBus or XDG portals.
+            Such services should be configured to be part of this slice by
+            adding <varname>Slice=session.slice</varname> to their unit files.</para>
+          </listitem>
+        </varlistentry>
+
+        <varlistentry>
+          <term><filename>background.slice</filename></term>
+          <listitem>
+            <para>All services running low-priority background tasks should use this slice.
+            This permits resources to be preferentially assigned to the other slices.
+            Examples include non-interactive tasks like file indexing or backup operations
+            where latency is not important.</para>
+          </listitem>
+        </varlistentry>
+      </variablelist>
+    </refsect2>
   </refsect1>
 
   <refsect1>
index 4b1f850af4f3c1444e758f8d00f16312065b98b2..3e41d6f0bfed7ffc30617990ed5cdf9b2548772c 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.swap"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index df100ec4e7b3634eaa517e22d89ef3ed8ea161f1..7960adb65977eb421631e5f7400d1cf4fea67fc8 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.syntax">
 
index a706a4588af78c3330901f045e101eb44825dfe7..bd618d8e93b1e7c790490ee3db0a4ac8e80324da 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.target">
   <refentryinfo>
index 79fe9735c42984bca40fb329c4e1d05b5276a63c..a759707fec6670b1028c8b72ca7bad61e4eca8e7 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.time">
 
index 32f7814f8e54cf435e42a60f818cb3e404b0eeba..9fe7ff3255cffd4064d3c66f305942d64f5c7baa 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.timer">
   <refentryinfo>
       <varlistentry>
         <term><varname>RandomizedDelaySec=</varname></term>
 
-        <listitem><para>Delay the timer by a randomly selected, evenly
-        distributed amount of time between 0 and the specified time
-        value. Defaults to 0, indicating that no randomized delay
-        shall be applied. Each timer unit will determine this delay
-        randomly before each iteration, and the delay will simply be
-        added on top of the next determined elapsing time. This is
-        useful to stretch dispatching of similarly configured timer
-        events over a certain amount time, to avoid that they all fire
-        at the same time, possibly resulting in resource
-        congestion. Note the relation to
-        <varname>AccuracySec=</varname> above: the latter allows the
-        service manager to coalesce timer events within a specified
-        time range in order to minimize wakeups, the former does the
-        opposite: it stretches timer events over a time range, to make
-        it unlikely that they fire simultaneously. If
-        <varname>RandomizedDelaySec=</varname> and
-        <varname>AccuracySec=</varname> are used in conjunction, first
-        the randomized delay is added, and then the result is
-        possibly further shifted to coalesce it with other timer
-        events happening on the system. As mentioned above
-        <varname>AccuracySec=</varname> defaults to 1min and
-        <varname>RandomizedDelaySec=</varname> to 0, thus encouraging
-        coalescing of timer events. In order to optimally stretch
-        timer events over a certain range of time, make sure to set
-        <varname>RandomizedDelaySec=</varname> to a higher value, and
-        <varname>AccuracySec=1us</varname>.</para></listitem>
+        <listitem><para>Delay the timer by a randomly selected, evenly distributed amount of time between 0
+        and the specified time value. Defaults to 0, indicating that no randomized delay shall be applied.
+        Each timer unit will determine this delay randomly before each iteration, and the delay will simply
+        be added on top of the next determined elapsing time, unless modified with
+        <varname>FixedRandomDelay=</varname>, see below.</para>
+
+        <para>This setting is useful to stretch dispatching of similarly configured timer events over a
+        certain time interval, to prevent them from firing all at the same time, possibly resulting in
+        resource congestion.</para>
+
+        <para>Note the relation to <varname>AccuracySec=</varname> above: the latter allows the service
+        manager to coalesce timer events within a specified time range in order to minimize wakeups, while
+        this setting does the opposite: it stretches timer events over an interval, to make it unlikely that
+        they fire simultaneously. If <varname>RandomizedDelaySec=</varname> and
+        <varname>AccuracySec=</varname> are used in conjunction, first the randomized delay is added, and
+        then the result is possibly further shifted to coalesce it with other timer events happening on the
+        system. As mentioned above <varname>AccuracySec=</varname> defaults to 1 minute and
+        <varname>RandomizedDelaySec=</varname> to 0, thus encouraging coalescing of timer events. In order to
+        optimally stretch timer events over a certain range of time, set
+        <varname>AccuracySec=1us</varname> and <varname>RandomizedDelaySec=</varname> to some higher value.
+        </para></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><varname>FixedRandomDelay=</varname></term>
+
+        <listitem><para>Takes a boolean argument. When enabled, the randomized offset specified by
+        <varname>RandomizedDelaySec=</varname> is reused for all firings of the same timer. For a given timer
+        unit, the offset depends on the machine ID, user identifier and timer name, which means that it is
+        stable between restarts of the manager. This effectively creates a fixed offset for an individual
+        timer, reducing the jitter in firings of this timer, while still avoiding firing at the same time as
+        other similarly configured timers.</para>
+
+        <para>This setting has no effect if <varname>RandomizedDelaySec=</varname> is set to 0. Defaults to
+        <option>false</option>.</para></listitem>
       </varlistentry>
 
       <varlistentry>
         when the system clock (<constant>CLOCK_REALTIME</constant>) jumps relative to the monotonic clock
         (<constant>CLOCK_MONOTONIC</constant>), or when the local system timezone is modified. These options
         can be used alone or in combination with other timer expressions (see above) within the same timer
-        unit. These options default to false.</para></listitem>
+        unit. These options default to <option>false</option>.</para></listitem>
       </varlistentry>
 
       <varlistentry>
         is nonetheless subject to the delay imposed by <varname>RandomizedDelaySec=</varname>.
         This is useful to catch up on missed runs of the service when the system was powered down. Note that
         this setting only has an effect on timers configured with <varname>OnCalendar=</varname>. Defaults to
-        <varname>false</varname>.</para>
+        <option>false</option>.</para>
 
         <para>Use <command>systemctl clean --what=state …</command> on the timer unit to remove the timestamp
         file maintained by this option from disk. In particular, use this command before uninstalling a timer
         from suspend, should it be suspended and if the system supports this. Note that this option will only
         make sure the system resumes on the appropriate times, it will not take care of suspending it again
         after any work that is to be done is finished. Defaults to
-        <varname>false</varname>.</para>
+        <option>false</option>.</para>
 
         <para>Note that this functionality requires privileges and is thus generally only available in the
         system service manager.</para>
         <varname>RemainAfterElapse=</varname> is on, starting the timer a second time has no effect. However,
         if <varname>RemainAfterElapse=</varname> is off and the timer unit was already unloaded, it can be
         started again, and thus the service can be triggered multiple times. Defaults to
-        <varname>yes</varname>.</para></listitem>
+        <option>true</option>.</para></listitem>
       </varlistentry>
     </variablelist>
   </refsect1>
index f23c903d069efc59da09601bd114a2d53f8370db..b7dbbe309ee100d191d3a8392e94e8b0742633bf 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd.unit"
           xmlns:xi="http://www.w3.org/2001/XInclude">
     <title>String Escaping for Inclusion in Unit Names</title>
 
     <para>Sometimes it is useful to convert arbitrary strings into unit names. To facilitate this, a method of string
-    escaping is used, in order to map strings containing arbitrary byte values (except NUL) into valid unit names and
-    their restricted character set. A common special case are unit names that reflect paths to objects in the file
-    system hierarchy. Example: a device unit <filename>dev-sda.device</filename> refers to a device with the device
-    node <filename index="false">/dev/sda</filename> in the file system.</para>
+    escaping is used, in order to map strings containing arbitrary byte values (except <constant>NUL</constant>) into
+    valid unit names and their restricted character set. A common special case are unit names that reflect paths to
+    objects in the file system hierarchy. Example: a device unit <filename>dev-sda.device</filename> refers to a device
+    with the device node <filename index="false">/dev/sda</filename> in the file system.</para>
 
     <para>The escaping algorithm operates as follows: given a string, any <literal>/</literal> character is replaced by
     <literal>-</literal>, and all other characters which are not ASCII alphanumerics or <literal>_</literal> are
           argument must either be a single word, or an assignment (i.e. two words, separated by
           <literal>=</literal>). In the former case the kernel command line is searched for the word
           appearing as is, or as left hand side of an assignment. In the latter case, the exact assignment is
-          looked for with right and left hand side matching.</para>
+          looked for with right and left hand side matching. This operates on the kernel command line
+          communicated to userspace via <filename>/proc/cmdline</filename>, except when the service manager
+          is invoked as payload of a container manager, in which case the command line of <filename>PID
+          1</filename> is used instead (i.e. <filename>/proc/1/cmdline</filename>).</para>
           </listitem>
         </varlistentry>
 
           <term><varname>ConditionFirstBoot=</varname></term>
 
           <listitem><para>Takes a boolean argument. This condition may be used to conditionalize units on
-          whether the system is booting up with an unpopulated <filename>/etc/</filename> directory
-          (specifically: an <filename>/etc/</filename> with no <filename>/etc/machine-id</filename>). This may
-          be used to populate <filename>/etc/</filename> on the first boot after factory reset, or when a new
-          system instance boots up for the first time.</para>
+          whether the system is booting up for the first time.  This roughly means that <filename>/etc/</filename>
+          is unpopulated (for details, see "First Boot Semantics" in
+          <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
+          This may be used to populate <filename>/etc/</filename> on the first boot after factory reset, or
+          when a new system instance boots up for the first time.</para>
+
+          <para>For robustness, units with <varname>ConditionFirstBoot=yes</varname> should order themselves
+          before <filename>first-boot-complete.target</filename> and pull in this passive target with
+          <varname>Wants=</varname>.  This ensures that in a case of an aborted first boot, these units will
+          be re-run during the next system startup.</para>
 
           <para>If the <varname>systemd.condition-first-boot=</varname> option is specified on the kernel
           command line (taking a boolean), it will override the result of this condition check, taking
           <term><varname>AssertHost=</varname></term>
           <term><varname>AssertKernelCommandLine=</varname></term>
           <term><varname>AssertKernelVersion=</varname></term>
+          <term><varname>AssertEnvironment=</varname></term>
           <term><varname>AssertSecurity=</varname></term>
           <term><varname>AssertCapability=</varname></term>
           <term><varname>AssertACPower=</varname></term>
           <term><varname>AssertPathIsSymbolicLink=</varname></term>
           <term><varname>AssertPathIsMountPoint=</varname></term>
           <term><varname>AssertPathIsReadWrite=</varname></term>
+          <term><varname>AssertPathIsEncrypted=</varname></term>
           <term><varname>AssertDirectoryNotEmpty=</varname></term>
           <term><varname>AssertFileNotEmpty=</varname></term>
           <term><varname>AssertFileIsExecutable=</varname></term>
           <term><varname>AssertUser=</varname></term>
           <term><varname>AssertGroup=</varname></term>
           <term><varname>AssertControlGroupController=</varname></term>
+          <term><varname>AssertMemory=</varname></term>
+          <term><varname>AssertCPUs=</varname></term>
 
           <listitem><para>Similar to the <varname>ConditionArchitecture=</varname>,
           <varname>ConditionVirtualization=</varname>, …, condition settings described above, these settings
       </varlistentry>
     </variablelist>
 
-    <para>The following specifiers are interpreted in the Install
-    section: %n, %N, %p, %i, %j, %g, %G, %U, %u, %m, %H, %b, %v. For their
-    meaning see the next section.
-    </para>
+    <para>The following specifiers are interpreted in the Install section:
+    %a, %b, %B, %g, %G, %H, %i, %j, %l, %m, %n, %N, %o, %p, %u, %U, %v, %w, %W, %%.
+    For their meaning see the next section.</para>
   </refsect1>
 
   <refsect1>
             <entry>Unescaped filename</entry>
             <entry>This is either the unescaped instance name (if applicable) with <filename>/</filename> prepended (if applicable), or the unescaped prefix name prepended with <filename>/</filename>. This implements unescaping according to the rules for escaping absolute file system paths discussed above.</entry>
           </row>
+          <row>
+            <entry><literal>%g</literal></entry>
+            <entry>User group</entry>
+            <entry>This is the name of the group running the service manager instance. In case of the system manager this resolves to <literal>root</literal>.</entry>
+          </row>
+          <row>
+            <entry><literal>%G</literal></entry>
+            <entry>User GID</entry>
+            <entry>This is the numeric GID of the user running the service manager instance. In case of the system manager this resolves to <literal>0</literal>.</entry>
+          </row>
           <row>
             <entry><literal>%h</literal></entry>
             <entry>User home directory</entry>
@@ -1792,11 +1814,6 @@ Note that this setting is <emphasis>not</emphasis> influenced by the <varname>Us
             <entry>Host name</entry>
             <entry>The hostname of the running system at the point in time the unit configuration is loaded.</entry>
           </row>
-          <row>
-            <entry><literal>%l</literal></entry>
-            <entry>Short host name</entry>
-            <entry>The hostname of the running system at the point in time the unit configuration is loaded, truncated at the first dot to remove any domain component.</entry>
-          </row>
           <row>
             <entry><literal>%i</literal></entry>
             <entry>Instance name</entry>
@@ -1817,13 +1834,17 @@ Note that this setting is <emphasis>not</emphasis> influenced by the <varname>Us
             <entry>Unescaped final component of the prefix</entry>
             <entry>Same as <literal>%j</literal>, but with escaping undone.</entry>
           </row>
+          <row>
+            <entry><literal>%l</literal></entry>
+            <entry>Short host name</entry>
+            <entry>The hostname of the running system at the point in time the unit configuration is loaded, truncated at the first dot to remove any domain component.</entry>
+          </row>
           <row>
             <entry><literal>%L</literal></entry>
             <entry>Log directory root</entry>
             <entry>This is either <filename>/var/log</filename> (for the system manager) or the path <literal>$XDG_CONFIG_HOME</literal> resolves to with <filename index="false">/log</filename> appended (for user managers).</entry>
           </row>
           <xi:include href="standard-specifiers.xml" xpointer="m"/>
-          <xi:include href="standard-specifiers.xml" xpointer="o"/>
           <row>
             <entry><literal>%n</literal></entry>
             <entry>Full unit name</entry>
@@ -1834,6 +1855,7 @@ Note that this setting is <emphasis>not</emphasis> influenced by the <varname>Us
             <entry>Full unit name</entry>
             <entry>Same as <literal>%n</literal>, but with the type suffix removed.</entry>
           </row>
+          <xi:include href="standard-specifiers.xml" xpointer="o"/>
           <row>
             <entry><literal>%p</literal></entry>
             <entry>Prefix name</entry>
@@ -1860,16 +1882,6 @@ Note that this setting is <emphasis>not</emphasis> influenced by the <varname>Us
             <entry>This is either <filename>/run/</filename> (for the system manager) or the path <literal>$XDG_RUNTIME_DIR</literal> resolves to (for user managers).</entry>
           </row>
           <xi:include href="standard-specifiers.xml" xpointer="T"/>
-          <row>
-            <entry><literal>%g</literal></entry>
-            <entry>User group</entry>
-            <entry>This is the name of the group running the service manager instance. In case of the system manager this resolves to <literal>root</literal>.</entry>
-          </row>
-          <row>
-            <entry><literal>%G</literal></entry>
-            <entry>User GID</entry>
-            <entry>This is the numeric GID of the user running the service manager instance. In case of the system manager this resolves to <literal>0</literal>.</entry>
-          </row>
           <row>
             <entry><literal>%u</literal></entry>
             <entry>User name</entry>
index 27e7bf53f69c0b791396da38b0a6f1006b4ca7ba..882b5a6c74eba66f6b96aa6756a6e313f6b5dc9f 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="systemd"
     xmlns:xi="http://www.w3.org/2001/XInclude">
       <xi:include href="less-variables.xml" xpointer="pager"/>
       <xi:include href="less-variables.xml" xpointer="less"/>
       <xi:include href="less-variables.xml" xpointer="lesscharset"/>
+      <xi:include href="less-variables.xml" xpointer="lesssecure"/>
       <xi:include href="less-variables.xml" xpointer="colors"/>
       <xi:include href="less-variables.xml" xpointer="urlify"/>
 
index 52b2d89474af211999533741b76ef5f30562acba..a76dda954b14433c7ffbb1ffaeb88ef0bb7fd3e8 100644 (file)
@@ -2,7 +2,7 @@
 <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 <refentry id="sysusers.d" conditional='ENABLE_SYSUSERS'
     xmlns:xi="http://www.w3.org/2001/XInclude">
 
index da24c081ee764b8a575458caee6671ec0ecd9f12..e5c70d4a18a9934d74b3cde4552c4f6c1d4ab3de 100644 (file)
@@ -2,7 +2,7 @@
 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 -->
 
 <refsect1>
index 0fffd510934d8d953b298461c7c0f504f018e6a4..294b359a3ad7e08f9732210f5b43726ac5ee4a2c 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="telinit" conditional='HAVE_SYSV_COMPAT'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 49de3444be7e2145127a4169e2c4cd1321c1e874..fb38d07e1a8382fd5123f192a02e2fe9da52fa05 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refsect1>
 
index a8c1f5c0f312fd98b66bfbab62f64a46d0ba7935..e7db4870c05ad39e684939db8ae3edf9c9c9d2a9 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="timedatectl" conditional='ENABLE_TIMEDATECTL'
   xmlns:xi="http://www.w3.org/2001/XInclude">
index c1a37ec837c771bea4439779cfdaa0335e1053d8..1cbea9eaa55d10dfc2075b291dc048f2f17446d3 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="timesyncd.conf" conditional='ENABLE_TIMESYNCD'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 5b81bb5888f4dd3e9a9d574cef373c05a0762c61..49ce8375a40b84459dad1179ab86b37520d2d8fe 100644 (file)
@@ -2,7 +2,7 @@
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   Copyright © 2010 Brandon Philips
 -->
@@ -639,6 +639,16 @@ w- /proc/sys/vm/swappiness - - - - 10</programlisting></para>
               <entry>System or user cache directory</entry>
               <entry>In <option>--user</option> mode, this is the same as <varname>$XDG_CACHE_HOME</varname>, and <filename>/var/cache</filename> otherwise.</entry>
             </row>
+            <row>
+              <entry><literal>%g</literal></entry>
+              <entry>User group</entry>
+              <entry>This is the name of the group running the command. In case of the system instance this resolves to <literal>root</literal>.</entry>
+            </row>
+            <row>
+              <entry><literal>%G</literal></entry>
+              <entry>User GID</entry>
+              <entry>This is the numeric GID of the group running the command. In case of the system instance this resolves to <constant>0</constant>.</entry>
+            </row>
             <row>
               <entry><literal>%h</literal></entry>
               <entry>User home directory</entry>
@@ -664,16 +674,6 @@ w- /proc/sys/vm/swappiness - - - - 10</programlisting></para>
               <entry>In <option>--user</option> mode, this is the same <varname>$XDG_RUNTIME_DIR</varname>, and <filename>/run/</filename> otherwise.</entry>
             </row>
             <xi:include href="standard-specifiers.xml" xpointer="T"/>
-            <row>
-              <entry><literal>%g</literal></entry>
-              <entry>User group</entry>
-              <entry>This is the name of the group running the command. In case of the system instance this resolves to <literal>root</literal>.</entry>
-            </row>
-            <row>
-              <entry><literal>%G</literal></entry>
-              <entry>User GID</entry>
-              <entry>This is the numeric GID of the group running the command. In case of the system instance this resolves to <constant>0</constant>.</entry>
-            </row>
             <row>
               <entry><literal>%u</literal></entry>
               <entry>User name</entry>
index aa695b5e04b8587bd9a3d0281c9e335375e5b045..df0a70c9fb0d6c1c529b63bcacbc8088981089e5 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="udev.conf"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index a41a39a43f9726ce7697f7eeda0a4d6903a98bb9..14e4c21aaebac7211e24c750f36a5441d4f9e607 100644 (file)
@@ -3,7 +3,7 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
   Copyright © 2014 Jason St. John
 -->
 
@@ -23,7 +23,8 @@
     <refpurpose>Dynamic device management</refpurpose>
   </refnamediv>
 
-  <refsect1><title>Description</title>
+  <refsect1>
+    <title>Description</title>
     <para>udev supplies the system software with device events, manages permissions
     of device nodes and may create additional symlinks in the <filename>/dev/</filename>
     directory, or renames network interfaces. The kernel usually just assigns unpredictable
@@ -44,7 +45,8 @@
     sources is provided by the library libudev.</para>
   </refsect1>
 
-  <refsect1><title>Rules Files</title>
+  <refsect1>
+      <title>Rules Files</title>
       <para>The udev rules are read from the files located in the system rules directories
       <filename>/usr/lib/udev/rules.d</filename> and <filename>/usr/local/lib/udev/rules.d</filename>, the
       volatile runtime directory <filename>/run/udev/rules.d</filename> and the local administration
       pointing to the device node, or run a specified program as part of
       the event handling.</para>
 
-      <para>A rule consists of a comma-separated list of one or more key-value pairs.
-      Each key has a distinct operation, depending on the used operator. Valid
-      operators are:</para>
-      <variablelist>
-        <varlistentry>
-          <term><literal>==</literal></term>
-          <listitem>
-            <para>Compare for equality.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><literal>!=</literal></term>
-          <listitem>
-            <para>Compare for inequality.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><literal>=</literal></term>
-          <listitem>
-            <para>Assign a value to a key. Keys that represent a list are reset
-            and only this single value is assigned.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><literal>+=</literal></term>
-          <listitem>
-            <para>Add the value to a key that holds a list of entries.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><literal>-=</literal></term>
-          <listitem>
-            <para>Remove the value from a key that holds a list of entries.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><literal>:=</literal></term>
-          <listitem>
-            <para>Assign  a  value  to  a key finally; disallow any later changes.</para>
-          </listitem>
-        </varlistentry>
-      </variablelist>
-
-      <para>The following key names can be used to match against device properties.
-      Some of the keys also match against properties of the parent devices in sysfs,
-      not only the device that has generated the event. If multiple keys that match
-      a parent device are specified in a single rule, all these keys must match at
-      one and the same parent device.</para>
-      <variablelist class='udev-directives'>
-        <varlistentry>
-          <term><varname>ACTION</varname></term>
-          <listitem>
-            <para>Match the name of the event action.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>DEVPATH</varname></term>
-          <listitem>
-            <para>Match the devpath of the event device.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>KERNEL</varname></term>
-          <listitem>
-            <para>Match the name of the event device.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>NAME</varname></term>
-          <listitem>
-            <para>Match the name of a network interface. It can be used once the
-            NAME key has been set in one of the preceding rules.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>SYMLINK</varname></term>
-          <listitem>
-            <para>Match the name of a symlink targeting the node. It can
-            be used once a SYMLINK key has been set in one of the preceding
-            rules. There may be multiple symlinks; only one needs to match.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>SUBSYSTEM</varname></term>
-          <listitem>
-            <para>Match the subsystem of the event device.</para>
-          </listitem>
-        </varlistentry>
-        <varlistentry>
-          <term><varname>DRIVER</varname></term>
-          <listitem>
-            <para>Match the driver name of the event device. Only set this key for devices
-            which are bound to a driver at the time the event is generated.</para>
-          </listitem>
-        </varlistentry>
-        <varlistentry>
-          <term><varname>ATTR{<replaceable>filename</replaceable>}</varname></term>
-          <listitem>
-            <para>Match sysfs attribute values of the event device. Trailing
-            whitespace in the attribute values is ignored unless the specified match
-            value itself contains trailing whitespace.
-            </para>
-          </listitem>
-        </varlistentry>
-        <varlistentry>
-          <term><varname>SYSCTL{<replaceable>kernel parameter</replaceable>}</varname></term>
-          <listitem>
-            <para>Match a kernel parameter value.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>KERNELS</varname></term>
-          <listitem>
-            <para>Search the devpath upwards for a matching device name.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>SUBSYSTEMS</varname></term>
-          <listitem>
-            <para>Search the devpath upwards for a matching device subsystem name.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>DRIVERS</varname></term>
-          <listitem>
-            <para>Search the devpath upwards for a matching device driver name.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>ATTRS{<replaceable>filename</replaceable>}</varname></term>
-          <listitem>
-            <para>Search the devpath upwards for a device with matching sysfs attribute values.
-            If multiple <varname>ATTRS</varname> matches are specified, all of them
-            must match on the same device. Trailing whitespace in the attribute values is ignored
-            unless the specified match value itself contains trailing whitespace.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>TAGS</varname></term>
-          <listitem>
-            <para>Search the devpath upwards for a device with matching tag.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>ENV{<replaceable>key</replaceable>}</varname></term>
-          <listitem>
-            <para>Match against a device property value.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>CONST{<replaceable>key</replaceable>}</varname></term>
-          <listitem>
-            <para>Match against a system-wide constant. Supported keys are:</para>
-            <variablelist>
-              <varlistentry>
-                <term><literal>arch</literal></term>
-                <listitem>
-                  <para>System's architecture. See <option>ConditionArchitecture=</option> in
-                  <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
-                  for possible values.</para>
-                </listitem>
-              </varlistentry>
-              <varlistentry>
-                <term><literal>virt</literal></term>
-                <listitem>
-                  <para>System's virtualization environment. See
-                  <citerefentry><refentrytitle>systemd-detect-virt</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-                  for possible values.</para>
-                </listitem>
-              </varlistentry>
-            </variablelist>
-            <para>Unknown keys will never match.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>TAG</varname></term>
-          <listitem>
-            <para>Match against a device tag.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>TEST{<replaceable>octal mode mask</replaceable>}</varname></term>
-          <listitem>
-            <para>Test the existence of a file. An octal mode mask can be specified
-            if needed.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>PROGRAM</varname></term>
-          <listitem>
-            <para>Execute a program to determine whether there is a match; the key is true if the program
-            returns successfully. The device properties are made available to the executed program in the
-            environment. The program's standard output is available in the <varname>RESULT</varname>
-            key.</para>
-
-            <para>This can only be used for very short-running foreground tasks. For details, see
-            <varname>RUN</varname>.</para>
-
-            <para>Note that multiple <varname>PROGRAM</varname> keys may be specified in one rule, and
-            <literal>=</literal>, <literal>:=</literal>, and <literal>+=</literal> have the same effect as
-            <literal>==</literal>.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>RESULT</varname></term>
-          <listitem>
-            <para>Match the returned string of the last <varname>PROGRAM</varname> call.
-            This key can be used in the same or in any later rule after a
-            <varname>PROGRAM</varname> call.</para>
-          </listitem>
-        </varlistentry>
-      </variablelist>
-
-      <para>Most of the fields support shell glob pattern matching and
-      alternate patterns. The following special characters are supported:</para>
-      <variablelist>
-        <varlistentry>
-          <term><literal>*</literal></term>
-          <listitem>
-            <para>Matches zero or more characters.</para>
-          </listitem>
-        </varlistentry>
-        <varlistentry>
-          <term><literal>?</literal></term>
-          <listitem>
-            <para>Matches any single character.</para>
-          </listitem>
-        </varlistentry>
-        <varlistentry>
-          <term><literal>[]</literal></term>
-          <listitem>
-            <para>Matches any single character specified within the brackets. For
-            example, the pattern string <literal>tty[SR]</literal>
-            would match either <literal>ttyS</literal> or <literal>ttyR</literal>.
-            Ranges are also supported via the <literal>-</literal> character.
-            For example, to match on the range of all digits, the pattern
-            <literal>[0-9]</literal> could be used. If the first character
-            following the <literal>[</literal> is a <literal>!</literal>,
-            any characters not enclosed are matched.</para>
-          </listitem>
-        </varlistentry>
-        <varlistentry>
-          <term><literal>|</literal></term>
-          <listitem>
-            <para>Separates alternative patterns. For example, the pattern string
-            <literal>abc|x*</literal> would match either <literal>abc</literal>
-            or <literal>x*</literal>.</para>
-          </listitem>
-        </varlistentry>
-      </variablelist>
-
-      <para>The following keys can get values assigned:</para>
-      <variablelist class='udev-directives'>
-        <varlistentry>
-          <term><varname>NAME</varname></term>
-          <listitem>
-            <para>The name to use for a network interface. See
-            <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>
-            for a higher-level mechanism for setting the interface name.
-            The name of a device node cannot be changed by udev, only additional
-            symlinks can be created.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>SYMLINK</varname></term>
-          <listitem>
-            <para>The name of a symlink targeting the node. Every matching rule adds
-            this value to the list of symlinks to be created.</para>
-            <para>The set of characters to name a symlink is limited. Allowed
-            characters are <literal>0-9A-Za-z#+-.:=@_/</literal>, valid UTF-8 character
-            sequences, and <literal>\x00</literal> hex encoding. All other
-            characters are replaced by a <literal>_</literal> character.</para>
-            <para>Multiple symlinks may be specified by separating the names by the
-            space character. In case multiple devices claim the same name, the link
-            always points to the device with the highest link_priority. If the current
-            device goes away, the links are re-evaluated and the device with the
-            next highest link_priority becomes the owner of the link. If no
-            link_priority is specified, the order of the devices (and which one of
-            them owns the link) is undefined.</para>
-            <para>Symlink names must never conflict with the kernel's default device
-            node names, as that would result in unpredictable behavior.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>OWNER</varname>, <varname>GROUP</varname>, <varname>MODE</varname></term>
-          <listitem>
-            <para>The permissions for the device node. Every specified value overrides
-            the compiled-in default value.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>SECLABEL{<replaceable>module</replaceable>}</varname></term>
-          <listitem>
-            <para>Applies the specified Linux Security Module label to the device node.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>ATTR{<replaceable>key</replaceable>}</varname></term>
-          <listitem>
-            <para>The value that should be written to a sysfs attribute of the
-            event device.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>SYSCTL{<replaceable>kernel parameter</replaceable>}</varname></term>
-          <listitem>
-            <para>The value that should be written to kernel parameter.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>ENV{<replaceable>key</replaceable>}</varname></term>
-          <listitem>
-            <para>Set a device property value. Property names with a leading <literal>.</literal>
-            are neither stored in the database nor exported to events or
-            external tools (run by, for example, the <varname>PROGRAM</varname>
-            match key).</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>TAG</varname></term>
-          <listitem>
-            <para>Attach a tag to a device. This is used to filter events for users
-            of libudev's monitor functionality, or to enumerate a group of tagged
-            devices. The implementation can only work efficiently if only a few
-            tags are attached to a device. It is only meant to be used in
-            contexts with specific device filter requirements, and not as a
-            general-purpose flag. Excessive use might result in inefficient event
-            handling.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>RUN{<replaceable>type</replaceable>}</varname></term>
-          <listitem>
-            <para>Specify a program to be executed after processing of all the rules for the event. With
-            <literal>+=</literal>, this invocation is added to the list, and with <literal>=</literal> or
-            <literal>:=</literal>, it replaces any previous contents of the list. Please note that both
-            <literal>program</literal> and <literal>builtin</literal> types described below use a single
-            list, so clearing the list with <literal>:=</literal> and <literal>=</literal> affects both
-            types.</para>
-
-            <para><replaceable>type</replaceable> may be:</para>
-            <variablelist>
-              <varlistentry>
-                <term><literal>program</literal></term>
-                <listitem>
-                  <para>Execute an external program specified as the assigned
-                  value. If no absolute path is given, the program is expected
-                  to live in <filename>/usr/lib/udev</filename>; otherwise, the
-                  absolute path must be specified.</para>
-                  <para>This is the default if no <replaceable>type</replaceable>
-                  is specified.</para>
-                </listitem>
-              </varlistentry>
-              <varlistentry>
-                <term><literal>builtin</literal></term>
-                <listitem>
-                  <para>As <varname>program</varname>, but use one of the
-                  built-in programs rather than an external one.</para>
-                </listitem>
-              </varlistentry>
-            </variablelist>
-
-            <para>The program name and following arguments are separated by spaces. Single quotes can be
-            used to specify arguments with spaces.</para>
-
-            <para>This can only be used for very short-running foreground tasks. Running an event process for
-            a long period of time may block all further events for this or a dependent device.</para>
-
-            <para>Note that running programs that access the network or mount/unmount filesystems is not
-            allowed inside of udev rules, due to the default sandbox that is enforced on
-            <filename>systemd-udevd.service</filename>.</para>
-
-            <para>Starting daemons or other long-running processes is not allowed; the forked processes,
-            detached or not, will be unconditionally killed after the event handling has finished. In order
-            to activate long-running processes from udev rules, provide a service unit and pull it in from a
-            udev device using the <varname>SYSTEMD_WANTS</varname> device property. See
-            <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>
-            for details.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>LABEL</varname></term>
-          <listitem>
-            <para>A named label to which a <varname>GOTO</varname> may jump.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>GOTO</varname></term>
-          <listitem>
-            <para>Jumps to the next <varname>LABEL</varname> with a matching name.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>IMPORT{<replaceable>type</replaceable>}</varname></term>
-          <listitem>
-            <para>Import a set of variables as device properties, depending on
-            <replaceable>type</replaceable>:</para>
-
-            <variablelist>
-              <varlistentry>
-                <term><literal>program</literal></term>
-                <listitem>
-                  <para>Execute an external program specified as the assigned
-                  value and, if it returns successfully,
-                  import its output, which must be in environment key
-                  format. Path specification, command/argument separation,
-                  and quoting work like in <varname>RUN</varname>.</para>
-                </listitem>
-              </varlistentry>
-              <varlistentry>
-                <term><literal>builtin</literal></term>
-                <listitem>
-                  <para>Similar to <literal>program</literal>, but use one of the
-                  built-in programs rather than an external one.</para>
-                </listitem>
-              </varlistentry>
-             <varlistentry>
-                <term><literal>file</literal></term>
-                <listitem>
-                  <para>Import a text file specified as the assigned value, the content
-                  of which must be in environment key format.</para>
-                </listitem>
-              </varlistentry>
-              <varlistentry>
-                <term><literal>db</literal></term>
-                <listitem>
-                  <para>Import a single property specified as the assigned value from the
-                  current device database. This works only if the database is already populated
-                  by an earlier event.</para>
-                </listitem>
-              </varlistentry>
-              <varlistentry>
-                <term><literal>cmdline</literal></term>
-                <listitem>
-                  <para>Import a single property from the kernel command line. For simple flags
-                  the value of the property is set to <literal>1</literal>.</para>
-                </listitem>
-              </varlistentry>
-              <varlistentry>
-                <term><literal>parent</literal></term>
-                <listitem>
-                  <para>Import the stored keys from the parent device by reading
-                  the database entry of the parent device. The value assigned to
-                  <option>IMPORT{parent}</option> is used as a filter of key names
-                  to import (with the same shell glob pattern matching used for
-                  comparisons).</para>
-                </listitem>
-              </varlistentry>
-            </variablelist>
-
-            <para>This can only be used for very short-running foreground tasks. For details see
-            <option>RUN</option>.</para>
-
-            <para>Note that multiple <varname>IMPORT{}</varname> keys may be specified in one rule, and
-            <literal>=</literal>, <literal>:=</literal>, and <literal>+=</literal> have the same effect as
-            <literal>==</literal>. The key is true if the import is successful, unless <literal>!=</literal>
-            is used as the operator which causes the key to be true if the import failed.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><varname>OPTIONS</varname></term>
-          <listitem>
-            <para>Rule and device options:</para>
-            <variablelist class='udev-directives'>
-              <varlistentry>
-                <term><option>link_priority=<replaceable>value</replaceable></option></term>
-                <listitem>
-                  <para>Specify the priority of the created symlinks. Devices with higher
-                  priorities overwrite existing symlinks of other devices. The default is 0.</para>
-                </listitem>
-              </varlistentry>
-              <varlistentry>
-                <term><option>string_escape=<replaceable>none|replace</replaceable></option></term>
-                <listitem>
-                  <para>Usually, control and other possibly unsafe characters are replaced
-                  in strings used for device naming. The mode of replacement can be specified
-                  with this option.</para>
-                </listitem>
-              </varlistentry>
-              <varlistentry>
-                <term><option>static_node=</option></term>
-                <listitem>
-                  <para>Apply the permissions specified in this rule to the
-                  static device node with the specified name. Also, for every
-                  tag specified in this rule, create a symlink
-                  in the directory
-                  <filename>/run/udev/static_node-tags/<replaceable>tag</replaceable></filename>
-                  pointing at the static device node with the specified name.
-                  Static device node creation is performed by systemd-tmpfiles
-                  before systemd-udevd is started. The static nodes might not
-                  have a corresponding kernel device; they are used to trigger
-                  automatic kernel module loading when they are accessed.</para>
-                </listitem>
-              </varlistentry>
-              <varlistentry>
-                <term><option>watch</option></term>
-                <listitem>
-                  <para>Watch the device node with inotify; when the node is
-                  closed after being opened for writing, a change uevent is
-                  synthesized.</para>
-                </listitem>
-              </varlistentry>
-              <varlistentry>
-                <term><option>nowatch</option></term>
-                <listitem>
-                  <para>Disable the watching of a device node with inotify.</para>
-                </listitem>
-              </varlistentry>
+      <para>A rule consists of a comma-separated list of one or more key-operator-value expressions.
+      Each expression has a distinct effect, depending on the key and operator used.</para>
+
+      <refsect2>
+        <title>Operators</title>
+        <variablelist>
+          <varlistentry>
+            <term><literal>==</literal></term>
+            <listitem>
+              <para>Compare for equality.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><literal>!=</literal></term>
+            <listitem>
+              <para>Compare for inequality.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><literal>=</literal></term>
+            <listitem>
+              <para>Assign a value to a key. Keys that represent a list are reset
+              and only this single value is assigned.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><literal>+=</literal></term>
+            <listitem>
+              <para>Add the value to a key that holds a list of entries.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><literal>-=</literal></term>
+            <listitem>
+              <para>Remove the value from a key that holds a list of entries.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><literal>:=</literal></term>
+            <listitem>
+              <para>Assign  a  value  to  a key finally; disallow any later changes.</para>
+            </listitem>
+          </varlistentry>
+        </variablelist>
+      </refsect2>
+
+      <refsect2>
+        <title>Values</title>
+          <para>Values are written as double quoted strings, such as ("string").
+          To include a quotation mark (") in the value, precede it by a backslash (\").
+          Any other occurrences of a character followed by a backslash are not further unescaped.
+          That is, "\t\n" is treated as four characters:
+          backslash, lowercase t, backslash, lowercase n.</para>
+
+          <para>The string can be prefixed with a lowercase e (e"string\n") to mark the string as
+          <ulink url="https://en.wikipedia.org/wiki/Escape_sequences_in_C#Table_of_escape_sequences">C-style escaped</ulink>.
+          For example, e"string\n" is parsed as 7 characters: 6 lowercase letters and a newline.
+          This can be useful for writing special characters when a kernel driver requires them.</para>
+
+          <para>Please note that <constant>NUL</constant> is not allowed in either string variant.</para>
+      </refsect2>
+
+      <refsect2>
+        <title>Keys</title>
+        <para>The following key names can be used to match against device properties.
+        Some of the keys also match against properties of the parent devices in sysfs,
+        not only the device that has generated the event. If multiple keys that match
+        a parent device are specified in a single rule, all these keys must match at
+        one and the same parent device.</para>
+        <variablelist class='udev-directives'>
+          <varlistentry>
+            <term><varname>ACTION</varname></term>
+            <listitem>
+              <para>Match the name of the event action.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>DEVPATH</varname></term>
+            <listitem>
+              <para>Match the devpath of the event device.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>KERNEL</varname></term>
+            <listitem>
+              <para>Match the name of the event device.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>NAME</varname></term>
+            <listitem>
+              <para>Match the name of a network interface. It can be used once the
+              NAME key has been set in one of the preceding rules.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>SYMLINK</varname></term>
+            <listitem>
+              <para>Match the name of a symlink targeting the node. It can
+              be used once a SYMLINK key has been set in one of the preceding
+              rules. There may be multiple symlinks; only one needs to match.
+              </para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>SUBSYSTEM</varname></term>
+            <listitem>
+              <para>Match the subsystem of the event device.</para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term><varname>DRIVER</varname></term>
+            <listitem>
+              <para>Match the driver name of the event device. Only set this key for devices
+              which are bound to a driver at the time the event is generated.</para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term><varname>ATTR{<replaceable>filename</replaceable>}</varname></term>
+            <listitem>
+              <para>Match sysfs attribute values of the event device. Trailing
+              whitespace in the attribute values is ignored unless the specified match
+              value itself contains trailing whitespace.
+              </para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term><varname>SYSCTL{<replaceable>kernel parameter</replaceable>}</varname></term>
+            <listitem>
+              <para>Match a kernel parameter value.
+              </para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>KERNELS</varname></term>
+            <listitem>
+              <para>Search the devpath upwards for a matching device name.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>SUBSYSTEMS</varname></term>
+            <listitem>
+              <para>Search the devpath upwards for a matching device subsystem name.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>DRIVERS</varname></term>
+            <listitem>
+              <para>Search the devpath upwards for a matching device driver name.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>ATTRS{<replaceable>filename</replaceable>}</varname></term>
+            <listitem>
+              <para>Search the devpath upwards for a device with matching sysfs attribute values.
+              If multiple <varname>ATTRS</varname> matches are specified, all of them
+              must match on the same device. Trailing whitespace in the attribute values is ignored
+              unless the specified match value itself contains trailing whitespace.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>TAGS</varname></term>
+            <listitem>
+              <para>Search the devpath upwards for a device with matching tag.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>ENV{<replaceable>key</replaceable>}</varname></term>
+            <listitem>
+              <para>Match against a device property value.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>CONST{<replaceable>key</replaceable>}</varname></term>
+            <listitem>
+              <para>Match against a system-wide constant. Supported keys are:</para>
+              <variablelist>
+                <varlistentry>
+                  <term><literal>arch</literal></term>
+                  <listitem>
+                    <para>System's architecture. See <option>ConditionArchitecture=</option> in
+                    <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+                    for possible values.</para>
+                  </listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><literal>virt</literal></term>
+                  <listitem>
+                    <para>System's virtualization environment. See
+                    <citerefentry><refentrytitle>systemd-detect-virt</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+                    for possible values.</para>
+                  </listitem>
+                </varlistentry>
+              </variablelist>
+              <para>Unknown keys will never match.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>TAG</varname></term>
+            <listitem>
+              <para>Match against a device tag.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>TEST{<replaceable>octal mode mask</replaceable>}</varname></term>
+            <listitem>
+              <para>Test the existence of a file. An octal mode mask can be specified
+              if needed.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>PROGRAM</varname></term>
+            <listitem>
+              <para>Execute a program to determine whether there is a match; the key is true if the program
+              returns successfully. The device properties are made available to the executed program in the
+              environment. The program's standard output is available in the <varname>RESULT</varname>
+              key.</para>
+
+              <para>This can only be used for very short-running foreground tasks. For details, see
+              <varname>RUN</varname>.</para>
+
+              <para>Note that multiple <varname>PROGRAM</varname> keys may be specified in one rule, and
+              <literal>=</literal>, <literal>:=</literal>, and <literal>+=</literal> have the same effect as
+              <literal>==</literal>.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>RESULT</varname></term>
+            <listitem>
+              <para>Match the returned string of the last <varname>PROGRAM</varname> call.
+              This key can be used in the same or in any later rule after a
+              <varname>PROGRAM</varname> call.</para>
+            </listitem>
+          </varlistentry>
+        </variablelist>
+
+        <para>Most of the fields support shell glob pattern matching and
+        alternate patterns. The following special characters are supported:</para>
+        <variablelist>
+          <varlistentry>
+            <term><literal>*</literal></term>
+            <listitem>
+              <para>Matches zero or more characters.</para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term><literal>?</literal></term>
+            <listitem>
+              <para>Matches any single character.</para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term><literal>[]</literal></term>
+            <listitem>
+              <para>Matches any single character specified within the brackets. For
+              example, the pattern string <literal>tty[SR]</literal>
+              would match either <literal>ttyS</literal> or <literal>ttyR</literal>.
+              Ranges are also supported via the <literal>-</literal> character.
+              For example, to match on the range of all digits, the pattern
+              <literal>[0-9]</literal> could be used. If the first character
+              following the <literal>[</literal> is a <literal>!</literal>,
+              any characters not enclosed are matched.</para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term><literal>|</literal></term>
+            <listitem>
+              <para>Separates alternative patterns. For example, the pattern string
+              <literal>abc|x*</literal> would match either <literal>abc</literal>
+              or <literal>x*</literal>.</para>
+            </listitem>
+          </varlistentry>
+        </variablelist>
+
+        <para>The following keys can get values assigned:</para>
+        <variablelist class='udev-directives'>
+          <varlistentry>
+            <term><varname>NAME</varname></term>
+            <listitem>
+              <para>The name to use for a network interface. See
+              <citerefentry><refentrytitle>systemd.link</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+              for a higher-level mechanism for setting the interface name.
+              The name of a device node cannot be changed by udev, only additional
+              symlinks can be created.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>SYMLINK</varname></term>
+            <listitem>
+              <para>The name of a symlink targeting the node. Every matching rule adds
+              this value to the list of symlinks to be created.</para>
+              <para>The set of characters to name a symlink is limited. Allowed
+              characters are <literal>0-9A-Za-z#+-.:=@_/</literal>, valid UTF-8 character
+              sequences, and <literal>\x00</literal> hex encoding. All other
+              characters are replaced by a <literal>_</literal> character.</para>
+              <para>Multiple symlinks may be specified by separating the names by the
+              space character. In case multiple devices claim the same name, the link
+              always points to the device with the highest link_priority. If the current
+              device goes away, the links are re-evaluated and the device with the
+              next highest link_priority becomes the owner of the link. If no
+              link_priority is specified, the order of the devices (and which one of
+              them owns the link) is undefined.</para>
+              <para>Symlink names must never conflict with the kernel's default device
+              node names, as that would result in unpredictable behavior.
+              </para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>OWNER</varname>, <varname>GROUP</varname>, <varname>MODE</varname></term>
+            <listitem>
+              <para>The permissions for the device node. Every specified value overrides
+              the compiled-in default value.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>SECLABEL{<replaceable>module</replaceable>}</varname></term>
+            <listitem>
+              <para>Applies the specified Linux Security Module label to the device node.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>ATTR{<replaceable>key</replaceable>}</varname></term>
+            <listitem>
+              <para>The value that should be written to a sysfs attribute of the
+              event device.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>SYSCTL{<replaceable>kernel parameter</replaceable>}</varname></term>
+            <listitem>
+              <para>The value that should be written to kernel parameter.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>ENV{<replaceable>key</replaceable>}</varname></term>
+            <listitem>
+              <para>Set a device property value. Property names with a leading <literal>.</literal>
+              are neither stored in the database nor exported to events or
+              external tools (run by, for example, the <varname>PROGRAM</varname>
+              match key).</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>TAG</varname></term>
+            <listitem>
+              <para>Attach a tag to a device. This is used to filter events for users
+              of libudev's monitor functionality, or to enumerate a group of tagged
+              devices. The implementation can only work efficiently if only a few
+              tags are attached to a device. It is only meant to be used in
+              contexts with specific device filter requirements, and not as a
+              general-purpose flag. Excessive use might result in inefficient event
+              handling.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>RUN{<replaceable>type</replaceable>}</varname></term>
+            <listitem>
+              <para>Specify a program to be executed after processing of all the rules for the event. With
+              <literal>+=</literal>, this invocation is added to the list, and with <literal>=</literal> or
+              <literal>:=</literal>, it replaces any previous contents of the list. Please note that both
+              <literal>program</literal> and <literal>builtin</literal> types described below use a single
+              list, so clearing the list with <literal>:=</literal> and <literal>=</literal> affects both
+              types.</para>
+
+              <para><replaceable>type</replaceable> may be:</para>
+              <variablelist>
+                <varlistentry>
+                  <term><literal>program</literal></term>
+                  <listitem>
+                    <para>Execute an external program specified as the assigned
+                    value. If no absolute path is given, the program is expected
+                    to live in <filename>/usr/lib/udev</filename>; otherwise, the
+                    absolute path must be specified.</para>
+                    <para>This is the default if no <replaceable>type</replaceable>
+                    is specified.</para>
+                  </listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><literal>builtin</literal></term>
+                  <listitem>
+                    <para>As <varname>program</varname>, but use one of the
+                    built-in programs rather than an external one.</para>
+                  </listitem>
+                </varlistentry>
+              </variablelist>
+
+              <para>The program name and following arguments are separated by spaces. Single quotes can be
+              used to specify arguments with spaces.</para>
+
+              <para>This can only be used for very short-running foreground tasks. Running an event process for
+              a long period of time may block all further events for this or a dependent device.</para>
+
+              <para>Note that running programs that access the network or mount/unmount filesystems is not
+              allowed inside of udev rules, due to the default sandbox that is enforced on
+              <filename>systemd-udevd.service</filename>.</para>
+
+              <para>Starting daemons or other long-running processes is not allowed; the forked processes,
+              detached or not, will be unconditionally killed after the event handling has finished. In order
+              to activate long-running processes from udev rules, provide a service unit and pull it in from a
+              udev device using the <varname>SYSTEMD_WANTS</varname> device property. See
+              <citerefentry><refentrytitle>systemd.device</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+              for details.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>LABEL</varname></term>
+            <listitem>
+              <para>A named label to which a <varname>GOTO</varname> may jump.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>GOTO</varname></term>
+            <listitem>
+              <para>Jumps to the next <varname>LABEL</varname> with a matching name.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>IMPORT{<replaceable>type</replaceable>}</varname></term>
+            <listitem>
+              <para>Import a set of variables as device properties, depending on
+              <replaceable>type</replaceable>:</para>
+
+              <variablelist>
+                <varlistentry>
+                  <term><literal>program</literal></term>
+                  <listitem>
+                    <para>Execute an external program specified as the assigned
+                    value and, if it returns successfully,
+                    import its output, which must be in environment key
+                    format. Path specification, command/argument separation,
+                    and quoting work like in <varname>RUN</varname>.</para>
+                  </listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><literal>builtin</literal></term>
+                  <listitem>
+                    <para>Similar to <literal>program</literal>, but use one of the
+                    built-in programs rather than an external one.</para>
+                  </listitem>
+                </varlistentry>
               <varlistentry>
-                <term><option>db_persist</option></term>
-                <listitem>
-                  <para>Set the flag (sticky bit) on the udev database entry
-                  of the event device. Device properties are then kept in the
-                  database even when
-                  <command>udevadm info --cleanup-db</command> is called.
-                  This option can be useful in certain cases
-                  (e.g. Device Mapper devices) for persisting device state
-                  on the transition from initramfs.</para>
-                </listitem>
-              </varlistentry>
-            </variablelist>
-          </listitem>
-        </varlistentry>
-      </variablelist>
-
-      <para>The <varname>NAME</varname>, <varname>SYMLINK</varname>,
-      <varname>PROGRAM</varname>, <varname>OWNER</varname>,
-      <varname>GROUP</varname>, <varname>MODE</varname>, <varname>SECLABEL</varname>,
-      and <varname>RUN</varname> fields support simple string substitutions.
-      The <varname>RUN</varname> substitutions are performed after all rules
-      have been processed, right before the program is executed, allowing for
-      the use of device properties set by earlier matching rules. For all other
-      fields, substitutions are performed while the individual rule is being
-      processed. The available substitutions are:</para>
-      <variablelist class='udev-directives'>
-        <varlistentry>
-          <term><option>$kernel</option>, <option>%k</option></term>
-          <listitem>
-            <para>The kernel name for this device.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>$number</option>, <option>%n</option></term>
-          <listitem>
-            <para>The kernel number for this device. For example, <literal>sda3</literal> has kernel number
-            3.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>$devpath</option>, <option>%p</option></term>
-          <listitem>
-            <para>The devpath of the device.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>$id</option>, <option>%b</option></term>
-          <listitem>
-            <para>The name of the device matched while searching the devpath
-              upwards for <option>SUBSYSTEMS</option>, <option>KERNELS</option>,
-              <option>DRIVERS</option>, and <option>ATTRS</option>.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>$driver</option></term>
-          <listitem>
-            <para>The driver name of the device matched while searching the
-              devpath upwards for <option>SUBSYSTEMS</option>,
-              <option>KERNELS</option>, <option>DRIVERS</option>, and
-              <option>ATTRS</option>.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>$attr{<replaceable>file</replaceable>}</option>, <option>%s{<replaceable>file</replaceable>}</option></term>
-          <listitem>
-            <para>The value of a sysfs attribute found at the device where
-              all keys of the rule have matched. If the matching device does not
-              have such an attribute, and a previous <option>KERNELS</option>,
-              <option>SUBSYSTEMS</option>, <option>DRIVERS</option>, or
-              <option>ATTRS</option> test selected a parent device, then the
-              attribute from that parent device is used.
-            </para>
-            <para>If the attribute is a symlink, the last element of the
-              symlink target is returned as the value.
-            </para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>$env{<replaceable>key</replaceable>}</option>, <option>%E{<replaceable>key</replaceable>}</option></term>
-          <listitem>
-            <para>A device property value.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>$major</option>, <option>%M</option></term>
-          <listitem>
-            <para>The kernel major number for the device.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>$minor</option>, <option>%m</option></term>
-          <listitem>
-            <para>The kernel minor number for the device.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>$result</option>, <option>%c</option></term>
-          <listitem>
-            <para>The string returned by the external program requested with
-            <varname>PROGRAM</varname>.
-            A single part of the string, separated by a space character, may be selected
-            by specifying the part number as an attribute: <literal>%c{N}</literal>.
-            If the number is followed by the <literal>+</literal> character, this part plus all remaining parts
-            of the result string are substituted: <literal>%c{N+}</literal>.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>$parent</option>, <option>%P</option></term>
-          <listitem>
-            <para>The node name of the parent device.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>$name</option></term>
-          <listitem>
-            <para>The current name of the device. If not changed by a rule, it is the
-            name of the kernel device.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>$links</option></term>
-          <listitem>
-            <para>A space-separated list of the current symlinks. The value is
-            only set during a remove event or if an earlier rule assigned a value.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>$root</option>, <option>%r</option></term>
-          <listitem>
-            <para>The udev_root value.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>$sys</option>, <option>%S</option></term>
-          <listitem>
-            <para>The sysfs mount point.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>$devnode</option>, <option>%N</option></term>
-          <listitem>
-            <para>The name of the device node.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>%%</option></term>
-          <listitem>
-          <para>The <literal>%</literal> character itself.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term><option>$$</option></term>
-          <listitem>
-          <para>The <literal>$</literal> character itself.</para>
-          </listitem>
-        </varlistentry>
-      </variablelist>
+                  <term><literal>file</literal></term>
+                  <listitem>
+                    <para>Import a text file specified as the assigned value, the content
+                    of which must be in environment key format.</para>
+                  </listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><literal>db</literal></term>
+                  <listitem>
+                    <para>Import a single property specified as the assigned value from the
+                    current device database. This works only if the database is already populated
+                    by an earlier event.</para>
+                  </listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><literal>cmdline</literal></term>
+                  <listitem>
+                    <para>Import a single property from the kernel command line. For simple flags
+                    the value of the property is set to <literal>1</literal>.</para>
+                  </listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><literal>parent</literal></term>
+                  <listitem>
+                    <para>Import the stored keys from the parent device by reading
+                    the database entry of the parent device. The value assigned to
+                    <option>IMPORT{parent}</option> is used as a filter of key names
+                    to import (with the same shell glob pattern matching used for
+                    comparisons).</para>
+                  </listitem>
+                </varlistentry>
+              </variablelist>
+
+              <para>This can only be used for very short-running foreground tasks. For details see
+              <option>RUN</option>.</para>
+
+              <para>Note that multiple <varname>IMPORT{}</varname> keys may be specified in one rule, and
+              <literal>=</literal>, <literal>:=</literal>, and <literal>+=</literal> have the same effect as
+              <literal>==</literal>. The key is true if the import is successful, unless <literal>!=</literal>
+              is used as the operator which causes the key to be true if the import failed.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><varname>OPTIONS</varname></term>
+            <listitem>
+              <para>Rule and device options:</para>
+              <variablelist class='udev-directives'>
+                <varlistentry>
+                  <term><option>link_priority=<replaceable>value</replaceable></option></term>
+                  <listitem>
+                    <para>Specify the priority of the created symlinks. Devices with higher
+                    priorities overwrite existing symlinks of other devices. The default is 0.</para>
+                  </listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><option>string_escape=<replaceable>none|replace</replaceable></option></term>
+                  <listitem>
+                    <para>Usually, control and other possibly unsafe characters are replaced
+                    in strings used for device naming. The mode of replacement can be specified
+                    with this option.</para>
+                  </listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><option>static_node=</option></term>
+                  <listitem>
+                    <para>Apply the permissions specified in this rule to the
+                    static device node with the specified name. Also, for every
+                    tag specified in this rule, create a symlink
+                    in the directory
+                    <filename>/run/udev/static_node-tags/<replaceable>tag</replaceable></filename>
+                    pointing at the static device node with the specified name.
+                    Static device node creation is performed by systemd-tmpfiles
+                    before systemd-udevd is started. The static nodes might not
+                    have a corresponding kernel device; they are used to trigger
+                    automatic kernel module loading when they are accessed.</para>
+                  </listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><option>watch</option></term>
+                  <listitem>
+                    <para>Watch the device node with inotify; when the node is
+                    closed after being opened for writing, a change uevent is
+                    synthesized.</para>
+                  </listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><option>nowatch</option></term>
+                  <listitem>
+                    <para>Disable the watching of a device node with inotify.</para>
+                  </listitem>
+                </varlistentry>
+                <varlistentry>
+                  <term><option>db_persist</option></term>
+                  <listitem>
+                    <para>Set the flag (sticky bit) on the udev database entry
+                    of the event device. Device properties are then kept in the
+                    database even when
+                    <command>udevadm info --cleanup-db</command> is called.
+                    This option can be useful in certain cases
+                    (e.g. Device Mapper devices) for persisting device state
+                    on the transition from initramfs.</para>
+                  </listitem>
+                </varlistentry>
+              </variablelist>
+            </listitem>
+          </varlistentry>
+        </variablelist>
+
+        <para>The <varname>NAME</varname>, <varname>SYMLINK</varname>,
+        <varname>PROGRAM</varname>, <varname>OWNER</varname>,
+        <varname>GROUP</varname>, <varname>MODE</varname>, <varname>SECLABEL</varname>,
+        and <varname>RUN</varname> fields support simple string substitutions.
+        The <varname>RUN</varname> substitutions are performed after all rules
+        have been processed, right before the program is executed, allowing for
+        the use of device properties set by earlier matching rules. For all other
+        fields, substitutions are performed while the individual rule is being
+        processed. The available substitutions are:</para>
+        <variablelist class='udev-directives'>
+          <varlistentry>
+            <term><option>$kernel</option>, <option>%k</option></term>
+            <listitem>
+              <para>The kernel name for this device.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><option>$number</option>, <option>%n</option></term>
+            <listitem>
+              <para>The kernel number for this device. For example, <literal>sda3</literal> has kernel number
+              3.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><option>$devpath</option>, <option>%p</option></term>
+            <listitem>
+              <para>The devpath of the device.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><option>$id</option>, <option>%b</option></term>
+            <listitem>
+              <para>The name of the device matched while searching the devpath
+                upwards for <option>SUBSYSTEMS</option>, <option>KERNELS</option>,
+                <option>DRIVERS</option>, and <option>ATTRS</option>.
+              </para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><option>$driver</option></term>
+            <listitem>
+              <para>The driver name of the device matched while searching the
+                devpath upwards for <option>SUBSYSTEMS</option>,
+                <option>KERNELS</option>, <option>DRIVERS</option>, and
+                <option>ATTRS</option>.
+              </para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><option>$attr{<replaceable>file</replaceable>}</option>, <option>%s{<replaceable>file</replaceable>}</option></term>
+            <listitem>
+              <para>The value of a sysfs attribute found at the device where
+                all keys of the rule have matched. If the matching device does not
+                have such an attribute, and a previous <option>KERNELS</option>,
+                <option>SUBSYSTEMS</option>, <option>DRIVERS</option>, or
+                <option>ATTRS</option> test selected a parent device, then the
+                attribute from that parent device is used.
+              </para>
+              <para>If the attribute is a symlink, the last element of the
+                symlink target is returned as the value.
+              </para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><option>$env{<replaceable>key</replaceable>}</option>, <option>%E{<replaceable>key</replaceable>}</option></term>
+            <listitem>
+              <para>A device property value.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><option>$major</option>, <option>%M</option></term>
+            <listitem>
+              <para>The kernel major number for the device.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><option>$minor</option>, <option>%m</option></term>
+            <listitem>
+              <para>The kernel minor number for the device.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><option>$result</option>, <option>%c</option></term>
+            <listitem>
+              <para>The string returned by the external program requested with
+              <varname>PROGRAM</varname>.
+              A single part of the string, separated by a space character, may be selected
+              by specifying the part number as an attribute: <literal>%c{N}</literal>.
+              If the number is followed by the <literal>+</literal> character, this part plus all remaining parts
+              of the result string are substituted: <literal>%c{N+}</literal>.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><option>$parent</option>, <option>%P</option></term>
+            <listitem>
+              <para>The node name of the parent device.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><option>$name</option></term>
+            <listitem>
+              <para>The current name of the device. If not changed by a rule, it is the
+              name of the kernel device.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><option>$links</option></term>
+            <listitem>
+              <para>A space-separated list of the current symlinks. The value is
+              only set during a remove event or if an earlier rule assigned a value.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><option>$root</option>, <option>%r</option></term>
+            <listitem>
+              <para>The udev_root value.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><option>$sys</option>, <option>%S</option></term>
+            <listitem>
+              <para>The sysfs mount point.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><option>$devnode</option>, <option>%N</option></term>
+            <listitem>
+              <para>The name of the device node.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><option>%%</option></term>
+            <listitem>
+            <para>The <literal>%</literal> character itself.</para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
+            <term><option>$$</option></term>
+            <listitem>
+            <para>The <literal>$</literal> character itself.</para>
+            </listitem>
+          </varlistentry>
+        </variablelist>
+      </refsect2>
   </refsect1>
 
   <refsect1>
index 0deb1d0d2ca8f2b884ab2a02cab8932176acc025..f2d712f23f96a02a956265551d1246a8f8e2937d 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="udev_device_get_syspath"
   xmlns:xi="http://www.w3.org/2001/XInclude">
       <citerefentry><refentrytitle>udev_enumerate_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>udev_monitor_new_from_netlink</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <citerefentry><refentrytitle>udev_list_entry</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     </para>
   </refsect1>
 
index 2e5b67e7503b4f7c2ccd3c49beb7e52b9d25afee..19bad4f7da75870913a8e753c6f57a2107ca0dad 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="udev_device_has_tag"
   xmlns:xi="http://www.w3.org/2001/XInclude">
     passed to <function>udev_device_has_tag()</function>, but the opposite might not be true, in case a tag is
     no longer configured by the rules applied to the most recent device even.</para>
 
-    <para><function>udev_device_get_tags_list_entry()</function> returns a a
-    <function>udev_list_entry</function> object, encapsulating a list of tags set for the specified
+    <para><function>udev_device_get_tags_list_entry()</function> returns a
+    <structname>udev_list_entry</structname> object, encapsulating a list of tags set for the specified
     device. Similar, <function>udev_device_get_current_tags_list_entry()</function> returns a list of tags
     set for the specified device as effect of the most recent device event seen (see above for details on the
     difference).</para>
index 763041d223e43b4f5c75b6fc0c98ce1507a544b2..f5ec03d4c7e4b3714e3209bbbd725c133641a0f1 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="udev_device_new_from_syspath"
   xmlns:xi="http://www.w3.org/2001/XInclude">
   <refsect1>
     <title>Description</title>
 
-    <para><function>udev_device_new_from_syspath</function>,
-    <function>udev_device_new_from_devnum</function>,
-    <function>udev_device_new_from_subsystem_sysname</function>,
-    <function>udev_device_new_from_device_id</function>, and
-    <function>udev_device_new_from_environment</function>
+    <para><function>udev_device_new_from_syspath()</function>,
+    <function>udev_device_new_from_devnum()</function>,
+    <function>udev_device_new_from_subsystem_sysname()</function>,
+    <function>udev_device_new_from_device_id()</function>, and
+    <function>udev_device_new_from_environment()</function>
     allocate a new udev device object and returns a pointer to it. This
     object is opaque and must not be accessed by the caller via different
     means than functions provided by libudev. Initially, the reference count
     <function>udev_device_unref()</function>. Once the reference count hits 0,
     the device object is destroyed and freed.</para>
 
-    <para><function>udev_device_new_from_syspath</function>,
-    <function>udev_device_new_from_devnum</function>,
-    <function>udev_device_new_from_subsystem_sysname</function>, and
-    <function>udev_device_new_from_device_id</function>
+    <para><function>udev_device_new_from_syspath()</function>,
+    <function>udev_device_new_from_devnum()</function>,
+    <function>udev_device_new_from_subsystem_sysname()</function>, and
+    <function>udev_device_new_from_device_id()</function>
     create the device object based on information found in
     <filename>/sys/</filename>, annotated with properties from the udev-internal
     device database. A syspath is any subdirectory of <filename>/sys/</filename>,
     with the restriction that a subdirectory of <filename>/sys/devices</filename>
     (or a symlink to one) represents a real device and as such must contain
-    a <filename>uevent</filename> file. <function>udev_device_new_from_devnum</function>
+    a <filename>uevent</filename> file. <function>udev_device_new_from_devnum()</function>
     takes a device type, which can be <constant>b</constant> for block devices or
     <constant>c</constant> for character devices, as well as a devnum (see
     <citerefentry project='man-pages'><refentrytitle>makedev</refentrytitle><manvolnum>3</manvolnum></citerefentry>).
-    <function>udev_device_new_from_subsystem_sysname</function> looks up devices based
+    <function>udev_device_new_from_subsystem_sysname()</function> looks up devices based
     on the provided subsystem and sysname
     (see <citerefentry><refentrytitle>udev_device_get_subsystem</refentrytitle><manvolnum>3</manvolnum></citerefentry>
     and
     <citerefentry><refentrytitle>udev_device_get_sysname</refentrytitle><manvolnum>3</manvolnum></citerefentry>)
-    and <function>udev_device_new_from_device_id</function> looks up devices based on the provided
+    and <function>udev_device_new_from_device_id()</function> looks up devices based on the provided
     device ID, which is a special string in one of the following four forms:
     <table>
       <title>Device ID strings</title>
     </table>
     </para>
 
-    <para><function>udev_device_new_from_environment</function>
+    <para><function>udev_device_new_from_environment()</function>
     creates a device from the current environment (see
     <citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>).
     Each key-value pair is interpreted in the same way as if it was
index 0dbb926ff0a5e087506a93cc02e5f4a51d50750e..455aabd725b14487094379382f50c70777b73aae 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="udev_enumerate_add_match_subsystem"
   xmlns:xi="http://www.w3.org/2001/XInclude">
     <title>Return Value</title>
 
     <para>On success,
-    <function>udev_enumerate_add_match_subsystem</function>,
-    <function>udev_enumerate_add_nomatch_subsystem</function>,
-    <function>udev_enumerate_add_match_sysattr</function>,
-    <function>udev_enumerate_add_nomatch_sysattr</function>,
-    <function>udev_enumerate_add_match_property</function>,
-    <function>udev_enumerate_add_match_sysname</function>,
-    <function>udev_enumerate_add_match_tag</function>,
-    <function>udev_enumerate_add_match_parent</function> and
-    <function>udev_enumerate_add_match_is_initialized</function>
+    <function>udev_enumerate_add_match_subsystem()</function>,
+    <function>udev_enumerate_add_nomatch_subsystem()</function>,
+    <function>udev_enumerate_add_match_sysattr()</function>,
+    <function>udev_enumerate_add_nomatch_sysattr()</function>,
+    <function>udev_enumerate_add_match_property()</function>,
+    <function>udev_enumerate_add_match_sysname()</function>,
+    <function>udev_enumerate_add_match_tag()</function>,
+    <function>udev_enumerate_add_match_parent()</function> and
+    <function>udev_enumerate_add_match_is_initialized()</function>
     return an integer greater than, or equal to,
     <constant>0</constant>.</para>
   </refsect1>
index 013d5cc823371d87e32dd9be785b88eb7330e0fc..3360cf04540993bcb18e26d9a2726f35a91093fc 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="udev_enumerate_new"
   xmlns:xi="http://www.w3.org/2001/XInclude">
index d3dddd415739c459765148b268c2ce5d3c4f7909..22151a532d203f65b27e579314601277d9f64086 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="udev_enumerate_scan_devices"
   xmlns:xi="http://www.w3.org/2001/XInclude">
index 9f44812cb4d2b30cd0dba562ae8ccbc68eaa926c..94273cef855eeca008f8306f914bd7891052ea0d 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="udev_list_entry"
   xmlns:xi="http://www.w3.org/2001/XInclude">
index 88a19f1da882b6c8513742f1bf367917178c342e..4e77db4836ec68941e21ed739a99f6a1fd6852b3 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="udev_monitor_filter_update"
   xmlns:xi="http://www.w3.org/2001/XInclude">
index cc37d219364fa9e20904ed3aab213b9cc0f0d30f..538a27e2b11776142a05b0b6bf73bc5755af0be5 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="udev_monitor_new_from_netlink"
   xmlns:xi="http://www.w3.org/2001/XInclude">
index 5b3f097d17902737b552ac7d9a49c3e58836a4df..bbdce3cb67c15385555e223f2ebcb8ab968219f2 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="udev_monitor_receive_device"
   xmlns:xi="http://www.w3.org/2001/XInclude">
index 89fa05e38858bdca19b7c2bdc239e2c014127a00..34e249d486c1191a169891bc31c1c85faa50d497 100644 (file)
@@ -4,7 +4,7 @@
 <!ENTITY % entities SYSTEM "custom-entities.ent" >
 %entities;
 ]>
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="udev_new"
   xmlns:xi="http://www.w3.org/2001/XInclude">
index d2f6083bae0f6b8ffc16a05ae4a7a0ee1dcf7b9f..ec26cc3c07fed03d442057b9506bc86e2e82081b 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="udevadm"
           xmlns:xi="http://www.w3.org/2001/XInclude">
index 8034735658c5d5e08dcf5eb1d83153d8dee92fc7..728118e60cb40e3c065aa99d2dd50743a859deb4 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <variablelist>
   <varlistentry id='user'>
index b9d1461404319e818a44ded815211efa2ea19888..0cf7f02352a61a018a44f36023ff210eaa9b9c31 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="user@.service">
   <refentryinfo>
index c86937760f3f53ca1a47bc752f1aff07c14be5ec..0c2dd73bb96a33d6980c996ef5242f2d1f23ce4d 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="userdbctl" conditional='ENABLE_USERDB'
     xmlns:xi="http://www.w3.org/2001/XInclude">
index 2e2223cc6939c187de514306d4289d20fcb24aa8..378812bd2a68a754d6985f425876a0338cb03004 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*-nxml-*-->
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <refentry id="vconsole.conf" conditional='ENABLE_VCONSOLE'>
   <refentryinfo>
index a800959ba935d0fc463a755c67ed3b6248586f84..75eb6fc1dc55d035583b0363f5314585f8d14b52 100644 (file)
@@ -1,7 +1,7 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 project('systemd', 'c',
-        version : '246',
+        version : '247',
         license : 'LGPLv2+',
         default_options: [
                 'c_std=gnu99',
@@ -13,7 +13,7 @@ project('systemd', 'c',
         meson_version : '>= 0.46',
        )
 
-libsystemd_version = '0.29.0'
+libsystemd_version = '0.30.0'
 libudev_version = '1.7.0'
 
 # We need the same data in two different formats, ugh!
@@ -38,8 +38,8 @@ relative_source_path = run_command('realpath',
                                    project_source_root).stdout().strip()
 conf.set_quoted('RELATIVE_SOURCE_PATH', relative_source_path)
 
-conf.set10('DEVELOPER_MODE', get_option('mode') == 'developer',
-           description : 'enable additional checks only suitable in development')
+conf.set('BUILD_MODE', 'BUILD_MODE_' + get_option('mode').to_upper(),
+         description : 'tailor build to development or release builds')
 
 want_ossfuzz = get_option('oss-fuzz')
 want_libfuzzer = get_option('llvm-fuzz')
@@ -126,6 +126,7 @@ if rootlibdir == ''
         rootlibdir = join_paths(rootprefixdir, libdir.split('/')[-1])
 endif
 
+install_sysconfdir = get_option('install-sysconfdir')
 # Dirs of external packages
 pkgconfigdatadir = get_option('pkgconfigdatadir') == '' ? join_paths(datadir, 'pkgconfig') : get_option('pkgconfigdatadir')
 pkgconfiglibdir = get_option('pkgconfiglibdir') == '' ? join_paths(libdir, 'pkgconfig') : get_option('pkgconfiglibdir')
@@ -221,11 +222,11 @@ conf.set_quoted('USER_CONFIG_UNIT_DIR',                       join_paths(pkgsysc
 conf.set_quoted('USER_DATA_UNIT_DIR',                         userunitdir)
 conf.set_quoted('CERTIFICATE_ROOT',                           get_option('certificate-root'))
 conf.set_quoted('CATALOG_DATABASE',                           join_paths(catalogstatedir, 'database'))
-conf.set_quoted('SYSTEMD_CGROUP_AGENT_PATH',                  join_paths(rootlibexecdir, 'systemd-cgroups-agent'))
 conf.set_quoted('SYSTEMD_BINARY_PATH',                        join_paths(rootlibexecdir, 'systemd'))
+conf.set_quoted('SYSTEMD_CGROUPS_AGENT_PATH',                 join_paths(rootlibexecdir, 'systemd-cgroups-agent'))
 conf.set_quoted('SYSTEMD_FSCK_PATH',                          join_paths(rootlibexecdir, 'systemd-fsck'))
-conf.set_quoted('SYSTEMD_MAKEFS_PATH',                        join_paths(rootlibexecdir, 'systemd-makefs'))
 conf.set_quoted('SYSTEMD_GROWFS_PATH',                        join_paths(rootlibexecdir, 'systemd-growfs'))
+conf.set_quoted('SYSTEMD_MAKEFS_PATH',                        join_paths(rootlibexecdir, 'systemd-makefs'))
 conf.set_quoted('SYSTEMD_SHUTDOWN_BINARY_PATH',               join_paths(rootlibexecdir, 'systemd-shutdown'))
 conf.set_quoted('SYSTEMCTL_BINARY_PATH',                      join_paths(rootbindir, 'systemctl'))
 conf.set_quoted('SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH', join_paths(rootbindir, 'systemd-tty-ask-password-agent'))
@@ -1075,6 +1076,7 @@ else
         libcurl = []
 endif
 conf.set10('HAVE_LIBCURL', have)
+conf.set10('CURL_NO_OLDIES', get_option('mode') == 'developer')
 
 want_libidn = get_option('libidn')
 want_libidn2 = get_option('libidn2')
@@ -1414,6 +1416,18 @@ conf.set10('ENABLE_HOMED', have)
 have = have and conf.get('HAVE_PAM') == 1
 conf.set10('ENABLE_PAM_HOME', have)
 
+have = get_option('oomd')
+if have == 'auto'
+        have = get_option('mode') == 'developer'
+else
+        have = have == 'true'
+        if have and get_option('mode') != 'developer'
+                warning('oomd is not ready for release mode (yet)')
+        endif
+endif
+conf.set10('ENABLE_OOMD', have)
+substs.set10('ENABLE_OOMD', have)
+
 want_remote = get_option('remote')
 if want_remote != 'false'
         have_deps = [conf.get('HAVE_MICROHTTPD') == 1,
@@ -1551,21 +1565,11 @@ meson_apply_m4 = find_program('tools/meson-apply-m4.sh')
 
 includes = include_directories('src/basic',
                                'src/boot',
+                               'src/core',
                                'src/home',
-                               'src/shared',
-                               'src/systemd',
                                'src/journal',
                                'src/journal-remote',
-                               'src/nspawn',
-                               'src/resolve',
-                               'src/timesync',
-                               'src/time-wait-sync',
-                               'src/login',
-                               'src/udev',
-                               'src/libudev',
-                               'src/core',
-                               'src/shutdown',
-                               'src/xdg-autostart-generator',
+                               'src/libsystemd-network',
                                'src/libsystemd/sd-bus',
                                'src/libsystemd/sd-device',
                                'src/libsystemd/sd-event',
@@ -1574,7 +1578,17 @@ includes = include_directories('src/basic',
                                'src/libsystemd/sd-netlink',
                                'src/libsystemd/sd-network',
                                'src/libsystemd/sd-resolve',
-                               'src/libsystemd-network',
+                               'src/libudev',
+                               'src/login',
+                               'src/nspawn',
+                               'src/resolve',
+                               'src/shared',
+                               'src/shutdown',
+                               'src/systemd',
+                               'src/time-wait-sync',
+                               'src/timesync',
+                               'src/udev',
+                               'src/xdg-autostart-generator',
                                '.')
 
 add_project_arguments('-include', 'config.h', language : 'c')
@@ -1583,6 +1597,7 @@ generate_gperfs = find_program('tools/generate-gperfs.py')
 
 subdir('po')
 subdir('catalog')
+subdir('src/libudev')
 subdir('src/systemd')
 subdir('src/basic')
 subdir('src/libsystemd')
@@ -1662,7 +1677,6 @@ update_dbus_docs_py = find_program('tools/update-dbus-docs.py')
 # usually, but not always, installed in /bin.
 public_programs = []
 
-subdir('src/libudev')
 subdir('src/shared')
 subdir('src/core')
 subdir('src/shutdown')
@@ -1673,6 +1687,7 @@ subdir('src/analyze')
 subdir('src/journal-remote')
 subdir('src/coredump')
 subdir('src/pstore')
+subdir('src/oom')
 subdir('src/hostname')
 subdir('src/import')
 subdir('src/partition')
@@ -2732,6 +2747,27 @@ if conf.get('ENABLE_PSTORE') == 1
                 install_dir : rootlibexecdir)
 endif
 
+if conf.get('ENABLE_OOMD') == 1
+        executable('systemd-oomd',
+                   systemd_oomd_sources,
+                   include_directories : includes,
+                   link_with : [libshared],
+                   dependencies : [],
+                   install_rpath : rootlibexecdir,
+                   install : true,
+                   install_dir : rootlibexecdir)
+
+        public_programs += executable(
+                   'oomctl',
+                   oomctl_sources,
+                   include_directories : includes,
+                   link_with : [libshared],
+                   dependencies : [],
+                   install_rpath : rootlibexecdir,
+                   install : true,
+                   install_dir : rootbindir)
+endif
+
 if conf.get('ENABLE_BINFMT') == 1
         public_programs += executable(
                 'systemd-binfmt',
@@ -2744,8 +2780,10 @@ if conf.get('ENABLE_BINFMT') == 1
 
         meson.add_install_script('sh', '-c',
                                  mkdir_p.format(binfmtdir))
-        meson.add_install_script('sh', '-c',
-                                 mkdir_p.format(join_paths(sysconfdir, 'binfmt.d')))
+        if install_sysconfdir
+                meson.add_install_script('sh', '-c',
+                                         mkdir_p.format(join_paths(sysconfdir, 'binfmt.d')))
+        endif
 endif
 
 if conf.get('ENABLE_REPART') == 1
@@ -2859,8 +2897,10 @@ executable(
         install : true,
         install_dir : rootlibexecdir)
 
-install_data('src/sleep/sleep.conf',
-             install_dir : pkgsysconfdir)
+if install_sysconfdir
+        install_data('src/sleep/sleep.conf',
+                     install_dir : pkgsysconfdir)
+endif
 
 public_programs += executable(
         'systemd-sysctl',
@@ -3062,6 +3102,7 @@ if enable_sysusers
                         'systemd-sysusers.standalone',
                         'src/sysusers/sysusers.c',
                         include_directories : includes,
+                        c_args : '-DSTANDALONE',
                         link_with : [libshared_static,
                                      libbasic,
                                      libbasic_gcrypt,
@@ -3104,6 +3145,7 @@ if conf.get('ENABLE_TMPFILES') == 1
                         'systemd-tmpfiles.standalone',
                         systemd_tmpfiles_sources,
                         include_directories : includes,
+                        c_args : '-DSTANDALONE',
                         link_with : [libshared_static,
                                      libbasic,
                                      libbasic_gcrypt,
@@ -3154,7 +3196,6 @@ public_programs += executable(
         c_args : '-DLOG_REALM=LOG_REALM_UDEV',
         include_directories : includes,
         link_with : [libudev_core,
-                     libsystemd_network,
                      libudev_static],
         dependencies : [versiondep,
                         threads,
@@ -3209,8 +3250,10 @@ if conf.get('HAVE_KMOD') == 1
 
         meson.add_install_script('sh', '-c',
                                  mkdir_p.format(modulesloaddir))
-        meson.add_install_script('sh', '-c',
-                                 mkdir_p.format(join_paths(sysconfdir, 'modules-load.d')))
+        if install_sysconfdir
+                meson.add_install_script('sh', '-c',
+                                         mkdir_p.format(join_paths(sysconfdir, 'modules-load.d')))
+        endif
 endif
 
 public_programs += executable(
@@ -3304,6 +3347,7 @@ foreach tuple : tests
         type = tuple.length() >= 5 ? tuple[4] : ''
         defs = tuple.length() >= 6 ? tuple[5] : []
         incs = tuple.length() >= 7 ? tuple[6] : includes
+        parallel = tuple.length() >= 8 ? tuple[7] : true
         timeout = 30
 
         name = sources[0].split('/')[-1].split('.')[0]
@@ -3396,40 +3440,39 @@ endif
 
 fuzzer_exes = []
 
-if get_option('tests') != 'false'
-        foreach tuple : fuzzers
-                sources = tuple[0]
-                link_with = tuple[1].length() > 0 ? tuple[1] : [libshared]
-                dependencies = tuple[2]
-                defs = tuple.length() >= 4 ? tuple[3] : []
-                incs = tuple.length() >= 5 ? tuple[4] : includes
-                link_args = []
-
-                if want_ossfuzz
+foreach tuple : fuzzers
+        sources = tuple[0]
+        link_with = tuple[1].length() > 0 ? tuple[1] : [libshared]
+        dependencies = tuple[2]
+        defs = tuple.length() >= 4 ? tuple[3] : []
+        incs = tuple.length() >= 5 ? tuple[4] : includes
+        link_args = []
+
+        if want_ossfuzz
+                dependencies += fuzzing_engine
+        elif want_libfuzzer
+                if fuzzing_engine.found()
                         dependencies += fuzzing_engine
-                elif want_libfuzzer
-                        if fuzzing_engine.found()
-                                dependencies += fuzzing_engine
-                        else
-                                link_args += ['-fsanitize=fuzzer']
-                        endif
                 else
-                        sources += 'src/fuzz/fuzz-main.c'
+                        link_args += ['-fsanitize=fuzzer']
                 endif
+        else
+                sources += 'src/fuzz/fuzz-main.c'
+        endif
 
-                name = sources[0].split('/')[-1].split('.')[0]
+        name = sources[0].split('/')[-1].split('.')[0]
 
-                fuzzer_exes += executable(
-                        name,
-                        sources,
-                        include_directories : [incs, include_directories('src/fuzz')],
-                        link_with : link_with,
-                        dependencies : dependencies,
-                        c_args : defs,
-                        link_args: link_args,
-                        install : false)
-        endforeach
-endif
+        fuzzer_exes += executable(
+                name,
+                sources,
+                include_directories : [incs, include_directories('src/fuzz')],
+                link_with : link_with,
+                dependencies : dependencies,
+                c_args : defs,
+                link_args: link_args,
+                install : false,
+                build_by_default : fuzz_tests or fuzzer_build)
+endforeach
 
 run_target(
         'fuzzers',
@@ -3454,8 +3497,10 @@ subdir('docs/var-log')
 install_subdir('factory/etc',
                install_dir : factorydir)
 
-install_data('xorg/50-systemd-user.sh',
-             install_dir : xinitrcdir)
+if install_sysconfdir
+        install_data('xorg/50-systemd-user.sh',
+                     install_dir : xinitrcdir)
+endif
 install_data('modprobe.d/systemd.conf',
              install_dir : modprobedir)
 install_data('LICENSE.GPL2',
@@ -3516,7 +3561,7 @@ foreach tuple : sanitizers
                         if name != prev
                                 if want_tests == 'false'
                                         message('Not compiling @0@ because tests is set to false'.format(name))
-                                elif slow_tests or fuzz_tests
+                                elif fuzz_tests
                                         exe = custom_target(
                                                 name,
                                                 output : name,
@@ -3526,13 +3571,13 @@ foreach tuple : sanitizers
                                                            '@OUTPUT@'],
                                                 build_by_default : true)
                                 else
-                                        message('Not compiling @0@ because slow-tests/fuzz-tests is set to false'.format(name))
+                                        message('Not compiling @0@ because fuzz-tests is set to false'.format(name))
                                 endif
                         endif
                         prev = name
 
-                        if want_tests != 'false' and (slow_tests or fuzz_tests)
-                                test('@0@:@1@:@2@'.format(b, c, sanitizer),
+                        if fuzz_tests
+                                test('@0@_@1@_@2@'.format(b, c, sanitizer),
                                      env,
                                      env : ['UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1'],
                                      timeout : 60,
@@ -3750,6 +3795,7 @@ foreach tuple : [
         ['DNS-over-TLS(openssl)', conf.get('DNS_OVER_TLS_USE_OPENSSL') == 1],
         ['coredump'],
         ['pstore'],
+        ['oomd'],
         ['polkit'],
         ['legacy pkla',      install_polkit_pkla],
         ['efi'],
index 9d14eca7f97f64559d6e6f1d3306a0973aa76af3..b50b0e9224294ec3517db05f12b35a08cdd20378 100644 (file)
@@ -1,11 +1,11 @@
 # -*- mode: meson -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 option('version-tag', type : 'string',
        description : 'override the git version string')
 
 option('mode', type : 'combo', choices : ['developer', 'release'],
-       description : 'enable additional checks suitable for systemd development')
+       description : 'autoenable features suitable for systemd development/release builds')
 
 option('split-usr', type : 'combo', choices : ['auto', 'true', 'false'],
        description : '''/bin, /sbin aren't symlinks into /usr''')
@@ -97,6 +97,8 @@ option('coredump', type : 'boolean',
        description : 'install the coredump handler')
 option('pstore', type : 'boolean',
        description : 'install the pstore archival tool')
+option('oomd', type : 'combo', choices : ['auto', 'true', 'false'],
+       description : 'install the userspace oom killer')
 option('logind', type : 'boolean',
        description : 'install the systemd-logind stack')
 option('hostnamed', type : 'boolean',
@@ -178,6 +180,8 @@ option('pamconfdir', type : 'string',
        description : 'directory for PAM configuration ["no" disables]')
 option('docdir', type : 'string',
        description : 'documentation directory')
+option('install-sysconfdir', type : 'boolean', value : true,
+       description : 'install configuration files to $sysconfdir')
 
 option('fallback-hostname', type : 'string', value : 'localhost',
        description : 'the hostname used if none configured')
index 0c4a3eaa3a5e56d2acadb36961c485bd51f4ea8f..652254155c265c820ba0b3175e24a3cb7cd003c2 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 44c59b7dde90c5e978af957dd40f139c41c848db..a8e683455be551d9d2020a350bbea2039a0ed36f 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 8a8df2fcd3d05f194346dc5fa277a2885b0b7837..7e8ff48d75ceb91198c55706ec638829287cf52d 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 4d4482b33a8e499933b4f50e82a0ce516a937f28..b0ea57a67c17d5b9a102ae0cc84782ed4d2025a6 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 4144034cde10c9534fccc1c96cae06813fa36583..45c5ab173465518b36d100e0dec51753ed913838 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index dc7a42bf585543676289dfface0f5ea53e3d1a21..bca660ac28899956842899ab1c6f4d32317576ca 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 99a650eac3a683f780d3958f2b3ef341c0bca7cd..b0e60f72176b38716565ae5e784a4da0517aba2c 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 if conf.get('ENABLE_NETWORKD') == 1
         install_data('80-container-host0.network',
@@ -10,8 +10,10 @@ if conf.get('ENABLE_NETWORKD') == 1
                      '80-wifi-station.network.example',
                      install_dir : networkdir)
 
-        meson.add_install_script('sh', '-c',
-                                 mkdir_p.format(join_paths(sysconfdir, 'systemd/network')))
+        if install_sysconfdir
+                meson.add_install_script('sh', '-c',
+                                         mkdir_p.format(join_paths(sysconfdir, 'systemd/network')))
+        endif
 endif
 
 install_data('99-default.link',
index e6ef4d7920a003e20655e6346082ccff6d3b8cc3..599445be37f515d2c870ec53fecbae08bd303fd9 100644 (file)
@@ -4,6 +4,7 @@ src/core/dbus-job.c
 src/core/dbus-manager.c
 src/core/dbus-mount.c
 src/core/dbus-path.c
+src/core/dbus-scope.c
 src/core/dbus-service.c
 src/core/dbus-slice.c
 src/core/dbus-socket.c
@@ -11,10 +12,10 @@ src/core/dbus-swap.c
 src/core/dbus-target.c
 src/core/dbus-timer.c
 src/core/dbus-unit.c
-src/core/dbus-scope.c
 src/core/org.freedesktop.systemd1.policy
 src/hostname/hostnamed.c
 src/locale/localed.c
 src/timedate/timedated.c
-units/user@.service.in
 units/debug-shell.service.in
+units/systemd-journald.service.in
+units/user@.service.in
index 3286e1ab69b714d5674481ba872e0b6ac4cd6f32..77f3a3f2cf96330a60292245e002f222be0134fd 100644 (file)
--- a/po/be.po
+++ b/po/be.po
@@ -1,24 +1,26 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Belarusian translation for systemd.
 #
 #
 # Viktar Vaŭčkievič <victorenator@gmail.com>, 2015, 2016.
+# Zmicer Turok <nashtlumach@gmail.com>, 2020.
 msgid ""
 msgstr ""
 "Project-Id-Version: systemd master\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2020-08-19 18:02+0200\n"
-"PO-Revision-Date: 2016-06-09 19:47+0300\n"
-"Last-Translator: Viktar Vaŭčkievič <victorenator@gmail.com>\n"
-"Language-Team: \n"
+"PO-Revision-Date: 2020-10-16 06:30+0000\n"
+"Last-Translator: Zmicer Turok <nashtlumach@gmail.com>\n"
+"Language-Team: Belarusian <https://translate.fedoraproject.org/projects/"
+"systemd/master/be/>\n"
 "Language: be\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
-"X-Generator: Lokalize 2.0\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+"X-Generator: Weblate 4.2.2\n"
 
 #: src/core/org.freedesktop.systemd1.policy.in:22
 msgid "Send passphrase back to system"
@@ -27,39 +29,39 @@ msgstr "Адправіць пароль назад сістэме"
 #: src/core/org.freedesktop.systemd1.policy.in:23
 msgid ""
 "Authentication is required to send the entered passphrase back to the system."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð°Ð´Ð¿Ñ\80аÑ\9eкÑ\96 Ð¿Ð°Ñ\80олÑ\8f Ð½Ð°Ð·Ð°Ð´ Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dме."
+msgstr "Ð\9aаб Ð°Ð´Ð¿Ñ\80авÑ\96Ñ\86Ñ\8c Ð¿Ð°Ñ\80олÑ\8c Ð½Ð°Ð·Ð°Ð´ Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dме, Ð¿Ð°Ñ\82Ñ\80бÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/core/org.freedesktop.systemd1.policy.in:33
 msgid "Manage system services or other units"
-msgstr "Кіраваць сэрвісамі і іншымі сістэмнымі адзінкамі"
+msgstr "Кіраванне сістэмнымі службамі і іншымі адзінкамі"
 
 #: src/core/org.freedesktop.systemd1.policy.in:34
 msgid "Authentication is required to manage system services or other units."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f ÐºÑ\96Ñ\80аваннÑ\8f Ñ\81Ñ\8dÑ\80вÑ\96Ñ\81амÑ\96 Ñ\96 Ñ\96нÑ\88Ñ\8bмÑ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмнÑ\8bмÑ\96 "
-"адзінкамі."
+"Ð\94лÑ\8f ÐºÑ\96Ñ\80аваннÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмнÑ\8bмÑ\96 Ñ\81лÑ\83жбамÑ\96 Ñ\96 Ñ\96нÑ\88Ñ\8bмÑ\96 Ð°Ð´Ð·Ñ\96нкамÑ\96 Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а "
+"аўтэнтыфікацыя."
 
 #: src/core/org.freedesktop.systemd1.policy.in:43
 msgid "Manage system service or unit files"
-msgstr "Кіраваць файламі сэрвісаў і іншых сістэмных адзінак"
+msgstr "Кіраванне файламі сістэмных службаў і іншых адзінак"
 
 #: src/core/org.freedesktop.systemd1.policy.in:44
 msgid "Authentication is required to manage system service or unit files."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f ÐºÑ\96Ñ\80аваннÑ\8f Ñ\84айламÑ\96 Ñ\81Ñ\8dÑ\80вÑ\96Ñ\81аÑ\9e Ñ\96 Ñ\96нÑ\88Ñ\8bÑ\85 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмнÑ\8bÑ\85 "
-"адзінак."
+"Ð\94лÑ\8f ÐºÑ\96Ñ\80аваннÑ\8f Ñ\84айламÑ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмнÑ\8bÑ\85 Ñ\81лÑ\83жбаÑ\9e Ñ\96 Ñ\96нÑ\88Ñ\8bÑ\85 Ð°Ð´Ð·Ñ\96нак Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а "
+"аўтэнтыфікацыя."
 
 #: src/core/org.freedesktop.systemd1.policy.in:54
 msgid "Set or unset system and service manager environment variables"
-msgstr "УÑ\81Ñ\82алÑ\8fваÑ\86Ñ\8c Ð°Ð±Ð¾ Ñ\81кÑ\96нÑ\83Ñ\86Ñ\8c Ð·Ð¼ÐµÐ½Ð½Ñ\8bÑ\8f Ð°Ñ\81Ñ\8fÑ\80оддзÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмнага Ð¼Ñ\8dнÑ\8dджÑ\8dÑ\80а"
+msgstr "Ð\9dаладзÑ\96Ñ\86Ñ\8c Ð·Ð¼ÐµÐ½Ð½Ñ\8bÑ\8f Ð°Ñ\81Ñ\8fÑ\80оддзÑ\8f ÐºÑ\96Ñ\80аÑ\9eнÑ\96ка Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b"
 
 #: src/core/org.freedesktop.systemd1.policy.in:55
 msgid ""
 "Authentication is required to set or unset system and service manager "
 "environment variables."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eÑ\81Ñ\82алÑ\8fваннÑ\8f Ð°Ð±Ð¾ Ñ\81кÑ\96дÑ\83 Ð·Ð¼ÐµÐ½Ð½Ñ\8bÑ\85 Ð°Ñ\81Ñ\8fÑ\80оддзÑ\8f "
-"сістэмнага мэнэджэра."
+"Ð\94лÑ\8f Ð½Ð°Ð»Ð°Ð´ÐºÑ\96 Ð·Ð¼ÐµÐ½Ð½Ñ\8bÑ\85 Ð°Ñ\81Ñ\8fÑ\80оддзÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмнага ÐºÑ\96Ñ\80аÑ\9eнÑ\96ка Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а "
+"аўтэнтыфікацыя."
 
 #: src/core/org.freedesktop.systemd1.policy.in:64
 msgid "Reload the systemd state"
@@ -67,154 +69,139 @@ msgstr "Перачытаць стан systemd"
 
 #: src/core/org.freedesktop.systemd1.policy.in:65
 msgid "Authentication is required to reload the systemd state."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð¿ÐµÑ\80аÑ\87Ñ\8bÑ\82аннÑ\8f Ñ\81Ñ\82анÑ\83 systemd."
+msgstr "Ð\9aаб Ð¿ÐµÑ\80аÑ\87Ñ\8bÑ\82аÑ\86Ñ\8c Ñ\81Ñ\82ан systemd, Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/home/org.freedesktop.home1.policy:13
 msgid "Create a home area"
-msgstr ""
+msgstr "Стварыць хатнюю прастору"
 
 #: src/home/org.freedesktop.home1.policy:14
-#, fuzzy
-#| msgid "Authentication is required to reload the systemd state."
 msgid "Authentication is required to create a user's home area."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð¿ÐµÑ\80аÑ\87Ñ\8bÑ\82аннÑ\8f Ñ\81Ñ\82анÑ\83 systemd."
+msgstr "Ð\94лÑ\8f Ñ\81Ñ\82ваÑ\80Ñ\8dннÑ\8f Ñ\85аÑ\82нÑ\8fй Ð¿Ñ\80аÑ\81Ñ\82оÑ\80Ñ\8b Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/home/org.freedesktop.home1.policy:23
 msgid "Remove a home area"
-msgstr ""
+msgstr "Выдаліць хатнюю прастору"
 
 #: src/home/org.freedesktop.home1.policy:24
-#, fuzzy
-#| msgid "Authentication is required to reload the systemd state."
 msgid "Authentication is required to remove a user's home area."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð¿ÐµÑ\80аÑ\87Ñ\8bÑ\82аннÑ\8f Ñ\81Ñ\82анÑ\83 systemd."
+msgstr "Ð\94лÑ\8f Ð²Ñ\8bдаленнÑ\8f Ñ\85аÑ\82нÑ\8fй Ð¿Ñ\80аÑ\81Ñ\82оÑ\80Ñ\8b Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/home/org.freedesktop.home1.policy:33
 msgid "Check credentials of a home area"
-msgstr ""
+msgstr "Праверыць уліковыя даныя хатняй прасторы"
 
 #: src/home/org.freedesktop.home1.policy:34
-#, fuzzy
-#| msgid ""
-#| "Authentication is required to manage active sessions, users and seats."
 msgid ""
 "Authentication is required to check credentials against a user's home area."
-msgstr ""
-"Неабходна аўтэнтыфікацыя для кіравання актыўнымі сесіямі, карыстальнікамі і "
-"месцамі."
+msgstr "Для праверкі ўліковых даных хатняй прасторы патрабуецца аўтэнтыфікацыя."
 
 #: src/home/org.freedesktop.home1.policy:43
 msgid "Update a home area"
-msgstr ""
+msgstr "Абнавіць хатнюю прастору"
 
 #: src/home/org.freedesktop.home1.policy:44
-#, fuzzy
-#| msgid "Authentication is required to attach a device to a seat."
 msgid "Authentication is required to update a user's home area."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð´Ð°Ð»Ñ\83Ñ\87Ñ\8dннÑ\8f Ð¿Ñ\80Ñ\8bлад Ð´Ð° Ð¿Ñ\80аÑ\86оÑ\9eнÑ\8bÑ\85 Ð¼ÐµÑ\81Ñ\86аÑ\9e."
+msgstr "Ð\94лÑ\8f Ð°Ð±Ð½Ð°Ñ\9eленнÑ\8f Ñ\85аÑ\82нÑ\8fй Ð¿Ñ\80аÑ\81Ñ\82оÑ\80Ñ\8b Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/home/org.freedesktop.home1.policy:53
 msgid "Resize a home area"
-msgstr ""
+msgstr "Змяніць памер хатняй прасторы"
 
 #: src/home/org.freedesktop.home1.policy:54
-#, fuzzy
-#| msgid "Authentication is required to set a wall message"
 msgid "Authentication is required to resize a user's home area."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eÑ\81Ñ\82алÑ\8fваннÑ\8f Ñ\9eÑ\81еагÑ\83лÑ\8cнага Ð¿Ð°Ð²ÐµÐ´Ð°Ð¼Ð»ÐµÐ½Ð½Ñ\8f"
+msgstr "Ð\94лÑ\8f Ð·Ð¼ÐµÐ½Ñ\8b Ð¿Ð°Ð¼ÐµÑ\80Ñ\83 Ñ\85аÑ\82нÑ\8fй Ð¿Ñ\80аÑ\81Ñ\82оÑ\80Ñ\8b Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/home/org.freedesktop.home1.policy:63
 msgid "Change password of a home area"
-msgstr ""
+msgstr "Змяніць пароль для хатняй прасторы"
 
 #: src/home/org.freedesktop.home1.policy:64
-#, fuzzy
-#| msgid ""
-#| "Authentication is required to manage active sessions, users and seats."
 msgid ""
 "Authentication is required to change the password of a user's home area."
-msgstr ""
-"Неабходна аўтэнтыфікацыя для кіравання актыўнымі сесіямі, карыстальнікамі і "
-"месцамі."
+msgstr "Для змены пароля для хатняй прасторы патрабуецца аўтэнтыфікацыя."
 
 #: src/hostname/org.freedesktop.hostname1.policy:20
 msgid "Set hostname"
-msgstr "УÑ\81Ñ\82алÑ\8fваÑ\86Ñ\8c Ñ\96мÑ\8f Ð²Ñ\83зла"
+msgstr "Ð\9dаладзÑ\96Ñ\86Ñ\8c Ð½Ð°Ð·Ð²Ñ\83 ÐºÐ°Ð¼Ð¿â\80\99Ñ\8eÑ\82аÑ\80а"
 
 #: src/hostname/org.freedesktop.hostname1.policy:21
 msgid "Authentication is required to set the local hostname."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eÑ\81Ñ\82алÑ\8fваннÑ\8f Ñ\96мÑ\8f Ð²Ñ\83зла."
+msgstr "Ð\94лÑ\8f Ð½Ð°Ð»Ð°Ð´ÐºÑ\96 Ð½Ð°Ð·Ð²Ñ\8b ÐºÐ°Ð¼Ð¿â\80\99Ñ\8eÑ\82аÑ\80а Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/hostname/org.freedesktop.hostname1.policy:30
 msgid "Set static hostname"
-msgstr "УÑ\81Ñ\82алÑ\8fваÑ\86Ñ\8c Ñ\81Ñ\82аÑ\82Ñ\8bÑ\87нае Ñ\96мÑ\8f Ð²Ñ\83зла"
+msgstr "Ð\9dаладзÑ\96Ñ\86Ñ\8c Ñ\81Ñ\82аÑ\82Ñ\8bÑ\87нÑ\83Ñ\8e Ð½Ð°Ð·Ð²Ñ\83 ÐºÐ°Ð¼Ð¿â\80\99Ñ\8eÑ\82аÑ\80а"
 
 #: src/hostname/org.freedesktop.hostname1.policy:31
 msgid ""
 "Authentication is required to set the statically configured local hostname, "
 "as well as the pretty hostname."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eÑ\81Ñ\82алÑ\8fваннÑ\8f Ñ\8fк Ñ\81Ñ\82аÑ\82Ñ\8bÑ\87нага Ñ\82ак Ñ\96 Ð¿Ñ\80Ñ\8bгожага Ñ\96мÑ\8f "
-"вÑ\83зла."
+"Ð\94лÑ\8f Ð½Ð°Ð»Ð°Ð´ÐºÑ\96 Ñ\8fк Ñ\81Ñ\82аÑ\82Ñ\8bÑ\87най, Ñ\82ак Ñ\96 Ð·Ñ\80азÑ\83мелай, Ð½Ð°Ð·Ð²Ñ\8b ÐºÐ°Ð¼Ð¿â\80\99Ñ\8eÑ\82аÑ\80а Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а "
+"аÑ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/hostname/org.freedesktop.hostname1.policy:41
 msgid "Set machine information"
-msgstr "УÑ\81Ñ\82алÑ\8fваÑ\86Ñ\8c Ñ\96нÑ\84аÑ\80маÑ\86Ñ\8bÑ\8e Ð°Ð± Ð¼Ð°Ñ\88Ñ\8bне"
+msgstr "Ð\9dаладзÑ\96Ñ\86Ñ\8c Ð·Ð²ÐµÑ\81Ñ\82кÑ\96 Ð¿Ñ\80а ÐºÐ°Ð¼Ð¿â\80\99Ñ\8eÑ\82аÑ\80"
 
 #: src/hostname/org.freedesktop.hostname1.policy:42
 msgid "Authentication is required to set local machine information."
-msgstr ""
-"Неабходна аўтэнтыфікацыя для ўсталявання інфармацыі аб лакальнай машыне."
+msgstr "Для наладкі звестак пра камп’ютар патрабуецца аўтэнтыфікацыя."
 
 #: src/hostname/org.freedesktop.hostname1.policy:51
 msgid "Get product UUID"
-msgstr ""
+msgstr "Атрымаць UUID прадукту"
 
 #: src/hostname/org.freedesktop.hostname1.policy:52
-#, fuzzy
-#| msgid "Authentication is required to reload '$(unit)'."
 msgid "Authentication is required to get product UUID."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð¿ÐµÑ\80аÑ\87Ñ\8bÑ\82аннÑ\8f Ñ\81Ñ\82анÑ\83 '$(unit)'."
+msgstr "Ð\94лÑ\8f Ð°Ñ\82Ñ\80Ñ\8bманнÑ\8f UUID Ð¿Ñ\80адÑ\83кÑ\82Ñ\83 Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/import/org.freedesktop.import1.policy:22
 msgid "Import a VM or container image"
-msgstr "Ð\86мпаÑ\80Ñ\82аваÑ\86Ñ\8c Ð²Ð¾Ð±Ñ\80аз Ð\92Ð\9c або кантэйнера"
+msgstr "Ð\86мпаÑ\80Ñ\82аваÑ\86Ñ\8c Ð²Ð¾Ð±Ñ\80аз Ð²Ñ\96Ñ\80Ñ\82Ñ\83алÑ\8cнай Ð¼Ð°Ñ\88Ñ\8bнÑ\8b або кантэйнера"
 
 #: src/import/org.freedesktop.import1.policy:23
 msgid "Authentication is required to import a VM or container image"
-msgstr "Неабходна аўтэнтыфікацыя для імпарту вобраза ВМ або кантэйнера"
+msgstr ""
+"Для імпарту вобраза віртуальнай машыны або кантэйнера патрабуецца "
+"аўтэнтыфікацыя"
 
 #: src/import/org.freedesktop.import1.policy:32
 msgid "Export a VM or container image"
-msgstr "ЭкÑ\81паÑ\80Ñ\82аваÑ\86Ñ\8c Ð²Ð¾Ð±Ñ\80аз Ð\92Ð\9c або кантэйнера"
+msgstr "ЭкÑ\81паÑ\80Ñ\82аваÑ\86Ñ\8c Ð²Ð¾Ð±Ñ\80аз Ð²Ñ\96Ñ\80Ñ\82Ñ\83алÑ\8cнай Ð¼Ð°Ñ\88Ñ\8bнÑ\8b або кантэйнера"
 
 #: src/import/org.freedesktop.import1.policy:33
 msgid "Authentication is required to export a VM or container image"
-msgstr "Неабходна аўтэнтыфікацыя для экспарту вобраза ВМ або кантэйнера"
+msgstr ""
+"Для экспарту вобраза віртуальнай машыны або кантэйнера патрабуецца "
+"аўтэнтыфікацыя"
 
 #: src/import/org.freedesktop.import1.policy:42
 msgid "Download a VM or container image"
-msgstr "СпампаваÑ\86Ñ\8c Ð²Ð¾Ð±Ñ\80аз Ð\92Ð\9c або кантэйнера"
+msgstr "СпампаваÑ\86Ñ\8c Ð²Ð¾Ð±Ñ\80аз Ð²Ñ\96Ñ\80Ñ\82Ñ\83алÑ\8cнай Ð¼Ð°Ñ\88Ñ\8bнÑ\8b або кантэйнера"
 
 #: src/import/org.freedesktop.import1.policy:43
 msgid "Authentication is required to download a VM or container image"
-msgstr "Неабходна аўтэнтыфікацыя для спампоўкі вобраза ВМ або кантэйнера"
+msgstr ""
+"Для спампоўвання вобраза віртуальнай машыны або кантэйнера патрабуецца "
+"аўтэнтыфікацыя"
 
 #: src/locale/org.freedesktop.locale1.policy:22
 msgid "Set system locale"
-msgstr "УÑ\81Ñ\82алÑ\8fваць сістэмную лакаль"
+msgstr "Ð\9dаладзÑ\96ць сістэмную лакаль"
 
 #: src/locale/org.freedesktop.locale1.policy:23
 msgid "Authentication is required to set the system locale."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eÑ\81Ñ\82алÑ\8fваннÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмнай Ð»Ð°ÐºÐ°Ð»Ñ\96."
+msgstr "Ð\94лÑ\8f Ð½Ð°Ð»Ð°Ð´ÐºÑ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмнай Ð»Ð°ÐºÐ°Ð»Ñ\96 Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/locale/org.freedesktop.locale1.policy:33
 msgid "Set system keyboard settings"
-msgstr "УÑ\81Ñ\82алÑ\8fваÑ\86Ñ\8c Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмнÑ\8bÑ\8f Ð½Ð°Ð»Ð°Ð´ы клавіятуры"
+msgstr "Ð\9dаладзÑ\96Ñ\86Ñ\8c Ð¿Ð°Ñ\80амеÑ\82Ñ\80ы клавіятуры"
 
 #: src/locale/org.freedesktop.locale1.policy:34
 msgid "Authentication is required to set the system keyboard settings."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eÑ\81Ñ\82алÑ\8fваннÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмнÑ\8bÑ\85 Ð½Ð°Ð»Ð°Ð´ ÐºÐ»Ð°Ð²Ñ\96Ñ\8fÑ\82Ñ\83Ñ\80Ñ\8b."
+msgstr "Ð\94лÑ\8f Ð½Ð°Ð»Ð°Ð´ÐºÑ\96 Ð¿Ð°Ñ\80амеÑ\82Ñ\80аÑ\9e ÐºÐ»Ð°Ð²Ñ\96Ñ\8fÑ\82Ñ\83Ñ\80Ñ\8b Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/login/org.freedesktop.login1.policy:22
 msgid "Allow applications to inhibit system shutdown"
@@ -224,8 +211,8 @@ msgstr "Дазволіць праграмам перашкаджаць выкл
 msgid ""
 "Authentication is required for an application to inhibit system shutdown."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð´Ð°Ð·Ð²Ð¾Ð»Ñ\83 Ð¿Ñ\80агÑ\80амам Ð¿ÐµÑ\80аÑ\88каджаÑ\86Ñ\8c Ð²Ñ\8bклÑ\8eÑ\87Ñ\8dннÑ\8e "
-"сістэмы."
+"Ð\94лÑ\8f Ñ\82аго, ÐºÐ°Ð± Ð´Ð°Ð·Ð²Ð¾Ð»Ñ\96Ñ\86Ñ\8c Ð¿Ñ\80агÑ\80амам Ð¿ÐµÑ\80аÑ\88каджаÑ\86Ñ\8c Ð²Ñ\8bклÑ\8eÑ\87Ñ\8dннÑ\8e Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b, "
+"патрабуецца аўтэнтыфікацыя."
 
 #: src/login/org.freedesktop.login1.policy:33
 msgid "Allow applications to delay system shutdown"
@@ -234,28 +221,28 @@ msgstr "Дазволіць праграмам затрымліваць выкл
 #: src/login/org.freedesktop.login1.policy:34
 msgid "Authentication is required for an application to delay system shutdown."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð´Ð°Ð·Ð²Ð¾Ð»Ñ\83 Ð¿Ñ\80агÑ\80амам Ð·Ð°Ñ\82Ñ\80Ñ\8bмлÑ\96ваÑ\86Ñ\8c Ð²Ñ\8bклÑ\8eÑ\87Ñ\8dнне "
-"сістэмы."
+"Ð\94лÑ\8f Ñ\82аго, ÐºÐ°Ð± Ð´Ð°Ð·Ð²Ð¾Ð»Ñ\96Ñ\86Ñ\8c Ð¿Ñ\80агÑ\80амам Ð·Ð°Ñ\82Ñ\80Ñ\8bмлÑ\96ваÑ\86Ñ\8c Ð²Ñ\8bклÑ\8eÑ\87Ñ\8dнне Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b, "
+"патрабуецца аўтэнтыфікацыя."
 
 #: src/login/org.freedesktop.login1.policy:44
 msgid "Allow applications to inhibit system sleep"
-msgstr "Ð\94азволÑ\96Ñ\86Ñ\8c Ð¿Ñ\80агÑ\80амам Ð¿ÐµÑ\80аÑ\88каджаÑ\86Ñ\8c Ð·Ð°Ñ\81Ñ\8bпаннÑ\8e Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b"
+msgstr "Ð\94азволÑ\96Ñ\86Ñ\8c Ð¿Ñ\80агÑ\80амам Ð¿ÐµÑ\80аÑ\88каджаÑ\86Ñ\8c Ð¿ÐµÑ\80аÑ\85одÑ\83 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ñ\9e Ñ\80Ñ\8dжÑ\8bм Ñ\81нÑ\83"
 
 #: src/login/org.freedesktop.login1.policy:45
 msgid "Authentication is required for an application to inhibit system sleep."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð´Ð°Ð·Ð²Ð¾Ð»Ñ\83 Ð¿Ñ\80агÑ\80амам Ð¿ÐµÑ\80аÑ\88каджаÑ\86Ñ\8c Ð·Ð°Ñ\81Ñ\8bпаннÑ\8e "
-"сістэмы."
+"Ð\94лÑ\8f Ñ\82аго, ÐºÐ°Ð± Ð´Ð°Ð·Ð²Ð¾Ð»Ñ\96Ñ\86Ñ\8c Ð¿Ñ\80агÑ\80амам Ð¿ÐµÑ\80аÑ\88каджаÑ\86Ñ\8c Ð¿ÐµÑ\80аÑ\85одÑ\83 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ñ\9e Ñ\80Ñ\8dжÑ\8bм Ñ\81нÑ\83, "
+"патрабуецца аўтэнтыфікацыя."
 
 #: src/login/org.freedesktop.login1.policy:55
 msgid "Allow applications to delay system sleep"
-msgstr "Ð\94азволÑ\96Ñ\86Ñ\8c Ð¿Ñ\80агÑ\80амам Ð·Ð°Ñ\82Ñ\80Ñ\8bмлÑ\96ваÑ\86Ñ\8c Ð·Ð°Ñ\81Ñ\8bпанне Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b"
+msgstr "Ð\94азволÑ\96Ñ\86Ñ\8c Ð¿Ñ\80агÑ\80амам Ð·Ð°Ñ\82Ñ\80Ñ\8bмлÑ\96ваÑ\86Ñ\8c Ð¿ÐµÑ\80аÑ\85од Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ñ\9e Ñ\80Ñ\8dжÑ\8bм Ñ\81нÑ\83"
 
 #: src/login/org.freedesktop.login1.policy:56
 msgid "Authentication is required for an application to delay system sleep."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð´Ð°Ð·Ð²Ð¾Ð»Ñ\83 Ð¿Ñ\80агÑ\80амам Ð·Ð°Ñ\82Ñ\80Ñ\8bмлÑ\96ваÑ\86Ñ\8c Ð·Ð°Ñ\81Ñ\8bпанне "
-"сістэмы."
+"Ð\94лÑ\8f Ñ\82аго, ÐºÐ°Ð± Ð´Ð°Ð·Ð²Ð¾Ð»Ñ\96Ñ\86Ñ\8c Ð¿Ñ\80агÑ\80амам Ð·Ð°Ñ\82Ñ\80Ñ\8bмлÑ\96ваÑ\86Ñ\8c Ð¿ÐµÑ\80аÑ\85од Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ñ\9e Ñ\80Ñ\8dжÑ\8bм Ñ\81нÑ\83, "
+"патрабуецца аўтэнтыфікацыя."
 
 #: src/login/org.freedesktop.login1.policy:65
 msgid "Allow applications to inhibit automatic system suspend"
@@ -266,82 +253,78 @@ msgid ""
 "Authentication is required for an application to inhibit automatic system "
 "suspend."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð´Ð°Ð·Ð²Ð¾Ð»Ñ\83 Ð¿Ñ\80агÑ\80амам Ð¿ÐµÑ\80аÑ\88каджаÑ\86Ñ\8c Ð°Ñ\9eÑ\82амаÑ\82Ñ\8bÑ\87намÑ\83 "
-"прыпыненню сістэмы."
+"Ð\94лÑ\8f Ñ\82аго, ÐºÐ°Ð± Ð´Ð°Ð·Ð²Ð¾Ð»Ñ\96Ñ\86Ñ\8c Ð¿Ñ\80агÑ\80амам Ð¿ÐµÑ\80аÑ\88каджаÑ\86Ñ\8c Ð°Ñ\9eÑ\82амаÑ\82Ñ\8bÑ\87намÑ\83 Ð¿Ñ\80Ñ\8bпÑ\8bненнÑ\8e "
+"сістэмы, патрабуецца аўтэнтыфікацыя."
 
 #: src/login/org.freedesktop.login1.policy:75
 msgid "Allow applications to inhibit system handling of the power key"
-msgstr ""
-"Дазволіць праграмам перашкаджаць сістэме апрацоўваць клавішу выключэння"
+msgstr "Дазволіць праграмам перашкаджаць сістэме апрацоўваць кнопку выключэння"
 
 #: src/login/org.freedesktop.login1.policy:76
 msgid ""
 "Authentication is required for an application to inhibit system handling of "
 "the power key."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð´Ð°Ð·Ð²Ð¾Ð»Ñ\83 Ð¿Ñ\80агÑ\80амам Ð¿ÐµÑ\80аÑ\88каджаÑ\86Ñ\8c Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dме "
-"апÑ\80аÑ\86оÑ\9eваÑ\86Ñ\8c ÐºÐ»Ð°Ð²Ñ\96Ñ\88Ñ\83 Ð²Ñ\8bклÑ\8eÑ\87Ñ\8dння."
+"Ð\94лÑ\8f Ñ\82аго, ÐºÐ°Ð± Ð´Ð°Ð·Ð²Ð¾Ð»Ñ\96Ñ\86Ñ\8c Ð¿Ñ\80агÑ\80амам Ð¿ÐµÑ\80аÑ\88каджаÑ\86Ñ\8c Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dме Ð°Ð¿Ñ\80аÑ\86оÑ\9eваÑ\86Ñ\8c ÐºÐ½Ð¾Ð¿ÐºÑ\83 "
+"вÑ\8bклÑ\8eÑ\87Ñ\8dннÑ\8f, Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bя."
 
 #: src/login/org.freedesktop.login1.policy:86
 msgid "Allow applications to inhibit system handling of the suspend key"
-msgstr ""
-"Дазволіць праграмам перашкаджаць сістэме апрацоўваць клавішу прыпынення"
+msgstr "Дазволіць праграмам перашкаджаць сістэме апрацоўваць кнопку прыпынення"
 
 #: src/login/org.freedesktop.login1.policy:87
 msgid ""
 "Authentication is required for an application to inhibit system handling of "
 "the suspend key."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð´Ð°Ð·Ð²Ð¾Ð»Ñ\83 Ð¿Ñ\80агÑ\80амам Ð¿ÐµÑ\80аÑ\88каджаÑ\86Ñ\8c Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dме "
-"апÑ\80аÑ\86оÑ\9eваÑ\86Ñ\8c ÐºÐ»Ð°Ð²Ñ\96Ñ\88Ñ\83 Ð¿Ñ\80Ñ\8bпÑ\8bнення."
+"Ð\94лÑ\8f Ñ\82аго, ÐºÐ°Ð± Ð´Ð°Ð·Ð²Ð¾Ð»Ñ\96Ñ\86Ñ\8c Ð¿Ñ\80агÑ\80амам Ð¿ÐµÑ\80аÑ\88каджаÑ\86Ñ\8c Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dме Ð°Ð¿Ñ\80аÑ\86оÑ\9eваÑ\86Ñ\8c ÐºÐ½Ð¾Ð¿ÐºÑ\83 "
+"пÑ\80Ñ\8bпÑ\8bненнÑ\8f, Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bя."
 
 #: src/login/org.freedesktop.login1.policy:97
 msgid "Allow applications to inhibit system handling of the hibernate key"
 msgstr ""
-"Дазволіць праграмам перашкаджаць сістэме апрацоўваць клавішу гібернацыі"
+"Дазволіць праграмам перашкаджаць сістэме апрацоўваць кнопку пераходу ў рэжым "
+"сну"
 
 #: src/login/org.freedesktop.login1.policy:98
 msgid ""
 "Authentication is required for an application to inhibit system handling of "
 "the hibernate key."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð´Ð°Ð·Ð²Ð¾Ð»Ñ\83 Ð¿Ñ\80агÑ\80амам Ð¿ÐµÑ\80аÑ\88каджаÑ\86Ñ\8c Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dме "
-"апÑ\80аÑ\86оÑ\9eваÑ\86Ñ\8c ÐºÐ»Ð°Ð²Ñ\96Ñ\88Ñ\83 Ð³Ñ\96беÑ\80наÑ\86Ñ\8bÑ\96."
+"Ð\94лÑ\8f Ñ\82аго, ÐºÐ°Ð± Ð´Ð°Ð·Ð²Ð¾Ð»Ñ\96Ñ\86Ñ\8c Ð¿Ñ\80агÑ\80амам Ð¿ÐµÑ\80аÑ\88каджаÑ\86Ñ\8c Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dме Ð°Ð¿Ñ\80аÑ\86оÑ\9eваÑ\86Ñ\8c ÐºÐ½Ð¾Ð¿ÐºÑ\83 "
+"пеÑ\80аÑ\85одÑ\83 Ñ\9e Ñ\80Ñ\8dжÑ\8bм Ñ\81нÑ\83, Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/login/org.freedesktop.login1.policy:107
 msgid "Allow applications to inhibit system handling of the lid switch"
-msgstr ""
-"Дазволіць праграмам перашкаджаць сістэме апрацоўваць закрыццё крышкі ноўтбука"
+msgstr "Дазволіць праграмам перашкаджаць сістэме апрацоўваць закрыццё ноўтбука"
 
 #: src/login/org.freedesktop.login1.policy:108
 msgid ""
 "Authentication is required for an application to inhibit system handling of "
 "the lid switch."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð´Ð°Ð·Ð²Ð¾Ð»Ñ\83 Ð¿Ñ\80агÑ\80амам Ð¿ÐµÑ\80аÑ\88каджаÑ\86Ñ\8c Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dме "
-"апÑ\80аÑ\86оÑ\9eваÑ\86Ñ\8c Ð·Ð°ÐºÑ\80Ñ\8bÑ\86Ñ\86Ñ\91 ÐºÑ\80Ñ\8bÑ\88кÑ\96 Ð½Ð¾Ñ\9eÑ\82бÑ\83ка."
+"Ð\94лÑ\8f Ñ\82аго, ÐºÐ°Ð± Ð´Ð°Ð·Ð²Ð¾Ð»Ñ\96Ñ\86Ñ\8c Ð¿Ñ\80агÑ\80амам Ð¿ÐµÑ\80аÑ\88каджаÑ\86Ñ\8c Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dме Ð°Ð¿Ñ\80аÑ\86оÑ\9eваÑ\86Ñ\8c Ð·Ð°ÐºÑ\80Ñ\8bÑ\86Ñ\86Ñ\91 "
+"ноÑ\9eÑ\82бÑ\83ка, Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/login/org.freedesktop.login1.policy:117
 msgid "Allow non-logged-in user to run programs"
-msgstr ""
-"Дазволіць карыстальніку, якія яшчэ не ўвайшоў у сістэму, выконваць праграмы"
+msgstr "Дазволіць праграмам працаваць у фоне па-за сеансам карыстальніка"
 
 #: src/login/org.freedesktop.login1.policy:118
 msgid "Explicit request is required to run programs as a non-logged-in user."
 msgstr ""
-"Ð\9dеабÑ\85однÑ\8b Ð²Ñ\96давоÑ\87нÑ\8b Ð·Ð°Ð¿Ñ\8bÑ\82 Ð´Ð»Ñ\8f Ð²Ñ\8bкананнÑ\8f Ð¿Ñ\80агÑ\80ам ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96ка, Ñ\8fкÑ\96 Ñ\8fÑ\88Ñ\87Ñ\8d Ð½Ðµ "
-"ўвайшоў у сістэму."
+"Ð\94лÑ\8f Ñ\82аго, ÐºÐ°Ð± Ð´Ð°Ð·Ð²Ð¾Ð»Ñ\96Ñ\86Ñ\8c Ð¿Ñ\80агÑ\80амам Ð¿Ñ\80аÑ\86аваÑ\86Ñ\8c Ð¿Ð°-за Ñ\81еанÑ\81ам ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96ка, "
+"патрабуецца відавочны запыт."
 
 #: src/login/org.freedesktop.login1.policy:127
 msgid "Allow non-logged-in users to run programs"
-msgstr ""
-"Дазволіць карыстальнікам, якія яшчэ не ўвайшлі ў сістэму, выконваць праграмы"
+msgstr "Дазволіць праграмам працаваць у фоне па-за сеансам карыстальніка"
 
 #: src/login/org.freedesktop.login1.policy:128
 msgid "Authentication is required to run programs as a non-logged-in user."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð²Ñ\8bкананнÑ\8f Ð¿Ñ\80агÑ\80ам ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96ка, Ñ\8fкÑ\96 Ñ\8fÑ\88Ñ\87Ñ\8d Ð½Ðµ "
-"ўвайшоў у сістэму."
+"Ð\94лÑ\8f Ñ\82аго, ÐºÐ°Ð± Ð´Ð°Ð·Ð²Ð¾Ð»Ñ\96Ñ\86Ñ\8c Ð¿Ñ\80агÑ\80амам Ð¿Ñ\80аÑ\86аваÑ\86Ñ\8c Ð¿Ð°-за Ð¼ÐµÐ¶Ð°Ð¼Ñ\96 Ñ\81еанÑ\81а "
+"карыстальніка, патрабуецца аўтэнтыфікацыя."
 
 #: src/login/org.freedesktop.login1.policy:137
 msgid "Allow attaching devices to seats"
@@ -349,15 +332,17 @@ msgstr "Дазволіць далучаць прылады да працоўны
 
 #: src/login/org.freedesktop.login1.policy:138
 msgid "Authentication is required to attach a device to a seat."
-msgstr "Неабходна аўтэнтыфікацыя для далучэння прылад да працоўных месцаў."
+msgstr ""
+"Для таго, каб дазволіць далучаць прылады да працоўных месцаў, патрабуецца "
+"аўтэнтыфікацыя."
 
 #: src/login/org.freedesktop.login1.policy:148
 msgid "Flush device to seat attachments"
-msgstr "Ð\90дклÑ\8eÑ\87аць прылады ад працоўных месцаў"
+msgstr "Ð\90длÑ\83Ñ\87Ñ\8bць прылады ад працоўных месцаў"
 
 #: src/login/org.freedesktop.login1.policy:149
 msgid "Authentication is required to reset how devices are attached to seats."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð°Ð´ÐºÐ»Ñ\8eÑ\87Ñ\8dннÑ\8f Ð¿Ñ\80Ñ\8bлад Ð°Ð´ Ð¿Ñ\80аÑ\86оÑ\9eнÑ\8bÑ\85 Ð¼ÐµÑ\81Ñ\86аÑ\9e."
+msgstr "Ð\94лÑ\8f Ð°Ð´Ð»Ñ\83Ñ\87Ñ\8dннÑ\8f Ð¿Ñ\80Ñ\8bлад Ð°Ð´ Ð¿Ñ\80аÑ\86оÑ\9eнÑ\8bÑ\85 Ð¼ÐµÑ\81Ñ\86аÑ\9e Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/login/org.freedesktop.login1.policy:158
 msgid "Power off the system"
@@ -365,19 +350,19 @@ msgstr "Выключыць сістэму"
 
 #: src/login/org.freedesktop.login1.policy:159
 msgid "Authentication is required to power off the system."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð²Ñ\8bклÑ\8eÑ\87Ñ\8dннÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b."
+msgstr "Ð\94лÑ\8f Ð²Ñ\8bклÑ\8eÑ\87Ñ\8dннÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/login/org.freedesktop.login1.policy:169
 msgid "Power off the system while other users are logged in"
-msgstr "Ð\92Ñ\8bклÑ\8eÑ\87Ñ\8bÑ\86Ñ\8c Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\83 Ð¿Ñ\80Ñ\8b Ð¿Ñ\80Ñ\8bÑ\81Ñ\83Ñ\82наÑ\81Ñ\86Ñ\96 Ñ\96нÑ\88Ñ\8bÑ\85 ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96каÑ\9e"
+msgstr "Ð\92Ñ\8bклÑ\8eÑ\87Ñ\8bÑ\86Ñ\8c Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\83 Ð· Ñ\96нÑ\88Ñ\8bмÑ\96 Ð¿Ñ\80Ñ\8bÑ\81Ñ\83Ñ\82нÑ\8bмÑ\96 ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96камÑ\96"
 
 #: src/login/org.freedesktop.login1.policy:170
 msgid ""
 "Authentication is required to power off the system while other users are "
 "logged in."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð²Ñ\8bклÑ\8eÑ\87Ñ\8dннÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ð¿Ñ\80Ñ\8b Ð¿Ñ\80Ñ\8bÑ\81Ñ\83Ñ\82наÑ\81Ñ\86Ñ\96 Ñ\96нÑ\88Ñ\8bÑ\85 "
-"каÑ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96каÑ\9e."
+"Ð\94лÑ\8f Ð²Ñ\8bклÑ\8eÑ\87Ñ\8dннÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ð· Ñ\96нÑ\88Ñ\8bмÑ\96 Ð¿Ñ\80Ñ\8bÑ\81Ñ\83Ñ\82нÑ\8bмÑ\96 ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96камÑ\96 Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а "
+"аÑ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/login/org.freedesktop.login1.policy:180
 msgid "Power off the system while an application is inhibiting this"
@@ -388,8 +373,8 @@ msgid ""
 "Authentication is required to power off the system while an application is "
 "inhibiting this."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð²Ñ\8bклÑ\8eÑ\87Ñ\8dннÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b, ÐºÐ°Ð»Ñ\96 Ð¿Ñ\80агÑ\80амÑ\8b перашкаджаюць "
-"гÑ\8dÑ\82амÑ\83."
+"Ð\94лÑ\8f Ð²Ñ\8bклÑ\8eÑ\87Ñ\8dннÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ð· Ð°ÐºÑ\82Ñ\8bÑ\9eнÑ\8bмÑ\96 Ð¿Ñ\80агÑ\80амамÑ\96, Ñ\8fкÑ\96Ñ\8f перашкаджаюць "
+"вÑ\8bклÑ\8eÑ\87Ñ\8dннÑ\8e, Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/login/org.freedesktop.login1.policy:191
 msgid "Reboot the system"
@@ -397,19 +382,19 @@ msgstr "Перазагрузіць сістэму"
 
 #: src/login/org.freedesktop.login1.policy:192
 msgid "Authentication is required to reboot the system."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð¿ÐµÑ\80азагÑ\80Ñ\83зкÑ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b."
+msgstr "Ð\94лÑ\8f Ð¿ÐµÑ\80азагÑ\80Ñ\83зкÑ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/login/org.freedesktop.login1.policy:202
 msgid "Reboot the system while other users are logged in"
-msgstr "Ð\9fеÑ\80азагÑ\80Ñ\83зÑ\96Ñ\86Ñ\8c Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\83 Ð¿Ñ\80Ñ\8b Ð¿Ñ\80Ñ\8bÑ\81Ñ\83Ñ\82наÑ\81Ñ\86Ñ\96 Ñ\96нÑ\88Ñ\8bÑ\85 ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96каÑ\9e"
+msgstr "Ð\9fеÑ\80азагÑ\80Ñ\83зÑ\96Ñ\86Ñ\8c Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\83 Ð· Ñ\96нÑ\88Ñ\8bмÑ\96 Ð¿Ñ\80Ñ\8bÑ\81Ñ\83Ñ\82нÑ\8bмÑ\96 ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96камÑ\96"
 
 #: src/login/org.freedesktop.login1.policy:203
 msgid ""
 "Authentication is required to reboot the system while other users are logged "
 "in."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð¿ÐµÑ\80азагÑ\80Ñ\83зкÑ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ð¿Ñ\80Ñ\8b Ð¿Ñ\80Ñ\8bÑ\81Ñ\83Ñ\82наÑ\81Ñ\86Ñ\96 Ñ\96нÑ\88Ñ\8bÑ\85 "
-"каÑ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96каÑ\9e."
+"Ð\94лÑ\8f Ð¿ÐµÑ\80азагÑ\80Ñ\83зкÑ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ð· Ñ\96нÑ\88Ñ\8bмÑ\96 Ð¿Ñ\80Ñ\8bÑ\81Ñ\83Ñ\82нÑ\8bмÑ\96 ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96камÑ\96 Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а "
+"аÑ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/login/org.freedesktop.login1.policy:213
 msgid "Reboot the system while an application is inhibiting this"
@@ -420,56 +405,40 @@ msgid ""
 "Authentication is required to reboot the system while an application is "
 "inhibiting this."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð¿ÐµÑ\80азагÑ\80Ñ\83зкÑ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b, ÐºÐ°Ð»Ñ\96 Ð¿Ñ\80агÑ\80амÑ\8b "
-"пеÑ\80аÑ\88каджаÑ\8eÑ\86Ñ\8c Ð³Ñ\8dÑ\82амÑ\83."
+"Ð\94лÑ\8f Ð¿ÐµÑ\80азагÑ\80Ñ\83зкÑ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ð· Ð°ÐºÑ\82Ñ\8bÑ\9eнÑ\8bмÑ\96 Ð¿Ñ\80агÑ\80амамÑ\96, Ñ\8fкÑ\96Ñ\8f Ð¿ÐµÑ\80аÑ\88каджаÑ\8eÑ\86Ñ\8c "
+"вÑ\8bклÑ\8eÑ\87Ñ\8dннÑ\8e, Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/login/org.freedesktop.login1.policy:224
-#, fuzzy
-#| msgid "Hibernate the system"
 msgid "Halt the system"
-msgstr "Ð\93Ñ\96беÑ\80наваць сістэму"
+msgstr "СпÑ\8bнÑ\96ць сістэму"
 
 #: src/login/org.freedesktop.login1.policy:225
-#, fuzzy
-#| msgid "Authentication is required to hibernate the system."
 msgid "Authentication is required to halt the system."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð³Ñ\96беÑ\80наÑ\86Ñ\8bÑ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b."
+msgstr "Ð\94лÑ\8f Ñ\81пÑ\8bненнÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/login/org.freedesktop.login1.policy:235
-#, fuzzy
-#| msgid "Hibernate the system while other users are logged in"
 msgid "Halt the system while other users are logged in"
-msgstr "Ð\93Ñ\96беÑ\80наваÑ\86Ñ\8c Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\83 Ð¿Ñ\80Ñ\8b Ð¿Ñ\80Ñ\8bÑ\81Ñ\83Ñ\82наÑ\81Ñ\86Ñ\96 Ñ\96нÑ\88Ñ\8bÑ\85 ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96каÑ\9e"
+msgstr "СпÑ\8bнÑ\96Ñ\86Ñ\8c Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\83 Ð· Ñ\96нÑ\88Ñ\8bмÑ\96 Ð¿Ñ\80Ñ\8bÑ\81Ñ\83Ñ\82нÑ\8bмÑ\96 ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96камÑ\96"
 
 #: src/login/org.freedesktop.login1.policy:236
-#, fuzzy
-#| msgid ""
-#| "Authentication is required to hibernate the system while other users are "
-#| "logged in."
 msgid ""
 "Authentication is required to halt the system while other users are logged "
 "in."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð³Ñ\96беÑ\80наÑ\86Ñ\8bÑ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ð¿Ñ\80Ñ\8b Ð¿Ñ\80Ñ\8bÑ\81Ñ\83Ñ\82наÑ\81Ñ\86Ñ\96 Ñ\96нÑ\88Ñ\8bÑ\85 "
-"каÑ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96каÑ\9e."
+"Ð\94лÑ\8f Ñ\81пÑ\8bненнÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ð· Ñ\96нÑ\88Ñ\8bмÑ\96 Ð¿Ñ\80Ñ\8bÑ\81Ñ\83Ñ\82нÑ\8bмÑ\96 ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96камÑ\96 Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а "
+"аÑ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/login/org.freedesktop.login1.policy:246
-#, fuzzy
-#| msgid "Hibernate the system while an application is inhibiting this"
 msgid "Halt the system while an application is inhibiting this"
-msgstr "Ð\93Ñ\96беÑ\80наваць сістэму, калі праграмы перашкаджаюць гэтаму"
+msgstr "СпÑ\8bнÑ\96ць сістэму, калі праграмы перашкаджаюць гэтаму"
 
 #: src/login/org.freedesktop.login1.policy:247
-#, fuzzy
-#| msgid ""
-#| "Authentication is required to hibernate the system while an application "
-#| "is inhibiting this."
 msgid ""
 "Authentication is required to halt the system while an application is "
 "inhibiting this."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð³Ñ\96беÑ\80наÑ\86Ñ\8bÑ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b, ÐºÐ°Ð»Ñ\96 Ð¿Ñ\80агÑ\80амÑ\8b Ð¿ÐµÑ\80аÑ\88каджаÑ\8eÑ\86Ñ\8c "
-"гÑ\8dÑ\82амÑ\83."
+"Ð\94лÑ\8f Ñ\81пÑ\8bненнÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ð· Ð°ÐºÑ\82Ñ\8bÑ\9eнÑ\8bмÑ\96 Ð¿Ñ\80агÑ\80амамÑ\96, Ñ\8fкÑ\96Ñ\8f Ð¿ÐµÑ\80аÑ\88каджаÑ\8eÑ\86Ñ\8c Ð²Ñ\8bклÑ\8eÑ\87Ñ\8dннÑ\8e, "
+"паÑ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/login/org.freedesktop.login1.policy:257
 msgid "Suspend the system"
@@ -477,19 +446,19 @@ msgstr "Прыпыніць сістэму"
 
 #: src/login/org.freedesktop.login1.policy:258
 msgid "Authentication is required to suspend the system."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð¿Ñ\80Ñ\8bпÑ\8bненнÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b."
+msgstr "Ð\94лÑ\8f Ð¿Ñ\80Ñ\8bпÑ\8bненнÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/login/org.freedesktop.login1.policy:267
 msgid "Suspend the system while other users are logged in"
-msgstr "Ð\9fÑ\80Ñ\8bпÑ\8bнÑ\96Ñ\86Ñ\8c Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\83 Ð¿Ñ\80Ñ\8b Ð¿Ñ\80Ñ\8bÑ\81Ñ\83Ñ\82наÑ\81Ñ\86Ñ\96 Ñ\96нÑ\88Ñ\8bÑ\85 ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96каÑ\9e"
+msgstr "Ð\9fÑ\80Ñ\8bпÑ\8bнÑ\96Ñ\86Ñ\8c Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\83 Ð· Ñ\96нÑ\88Ñ\8bмÑ\96 Ð¿Ñ\80Ñ\8bÑ\81Ñ\83Ñ\82нÑ\8bмÑ\96 ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96камÑ\96"
 
 #: src/login/org.freedesktop.login1.policy:268
 msgid ""
 "Authentication is required to suspend the system while other users are "
 "logged in."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð¿Ñ\80Ñ\8bпÑ\8bненнÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ð¿Ñ\80Ñ\8b Ð¿Ñ\80Ñ\8bÑ\81Ñ\83Ñ\82наÑ\81Ñ\86Ñ\96 Ñ\96нÑ\88Ñ\8bÑ\85 "
-"каÑ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96каÑ\9e."
+"Ð\94лÑ\8f Ð¿Ñ\80Ñ\8bпÑ\8bненнÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ð· Ñ\96нÑ\88Ñ\8bмÑ\96 Ð¿Ñ\80Ñ\8bÑ\81Ñ\83Ñ\82нÑ\8bмÑ\96 ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96камÑ\96 Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а "
+"аÑ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/login/org.freedesktop.login1.policy:278
 msgid "Suspend the system while an application is inhibiting this"
@@ -500,130 +469,119 @@ msgid ""
 "Authentication is required to suspend the system while an application is "
 "inhibiting this."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð¿Ñ\80Ñ\8bпÑ\8bненнÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b, ÐºÐ°Ð»Ñ\96 Ð¿Ñ\80агÑ\80амÑ\8b перашкаджаюць "
-"гÑ\8dÑ\82амÑ\83."
+"Ð\94лÑ\8f Ð¿Ñ\80Ñ\8bпÑ\8bненнÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ð· Ð°ÐºÑ\82Ñ\8bÑ\9eнÑ\8bмÑ\96 Ð¿Ñ\80агÑ\80амамÑ\96, Ñ\8fкÑ\96Ñ\8f перашкаджаюць "
+"вÑ\8bклÑ\8eÑ\87Ñ\8dннÑ\8e, Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/login/org.freedesktop.login1.policy:289
 msgid "Hibernate the system"
-msgstr "Ð\93Ñ\96беÑ\80наваÑ\86Ñ\8c Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dму"
+msgstr "Ð\9fеÑ\80авеÑ\81Ñ\86Ñ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\83 Ñ\9e Ñ\80Ñ\8dжÑ\8bм Ñ\81ну"
 
 #: src/login/org.freedesktop.login1.policy:290
 msgid "Authentication is required to hibernate the system."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð³Ñ\96беÑ\80наÑ\86Ñ\8bÑ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b."
+msgstr "Ð\94лÑ\8f Ð¿ÐµÑ\80аводÑ\83 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ñ\9e Ñ\80Ñ\8dжÑ\8bм Ñ\81нÑ\83 Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/login/org.freedesktop.login1.policy:299
 msgid "Hibernate the system while other users are logged in"
-msgstr "Ð\93Ñ\96беÑ\80наваÑ\86Ñ\8c Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\83 Ð¿Ñ\80Ñ\8b Ð¿Ñ\80Ñ\8bÑ\81Ñ\83Ñ\82наÑ\81Ñ\86Ñ\96 Ñ\96нÑ\88Ñ\8bÑ\85 ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96каÑ\9e"
+msgstr "Ð\9fеÑ\80авеÑ\81Ñ\86Ñ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\83 Ñ\9e Ñ\80Ñ\8dжÑ\8bм Ñ\81нÑ\83 Ð· Ñ\96нÑ\88Ñ\8bмÑ\96 Ð¿Ñ\80Ñ\8bÑ\81Ñ\83Ñ\82нÑ\8bмÑ\96 ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96камÑ\96"
 
 #: src/login/org.freedesktop.login1.policy:300
 msgid ""
 "Authentication is required to hibernate the system while other users are "
 "logged in."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð³Ñ\96беÑ\80наÑ\86Ñ\8bÑ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ð¿Ñ\80Ñ\8b Ð¿Ñ\80Ñ\8bÑ\81Ñ\83Ñ\82наÑ\81Ñ\86Ñ\96 Ñ\96нÑ\88Ñ\8bÑ\85 "
-"каÑ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96каÑ\9e."
+"Ð\94лÑ\8f Ð¿ÐµÑ\80аводÑ\83 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ñ\9e Ñ\80Ñ\8dжÑ\8bм Ñ\81нÑ\83 Ð· Ñ\96нÑ\88Ñ\8bмÑ\96 Ð¿Ñ\80Ñ\8bÑ\81Ñ\83Ñ\82нÑ\8bмÑ\96 ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96камÑ\96 "
+"паÑ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/login/org.freedesktop.login1.policy:310
 msgid "Hibernate the system while an application is inhibiting this"
-msgstr "Ð\93Ñ\96беÑ\80наваÑ\86Ñ\8c Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dму, калі праграмы перашкаджаюць гэтаму"
+msgstr "Ð\9fеÑ\80авеÑ\81Ñ\86Ñ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\83 Ñ\9e Ñ\80Ñ\8dжÑ\8bм Ñ\81ну, калі праграмы перашкаджаюць гэтаму"
 
 #: src/login/org.freedesktop.login1.policy:311
 msgid ""
 "Authentication is required to hibernate the system while an application is "
 "inhibiting this."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð³Ñ\96беÑ\80наÑ\86Ñ\8bÑ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b, ÐºÐ°Ð»Ñ\96 Ð¿Ñ\80агÑ\80амÑ\8b перашкаджаюць "
-"гÑ\8dÑ\82амÑ\83."
+"Ð\94лÑ\8f Ð¿ÐµÑ\80аводÑ\83 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b Ñ\9e Ñ\80Ñ\8dжÑ\8bм Ñ\81нÑ\83 Ð· Ð°ÐºÑ\82Ñ\8bÑ\9eнÑ\8bмÑ\96 Ð¿Ñ\80агÑ\80амамÑ\96, Ñ\8fкÑ\96Ñ\8f перашкаджаюць "
+"вÑ\8bклÑ\8eÑ\87Ñ\8dннÑ\8e, Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/login/org.freedesktop.login1.policy:321
 msgid "Manage active sessions, users and seats"
-msgstr "Кіраваць актыўнымі сесіямі, карыстальнікамі і працоўнымі месцамі"
+msgstr "Кіраванне актыўнымі сеансамі, карыстальнікамі і працоўнымі месцамі"
 
 #: src/login/org.freedesktop.login1.policy:322
 msgid "Authentication is required to manage active sessions, users and seats."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f ÐºÑ\96Ñ\80аваннÑ\8f Ð°ÐºÑ\82Ñ\8bÑ\9eнÑ\8bмÑ\96 Ñ\81еÑ\81Ñ\96Ñ\8fмÑ\96, ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96камÑ\96 і "
-"меÑ\81Ñ\86амÑ\96."
+"Ð\94лÑ\8f ÐºÑ\96Ñ\80аваннÑ\8f Ð°ÐºÑ\82Ñ\8bÑ\9eнÑ\8bмÑ\96 Ñ\81еанÑ\81амÑ\96, ÐºÐ°Ñ\80Ñ\8bÑ\81Ñ\82алÑ\8cнÑ\96камÑ\96 Ñ\96 Ð¿Ñ\80аÑ\86оÑ\9eнÑ\8bмÑ\96 Ð¼ÐµÑ\81Ñ\86амі "
+"паÑ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/login/org.freedesktop.login1.policy:331
 msgid "Lock or unlock active sessions"
-msgstr "Ð\91лакаваÑ\86Ñ\8c Ð°Ð±Ð¾ Ñ\80азблакаваÑ\86Ñ\8c Ð°ÐºÑ\82Ñ\8bÑ\9eнÑ\83Ñ\8e Ñ\81еÑ\81Ñ\96Ñ\8e"
+msgstr "Ð\97аблакаваÑ\86Ñ\8c Ð°Ð±Ð¾ Ñ\80азблакаваÑ\86Ñ\8c Ð°ÐºÑ\82Ñ\8bÑ\9eнÑ\8bÑ\8f Ñ\81еанÑ\81Ñ\8b"
 
 #: src/login/org.freedesktop.login1.policy:332
 msgid "Authentication is required to lock or unlock active sessions."
 msgstr ""
-"Неабходна аўтэнтыфікацыя для блакіроўкі або разблакіроўкі актыўнай сесіі."
+"Для таго, каб заблакаваць ці разблакаваць актыўныя сеансы, патрабуецца "
+"аўтэнтыфікацыя."
 
 #: src/login/org.freedesktop.login1.policy:341
 msgid "Set the reboot \"reason\" in the kernel"
-msgstr ""
+msgstr "Вызначыць \"прычыну\" перазапуску"
 
 #: src/login/org.freedesktop.login1.policy:342
-#, fuzzy
-#| msgid "Authentication is required to set the system timezone."
 msgid "Authentication is required to set the reboot \"reason\" in the kernel."
-msgstr "Неабходна аўтэнтыфікацыя для ўсталявання сістэмнага часавога поясу."
+msgstr ""
+"Для таго, каб вызначыць прычыну перазапуску, патрабуецца аўтэнтыфікацыя."
 
 #: src/login/org.freedesktop.login1.policy:352
-#, fuzzy
-#| msgid "Allow indication to the firmware to boot to setup interface"
 msgid "Indicate to the firmware to boot to setup interface"
-msgstr "Ð\94азволÑ\96Ñ\86Ñ\8c Ñ\83казанне Ð¿Ñ\80аÑ\88Ñ\8bÑ\9eÑ\86Ñ\8b Ð½Ð° Ð·Ð°Ð³Ñ\80Ñ\83зкÑ\83 Ñ\96нÑ\82Ñ\8dÑ\80Ñ\84ейÑ\81Ñ\83 Ð½Ð°Ð»Ð°Ð´"
+msgstr "Ð\97апÑ\83Ñ\81Ñ\86Ñ\96Ñ\86Ñ\8c Ð½Ð°Ð»Ð°Ð´ÐºÑ\83 Ð¿Ñ\80аÑ\88Ñ\8bÑ\9eкÑ\96 Ð¿Ð°Ð´Ñ\87аÑ\81 Ð½Ð°Ñ\81Ñ\82Ñ\83пнага Ð·Ð°Ð¿Ñ\83Ñ\81кÑ\83"
 
 #: src/login/org.freedesktop.login1.policy:353
 msgid ""
 "Authentication is required to indicate to the firmware to boot to setup "
 "interface."
-msgstr ""
-"Неабходна аўтэнтыфікацыя для ўказання прашыўцы на загрузку інтэрфейсу налад."
+msgstr "Для таго, каб запусціць наладку прашыўкі, патрабуецца аўтэнтыфікацыя."
 
 #: src/login/org.freedesktop.login1.policy:363
 msgid "Indicate to the boot loader to boot to the boot loader menu"
-msgstr ""
+msgstr "Вывесці меню загрузчыка падчас наступнага запуску"
 
 #: src/login/org.freedesktop.login1.policy:364
-#, fuzzy
-#| msgid ""
-#| "Authentication is required to indicate to the firmware to boot to setup "
-#| "interface."
 msgid ""
 "Authentication is required to indicate to the boot loader to boot to the "
 "boot loader menu."
 msgstr ""
-"Неабходна аўтэнтыфікацыя для ўказання прашыўцы на загрузку інтэрфейсу налад."
+"Для вываду меню загрузчыка падчас наступнага запуску патрабуецца "
+"аўтэнтыфікацыя."
 
 #: src/login/org.freedesktop.login1.policy:374
 msgid "Indicate to the boot loader to boot a specific entry"
-msgstr ""
+msgstr "Абраць пэўны загрузачны запіс падчас наступнага запуску"
 
 #: src/login/org.freedesktop.login1.policy:375
-#, fuzzy
-#| msgid ""
-#| "Authentication is required to indicate to the firmware to boot to setup "
-#| "interface."
 msgid ""
 "Authentication is required to indicate to the boot loader to boot into a "
 "specific boot loader entry."
 msgstr ""
-"Неабходна аўтэнтыфікацыя для ўказання прашыўцы на загрузку інтэрфейсу налад."
+"Для таго, каб абраць пэўны загрузачны запіс падчас наступнага запуску, "
+"патрабуецца аўтэнтыфікацыя."
 
 #: src/login/org.freedesktop.login1.policy:385
 msgid "Set a wall message"
-msgstr "УÑ\81Ñ\82алÑ\8fваць усеагульнае паведамленне"
+msgstr "Ð\92Ñ\8bзнаÑ\87Ñ\8bць усеагульнае паведамленне"
 
 #: src/login/org.freedesktop.login1.policy:386
 msgid "Authentication is required to set a wall message"
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eÑ\81Ñ\82алÑ\8fваннÑ\8f Ñ\9eÑ\81еагÑ\83лÑ\8cнага Ð¿Ð°Ð²ÐµÐ´Ð°Ð¼Ð»ÐµÐ½Ð½я"
+msgstr "Ð\94лÑ\8f Ð²Ñ\8bзнаÑ\87Ñ\8dннÑ\8f Ñ\9eÑ\81еагÑ\83лÑ\8cнага Ð¿Ð°Ð²ÐµÐ´Ð°Ð¼Ð»ÐµÐ½Ð½Ñ\8f Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bя"
 
 #: src/login/org.freedesktop.login1.policy:395
 msgid "Change Session"
-msgstr ""
+msgstr "Змяніць сеанс"
 
 #: src/login/org.freedesktop.login1.policy:396
-#, fuzzy
-#| msgid "Authentication is required to set the local hostname."
 msgid "Authentication is required to change the virtual terminal."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eÑ\81Ñ\82алÑ\8fваннÑ\8f Ñ\96мÑ\8f Ð²Ñ\83зла."
+msgstr "Ð\94лÑ\8f Ð·Ð¼ÐµÐ½Ñ\8b Ð²Ñ\96Ñ\80Ñ\82Ñ\83алÑ\8cнага Ñ\81еанÑ\81а Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/machine/org.freedesktop.machine1.policy:22
 msgid "Log into a local container"
@@ -631,329 +589,297 @@ msgstr "Увайсці ў лакальны кантэйнер"
 
 #: src/machine/org.freedesktop.machine1.policy:23
 msgid "Authentication is required to log into a local container."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eваÑ\85одÑ\83 Ñ\9e Ð»Ð°ÐºÐ°Ð»Ñ\8cнÑ\8b ÐºÐ°Ð½Ñ\82Ñ\8dйнеÑ\80."
+msgstr "Ð\94лÑ\8f Ñ\9eваÑ\85одÑ\83 Ñ\9e Ð»Ð°ÐºÐ°Ð»Ñ\8cнÑ\8b ÐºÐ°Ð½Ñ\82Ñ\8dйнеÑ\80 Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/machine/org.freedesktop.machine1.policy:32
 msgid "Log into the local host"
-msgstr "Увайсці ў лакальны вузел"
+msgstr "Увайсці на лакальны камп’ютар"
 
 #: src/machine/org.freedesktop.machine1.policy:33
 msgid "Authentication is required to log into the local host."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eваÑ\85одÑ\83 Ñ\9e Ð»Ð°ÐºÐ°Ð»Ñ\8cнÑ\8b Ð²Ñ\83зел."
+msgstr "Ð\94лÑ\8f Ñ\9eваÑ\85одÑ\83 Ð½Ð° Ð»Ð°ÐºÐ°Ð»Ñ\8cнÑ\8b ÐºÐ°Ð¼Ð¿â\80\99Ñ\8eÑ\82аÑ\80 Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/machine/org.freedesktop.machine1.policy:42
 msgid "Acquire a shell in a local container"
-msgstr "Атрымаць абалонку на лакальным кантэйнеры"
+msgstr "Атрымаць абалонку ў лакальным кантэйнеры"
 
 #: src/machine/org.freedesktop.machine1.policy:43
 msgid "Authentication is required to acquire a shell in a local container."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð°Ñ\82Ñ\80Ñ\8bманнÑ\8f Ð°Ð±Ð°Ð»Ð¾Ð½ÐºÑ\96 Ð½Ð° Ð»Ð°ÐºÐ°Ð»Ñ\8cнÑ\8bм ÐºÐ°Ð½Ñ\82Ñ\8dйнеÑ\80Ñ\8b."
+"Ð\94лÑ\8f Ð°Ñ\82Ñ\80Ñ\8bманнÑ\8f Ð°Ð±Ð°Ð»Ð¾Ð½ÐºÑ\96 Ñ\9e Ð»Ð°ÐºÐ°Ð»Ñ\8cнÑ\8bм ÐºÐ°Ð½Ñ\82Ñ\8dйнеÑ\80Ñ\8b Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/machine/org.freedesktop.machine1.policy:53
 msgid "Acquire a shell on the local host"
-msgstr "Ð\90Ñ\82Ñ\80Ñ\8bмаÑ\86Ñ\8c Ð°Ð±Ð°Ð»Ð¾Ð½ÐºÑ\83 Ð½Ð° Ð»Ð°ÐºÐ°Ð»Ñ\8cнÑ\8bм Ð²Ñ\83зле"
+msgstr "Ð\90Ñ\82Ñ\80Ñ\8bмаÑ\86Ñ\8c Ð°Ð±Ð°Ð»Ð¾Ð½ÐºÑ\83 Ð½Ð° Ð»Ð°ÐºÐ°Ð»Ñ\8cнÑ\8bм ÐºÐ°Ð¼Ð¿â\80\99Ñ\8eÑ\82аÑ\80Ñ\8b"
 
 #: src/machine/org.freedesktop.machine1.policy:54
 msgid "Authentication is required to acquire a shell on the local host."
-msgstr "Неабходна аўтэнтыфікацыя для атрымання абалонкі на лакальным вузле."
+msgstr ""
+"Для атрымання абалонкі на лакальным камп’ютары патрабуецца аўтэнтыфікацыя."
 
 #: src/machine/org.freedesktop.machine1.policy:64
 msgid "Acquire a pseudo TTY in a local container"
-msgstr "Атрымаць псеўда TTY на лакальным кантэйнеры"
+msgstr "Атрымаць псеўда-тэрмінал у лакальным кантэйнеры"
 
 #: src/machine/org.freedesktop.machine1.policy:65
 msgid ""
 "Authentication is required to acquire a pseudo TTY in a local container."
 msgstr ""
-"Неабходна аўтэнтыфікацыя для атрымання псеўда TTY на лакальным кантэйнеры."
+"Для атрымання псеўда-тэрмінала ў лакальным кантэйнеры патрабуецца "
+"аўтэнтыфікацыя."
 
 #: src/machine/org.freedesktop.machine1.policy:74
 msgid "Acquire a pseudo TTY on the local host"
-msgstr "Атрымаць псеўда TTY на лакальным вузле"
+msgstr "Атрымаць псеўда-тэрмінал на лакальным камп’ютары"
 
 #: src/machine/org.freedesktop.machine1.policy:75
 msgid "Authentication is required to acquire a pseudo TTY on the local host."
-msgstr "Неабходна аўтэнтыфікацыя для атрымання псеўда TTY на лакальным вузле."
+msgstr ""
+"Для атрымання псеўда-тэрмінала на лакальным камп’ютары патрабуецца "
+"аўтэнтыфікацыя."
 
 #: src/machine/org.freedesktop.machine1.policy:84
 msgid "Manage local virtual machines and containers"
-msgstr "Кіраваць лакальнымі віртуальнымі машынамі або кантэйнерамі"
+msgstr "Кіраванне лакальнымі віртуальнымі машынамі або кантэйнерамі"
 
 #: src/machine/org.freedesktop.machine1.policy:85
 msgid ""
 "Authentication is required to manage local virtual machines and containers."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f ÐºÑ\96Ñ\80аваннÑ\8f Ð»Ð°ÐºÐ°Ð»Ñ\8cнÑ\8bмÑ\96 Ð²Ñ\96Ñ\80Ñ\82Ñ\83алÑ\8cнÑ\8bмÑ\96 Ð¼Ð°Ñ\88Ñ\8bнамÑ\96 Ñ\96 "
-"канÑ\82Ñ\8dйнеÑ\80амÑ\96."
+"Ð\94лÑ\8f ÐºÑ\96Ñ\80аваннÑ\8f Ð»Ð°ÐºÐ°Ð»Ñ\8cнÑ\8bмÑ\96 Ð²Ñ\96Ñ\80Ñ\82Ñ\83алÑ\8cнÑ\8bмÑ\96 Ð¼Ð°Ñ\88Ñ\8bнамÑ\96 Ñ\96 ÐºÐ°Ð½Ñ\82Ñ\8dйнеÑ\80амÑ\96 Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а "
+"аÑ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/machine/org.freedesktop.machine1.policy:95
 msgid "Manage local virtual machine and container images"
-msgstr "Кіраваць вобразамі лакальных віртуальных машын і кантэйнераў"
+msgstr "Кіраванне вобразамі лакальных віртуальных машын і кантэйнераў"
 
 #: src/machine/org.freedesktop.machine1.policy:96
 msgid ""
 "Authentication is required to manage local virtual machine and container "
 "images."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f ÐºÑ\96Ñ\80аваннÑ\8f Ð²Ð¾Ð±Ñ\80азамÑ\96 Ð»Ð°ÐºÐ°Ð»Ñ\8cнÑ\8bÑ\85 Ð²Ñ\96Ñ\80Ñ\82Ñ\83алÑ\8cнÑ\8bÑ\85 Ð¼Ð°Ñ\88Ñ\8bн "
-"і кантэйнераў."
+"Ð\94лÑ\8f ÐºÑ\96Ñ\80аваннÑ\8f Ð²Ð¾Ð±Ñ\80азамÑ\96 Ð»Ð°ÐºÐ°Ð»Ñ\8cнÑ\8bÑ\85 Ð²Ñ\96Ñ\80Ñ\82Ñ\83алÑ\8cнÑ\8bÑ\85 Ð¼Ð°Ñ\88Ñ\8bн Ñ\96 ÐºÐ°Ð½Ñ\82Ñ\8dйнеÑ\80аÑ\9e "
+"патрабуецца аўтэнтыфікацыя."
 
 #: src/network/org.freedesktop.network1.policy:22
 msgid "Set NTP servers"
-msgstr ""
+msgstr "Вызначыць серверы NTP"
 
 #: src/network/org.freedesktop.network1.policy:23
-#, fuzzy
-#| msgid "Authentication is required to set the system time."
 msgid "Authentication is required to set NTP servers."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eÑ\81Ñ\82алÑ\8fваннÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмнага Ñ\87аÑ\81Ñ\83."
+msgstr "Ð\94лÑ\8f Ð²Ñ\8bзнаÑ\87Ñ\8dннÑ\8f Ñ\81еÑ\80веÑ\80аÑ\9e NTP Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/network/org.freedesktop.network1.policy:33
 #: src/resolve/org.freedesktop.resolve1.policy:44
 msgid "Set DNS servers"
-msgstr ""
+msgstr "Вызначыць серверы DNS"
 
 #: src/network/org.freedesktop.network1.policy:34
 #: src/resolve/org.freedesktop.resolve1.policy:45
-#, fuzzy
-#| msgid "Authentication is required to set the system time."
 msgid "Authentication is required to set DNS servers."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eÑ\81Ñ\82алÑ\8fваннÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмнага Ñ\87аÑ\81Ñ\83."
+msgstr "Ð\94лÑ\8f Ð²Ñ\8bзнаÑ\87Ñ\8dннÑ\8f Ñ\81еÑ\80веÑ\80аÑ\9e DNS Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/network/org.freedesktop.network1.policy:44
 #: src/resolve/org.freedesktop.resolve1.policy:55
 msgid "Set domains"
-msgstr ""
+msgstr "Вызначыць дамены"
 
 #: src/network/org.freedesktop.network1.policy:45
 #: src/resolve/org.freedesktop.resolve1.policy:56
-#, fuzzy
-#| msgid "Authentication is required to stop '$(unit)'."
 msgid "Authentication is required to set domains."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\81пÑ\8bненнÑ\8f '$(unit)'."
+msgstr "Ð\94лÑ\8f Ð²Ñ\8bзнаÑ\87Ñ\8dннÑ\8f Ð´Ð°Ð¼ÐµÐ½Ð°Ñ\9e Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/network/org.freedesktop.network1.policy:55
 #: src/resolve/org.freedesktop.resolve1.policy:66
 msgid "Set default route"
-msgstr ""
+msgstr "Вызначыць прадвызначаны маршрут"
 
 #: src/network/org.freedesktop.network1.policy:56
 #: src/resolve/org.freedesktop.resolve1.policy:67
-#, fuzzy
-#| msgid "Authentication is required to set the local hostname."
 msgid "Authentication is required to set default route."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eÑ\81Ñ\82алÑ\8fваннÑ\8f Ñ\96мÑ\8f Ð²Ñ\83зла."
+msgstr "Ð\94лÑ\8f Ð²Ñ\8bзнаÑ\87Ñ\8dннÑ\8f Ð¿Ñ\80адвÑ\8bзнаÑ\87анага Ð¼Ð°Ñ\80Ñ\88Ñ\80Ñ\83Ñ\82Ñ\83 Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/network/org.freedesktop.network1.policy:66
 #: src/resolve/org.freedesktop.resolve1.policy:77
 msgid "Enable/disable LLMNR"
-msgstr ""
+msgstr "Уключыць / адключыць LLMNR"
 
 #: src/network/org.freedesktop.network1.policy:67
 #: src/resolve/org.freedesktop.resolve1.policy:78
-#, fuzzy
-#| msgid "Authentication is required to hibernate the system."
 msgid "Authentication is required to enable or disable LLMNR."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð³Ñ\96беÑ\80наÑ\86Ñ\8bÑ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b."
+msgstr "Ð\94лÑ\8f Ñ\9eклÑ\8eÑ\87Ñ\8dннÑ\8f Ñ\86Ñ\96 Ð°Ð´ÐºÐ»Ñ\8eÑ\87Ñ\8dннÑ\8f LLMNR Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/network/org.freedesktop.network1.policy:77
 #: src/resolve/org.freedesktop.resolve1.policy:88
 msgid "Enable/disable multicast DNS"
-msgstr ""
+msgstr "Уключыць / адключыць multicast DNS"
 
 #: src/network/org.freedesktop.network1.policy:78
 #: src/resolve/org.freedesktop.resolve1.policy:89
-#, fuzzy
-#| msgid "Authentication is required to log into the local host."
 msgid "Authentication is required to enable or disable multicast DNS."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eваÑ\85одÑ\83 Ñ\9e Ð»Ð°ÐºÐ°Ð»Ñ\8cнÑ\8b Ð²Ñ\83зел."
+msgstr "Ð\94лÑ\8f Ñ\9eклÑ\8eÑ\87Ñ\8dннÑ\8f Ñ\86Ñ\96 Ð°Ð´ÐºÐ»Ñ\8eÑ\87Ñ\8dннÑ\8f multicast DNS Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/network/org.freedesktop.network1.policy:88
 #: src/resolve/org.freedesktop.resolve1.policy:99
 msgid "Enable/disable DNS over TLS"
-msgstr ""
+msgstr "Уключыць / адключыць DNS паверх TLS"
 
 #: src/network/org.freedesktop.network1.policy:89
 #: src/resolve/org.freedesktop.resolve1.policy:100
-#, fuzzy
-#| msgid "Authentication is required to set the local hostname."
 msgid "Authentication is required to enable or disable DNS over TLS."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eÑ\81Ñ\82алÑ\8fваннÑ\8f Ñ\96мÑ\8f Ð²Ñ\83зла."
+msgstr "Ð\94лÑ\8f Ñ\9eклÑ\8eÑ\87Ñ\8dннÑ\8f Ñ\86Ñ\96 Ð°Ð´ÐºÐ»Ñ\8eÑ\87Ñ\8dннÑ\8f DNS Ð¿Ð°Ð²ÐµÑ\80Ñ\85 TLS Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/network/org.freedesktop.network1.policy:99
 #: src/resolve/org.freedesktop.resolve1.policy:110
 msgid "Enable/disable DNSSEC"
-msgstr ""
+msgstr "Уключыць / адключыць DNSSEC"
 
 #: src/network/org.freedesktop.network1.policy:100
 #: src/resolve/org.freedesktop.resolve1.policy:111
-#, fuzzy
-#| msgid "Authentication is required to hibernate the system."
 msgid "Authentication is required to enable or disable DNSSEC."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð³Ñ\96беÑ\80наÑ\86Ñ\8bÑ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b."
+msgstr "Ð\94лÑ\8f Ñ\9eклÑ\8eÑ\87Ñ\8dннÑ\8f Ñ\86Ñ\96 Ð°Ð´ÐºÐ»Ñ\8eÑ\87Ñ\8dннÑ\8f DNSSEC Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/network/org.freedesktop.network1.policy:110
 #: src/resolve/org.freedesktop.resolve1.policy:121
 msgid "Set DNSSEC Negative Trust Anchors"
-msgstr ""
+msgstr "Вызначыць DNSSEC Negative Trust Anchors"
 
 #: src/network/org.freedesktop.network1.policy:111
 #: src/resolve/org.freedesktop.resolve1.policy:122
-#, fuzzy
-#| msgid "Authentication is required to set the system locale."
 msgid "Authentication is required to set DNSSEC Negative Trust Anchors."
-msgstr "Неабходна аўтэнтыфікацыя для ўсталявання сістэмнай лакалі."
+msgstr ""
+"Для вызначэння DNSSEC Negative Trust Anchors патрабуецца аўтэнтыфікацыя."
 
 #: src/network/org.freedesktop.network1.policy:121
 msgid "Revert NTP settings"
-msgstr ""
+msgstr "Скінуць налады NTP"
 
 #: src/network/org.freedesktop.network1.policy:122
-#, fuzzy
-#| msgid "Authentication is required to set the system time."
 msgid "Authentication is required to reset NTP settings."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eÑ\81Ñ\82алÑ\8fваннÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмнага Ñ\87аÑ\81Ñ\83."
+msgstr "Ð\94лÑ\8f Ñ\82аго, ÐºÐ°Ð± Ñ\81кÑ\96нÑ\83Ñ\86Ñ\8c Ð½Ð°Ð»Ð°Ð´Ñ\8b NTP, Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/network/org.freedesktop.network1.policy:132
 msgid "Revert DNS settings"
-msgstr ""
+msgstr "Скінуць налады DNS"
 
 #: src/network/org.freedesktop.network1.policy:133
-#, fuzzy
-#| msgid "Authentication is required to set the system time."
 msgid "Authentication is required to reset DNS settings."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eÑ\81Ñ\82алÑ\8fваннÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмнага Ñ\87аÑ\81Ñ\83."
+msgstr "Ð\94лÑ\8f Ñ\82аго, ÐºÐ°Ð± Ñ\81кÑ\96нÑ\83Ñ\86Ñ\8c Ð½Ð°Ð»Ð°Ð´Ñ\8b DNS, Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/network/org.freedesktop.network1.policy:143
 msgid "DHCP server sends force renew message"
-msgstr ""
+msgstr "Сервер DHCP адпраўляе паведамленне з прымусовым абнаўленнем"
 
 #: src/network/org.freedesktop.network1.policy:144
-#, fuzzy
-#| msgid "Authentication is required to set a wall message"
 msgid "Authentication is required to send force renew message."
-msgstr "Неабходна аўтэнтыфікацыя для ўсталявання ўсеагульнага паведамлення"
+msgstr ""
+"Для адпраўкі паведамлення з прымусовым абнаўленнем патрабуецца "
+"аўтэнтыфікацыя."
 
 #: src/network/org.freedesktop.network1.policy:154
 msgid "Renew dynamic addresses"
-msgstr ""
+msgstr "Абнавіць дынамічныя адрасы"
 
 #: src/network/org.freedesktop.network1.policy:155
-#, fuzzy
-#| msgid "Authentication is required to set a wall message"
 msgid "Authentication is required to renew dynamic addresses."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eÑ\81Ñ\82алÑ\8fваннÑ\8f Ñ\9eÑ\81еагÑ\83лÑ\8cнага Ð¿Ð°Ð²ÐµÐ´Ð°Ð¼Ð»ÐµÐ½Ð½Ñ\8f"
+msgstr "Ð\94лÑ\8f Ð°Ð±Ð½Ð°Ñ\9eленнÑ\8f Ð´Ñ\8bнамÑ\96Ñ\87нÑ\8bÑ\85 Ð°Ð´Ñ\80аÑ\81оÑ\9e Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/network/org.freedesktop.network1.policy:165
 msgid "Reload network settings"
-msgstr ""
+msgstr "Перазагрузіць налады сеткі"
 
 #: src/network/org.freedesktop.network1.policy:166
-#, fuzzy
-#| msgid "Authentication is required to reload the systemd state."
 msgid "Authentication is required to reload network settings."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð¿ÐµÑ\80аÑ\87Ñ\8bÑ\82аннÑ\8f Ñ\81Ñ\82анÑ\83 systemd."
+msgstr "Ð\94лÑ\8f Ð¿ÐµÑ\80азагÑ\80Ñ\83зкÑ\96 Ð½Ð°Ð»Ð°Ð´ Ñ\81еÑ\82кÑ\96 Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/network/org.freedesktop.network1.policy:176
 msgid "Reconfigure network interface"
-msgstr ""
+msgstr "Змяніць канфігурацыю сеткавага інтэрфейсу"
 
 #: src/network/org.freedesktop.network1.policy:177
-#, fuzzy
-#| msgid "Authentication is required to reboot the system."
 msgid "Authentication is required to reconfigure network interface."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð¿ÐµÑ\80азагÑ\80Ñ\83зкÑ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмÑ\8b."
+msgstr "Ð\94лÑ\8f Ð·Ð¼ÐµÐ½Ñ\8b ÐºÐ°Ð½Ñ\84Ñ\96гÑ\83Ñ\80аÑ\86Ñ\8bÑ\96 Ñ\81еÑ\82кавага Ñ\96нÑ\82Ñ\8dÑ\80Ñ\84ейÑ\81Ñ\83 Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/portable/org.freedesktop.portable1.policy:13
 msgid "Inspect a portable service image"
-msgstr ""
+msgstr "Прачытаць вобраз пераноснай службы"
 
 #: src/portable/org.freedesktop.portable1.policy:14
-#, fuzzy
-#| msgid "Authentication is required to import a VM or container image"
 msgid "Authentication is required to inspect a portable service image."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\96мпаÑ\80Ñ\82Ñ\83 Ð²Ð¾Ð±Ñ\80аза Ð\92Ð\9c Ð°Ð±Ð¾ ÐºÐ°Ð½Ñ\82Ñ\8dйнеÑ\80а"
+msgstr "Ð\94лÑ\8f Ñ\87Ñ\8bÑ\82аннÑ\8f Ð²Ð¾Ð±Ñ\80аза Ð¿ÐµÑ\80аноÑ\81най Ñ\81лÑ\83жбÑ\8b Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/portable/org.freedesktop.portable1.policy:23
 msgid "Attach or detach a portable service image"
-msgstr ""
+msgstr "Далучыць альбо адлучыць вобраз пераноснай службы"
 
 #: src/portable/org.freedesktop.portable1.policy:24
-#, fuzzy
-#| msgid "Authentication is required to attach a device to a seat."
 msgid ""
 "Authentication is required to attach or detach a portable service image."
-msgstr "Неабходна аўтэнтыфікацыя для далучэння прылад да працоўных месцаў."
+msgstr ""
+"Для далучэння альбо адлучэння вобраза пераноснай службы патрабуецца "
+"аўтэнтыфікацыя."
 
 #: src/portable/org.freedesktop.portable1.policy:34
 msgid "Delete or modify portable service image"
-msgstr ""
+msgstr "Выдаліць альбо змяніць вобраз пераноснай службы"
 
 #: src/portable/org.freedesktop.portable1.policy:35
-#, fuzzy
-#| msgid "Authentication is required to download a VM or container image"
 msgid ""
 "Authentication is required to delete or modify a portable service image."
-msgstr "Неабходна аўтэнтыфікацыя для спампоўкі вобраза ВМ або кантэйнера"
+msgstr ""
+"Для выдалення альбо змены вобраза пераноснай службы патрабуецца "
+"аўтэнтыфікацыя."
 
 #: src/resolve/org.freedesktop.resolve1.policy:22
 msgid "Register a DNS-SD service"
-msgstr ""
+msgstr "Рэгістрацыя службы DNS-SD"
 
 #: src/resolve/org.freedesktop.resolve1.policy:23
-#, fuzzy
-#| msgid "Authentication is required to set a wall message"
 msgid "Authentication is required to register a DNS-SD service"
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eÑ\81Ñ\82алÑ\8fваннÑ\8f Ñ\9eÑ\81еагÑ\83лÑ\8cнага Ð¿Ð°Ð²ÐµÐ´Ð°Ð¼Ð»ÐµÐ½Ð½я"
+msgstr "Ð\94лÑ\8f Ñ\80Ñ\8dгÑ\96Ñ\81Ñ\82Ñ\80аÑ\86Ñ\8bÑ\96 Ñ\81лÑ\83жбÑ\8b DNS-SD Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bя"
 
 #: src/resolve/org.freedesktop.resolve1.policy:33
 msgid "Unregister a DNS-SD service"
-msgstr ""
+msgstr "Выдаленне службы DNS-SD"
 
 #: src/resolve/org.freedesktop.resolve1.policy:34
-#, fuzzy
-#| msgid "Authentication is required to set a wall message"
 msgid "Authentication is required to unregister a DNS-SD service"
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eÑ\81Ñ\82алÑ\8fваннÑ\8f Ñ\9eÑ\81еагÑ\83лÑ\8cнага Ð¿Ð°Ð²ÐµÐ´Ð°Ð¼Ð»ÐµÐ½Ð½я"
+msgstr "Ð\94лÑ\8f Ð²Ñ\8bдаленнÑ\8f Ñ\81лÑ\83жбÑ\8b DNS-SD Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bя"
 
 #: src/resolve/org.freedesktop.resolve1.policy:132
 msgid "Revert name resolution settings"
-msgstr ""
+msgstr "Скінуць налады вырашэння назваў"
 
 #: src/resolve/org.freedesktop.resolve1.policy:133
-#, fuzzy
-#| msgid "Authentication is required to set the system keyboard settings."
 msgid "Authentication is required to reset name resolution settings."
-msgstr "Неабходна аўтэнтыфікацыя для ўсталявання сістэмных налад клавіятуры."
+msgstr ""
+"Для таго, каб скінуць налады вырашэння назваў, патрабуецца аўтэнтыфікацыя."
 
 #: src/timedate/org.freedesktop.timedate1.policy:22
 msgid "Set system time"
-msgstr "УÑ\81Ñ\82алÑ\8fваць сістэмны час"
+msgstr "Ð\9dаладзÑ\96ць сістэмны час"
 
 #: src/timedate/org.freedesktop.timedate1.policy:23
 msgid "Authentication is required to set the system time."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eÑ\81Ñ\82алÑ\8fваннÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмнага Ñ\87аÑ\81Ñ\83."
+msgstr "Ð\94лÑ\8f Ð½Ð°Ð»Ð°Ð´ÐºÑ\96 Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмнага Ñ\87аÑ\81Ñ\83 Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/timedate/org.freedesktop.timedate1.policy:33
 msgid "Set system timezone"
-msgstr "УÑ\81Ñ\82алÑ\8fваÑ\86Ñ\8c Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмнÑ\8b часавы пояс"
+msgstr "Ð\9dаладзÑ\96Ñ\86Ñ\8c часавы пояс"
 
 #: src/timedate/org.freedesktop.timedate1.policy:34
 msgid "Authentication is required to set the system timezone."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eÑ\81Ñ\82алÑ\8fваннÑ\8f Ñ\81Ñ\96Ñ\81Ñ\82Ñ\8dмнага Ñ\87аÑ\81авога Ð¿Ð¾Ñ\8fÑ\81Ñ\83."
+msgstr "Ð\94лÑ\8f Ð½Ð°Ð»Ð°Ð´ÐºÑ\96 Ñ\87аÑ\81авога Ð¿Ð¾Ñ\8fÑ\81а Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/timedate/org.freedesktop.timedate1.policy:43
 msgid "Set RTC to local timezone or UTC"
-msgstr "УÑ\81Ñ\82алÑ\8fваÑ\86Ñ\8c Ñ\87аÑ\81авÑ\8b Ð¿Ð¾Ñ\8fÑ\81 (мÑ\8fÑ\81Ñ\86овÑ\8b Ð°Ð±Ð¾ UTC), Ñ\83 Ñ\8fкÑ\96м RTC Ð·Ð°Ñ\85оÑ\9eвае Ñ\87аÑ\81"
+msgstr "Ð\9dаладзÑ\96Ñ\86Ñ\8c Ð°Ð¿Ð°Ñ\80аÑ\82нÑ\8b Ð³Ð°Ð´Ð·Ñ\96ннÑ\96к Ð½Ð° Ð¼Ñ\8fÑ\81Ñ\86овÑ\8b Ñ\87аÑ\81 Ð°Ð»Ñ\8cбо UTC"
 
 #: src/timedate/org.freedesktop.timedate1.policy:44
 msgid ""
 "Authentication is required to control whether the RTC stores the local or "
 "UTC time."
-msgstr ""
-"Неабходна аўтэнтыфікацыя для ўсталявання часавога поясу (мясцовы або UTC), у "
-"якім захоўваецца час у RTC."
+msgstr "Для наладкі апаратнага гадзінніка патрабуецца аўтэнтыфікацыя."
 
 #: src/timedate/org.freedesktop.timedate1.policy:53
 msgid "Turn network time synchronization on or off"
@@ -964,57 +890,57 @@ msgid ""
 "Authentication is required to control whether network time synchronization "
 "shall be enabled."
 msgstr ""
-"Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eклÑ\8eÑ\87Ñ\8dннÑ\8f Ð°Ð±Ð¾ Ð²Ñ\8bклÑ\8eÑ\87Ñ\8dннÑ\8f Ñ\81Ñ\96нÑ\85Ñ\80анÑ\96заÑ\86Ñ\8bÑ\96 Ñ\87аÑ\81Ñ\83 Ð¿а "
-"сетцы."
+"Ð\94лÑ\8f Ñ\9eклÑ\8eÑ\87Ñ\8dннÑ\8f Ð°Ð±Ð¾ Ð²Ñ\8bклÑ\8eÑ\87Ñ\8dннÑ\8f Ñ\81Ñ\96нÑ\85Ñ\80анÑ\96заÑ\86Ñ\8bÑ\96 Ñ\87аÑ\81Ñ\83 Ð¿Ð° Ñ\81еÑ\82Ñ\86Ñ\8b Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а "
+"аўтэнтыфікацыя."
 
 #: src/core/dbus-unit.c:362
 msgid "Authentication is required to start '$(unit)'."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð·Ð°Ð¿Ñ\83Ñ\81кÑ\83 '$(unit)'."
+msgstr "Ð\94лÑ\8f Ð·Ð°Ð¿Ñ\83Ñ\81кÑ\83 \"$(unit)\" Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/core/dbus-unit.c:363
 msgid "Authentication is required to stop '$(unit)'."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\81пÑ\8bненнÑ\8f '$(unit)'."
+msgstr "Ð\94лÑ\8f Ñ\81пÑ\8bненнÑ\8f \"$(unit)\" Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/core/dbus-unit.c:364
 msgid "Authentication is required to reload '$(unit)'."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð¿ÐµÑ\80аÑ\87Ñ\8bÑ\82аннÑ\8f Ñ\81Ñ\82анÑ\83 '$(unit)'."
+msgstr "Ð\94лÑ\8f Ð¿ÐµÑ\80аÑ\87Ñ\8bÑ\82аннÑ\8f Ñ\81Ñ\82анÑ\83 \"$(unit)\" Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/core/dbus-unit.c:365 src/core/dbus-unit.c:366
 msgid "Authentication is required to restart '$(unit)'."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ð¿ÐµÑ\80азапÑ\83Ñ\81кÑ\83 '$(unit)'."
+msgstr "Ð\94лÑ\8f Ð¿ÐµÑ\80азапÑ\83Ñ\81кÑ\83 \"$(unit)\" Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/core/dbus-unit.c:538
-#, fuzzy
-#| msgid "Authentication is required to set properties on '$(unit)'."
 msgid ""
 "Authentication is required to send a UNIX signal to the processes of "
 "'$(unit)'."
-msgstr "Неабходна аўтэнтыфікацыя для ўсталявання ўласцівасцей '$(unit)'."
+msgstr ""
+"Для адпраўкі сігналу UNIX працэсам адзінкі \"$(unit)\" патрабуецца "
+"аўтэнтыфікацыя."
 
 #: src/core/dbus-unit.c:569
 msgid "Authentication is required to reset the \"failed\" state of '$(unit)'."
-msgstr "Неабходна аўтэнтыфікацыя для анулявання памылковага стану '$(unit)'."
+msgstr ""
+"Для таго, каб скінуць стан \"failed\" у \"$(unit)\", патрабуецца "
+"аўтэнтыфікацыя."
 
 #: src/core/dbus-unit.c:602
 msgid "Authentication is required to set properties on '$(unit)'."
-msgstr "Ð\9dеабÑ\85одна Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f Ð´Ð»Ñ\8f Ñ\9eÑ\81Ñ\82алÑ\8fваннÑ\8f Ñ\9eлаÑ\81Ñ\86Ñ\96ваÑ\81Ñ\86ей '$(unit)'."
+msgstr "Ð\94лÑ\8f Ð·Ð¼ÐµÐ½Ñ\8b Ñ\9eлаÑ\81Ñ\86Ñ\96ваÑ\81Ñ\86ей \"$(unit)\" Ð¿Ð°Ñ\82Ñ\80абÑ\83еÑ\86Ñ\86а Ð°Ñ\9eÑ\82Ñ\8dнÑ\82Ñ\8bÑ\84Ñ\96каÑ\86Ñ\8bÑ\8f."
 
 #: src/core/dbus-unit.c:711
-#, fuzzy
-#| msgid ""
-#| "Authentication is required to reset the \"failed\" state of '$(unit)'."
 msgid ""
 "Authentication is required to delete files and directories associated with "
 "'$(unit)'."
-msgstr "Неабходна аўтэнтыфікацыя для анулявання памылковага стану '$(unit)'."
+msgstr ""
+"Для выдалення файлаў і каталогаў, якія звязаныя з \"$(unit)\", патрабуецца "
+"аўтэнтыфікацыя."
 
 #: src/core/dbus-unit.c:760
-#, fuzzy
-#| msgid ""
-#| "Authentication is required to reset the \"failed\" state of '$(unit)'."
 msgid ""
 "Authentication is required to freeze or thaw the processes of '$(unit)' unit."
-msgstr "Неабходна аўтэнтыфікацыя для анулявання памылковага стану '$(unit)'."
+msgstr ""
+"Для спынення альбо ўзнаўлення працэсаў \"$(unit)\" патрабуецца "
+"аўтэнтыфікацыя."
 
 #~ msgid "Authentication is required to kill '$(unit)'."
 #~ msgstr "Неабходна аўтэнтыфікацыя для забойства '$(unit)'."
index ff570070420bb31ccf80a41fee83102cb5e126dd..4e80e8ee71e26e68fcfe1f49e9b4b7ab46b01625 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Belarusian translation for systemd.
 #
index cb7eaacf369936195901a6e3b643663aa617d4ab..0859b09737aa670ac3ed1fab7ed927291c5dd021 100644 (file)
--- a/po/bg.po
+++ b/po/bg.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Bulgarian translation of systemd po-file.
 # Copyright © 2016 Alexander Shopov <ash@kambanaria.org>
index 76b2c60b8ffc13aea04823608d207afdbfb9fc21..fcbdb23ae579ecf556f9358ababfb71f6fcf3796 100644 (file)
--- a/po/ca.po
+++ b/po/ca.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Catalan translation for systemd.
 # Walter Garcia-Fontes <walter.garcia@upf.edu>, 2016.
index ee48ee72ebaa6e45cdc1497a4364734b10d9c705..abc618857988e5784842ad50bd447f265157653b 100644 (file)
--- a/po/cs.po
+++ b/po/cs.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Czech translation for systemd.
 # Daniel Maixner <xskipy@gmail.com>, 2016.
@@ -6,9 +6,9 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: systemd master\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-08-19 18:02+0200\n"
-"PO-Revision-Date: 2020-07-01 16:40+0200\n"
+"Report-Msgid-Bugs-To: https://github.com/systemd/systemd/issues\n"
+"POT-Creation-Date: 2020-09-10 03:33+0000\n"
+"PO-Revision-Date: 2020-10-26 22:48+0100\n"
 "Last-Translator: Daniel Rusek <mail@asciiwolf.com>\n"
 "Language-Team: Czech\n"
 "Language: cs\n"
@@ -17,7 +17,7 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Generator: Poedit 2.3.1\n"
+"X-Generator: Poedit 2.4.1\n"
 
 #: src/core/org.freedesktop.systemd1.policy.in:22
 msgid "Send passphrase back to system"
@@ -295,53 +295,67 @@ msgstr ""
 "ověření."
 
 #: src/login/org.freedesktop.login1.policy:117
+msgid "Allow applications to inhibit system handling of the reboot key"
+msgstr ""
+"Povolit aplikacím zakázat chovaní systému na stisknutí restartovacího "
+"tlačítka"
+
+#: src/login/org.freedesktop.login1.policy:118
+msgid ""
+"Authentication is required for an application to inhibit system handling of "
+"the reboot key."
+msgstr ""
+"Pro povolení aplikacím zakázat chovaní systému na stisknutí restartovacího "
+"tlačítka je vyžadováno ověření."
+
+#: src/login/org.freedesktop.login1.policy:128
 msgid "Allow non-logged-in user to run programs"
 msgstr "Povolit nepřihlášenému uživateli spouštět programy"
 
-#: src/login/org.freedesktop.login1.policy:118
+#: src/login/org.freedesktop.login1.policy:129
 msgid "Explicit request is required to run programs as a non-logged-in user."
 msgstr ""
 "Ke spuštění programů jako nepřihlášený uživatel je třeba speciální požadavek."
 
-#: src/login/org.freedesktop.login1.policy:127
+#: src/login/org.freedesktop.login1.policy:138
 msgid "Allow non-logged-in users to run programs"
 msgstr "Povolit nepřihlášeným uživatelům spouštět programy"
 
-#: src/login/org.freedesktop.login1.policy:128
+#: src/login/org.freedesktop.login1.policy:139
 msgid "Authentication is required to run programs as a non-logged-in user."
 msgstr "Ke spuštění programů jako nepřihlášený uživatel je vyžadováno ověření."
 
-#: src/login/org.freedesktop.login1.policy:137
+#: src/login/org.freedesktop.login1.policy:148
 msgid "Allow attaching devices to seats"
 msgstr "Povolit připojování zařízení ke stanovištím"
 
-#: src/login/org.freedesktop.login1.policy:138
+#: src/login/org.freedesktop.login1.policy:149
 msgid "Authentication is required to attach a device to a seat."
 msgstr "Pro připojování zařízení ke stanovišti je vyžadováno ověření."
 
-#: src/login/org.freedesktop.login1.policy:148
+#: src/login/org.freedesktop.login1.policy:159
 msgid "Flush device to seat attachments"
 msgstr "Odstranit přiřazení zařízení ke stanovištím"
 
-#: src/login/org.freedesktop.login1.policy:149
+#: src/login/org.freedesktop.login1.policy:160
 msgid "Authentication is required to reset how devices are attached to seats."
 msgstr ""
 "Pro resetování způsobu jak jsou zařízení přiřazována ke stanovištím je "
 "vyžadováno ověření."
 
-#: src/login/org.freedesktop.login1.policy:158
+#: src/login/org.freedesktop.login1.policy:169
 msgid "Power off the system"
 msgstr "Vypnout systém"
 
-#: src/login/org.freedesktop.login1.policy:159
+#: src/login/org.freedesktop.login1.policy:170
 msgid "Authentication is required to power off the system."
 msgstr "Pro vypnutí systému je vyžadováno ověření."
 
-#: src/login/org.freedesktop.login1.policy:169
+#: src/login/org.freedesktop.login1.policy:180
 msgid "Power off the system while other users are logged in"
 msgstr "Vypnout systém, i když jsou přihlášeni další uživatelé"
 
-#: src/login/org.freedesktop.login1.policy:170
+#: src/login/org.freedesktop.login1.policy:181
 msgid ""
 "Authentication is required to power off the system while other users are "
 "logged in."
@@ -349,11 +363,11 @@ msgstr ""
 "Pro vypnutí systému, když jsou přihlášeni další uživatelé je vyžadováno "
 "ověření."
 
-#: src/login/org.freedesktop.login1.policy:180
+#: src/login/org.freedesktop.login1.policy:191
 msgid "Power off the system while an application is inhibiting this"
 msgstr "Vypnout systém, i když aplikace požádala o zákaz vypnutí"
 
-#: src/login/org.freedesktop.login1.policy:181
+#: src/login/org.freedesktop.login1.policy:192
 msgid ""
 "Authentication is required to power off the system while an application is "
 "inhibiting this."
@@ -361,19 +375,19 @@ msgstr ""
 "Pro vypnutí systému, když aplikace požádala o zákaz vypnutí je vyžadováno "
 "ověření."
 
-#: src/login/org.freedesktop.login1.policy:191
+#: src/login/org.freedesktop.login1.policy:202
 msgid "Reboot the system"
 msgstr "Restartovat systém"
 
-#: src/login/org.freedesktop.login1.policy:192
+#: src/login/org.freedesktop.login1.policy:203
 msgid "Authentication is required to reboot the system."
 msgstr "Pro restartování systému je vyžadováno ověření."
 
-#: src/login/org.freedesktop.login1.policy:202
+#: src/login/org.freedesktop.login1.policy:213
 msgid "Reboot the system while other users are logged in"
 msgstr "Restartovat systém, i když jsou přihlášeni další uživatelé"
 
-#: src/login/org.freedesktop.login1.policy:203
+#: src/login/org.freedesktop.login1.policy:214
 msgid ""
 "Authentication is required to reboot the system while other users are logged "
 "in."
@@ -381,11 +395,11 @@ msgstr ""
 "Pro restartování systému, když jsou přihlášeni další uživatelé je vyžadováno "
 "ověření."
 
-#: src/login/org.freedesktop.login1.policy:213
+#: src/login/org.freedesktop.login1.policy:224
 msgid "Reboot the system while an application is inhibiting this"
 msgstr "Restartovat systém, i když aplikace požádala o zákaz restartu"
 
-#: src/login/org.freedesktop.login1.policy:214
+#: src/login/org.freedesktop.login1.policy:225
 msgid ""
 "Authentication is required to reboot the system while an application is "
 "inhibiting this."
@@ -393,19 +407,19 @@ msgstr ""
 "Pro restartování systému, když aplikace požádala o zákaz restartu je "
 "vyžadováno ověření."
 
-#: src/login/org.freedesktop.login1.policy:224
+#: src/login/org.freedesktop.login1.policy:235
 msgid "Halt the system"
 msgstr "Zastavit systém"
 
-#: src/login/org.freedesktop.login1.policy:225
+#: src/login/org.freedesktop.login1.policy:236
 msgid "Authentication is required to halt the system."
 msgstr "Pro zastavení systému je vyžadováno ověření."
 
-#: src/login/org.freedesktop.login1.policy:235
+#: src/login/org.freedesktop.login1.policy:246
 msgid "Halt the system while other users are logged in"
 msgstr "Zastavit systém, i když jsou přihlášeni další uživatelé"
 
-#: src/login/org.freedesktop.login1.policy:236
+#: src/login/org.freedesktop.login1.policy:247
 msgid ""
 "Authentication is required to halt the system while other users are logged "
 "in."
@@ -413,11 +427,11 @@ msgstr ""
 "Pro zastavení systému, když jsou přihlášeni další uživatelé je vyžadováno "
 "ověření."
 
-#: src/login/org.freedesktop.login1.policy:246
+#: src/login/org.freedesktop.login1.policy:257
 msgid "Halt the system while an application is inhibiting this"
 msgstr "Zastavit systém, i když aplikace požádala o zákaz zastavení"
 
-#: src/login/org.freedesktop.login1.policy:247
+#: src/login/org.freedesktop.login1.policy:258
 msgid ""
 "Authentication is required to halt the system while an application is "
 "inhibiting this."
@@ -425,19 +439,19 @@ msgstr ""
 "Pro zastavení systému, když aplikace požádala o zákaz zastavení je "
 "vyžadováno ověření."
 
-#: src/login/org.freedesktop.login1.policy:257
+#: src/login/org.freedesktop.login1.policy:268
 msgid "Suspend the system"
 msgstr "Uspat systém"
 
-#: src/login/org.freedesktop.login1.policy:258
+#: src/login/org.freedesktop.login1.policy:269
 msgid "Authentication is required to suspend the system."
 msgstr "Pro uspání systému je vyžadováno ověření."
 
-#: src/login/org.freedesktop.login1.policy:267
+#: src/login/org.freedesktop.login1.policy:278
 msgid "Suspend the system while other users are logged in"
 msgstr "Uspat systém, i když jsou přihlášeni další uživatelé"
 
-#: src/login/org.freedesktop.login1.policy:268
+#: src/login/org.freedesktop.login1.policy:279
 msgid ""
 "Authentication is required to suspend the system while other users are "
 "logged in."
@@ -445,11 +459,11 @@ msgstr ""
 "Pro uspání systému, když jsou přihlášeni další uživatelé je vyžadováno "
 "ověření."
 
-#: src/login/org.freedesktop.login1.policy:278
+#: src/login/org.freedesktop.login1.policy:289
 msgid "Suspend the system while an application is inhibiting this"
 msgstr "Uspat systém, i když aplikace požádala o zákaz uspání"
 
-#: src/login/org.freedesktop.login1.policy:279
+#: src/login/org.freedesktop.login1.policy:290
 msgid ""
 "Authentication is required to suspend the system while an application is "
 "inhibiting this."
@@ -457,19 +471,19 @@ msgstr ""
 "Pro uspání systému, když aplikace požádala o zákaz uspání je vyžadováno "
 "ověření."
 
-#: src/login/org.freedesktop.login1.policy:289
+#: src/login/org.freedesktop.login1.policy:300
 msgid "Hibernate the system"
 msgstr "Hibernovat systém"
 
-#: src/login/org.freedesktop.login1.policy:290
+#: src/login/org.freedesktop.login1.policy:301
 msgid "Authentication is required to hibernate the system."
 msgstr "Pro hibernaci systému je vyžadováno ověření."
 
-#: src/login/org.freedesktop.login1.policy:299
+#: src/login/org.freedesktop.login1.policy:310
 msgid "Hibernate the system while other users are logged in"
 msgstr "Hibernovat systém, i když jsou přihlášeni další uživatelé"
 
-#: src/login/org.freedesktop.login1.policy:300
+#: src/login/org.freedesktop.login1.policy:311
 msgid ""
 "Authentication is required to hibernate the system while other users are "
 "logged in."
@@ -477,11 +491,11 @@ msgstr ""
 "Pro hibernaci systému, když jsou přihlášeni další uživatelé je vyžadováno "
 "ověření."
 
-#: src/login/org.freedesktop.login1.policy:310
+#: src/login/org.freedesktop.login1.policy:321
 msgid "Hibernate the system while an application is inhibiting this"
 msgstr "Hibernovat systém, i když aplikace požádala o zákaz hibernace"
 
-#: src/login/org.freedesktop.login1.policy:311
+#: src/login/org.freedesktop.login1.policy:322
 msgid ""
 "Authentication is required to hibernate the system while an application is "
 "inhibiting this."
@@ -489,36 +503,36 @@ msgstr ""
 "Pro hibernaci systému, když aplikace požádala o zákaz hibernace je "
 "vyžadováno ověření."
 
-#: src/login/org.freedesktop.login1.policy:321
+#: src/login/org.freedesktop.login1.policy:332
 msgid "Manage active sessions, users and seats"
 msgstr "Spravovat aktivní sezení, uživatele a stanoviště"
 
-#: src/login/org.freedesktop.login1.policy:322
+#: src/login/org.freedesktop.login1.policy:333
 msgid "Authentication is required to manage active sessions, users and seats."
 msgstr ""
 "Pro správu aktivních sezení, uživatelů a stanovišť je vyžadováno ověření."
 
-#: src/login/org.freedesktop.login1.policy:331
+#: src/login/org.freedesktop.login1.policy:342
 msgid "Lock or unlock active sessions"
 msgstr "Zamknout nebo odemknout aktivní sezení"
 
-#: src/login/org.freedesktop.login1.policy:332
+#: src/login/org.freedesktop.login1.policy:343
 msgid "Authentication is required to lock or unlock active sessions."
 msgstr "Pro zamčení nebo odemčení aktivních sezení je vyžadováno ověření."
 
-#: src/login/org.freedesktop.login1.policy:341
+#: src/login/org.freedesktop.login1.policy:352
 msgid "Set the reboot \"reason\" in the kernel"
 msgstr "Nastavit \"důvod\" rebootu v jádře"
 
-#: src/login/org.freedesktop.login1.policy:342
+#: src/login/org.freedesktop.login1.policy:353
 msgid "Authentication is required to set the reboot \"reason\" in the kernel."
 msgstr "Pro nastavení \"důvodu\" rebootu v jádře je vyžadováno ověření."
 
-#: src/login/org.freedesktop.login1.policy:352
+#: src/login/org.freedesktop.login1.policy:363
 msgid "Indicate to the firmware to boot to setup interface"
 msgstr "Indikovat firmwaru, aby bootoval do instalačního prostředí"
 
-#: src/login/org.freedesktop.login1.policy:353
+#: src/login/org.freedesktop.login1.policy:364
 msgid ""
 "Authentication is required to indicate to the firmware to boot to setup "
 "interface."
@@ -526,41 +540,41 @@ msgstr ""
 "K indikaci firmwaru, aby bootoval do instalačního prostředí je vyžadováno "
 "ověření."
 
-#: src/login/org.freedesktop.login1.policy:363
+#: src/login/org.freedesktop.login1.policy:374
 msgid "Indicate to the boot loader to boot to the boot loader menu"
 msgstr "Indikovat zavaděči, aby bootoval do menu zavaděče"
 
-#: src/login/org.freedesktop.login1.policy:364
+#: src/login/org.freedesktop.login1.policy:375
 msgid ""
 "Authentication is required to indicate to the boot loader to boot to the "
 "boot loader menu."
 msgstr ""
 "K indikaci zavaděči, aby bootoval do menu zavaděče je vyžadováno ověření."
 
-#: src/login/org.freedesktop.login1.policy:374
+#: src/login/org.freedesktop.login1.policy:385
 msgid "Indicate to the boot loader to boot a specific entry"
 msgstr "Indikovat zavaděči, aby bootoval specifickou položku"
 
-#: src/login/org.freedesktop.login1.policy:375
+#: src/login/org.freedesktop.login1.policy:386
 msgid ""
 "Authentication is required to indicate to the boot loader to boot into a "
 "specific boot loader entry."
 msgstr ""
 "K indikaci zavaděči, aby bootoval specifickou položku je vyžadováno ověření."
 
-#: src/login/org.freedesktop.login1.policy:385
+#: src/login/org.freedesktop.login1.policy:396
 msgid "Set a wall message"
 msgstr "Nastavit zprávu všem uživatelům"
 
-#: src/login/org.freedesktop.login1.policy:386
+#: src/login/org.freedesktop.login1.policy:397
 msgid "Authentication is required to set a wall message"
 msgstr "K nastavení zprávy všem uživatelům je vyžadováno ověření"
 
-#: src/login/org.freedesktop.login1.policy:395
+#: src/login/org.freedesktop.login1.policy:406
 msgid "Change Session"
 msgstr "Změnit sezení"
 
-#: src/login/org.freedesktop.login1.policy:396
+#: src/login/org.freedesktop.login1.policy:407
 msgid "Authentication is required to change the virtual terminal."
 msgstr "Pro změnu virtuálního terminálu je vyžadováno ověření."
 
@@ -861,37 +875,37 @@ msgid ""
 "shall be enabled."
 msgstr "Pro kontrolu synchronizace času ze sítě je vyžadováno ověření."
 
-#: src/core/dbus-unit.c:362
+#: src/core/dbus-unit.c:359
 msgid "Authentication is required to start '$(unit)'."
 msgstr "Pro spuštění „$(unit)” je vyžadováno ověření."
 
-#: src/core/dbus-unit.c:363
+#: src/core/dbus-unit.c:360
 msgid "Authentication is required to stop '$(unit)'."
 msgstr "Pro vypnutí „$(unit)” je vyžadováno ověření."
 
-#: src/core/dbus-unit.c:364
+#: src/core/dbus-unit.c:361
 msgid "Authentication is required to reload '$(unit)'."
 msgstr "Pro opětovné načtení „$(unit)” je vyžadováno ověření."
 
-#: src/core/dbus-unit.c:365 src/core/dbus-unit.c:366
+#: src/core/dbus-unit.c:362 src/core/dbus-unit.c:363
 msgid "Authentication is required to restart '$(unit)'."
 msgstr "Pro restart „$(unit)” je vyžadováno ověření."
 
-#: src/core/dbus-unit.c:538
+#: src/core/dbus-unit.c:535
 msgid ""
 "Authentication is required to send a UNIX signal to the processes of "
 "'$(unit)'."
 msgstr "Pro odeslání UNIX signálu procesům „$(unit)” je vyžadováno ověření."
 
-#: src/core/dbus-unit.c:569
+#: src/core/dbus-unit.c:566
 msgid "Authentication is required to reset the \"failed\" state of '$(unit)'."
 msgstr "Pro resetování chybného stavu „$(unit)” je vyžadováno ověření."
 
-#: src/core/dbus-unit.c:602
+#: src/core/dbus-unit.c:599
 msgid "Authentication is required to set properties on '$(unit)'."
 msgstr "Pro nastavení vlastností na „$(unit)” je vyžadováno ověření."
 
-#: src/core/dbus-unit.c:711
+#: src/core/dbus-unit.c:708
 msgid ""
 "Authentication is required to delete files and directories associated with "
 "'$(unit)'."
@@ -899,7 +913,7 @@ msgstr ""
 "Pro odstranění souborů nebo adresářů souvisejících s „$(unit)” je vyžadováno "
 "ověření."
 
-#: src/core/dbus-unit.c:760
+#: src/core/dbus-unit.c:757
 msgid ""
 "Authentication is required to freeze or thaw the processes of '$(unit)' unit."
 msgstr ""
index b3bf1b765e549fdce70dbc8c20c454b4ddbbaf5e..74ee78628153fd28af7354fa81032d92a18cfca5 100644 (file)
--- a/po/da.po
+++ b/po/da.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Danish translation for systemd.
 # Daniel Machon <dmachon.dev@gmail.com>, 2015.
@@ -86,7 +86,7 @@ msgstr "Der kræves godkendelse for at fjerne en brugers hjemmeområde."
 msgid "Check credentials of a home area"
 msgstr "Tjek loginoplysninger for et hjemmeområde"
 
-# www.freedesktop.org/wiki/Software/systemd/multiseat/
+# https://www.freedesktop.org/software/systemd/man/sd-login.html
 #: src/home/org.freedesktop.home1.policy:34
 msgid ""
 "Authentication is required to check credentials against a user's home area."
@@ -98,7 +98,7 @@ msgstr ""
 msgid "Update a home area"
 msgstr "Opdater et hjemmeområde"
 
-# www.freedesktop.org/wiki/Software/systemd/multiseat/
+# https://www.freedesktop.org/software/systemd/man/sd-login.html
 #: src/home/org.freedesktop.home1.policy:44
 msgid "Authentication is required to update a user's home area."
 msgstr "Der kræves godkendelse for at opdatere en brugers hjemmeområde."
@@ -116,7 +116,7 @@ msgstr ""
 msgid "Change password of a home area"
 msgstr "Skift adgangskode for et hjemmeområde"
 
-# www.freedesktop.org/wiki/Software/systemd/multiseat/
+# https://www.freedesktop.org/software/systemd/man/sd-login.html
 #: src/home/org.freedesktop.home1.policy:64
 msgid ""
 "Authentication is required to change the password of a user's home area."
@@ -315,22 +315,22 @@ msgstr ""
 "Der kræves godkendelse for at brugere, som ikke er logget ind, kan køre "
 "programmer."
 
-# www.freedesktop.org/wiki/Software/systemd/multiseat/
+# https://www.freedesktop.org/software/systemd/man/sd-login.html
 #: src/login/org.freedesktop.login1.policy:137
 msgid "Allow attaching devices to seats"
 msgstr "Tillad at montere af enheder til arbejdsstationer"
 
-# www.freedesktop.org/wiki/Software/systemd/multiseat/
+# https://www.freedesktop.org/software/systemd/man/sd-login.html
 #: src/login/org.freedesktop.login1.policy:138
 msgid "Authentication is required to attach a device to a seat."
 msgstr "Der kræves godkendelse for at montere en enhed til en arbejdsstation."
 
-# www.freedesktop.org/wiki/Software/systemd/multiseat/
+# https://www.freedesktop.org/software/systemd/man/sd-login.html
 #: src/login/org.freedesktop.login1.policy:148
 msgid "Flush device to seat attachments"
 msgstr "Nulstil enhed monteret til en arbejdsstation"
 
-# www.freedesktop.org/wiki/Software/systemd/multiseat/
+# https://www.freedesktop.org/software/systemd/man/sd-login.html
 #: src/login/org.freedesktop.login1.policy:149
 msgid "Authentication is required to reset how devices are attached to seats."
 msgstr ""
@@ -502,7 +502,7 @@ msgstr ""
 msgid "Manage active sessions, users and seats"
 msgstr "Håndter aktive sessioner, brugere og arbejdsstationer"
 
-# www.freedesktop.org/wiki/Software/systemd/multiseat/
+# https://www.freedesktop.org/software/systemd/man/sd-login.html
 #: src/login/org.freedesktop.login1.policy:322
 msgid "Authentication is required to manage active sessions, users and seats."
 msgstr ""
@@ -802,7 +802,7 @@ msgstr ""
 msgid "Attach or detach a portable service image"
 msgstr "Tilslut eller frakobl et transportabel tjeneste-aftryk"
 
-# www.freedesktop.org/wiki/Software/systemd/multiseat/
+# https://www.freedesktop.org/software/systemd/man/sd-login.html
 #: src/portable/org.freedesktop.portable1.policy:24
 msgid ""
 "Authentication is required to attach or detach a portable service image."
index eac78e71fb8eb7de4a023f413d90705e7e2d9beb..1b88d14e03e17fd8b98edceda6a7776eee28bcf9 100644 (file)
--- a/po/de.po
+++ b/po/de.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # German translation for systemd.
 # Christian Kirbach <Christian.Kirbach@gmail.com>, 2014, 2015.
@@ -94,7 +94,7 @@ msgstr "Legitimierung ist zum erneuten Laden des systemd-Zustands notwendig."
 msgid "Check credentials of a home area"
 msgstr ""
 
-# www.freedesktop.org/wiki/Software/systemd/multiseat/
+# https://www.freedesktop.org/software/systemd/man/sd-login.html
 #: src/home/org.freedesktop.home1.policy:34
 #, fuzzy
 #| msgid ""
@@ -109,7 +109,7 @@ msgstr ""
 msgid "Update a home area"
 msgstr ""
 
-# www.freedesktop.org/wiki/Software/systemd/multiseat/
+# https://www.freedesktop.org/software/systemd/man/sd-login.html
 #: src/home/org.freedesktop.home1.policy:44
 #, fuzzy
 #| msgid "Authentication is required to attach a device to a seat."
@@ -132,7 +132,7 @@ msgstr "Legitimierung ist zum Einstellen einer Nachricht an alle notwendig"
 msgid "Change password of a home area"
 msgstr ""
 
-# www.freedesktop.org/wiki/Software/systemd/multiseat/
+# https://www.freedesktop.org/software/systemd/man/sd-login.html
 #: src/home/org.freedesktop.home1.policy:64
 #, fuzzy
 #| msgid ""
@@ -364,24 +364,24 @@ msgstr ""
 "Legitimierung ist erforderlich, damit nicht angemeldete Benutzer Programme "
 "ausführen dürfen."
 
-# www.freedesktop.org/wiki/Software/systemd/multiseat/
+# https://www.freedesktop.org/software/systemd/man/sd-login.html
 #: src/login/org.freedesktop.login1.policy:137
 msgid "Allow attaching devices to seats"
 msgstr "Das Anschließen von Geräten an Arbeitsstationen erlauben"
 
-# www.freedesktop.org/wiki/Software/systemd/multiseat/
+# https://www.freedesktop.org/software/systemd/man/sd-login.html
 #: src/login/org.freedesktop.login1.policy:138
 msgid "Authentication is required to attach a device to a seat."
 msgstr ""
 "Legitimierung ist zum Anschließen eines Geräts an eine Arbeitsstation "
 "notwendig."
 
-# www.freedesktop.org/wiki/Software/systemd/multiseat/
+# https://www.freedesktop.org/software/systemd/man/sd-login.html
 #: src/login/org.freedesktop.login1.policy:148
 msgid "Flush device to seat attachments"
 msgstr "Zurücksetzen der an eine Arbeitsstation angeschlossenen Geräte"
 
-# www.freedesktop.org/wiki/Software/systemd/multiseat/
+# https://www.freedesktop.org/software/systemd/man/sd-login.html
 #: src/login/org.freedesktop.login1.policy:149
 msgid "Authentication is required to reset how devices are attached to seats."
 msgstr ""
@@ -584,7 +584,7 @@ msgstr ""
 msgid "Manage active sessions, users and seats"
 msgstr "Aktive Sitzungen, Benutzer und Arbeitsstationen verwalten"
 
-# www.freedesktop.org/wiki/Software/systemd/multiseat/
+# https://www.freedesktop.org/software/systemd/man/sd-login.html
 #: src/login/org.freedesktop.login1.policy:322
 msgid "Authentication is required to manage active sessions, users and seats."
 msgstr ""
@@ -941,7 +941,7 @@ msgstr ""
 msgid "Attach or detach a portable service image"
 msgstr ""
 
-# www.freedesktop.org/wiki/Software/systemd/multiseat/
+# https://www.freedesktop.org/software/systemd/man/sd-login.html
 #: src/portable/org.freedesktop.portable1.policy:24
 #, fuzzy
 #| msgid "Authentication is required to attach a device to a seat."
index 535216f11cdb1889f34d061aefcc9115d86547de..fa581d9a91d353308e523df83dcb6b6fae7a0e27 100644 (file)
--- a/po/el.po
+++ b/po/el.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Greek translation for systemd.
 # Dimitris Spingos <dmtrs32@gmail.com>, 2014.
index d1bcd18db8dbfecb35899628cdaac0707da1b54b..9d92545da3c066eb40ea44c9493df33b402e959a 100644 (file)
--- a/po/es.po
+++ b/po/es.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Spanish translation for systemd.
 # Alex Puchades <alex94puchades@gmail.com>, 2015.
index d54de1e8e03be745433a06361ab0f7c5ceda4d32..a5f65ae7fd5e6d44f1e5ce4fd38233863024595c 100644 (file)
--- a/po/fr.po
+++ b/po/fr.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # French translations for systemd package
 # Traductions françaises du paquet systemd.
index d58c49342751775151f93257f45ecb3c82c1b439..4843e21c49eb42cbb7627c9e3d73ff28d871488f 100644 (file)
--- a/po/gl.po
+++ b/po/gl.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Fran Dieguez <frandieguez@gnome.org>, 2015.
 msgid ""
index 6cf7e8a05b5c5b6ebc22233c55b68c2d8a8b2342..23704ce95c5882267b3d5b295ffd917ccf672f8a 100644 (file)
--- a/po/hr.po
+++ b/po/hr.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # SOME DESCRIPTIVE TITLE.
 # This file is distributed under the same license as the PACKAGE package.
index d36bb4baad6c91fb95df5021a434ef09e257259a..0c8bb93ab2db35dd017ae3542a78f0b942ad5040 100644 (file)
--- a/po/hu.po
+++ b/po/hu.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Hungarian translation of systemd
 # Copyright © 2015, 2016. Free Software Foundation, Inc.
index 06268b308d641ff549723aa20960489354a8c869..3e5fb7a51d0fce0786a84eaf83a82f0298e9576f 100644 (file)
--- a/po/id.po
+++ b/po/id.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Indonesian translation for systemd.
 # Andika Triwidada <andika@gmail.com>, 2014.
index 1c1c6a40d0cf32627b6b81277a60c6f68d8739d6..595e4868ae9f8eef6eadbb5127c8f399699bc17e 100644 (file)
--- a/po/it.po
+++ b/po/it.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Italian translation for systemd package
 # Traduzione in italiano per il pacchetto systemd
index 54cccac9d4b20cc4ed488c81abe08379216ca5a6..7e55f1efcfb1c1d2f00e161e93fc52658501e7d3 100644 (file)
--- a/po/ja.po
+++ b/po/ja.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Japanese translation for systemd.
 #
index c4c4bd9747e6b96b8c1a9f9aea02215f1ab235e9..a5e3dbc3894f9ad7ea7abb0e2ce755c2a52cbd0d 100644 (file)
--- a/po/ko.po
+++ b/po/ko.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Korean translation for the systemd.
 # Seong-ho Cho <shcho@gnome.org>, 2015.
index 3611ac90f12c8b501b6260f4fa69c06ebf89ae0d..193f614f4fb47586357803963bc86912dfe79e2e 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 i18n = import('i18n')
 i18n.gettext(meson.project_name(),
index 37c8ca7e395547b5d3efd5c9ca0237027df1494b..b4b3912a5b5cd611e662c890025e10cfab13b1b4 100644 (file)
--- a/po/pl.po
+++ b/po/pl.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Polish translation for systemd.
 #
@@ -6,8 +6,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: systemd\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-08-19 18:02+0200\n"
-"PO-Revision-Date: 2020-05-03 13:50+0200\n"
+"POT-Creation-Date: 2020-09-10 03:33+0000\n"
+"PO-Revision-Date: 2020-10-18 13:10+0200\n"
 "Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n"
 "Language-Team: Polish <trans-pl@lists.fedoraproject.org>\n"
 "Language: pl\n"
@@ -309,57 +309,71 @@ msgstr ""
 "przez system."
 
 #: src/login/org.freedesktop.login1.policy:117
+msgid "Allow applications to inhibit system handling of the reboot key"
+msgstr ""
+"Zezwolenie programom na wstrzymanie obsługi klawisza ponownego uruchomienia "
+"przez system"
+
+#: src/login/org.freedesktop.login1.policy:118
+msgid ""
+"Authentication is required for an application to inhibit system handling of "
+"the reboot key."
+msgstr ""
+"Program wymaga uwierzytelnienia, aby wstrzymać obsługę klawisza ponownego "
+"uruchomienia przez system."
+
+#: src/login/org.freedesktop.login1.policy:128
 msgid "Allow non-logged-in user to run programs"
 msgstr "Zezwolenie niezalogowanemu użytkownikowi na uruchamianie programów"
 
-#: src/login/org.freedesktop.login1.policy:118
+#: src/login/org.freedesktop.login1.policy:129
 msgid "Explicit request is required to run programs as a non-logged-in user."
 msgstr ""
 "Wymagane jest bezpośrednie żądanie, aby uruchamiać programy jako "
 "niezalogowany użytkownik."
 
-#: src/login/org.freedesktop.login1.policy:127
+#: src/login/org.freedesktop.login1.policy:138
 msgid "Allow non-logged-in users to run programs"
 msgstr "Zezwolenie niezalogowanym użytkownikom na uruchamianie programów"
 
-#: src/login/org.freedesktop.login1.policy:128
+#: src/login/org.freedesktop.login1.policy:139
 msgid "Authentication is required to run programs as a non-logged-in user."
 msgstr ""
 "Wymagane jest uwierzytelnienie, aby uruchamiać programy jako niezalogowany "
 "użytkownik."
 
-#: src/login/org.freedesktop.login1.policy:137
+#: src/login/org.freedesktop.login1.policy:148
 msgid "Allow attaching devices to seats"
 msgstr "Zezwolenie na podłączanie urządzeń do stanowisk"
 
-#: src/login/org.freedesktop.login1.policy:138
+#: src/login/org.freedesktop.login1.policy:149
 msgid "Authentication is required to attach a device to a seat."
 msgstr ""
 "Wymagane jest uwierzytelnienie, aby podłączyć urządzenie do stanowiska."
 
-#: src/login/org.freedesktop.login1.policy:148
+#: src/login/org.freedesktop.login1.policy:159
 msgid "Flush device to seat attachments"
 msgstr "Usunięcie podłączenia urządzeń do stanowisk"
 
-#: src/login/org.freedesktop.login1.policy:149
+#: src/login/org.freedesktop.login1.policy:160
 msgid "Authentication is required to reset how devices are attached to seats."
 msgstr ""
 "Wymagane jest uwierzytelnienie, aby ponownie ustawić sposób podłączenia "
 "urządzeń do stanowisk."
 
-#: src/login/org.freedesktop.login1.policy:158
+#: src/login/org.freedesktop.login1.policy:169
 msgid "Power off the system"
 msgstr "Wyłączenie systemu"
 
-#: src/login/org.freedesktop.login1.policy:159
+#: src/login/org.freedesktop.login1.policy:170
 msgid "Authentication is required to power off the system."
 msgstr "Wymagane jest uwierzytelnienie, aby wyłączyć system."
 
-#: src/login/org.freedesktop.login1.policy:169
+#: src/login/org.freedesktop.login1.policy:180
 msgid "Power off the system while other users are logged in"
 msgstr "Wyłączenie systemu, kiedy są zalogowani inni użytkownicy"
 
-#: src/login/org.freedesktop.login1.policy:170
+#: src/login/org.freedesktop.login1.policy:181
 msgid ""
 "Authentication is required to power off the system while other users are "
 "logged in."
@@ -367,11 +381,11 @@ msgstr ""
 "Wymagane jest uwierzytelnienie, aby wyłączyć system, kiedy są zalogowani "
 "inni użytkownicy."
 
-#: src/login/org.freedesktop.login1.policy:180
+#: src/login/org.freedesktop.login1.policy:191
 msgid "Power off the system while an application is inhibiting this"
 msgstr "Wyłączenie systemu, kiedy program je wstrzymuje"
 
-#: src/login/org.freedesktop.login1.policy:181
+#: src/login/org.freedesktop.login1.policy:192
 msgid ""
 "Authentication is required to power off the system while an application is "
 "inhibiting this."
@@ -379,19 +393,19 @@ msgstr ""
 "Wymagane jest uwierzytelnienie, aby wyłączyć system, kiedy program to "
 "wstrzymuje."
 
-#: src/login/org.freedesktop.login1.policy:191
+#: src/login/org.freedesktop.login1.policy:202
 msgid "Reboot the system"
 msgstr "Ponowne uruchomienie systemu"
 
-#: src/login/org.freedesktop.login1.policy:192
+#: src/login/org.freedesktop.login1.policy:203
 msgid "Authentication is required to reboot the system."
 msgstr "Wymagane jest uwierzytelnienie, aby ponownie uruchomić system."
 
-#: src/login/org.freedesktop.login1.policy:202
+#: src/login/org.freedesktop.login1.policy:213
 msgid "Reboot the system while other users are logged in"
 msgstr "Ponowne uruchomienie systemu, kiedy są zalogowani inni użytkownicy"
 
-#: src/login/org.freedesktop.login1.policy:203
+#: src/login/org.freedesktop.login1.policy:214
 msgid ""
 "Authentication is required to reboot the system while other users are logged "
 "in."
@@ -399,11 +413,11 @@ msgstr ""
 "Wymagane jest uwierzytelnienie, aby ponownie uruchomić system, kiedy są "
 "zalogowani inni użytkownicy."
 
-#: src/login/org.freedesktop.login1.policy:213
+#: src/login/org.freedesktop.login1.policy:224
 msgid "Reboot the system while an application is inhibiting this"
 msgstr "Ponowne uruchomienie systemu, kiedy program je wstrzymuje"
 
-#: src/login/org.freedesktop.login1.policy:214
+#: src/login/org.freedesktop.login1.policy:225
 msgid ""
 "Authentication is required to reboot the system while an application is "
 "inhibiting this."
@@ -411,19 +425,19 @@ msgstr ""
 "Wymagane jest uwierzytelnienie, aby ponownie uruchomić system, kiedy program "
 "to wstrzymuje."
 
-#: src/login/org.freedesktop.login1.policy:224
+#: src/login/org.freedesktop.login1.policy:235
 msgid "Halt the system"
 msgstr "Zatrzymanie systemu"
 
-#: src/login/org.freedesktop.login1.policy:225
+#: src/login/org.freedesktop.login1.policy:236
 msgid "Authentication is required to halt the system."
 msgstr "Wymagane jest uwierzytelnienie, aby zatrzymać system."
 
-#: src/login/org.freedesktop.login1.policy:235
+#: src/login/org.freedesktop.login1.policy:246
 msgid "Halt the system while other users are logged in"
 msgstr "Zatrzymanie systemu, kiedy są zalogowani inni użytkownicy"
 
-#: src/login/org.freedesktop.login1.policy:236
+#: src/login/org.freedesktop.login1.policy:247
 msgid ""
 "Authentication is required to halt the system while other users are logged "
 "in."
@@ -431,11 +445,11 @@ msgstr ""
 "Wymagane jest uwierzytelnienie, aby zatrzymać system, kiedy są zalogowani "
 "inni użytkownicy."
 
-#: src/login/org.freedesktop.login1.policy:246
+#: src/login/org.freedesktop.login1.policy:257
 msgid "Halt the system while an application is inhibiting this"
 msgstr "Zatrzymanie systemu, kiedy program je wstrzymuje"
 
-#: src/login/org.freedesktop.login1.policy:247
+#: src/login/org.freedesktop.login1.policy:258
 msgid ""
 "Authentication is required to halt the system while an application is "
 "inhibiting this."
@@ -443,19 +457,19 @@ msgstr ""
 "Wymagane jest uwierzytelnienie, aby zatrzymać system, kiedy program to "
 "wstrzymuje."
 
-#: src/login/org.freedesktop.login1.policy:257
+#: src/login/org.freedesktop.login1.policy:268
 msgid "Suspend the system"
 msgstr "Uśpienie systemu"
 
-#: src/login/org.freedesktop.login1.policy:258
+#: src/login/org.freedesktop.login1.policy:269
 msgid "Authentication is required to suspend the system."
 msgstr "Wymagane jest uwierzytelnienie, aby uśpić system."
 
-#: src/login/org.freedesktop.login1.policy:267
+#: src/login/org.freedesktop.login1.policy:278
 msgid "Suspend the system while other users are logged in"
 msgstr "Uśpienie systemu, kiedy są zalogowani inni użytkownicy"
 
-#: src/login/org.freedesktop.login1.policy:268
+#: src/login/org.freedesktop.login1.policy:279
 msgid ""
 "Authentication is required to suspend the system while other users are "
 "logged in."
@@ -463,11 +477,11 @@ msgstr ""
 "Wymagane jest uwierzytelnienie, aby uśpić system, kiedy są zalogowani inni "
 "użytkownicy."
 
-#: src/login/org.freedesktop.login1.policy:278
+#: src/login/org.freedesktop.login1.policy:289
 msgid "Suspend the system while an application is inhibiting this"
 msgstr "Uśpienie systemu, kiedy program je wstrzymuje"
 
-#: src/login/org.freedesktop.login1.policy:279
+#: src/login/org.freedesktop.login1.policy:290
 msgid ""
 "Authentication is required to suspend the system while an application is "
 "inhibiting this."
@@ -475,19 +489,19 @@ msgstr ""
 "Wymagane jest uwierzytelnienie, aby uśpić system, kiedy program to "
 "wstrzymuje."
 
-#: src/login/org.freedesktop.login1.policy:289
+#: src/login/org.freedesktop.login1.policy:300
 msgid "Hibernate the system"
 msgstr "Hibernacja systemu"
 
-#: src/login/org.freedesktop.login1.policy:290
+#: src/login/org.freedesktop.login1.policy:301
 msgid "Authentication is required to hibernate the system."
 msgstr "Wymagane jest uwierzytelnienie, aby zahibernować system."
 
-#: src/login/org.freedesktop.login1.policy:299
+#: src/login/org.freedesktop.login1.policy:310
 msgid "Hibernate the system while other users are logged in"
 msgstr "Hibernacja systemu, kiedy są zalogowani inni użytkownicy"
 
-#: src/login/org.freedesktop.login1.policy:300
+#: src/login/org.freedesktop.login1.policy:311
 msgid ""
 "Authentication is required to hibernate the system while other users are "
 "logged in."
@@ -495,11 +509,11 @@ msgstr ""
 "Wymagane jest uwierzytelnienie, aby zahibernować system, kiedy są zalogowani "
 "inni użytkownicy."
 
-#: src/login/org.freedesktop.login1.policy:310
+#: src/login/org.freedesktop.login1.policy:321
 msgid "Hibernate the system while an application is inhibiting this"
 msgstr "Hibernacja systemu, kiedy program ją wstrzymuje"
 
-#: src/login/org.freedesktop.login1.policy:311
+#: src/login/org.freedesktop.login1.policy:322
 msgid ""
 "Authentication is required to hibernate the system while an application is "
 "inhibiting this."
@@ -507,40 +521,40 @@ msgstr ""
 "Wymagane jest uwierzytelnienie, aby zahibernować system, kiedy program to "
 "wstrzymuje."
 
-#: src/login/org.freedesktop.login1.policy:321
+#: src/login/org.freedesktop.login1.policy:332
 msgid "Manage active sessions, users and seats"
 msgstr "Zarządzanie aktywnymi sesjami, użytkownikami i stanowiskami"
 
-#: src/login/org.freedesktop.login1.policy:322
+#: src/login/org.freedesktop.login1.policy:333
 msgid "Authentication is required to manage active sessions, users and seats."
 msgstr ""
 "Wymagane jest uwierzytelnienie, aby zarządzać aktywnymi sesjami, "
 "użytkownikami i stanowiskami."
 
-#: src/login/org.freedesktop.login1.policy:331
+#: src/login/org.freedesktop.login1.policy:342
 msgid "Lock or unlock active sessions"
 msgstr "Zablokowanie lub odblokowanie aktywnych sesji"
 
-#: src/login/org.freedesktop.login1.policy:332
+#: src/login/org.freedesktop.login1.policy:343
 msgid "Authentication is required to lock or unlock active sessions."
 msgstr ""
 "Wymagane jest uwierzytelnienie, aby zablokować lub odblokować aktywne sesje."
 
-#: src/login/org.freedesktop.login1.policy:341
+#: src/login/org.freedesktop.login1.policy:352
 msgid "Set the reboot \"reason\" in the kernel"
 msgstr "Ustawienie przyczyny ponownego uruchomienia w jądrze"
 
-#: src/login/org.freedesktop.login1.policy:342
+#: src/login/org.freedesktop.login1.policy:353
 msgid "Authentication is required to set the reboot \"reason\" in the kernel."
 msgstr ""
 "Wymagane jest uwierzytelnienie, aby ustawić przyczynę ponownego uruchomienia "
 "w jądrze."
 
-#: src/login/org.freedesktop.login1.policy:352
+#: src/login/org.freedesktop.login1.policy:363
 msgid "Indicate to the firmware to boot to setup interface"
 msgstr "Wskazanie oprogramowaniu sprzętowemu, aby uruchomić interfejs ustawień"
 
-#: src/login/org.freedesktop.login1.policy:353
+#: src/login/org.freedesktop.login1.policy:364
 msgid ""
 "Authentication is required to indicate to the firmware to boot to setup "
 "interface."
@@ -548,11 +562,11 @@ msgstr ""
 "Wymagane jest uwierzytelnienie, aby wskazać oprogramowaniu sprzętowemu, że "
 "należy uruchomić interfejs ustawień."
 
-#: src/login/org.freedesktop.login1.policy:363
+#: src/login/org.freedesktop.login1.policy:374
 msgid "Indicate to the boot loader to boot to the boot loader menu"
 msgstr "Wskazanie programowi startowemu, aby uruchomić jego menu"
 
-#: src/login/org.freedesktop.login1.policy:364
+#: src/login/org.freedesktop.login1.policy:375
 msgid ""
 "Authentication is required to indicate to the boot loader to boot to the "
 "boot loader menu."
@@ -560,11 +574,11 @@ msgstr ""
 "Wymagane jest uwierzytelnienie, aby wskazać programowi startowemu, że należy "
 "uruchomić jego menu."
 
-#: src/login/org.freedesktop.login1.policy:374
+#: src/login/org.freedesktop.login1.policy:385
 msgid "Indicate to the boot loader to boot a specific entry"
 msgstr "Wskazanie programowi startowemu, aby uruchomić podany wpis"
 
-#: src/login/org.freedesktop.login1.policy:375
+#: src/login/org.freedesktop.login1.policy:386
 msgid ""
 "Authentication is required to indicate to the boot loader to boot into a "
 "specific boot loader entry."
@@ -572,19 +586,19 @@ msgstr ""
 "Wymagane jest uwierzytelnienie, aby wskazać programowi startowemu, że należy "
 "uruchomić podany wpis."
 
-#: src/login/org.freedesktop.login1.policy:385
+#: src/login/org.freedesktop.login1.policy:396
 msgid "Set a wall message"
 msgstr "Ustawienie komunikatu wall"
 
-#: src/login/org.freedesktop.login1.policy:386
+#: src/login/org.freedesktop.login1.policy:397
 msgid "Authentication is required to set a wall message"
 msgstr "Wymagane jest uwierzytelnienie, aby ustawić komunikat wall"
 
-#: src/login/org.freedesktop.login1.policy:395
+#: src/login/org.freedesktop.login1.policy:406
 msgid "Change Session"
 msgstr "Zmiana sesji"
 
-#: src/login/org.freedesktop.login1.policy:396
+#: src/login/org.freedesktop.login1.policy:407
 msgid "Authentication is required to change the virtual terminal."
 msgstr "Wymagane jest uwierzytelnienie, aby zmienić terminal wirtualny."
 
@@ -905,25 +919,25 @@ msgstr ""
 "Wymagane jest uwierzytelnienie, aby kontrolować, czy włączyć synchronizację "
 "czasu przez sieć."
 
-#: src/core/dbus-unit.c:362
+#: src/core/dbus-unit.c:359
 msgid "Authentication is required to start '$(unit)'."
 msgstr "Wymagane jest uwierzytelnienie, aby uruchomić jednostkę „$(unit)”."
 
-#: src/core/dbus-unit.c:363
+#: src/core/dbus-unit.c:360
 msgid "Authentication is required to stop '$(unit)'."
 msgstr "Wymagane jest uwierzytelnienie, aby zatrzymać jednostkę „$(unit)”."
 
-#: src/core/dbus-unit.c:364
+#: src/core/dbus-unit.c:361
 msgid "Authentication is required to reload '$(unit)'."
 msgstr ""
 "Wymagane jest uwierzytelnienie, aby ponownie wczytać jednostkę „$(unit)”."
 
-#: src/core/dbus-unit.c:365 src/core/dbus-unit.c:366
+#: src/core/dbus-unit.c:362 src/core/dbus-unit.c:363
 msgid "Authentication is required to restart '$(unit)'."
 msgstr ""
 "Wymagane jest uwierzytelnienie, aby ponownie uruchomić jednostkę „$(unit)”."
 
-#: src/core/dbus-unit.c:538
+#: src/core/dbus-unit.c:535
 msgid ""
 "Authentication is required to send a UNIX signal to the processes of "
 "'$(unit)'."
@@ -931,18 +945,18 @@ msgstr ""
 "Wymagane jest uwierzytelnienie, aby wysłać sygnał uniksowy do procesów "
 "jednostki „$(unit)”."
 
-#: src/core/dbus-unit.c:569
+#: src/core/dbus-unit.c:566
 msgid "Authentication is required to reset the \"failed\" state of '$(unit)'."
 msgstr ""
 "Wymagane jest uwierzytelnienie, aby przywrócić stan „failed” (niepowodzenia) "
 "jednostki „$(unit)”."
 
-#: src/core/dbus-unit.c:602
+#: src/core/dbus-unit.c:599
 msgid "Authentication is required to set properties on '$(unit)'."
 msgstr ""
 "Wymagane jest uwierzytelnienie, aby ustawić właściwości jednostki „$(unit)”."
 
-#: src/core/dbus-unit.c:711
+#: src/core/dbus-unit.c:708
 msgid ""
 "Authentication is required to delete files and directories associated with "
 "'$(unit)'."
@@ -950,7 +964,7 @@ msgstr ""
 "Wymagane jest uwierzytelnienie, aby usunąć pliki i katalogi powiązane "
 "z jednostką „$(unit)”."
 
-#: src/core/dbus-unit.c:760
+#: src/core/dbus-unit.c:757
 msgid ""
 "Authentication is required to freeze or thaw the processes of '$(unit)' unit."
 msgstr ""
index 1e807d89594c2794555b2f7132d13687ade889a9..188f8a9f98d73a549e14f9e6e86e82ddda7c9663 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Brazilian Portuguese translation for systemd.
 # Enrico Nicoletto <liverig@gmail.com>, 2014.
index 7924cf9f86bccbf671ea3a5d8b3a1e4bb5ff8ff6..6c46900752564354567d1a35082423c20a86a383 100644 (file)
--- a/po/ro.po
+++ b/po/ro.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Romanian translation for systemd.
 # va511e <va511e@yahoo.com>, 2015.
index 778da464567859ded13e16494a13ca119805b283..2211d1163018d20598fb52e6293d08f2770b88a6 100644 (file)
--- a/po/ru.po
+++ b/po/ru.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # translation of ru.po to Rissian
 #
index 8b87bd6a7d949b1bd6ac989252500343e5c561a5..d3dec2ba19f793baa59615d6cb8f23c6e76ac16e 100644 (file)
--- a/po/sk.po
+++ b/po/sk.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Slovak translation for systemd.
 # Dušan Kazik <prescott66@gmail.com>, 2017.
index 4747b26be94f5a6e92ca0aa6dd1d79eb92521df7..83920e80b3d8b33855b5a30a8ff88c9de9b3d20f 100644 (file)
--- a/po/sr.po
+++ b/po/sr.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # SOME DESCRIPTIVE TITLE.
 # This file is distributed under the same license as the PACKAGE package.
index 8148c6bce4c1d8165555dc2e8fc662e6899eb2d8..91108ad5ff12a69c26c08cae808da60d3600cda2 100644 (file)
--- a/po/sv.po
+++ b/po/sv.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Swedish translation for systemd.
 # Sebastian Rasmussen <sebras@gmail.com>, 2015.
index c5a76b2bfad8a1321fe689a000da838523a74019..0e04733372886f2a2d01355be8b51cfaa01e06a0 100644 (file)
--- a/po/tr.po
+++ b/po/tr.po
@@ -1,25 +1,25 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Turkish translation for systemd.
 # Necdet Yücel <necdetyucel@gmail.com>, 2014.
 # Gökhan Gurbetoğlu <ggurbet@gmail.com>, 2015.
-# Muhammet Kara <muhammetk@gnome.org>, 2015, 2016, 2017, 2018.
 # Oğuz Ersen <oguzersen@protonmail.com>, 2020.
+# Muhammet Kara <muhammetk@gmail.com>, 2015-2020.
+#
 msgid ""
 msgstr ""
 "Project-Id-Version: systemd master\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-08-19 18:02+0200\n"
-"PO-Revision-Date: 2020-09-26 06:29+0000\n"
-"Last-Translator: Oğuz Ersen <oguzersen@protonmail.com>\n"
-"Language-Team: Turkish <https://translate.fedoraproject.org/projects/systemd/"
-"master/tr/>\n"
+"Report-Msgid-Bugs-To: https://github.com/systemd/systemd/issues\n"
+"POT-Creation-Date: 2020-09-27 03:31+0000\n"
+"PO-Revision-Date: 2020-11-01 15:10+0300\n"
+"Last-Translator: Muhammet Kara <muhammetk@gmail.com>\n"
+"Language-Team: Turkish <gnometurk@gnome.org>\n"
 "Language: tr\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.2.2\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+"X-Generator: Gtranslator 3.38.0\n"
 
 #: src/core/org.freedesktop.systemd1.policy.in:22
 msgid "Send passphrase back to system"
@@ -72,72 +72,67 @@ msgstr "systemd durumunu yeniden yüklemek kimlik doğrulaması gerektiriyor."
 
 #: src/home/org.freedesktop.home1.policy:13
 msgid "Create a home area"
-msgstr ""
+msgstr "Ev alanı oluştur"
 
 #: src/home/org.freedesktop.home1.policy:14
-#, fuzzy
 #| msgid "Authentication is required to reload the systemd state."
 msgid "Authentication is required to create a user's home area."
-msgstr "systemd durumunu yeniden yüklemek kimlik doğrulaması gerektiriyor."
+msgstr "Bir kullanıcının ev alanını oluşturmak kimlik doğrulaması gerektirir."
 
 #: src/home/org.freedesktop.home1.policy:23
 msgid "Remove a home area"
-msgstr ""
+msgstr "Ev alanını kaldır"
 
 #: src/home/org.freedesktop.home1.policy:24
-#, fuzzy
 #| msgid "Authentication is required to reload the systemd state."
 msgid "Authentication is required to remove a user's home area."
-msgstr "systemd durumunu yeniden yüklemek kimlik doğrulaması gerektiriyor."
+msgstr "Bir kullanıcının ev alanını kaldırmak kimlik doğrulaması gerektirir."
 
 #: src/home/org.freedesktop.home1.policy:33
 msgid "Check credentials of a home area"
-msgstr ""
+msgstr "Bir ev alanının kimlik bilgilerini denetle"
 
 #: src/home/org.freedesktop.home1.policy:34
-#, fuzzy
 #| msgid ""
 #| "Authentication is required to attach or detach a portable service image."
 msgid ""
 "Authentication is required to check credentials against a user's home area."
 msgstr ""
-"Bir taşınabilir hizmet kalıbını tutturmak ya da ayırmak için kimlik "
-"doğrulaması gereklidir."
+"Bir kullanıcının ev alanının kimlik bilgilerini denetlemek için kimlik "
+"doğrulaması gerekir."
 
 #: src/home/org.freedesktop.home1.policy:43
 msgid "Update a home area"
-msgstr ""
+msgstr "Ev alanını güncelle"
 
 #: src/home/org.freedesktop.home1.policy:44
-#, fuzzy
 #| msgid "Authentication is required to attach a device to a seat."
 msgid "Authentication is required to update a user's home area."
-msgstr ""
-"Bir aygıtın yuvaya takılmasına izin vermek kimlik doğrulaması gerektiriyor."
+msgstr "Bir kullanıcının ev alanını güncellemek kimlik doğrulaması gerektirir."
 
 #: src/home/org.freedesktop.home1.policy:53
 msgid "Resize a home area"
-msgstr ""
+msgstr "Ev alanını yeniden boyutlandır"
 
 #: src/home/org.freedesktop.home1.policy:54
-#, fuzzy
 #| msgid "Authentication is required to set a wall message"
 msgid "Authentication is required to resize a user's home area."
-msgstr "Duvar mesajı ayarlamak için kimlik doğrulaması gereklidir"
+msgstr ""
+"Bir kullanıcının ev alanını yeniden boyutlandırmak kimlik doğrulaması "
+"gerektirir."
 
 #: src/home/org.freedesktop.home1.policy:63
 msgid "Change password of a home area"
-msgstr ""
+msgstr "Ev alanının parolasını değiştir"
 
 #: src/home/org.freedesktop.home1.policy:64
-#, fuzzy
 #| msgid ""
 #| "Authentication is required to manage active sessions, users and seats."
 msgid ""
 "Authentication is required to change the password of a user's home area."
 msgstr ""
-"Aktif oturumları, kullanıcıları ve yuvaları yönetmek için kimlik doğrulaması "
-"gereklidir."
+"Bir kullanıcının ev alanının parolasını değiştirmek kimlik doğrulaması "
+"gerektirir."
 
 #: src/hostname/org.freedesktop.hostname1.policy:20
 msgid "Set hostname"
@@ -328,57 +323,75 @@ msgstr ""
 "kimlik doğrulaması gereklidir."
 
 #: src/login/org.freedesktop.login1.policy:117
+#, fuzzy
+#| msgid "Allow applications to inhibit system handling of the power key"
+msgid "Allow applications to inhibit system handling of the reboot key"
+msgstr "Uygulamaların sistemin güç tuşunun kullanımını engellemesine izin ver"
+
+#: src/login/org.freedesktop.login1.policy:118
+#, fuzzy
+#| msgid ""
+#| "Authentication is required for an application to inhibit system handling "
+#| "of the power key."
+msgid ""
+"Authentication is required for an application to inhibit system handling of "
+"the reboot key."
+msgstr ""
+"Bir uygulamanın sistemin güç tuşunu idare etmesine engel olması için kimlik "
+"doğrulaması gereklidir."
+
+#: src/login/org.freedesktop.login1.policy:128
 msgid "Allow non-logged-in user to run programs"
 msgstr "Oturum açmamış kullanıcının program çalıştırmasına izin ver"
 
-#: src/login/org.freedesktop.login1.policy:118
+#: src/login/org.freedesktop.login1.policy:129
 msgid "Explicit request is required to run programs as a non-logged-in user."
 msgstr ""
 "Oturum açmamış bir kullanıcı olarak program çalıştırmak için açıkça istekte "
 "bulunulması gerekir."
 
-#: src/login/org.freedesktop.login1.policy:127
+#: src/login/org.freedesktop.login1.policy:138
 msgid "Allow non-logged-in users to run programs"
 msgstr "Oturum açmamış kullanıcıların program çalıştırmasına izin ver"
 
-#: src/login/org.freedesktop.login1.policy:128
+#: src/login/org.freedesktop.login1.policy:139
 msgid "Authentication is required to run programs as a non-logged-in user."
 msgstr ""
 "Oturum açmamış bir kullanıcı olarak program çalıştırmak için kimlik "
 "doğrulaması gereklidir."
 
-#: src/login/org.freedesktop.login1.policy:137
+#: src/login/org.freedesktop.login1.policy:148
 msgid "Allow attaching devices to seats"
 msgstr "Aygıtların yuvaya takılmasına izin ver"
 
-#: src/login/org.freedesktop.login1.policy:138
+#: src/login/org.freedesktop.login1.policy:149
 msgid "Authentication is required to attach a device to a seat."
 msgstr ""
 "Bir aygıtın yuvaya takılmasına izin vermek kimlik doğrulaması gerektiriyor."
 
-#: src/login/org.freedesktop.login1.policy:148
+#: src/login/org.freedesktop.login1.policy:159
 msgid "Flush device to seat attachments"
 msgstr "Aygıtın yuvaya eklenmesini sıfırla"
 
-#: src/login/org.freedesktop.login1.policy:149
+#: src/login/org.freedesktop.login1.policy:160
 msgid "Authentication is required to reset how devices are attached to seats."
 msgstr ""
 "Aygıtların yuvalara nasıl takıldığını sıfırlamak kimlik doğrulama "
 "gerektiriyor."
 
-#: src/login/org.freedesktop.login1.policy:158
+#: src/login/org.freedesktop.login1.policy:169
 msgid "Power off the system"
 msgstr "Sistemi kapat"
 
-#: src/login/org.freedesktop.login1.policy:159
+#: src/login/org.freedesktop.login1.policy:170
 msgid "Authentication is required to power off the system."
 msgstr "Sistemi kapatmak için kimlik doğrulaması gerekiyor."
 
-#: src/login/org.freedesktop.login1.policy:169
+#: src/login/org.freedesktop.login1.policy:180
 msgid "Power off the system while other users are logged in"
 msgstr "Diğer kullanıcılar oturum açmışken sistemi kapat"
 
-#: src/login/org.freedesktop.login1.policy:170
+#: src/login/org.freedesktop.login1.policy:181
 msgid ""
 "Authentication is required to power off the system while other users are "
 "logged in."
@@ -386,11 +399,11 @@ msgstr ""
 "Diğer kullanıcılar oturum açmışken sistemi kapatmak kimlik doğrulaması "
 "gerektiriyor."
 
-#: src/login/org.freedesktop.login1.policy:180
+#: src/login/org.freedesktop.login1.policy:191
 msgid "Power off the system while an application is inhibiting this"
 msgstr "Bir uygulama engellenmesini isterken sistemi kapat"
 
-#: src/login/org.freedesktop.login1.policy:181
+#: src/login/org.freedesktop.login1.policy:192
 msgid ""
 "Authentication is required to power off the system while an application is "
 "inhibiting this."
@@ -398,19 +411,19 @@ msgstr ""
 "Bir uygulama engellenmesini isterken sistemi kapatmak kimlik doğrulaması "
 "gerektiriyor."
 
-#: src/login/org.freedesktop.login1.policy:191
+#: src/login/org.freedesktop.login1.policy:202
 msgid "Reboot the system"
 msgstr "Sistemi yeniden başlat"
 
-#: src/login/org.freedesktop.login1.policy:192
+#: src/login/org.freedesktop.login1.policy:203
 msgid "Authentication is required to reboot the system."
 msgstr "Sistemi yeniden başlatmak kimlik doğrulaması gerektiriyor."
 
-#: src/login/org.freedesktop.login1.policy:202
+#: src/login/org.freedesktop.login1.policy:213
 msgid "Reboot the system while other users are logged in"
 msgstr "Diğer kullanıcılar oturum açmışken sistemi yeniden başlat"
 
-#: src/login/org.freedesktop.login1.policy:203
+#: src/login/org.freedesktop.login1.policy:214
 msgid ""
 "Authentication is required to reboot the system while other users are logged "
 "in."
@@ -418,11 +431,11 @@ msgstr ""
 "Diğer kullanıcılar oturum açmışken sistemi yeniden başlatmak kimlik "
 "doğrulaması gerektiriyor."
 
-#: src/login/org.freedesktop.login1.policy:213
+#: src/login/org.freedesktop.login1.policy:224
 msgid "Reboot the system while an application is inhibiting this"
 msgstr "Bir uygulama engellenmesini isterken sistemi yeniden başlat"
 
-#: src/login/org.freedesktop.login1.policy:214
+#: src/login/org.freedesktop.login1.policy:225
 msgid ""
 "Authentication is required to reboot the system while an application is "
 "inhibiting this."
@@ -430,19 +443,19 @@ msgstr ""
 "Bir uygulama engellenmesini isterken sistemi yeniden başlatmak kimlik "
 "doğrulaması gerektiriyor."
 
-#: src/login/org.freedesktop.login1.policy:224
+#: src/login/org.freedesktop.login1.policy:235
 msgid "Halt the system"
 msgstr "Sistemi durdur"
 
-#: src/login/org.freedesktop.login1.policy:225
+#: src/login/org.freedesktop.login1.policy:236
 msgid "Authentication is required to halt the system."
 msgstr "Sistemi durdurmak kimlik doğrulaması gerektiriyor."
 
-#: src/login/org.freedesktop.login1.policy:235
+#: src/login/org.freedesktop.login1.policy:246
 msgid "Halt the system while other users are logged in"
 msgstr "Diğer kullanıcılar oturum açmışken sistemi durdur"
 
-#: src/login/org.freedesktop.login1.policy:236
+#: src/login/org.freedesktop.login1.policy:247
 msgid ""
 "Authentication is required to halt the system while other users are logged "
 "in."
@@ -450,11 +463,11 @@ msgstr ""
 "Diğer kullanıcılar oturum açmışken sistemi durdurmak kimlik doğrulaması "
 "gerektiriyor."
 
-#: src/login/org.freedesktop.login1.policy:246
+#: src/login/org.freedesktop.login1.policy:257
 msgid "Halt the system while an application is inhibiting this"
 msgstr "Bir uygulama engellenmesini isterken sistemi durdur"
 
-#: src/login/org.freedesktop.login1.policy:247
+#: src/login/org.freedesktop.login1.policy:258
 #, fuzzy
 #| msgid ""
 #| "Authentication is required to hibernate the system while an application "
@@ -466,19 +479,19 @@ msgstr ""
 "Bir uygulama engellenmesini isterken sistemi hazırda bekletmek kimlik "
 "doğrulaması gerektiriyor."
 
-#: src/login/org.freedesktop.login1.policy:257
+#: src/login/org.freedesktop.login1.policy:268
 msgid "Suspend the system"
 msgstr "Sistemi askıya al"
 
-#: src/login/org.freedesktop.login1.policy:258
+#: src/login/org.freedesktop.login1.policy:269
 msgid "Authentication is required to suspend the system."
 msgstr "Sistemi askıya almak kimlik doğrulaması gerektiriyor."
 
-#: src/login/org.freedesktop.login1.policy:267
+#: src/login/org.freedesktop.login1.policy:278
 msgid "Suspend the system while other users are logged in"
 msgstr "Diğer kullanıcılar oturum açmışken sistemi askıya al"
 
-#: src/login/org.freedesktop.login1.policy:268
+#: src/login/org.freedesktop.login1.policy:279
 msgid ""
 "Authentication is required to suspend the system while other users are "
 "logged in."
@@ -486,11 +499,11 @@ msgstr ""
 "Diğer kullanıcılar oturum açmışken sistemi askıya almak kimlik doğrulaması "
 "gerektiriyor."
 
-#: src/login/org.freedesktop.login1.policy:278
+#: src/login/org.freedesktop.login1.policy:289
 msgid "Suspend the system while an application is inhibiting this"
 msgstr "Bir uygulama engellenmesini isterken sistemi askıya al"
 
-#: src/login/org.freedesktop.login1.policy:279
+#: src/login/org.freedesktop.login1.policy:290
 msgid ""
 "Authentication is required to suspend the system while an application is "
 "inhibiting this."
@@ -498,19 +511,19 @@ msgstr ""
 "Bir uygulama engellenmesini isterken sistemi askıya almak kimlik doğrulaması "
 "gerektiriyor."
 
-#: src/login/org.freedesktop.login1.policy:289
+#: src/login/org.freedesktop.login1.policy:300
 msgid "Hibernate the system"
 msgstr "Sistemi hazırda beklet"
 
-#: src/login/org.freedesktop.login1.policy:290
+#: src/login/org.freedesktop.login1.policy:301
 msgid "Authentication is required to hibernate the system."
 msgstr "Sistemi hazırda bekletmek kimlik doğrulaması gerektiriyor."
 
-#: src/login/org.freedesktop.login1.policy:299
+#: src/login/org.freedesktop.login1.policy:310
 msgid "Hibernate the system while other users are logged in"
 msgstr "Diğer kullanıcılar oturum açmışken sistemi hazırda beklet"
 
-#: src/login/org.freedesktop.login1.policy:300
+#: src/login/org.freedesktop.login1.policy:311
 msgid ""
 "Authentication is required to hibernate the system while other users are "
 "logged in."
@@ -518,11 +531,11 @@ msgstr ""
 "Diğer kullanıcılar oturum açmışken sistemi hazırda bekletmek kimlik "
 "doğrulaması gerektiriyor."
 
-#: src/login/org.freedesktop.login1.policy:310
+#: src/login/org.freedesktop.login1.policy:321
 msgid "Hibernate the system while an application is inhibiting this"
 msgstr "Bir uygulama engellenmesini isterken sistemi hazırda beklet"
 
-#: src/login/org.freedesktop.login1.policy:311
+#: src/login/org.freedesktop.login1.policy:322
 msgid ""
 "Authentication is required to hibernate the system while an application is "
 "inhibiting this."
@@ -530,44 +543,44 @@ msgstr ""
 "Bir uygulama engellenmesini isterken sistemi hazırda bekletmek kimlik "
 "doğrulaması gerektiriyor."
 
-#: src/login/org.freedesktop.login1.policy:321
+#: src/login/org.freedesktop.login1.policy:332
 msgid "Manage active sessions, users and seats"
 msgstr "Aktif oturumları, kullanıcıları ve yuvaları yönet"
 
-#: src/login/org.freedesktop.login1.policy:322
+#: src/login/org.freedesktop.login1.policy:333
 msgid "Authentication is required to manage active sessions, users and seats."
 msgstr ""
 "Aktif oturumları, kullanıcıları ve yuvaları yönetmek için kimlik doğrulaması "
 "gereklidir."
 
-#: src/login/org.freedesktop.login1.policy:331
+#: src/login/org.freedesktop.login1.policy:342
 msgid "Lock or unlock active sessions"
 msgstr "Aktif oturumları kilitle ya da kilidini aç"
 
-#: src/login/org.freedesktop.login1.policy:332
+#: src/login/org.freedesktop.login1.policy:343
 msgid "Authentication is required to lock or unlock active sessions."
 msgstr ""
 "Aktif oturumları kilitlemek ve bunların kilidini açmak için kimlik "
 "doğrulaması gereklidir."
 
-#: src/login/org.freedesktop.login1.policy:341
+#: src/login/org.freedesktop.login1.policy:352
 msgid "Set the reboot \"reason\" in the kernel"
 msgstr ""
 
-#: src/login/org.freedesktop.login1.policy:342
+#: src/login/org.freedesktop.login1.policy:353
 #, fuzzy
 #| msgid "Authentication is required to set the system timezone."
 msgid "Authentication is required to set the reboot \"reason\" in the kernel."
 msgstr "Sistem zaman dilimini ayarlamak kimlik doğrulaması gerektiriyor."
 
-#: src/login/org.freedesktop.login1.policy:352
+#: src/login/org.freedesktop.login1.policy:363
 #, fuzzy
 #| msgid "Allow indication to the firmware to boot to setup interface"
 msgid "Indicate to the firmware to boot to setup interface"
 msgstr ""
 "Kurulum arayüzünü önyüklemek için ürün yazılımının belirtilmesine izin ver"
 
-#: src/login/org.freedesktop.login1.policy:353
+#: src/login/org.freedesktop.login1.policy:364
 msgid ""
 "Authentication is required to indicate to the firmware to boot to setup "
 "interface."
@@ -575,11 +588,11 @@ msgstr ""
 "Kurulum arayüzünü önyüklemek için ürün yazılımının belirtilmesi için kimlik "
 "doğrulaması gereklidir."
 
-#: src/login/org.freedesktop.login1.policy:363
+#: src/login/org.freedesktop.login1.policy:374
 msgid "Indicate to the boot loader to boot to the boot loader menu"
 msgstr ""
 
-#: src/login/org.freedesktop.login1.policy:364
+#: src/login/org.freedesktop.login1.policy:375
 #, fuzzy
 #| msgid ""
 #| "Authentication is required to indicate to the firmware to boot to setup "
@@ -591,11 +604,11 @@ msgstr ""
 "Kurulum arayüzünü önyüklemek için ürün yazılımının belirtilmesi için kimlik "
 "doğrulaması gereklidir."
 
-#: src/login/org.freedesktop.login1.policy:374
+#: src/login/org.freedesktop.login1.policy:385
 msgid "Indicate to the boot loader to boot a specific entry"
 msgstr ""
 
-#: src/login/org.freedesktop.login1.policy:375
+#: src/login/org.freedesktop.login1.policy:386
 #, fuzzy
 #| msgid ""
 #| "Authentication is required to indicate to the firmware to boot to setup "
@@ -607,23 +620,22 @@ msgstr ""
 "Kurulum arayüzünü önyüklemek için ürün yazılımının belirtilmesi için kimlik "
 "doğrulaması gereklidir."
 
-#: src/login/org.freedesktop.login1.policy:385
+#: src/login/org.freedesktop.login1.policy:396
 msgid "Set a wall message"
 msgstr "Bir duvar mesajı ayarla"
 
-#: src/login/org.freedesktop.login1.policy:386
+#: src/login/org.freedesktop.login1.policy:397
 msgid "Authentication is required to set a wall message"
 msgstr "Duvar mesajı ayarlamak için kimlik doğrulaması gereklidir"
 
-#: src/login/org.freedesktop.login1.policy:395
+#: src/login/org.freedesktop.login1.policy:406
 msgid "Change Session"
-msgstr ""
+msgstr "Oturumu Değiştir"
 
-#: src/login/org.freedesktop.login1.policy:396
-#, fuzzy
+#: src/login/org.freedesktop.login1.policy:407
 #| msgid "Authentication is required to halt the system."
 msgid "Authentication is required to change the virtual terminal."
-msgstr "Sistemi durdurmak kimlik doğrulaması gerektiriyor."
+msgstr "Sanal uçbirimi değiştirmek kimlik doğrulaması gerektirir."
 
 #: src/machine/org.freedesktop.machine1.policy:22
 msgid "Log into a local container"
@@ -705,7 +717,7 @@ msgstr ""
 
 #: src/network/org.freedesktop.network1.policy:22
 msgid "Set NTP servers"
-msgstr ""
+msgstr "NTP sunucularını ayarla"
 
 #: src/network/org.freedesktop.network1.policy:23
 #, fuzzy
@@ -715,10 +727,9 @@ msgstr "Sistem zamanını ayarlamak kimlik doğrulaması gerektiriyor."
 
 #: src/network/org.freedesktop.network1.policy:33
 #: src/resolve/org.freedesktop.resolve1.policy:44
-#, fuzzy
 #| msgid "Register a DNS-SD service"
 msgid "Set DNS servers"
-msgstr "Bir DNS-SD hizmeti kaydet"
+msgstr "DNS sunucularını ayarla"
 
 #: src/network/org.freedesktop.network1.policy:34
 #: src/resolve/org.freedesktop.resolve1.policy:45
@@ -730,7 +741,7 @@ msgstr "Bir DNS-SD hizmeti kaydetmek için kimlik doğrulaması gereklidir"
 #: src/network/org.freedesktop.network1.policy:44
 #: src/resolve/org.freedesktop.resolve1.policy:55
 msgid "Set domains"
-msgstr ""
+msgstr "Etki alanlarını ayarla"
 
 #: src/network/org.freedesktop.network1.policy:45
 #: src/resolve/org.freedesktop.resolve1.policy:56
@@ -742,7 +753,7 @@ msgstr "'$(unit)' durdurmak için kimlik doğrulaması gereklidir."
 #: src/network/org.freedesktop.network1.policy:55
 #: src/resolve/org.freedesktop.resolve1.policy:66
 msgid "Set default route"
-msgstr ""
+msgstr "Öntanımlı rota belirle"
 
 #: src/network/org.freedesktop.network1.policy:56
 #: src/resolve/org.freedesktop.resolve1.policy:67
@@ -754,7 +765,7 @@ msgstr "Yerel makine adını ayarlamak kimlik doğrulaması gerektiriyor."
 #: src/network/org.freedesktop.network1.policy:66
 #: src/resolve/org.freedesktop.resolve1.policy:77
 msgid "Enable/disable LLMNR"
-msgstr ""
+msgstr "LLMNR etkinleştir/devre dışı bırak"
 
 #: src/network/org.freedesktop.network1.policy:67
 #: src/resolve/org.freedesktop.resolve1.policy:78
@@ -843,7 +854,7 @@ msgstr "Duvar mesajı ayarlamak için kimlik doğrulaması gereklidir"
 
 #: src/network/org.freedesktop.network1.policy:154
 msgid "Renew dynamic addresses"
-msgstr ""
+msgstr "Dinamik adresleri yenile"
 
 #: src/network/org.freedesktop.network1.policy:155
 #, fuzzy
@@ -853,7 +864,7 @@ msgstr "Duvar mesajı ayarlamak için kimlik doğrulaması gereklidir"
 
 #: src/network/org.freedesktop.network1.policy:165
 msgid "Reload network settings"
-msgstr ""
+msgstr "Ağ ayarlarını yeniden yükle"
 
 #: src/network/org.freedesktop.network1.policy:166
 #, fuzzy
@@ -863,7 +874,7 @@ msgstr "systemd durumunu yeniden yüklemek kimlik doğrulaması gerektiriyor."
 
 #: src/network/org.freedesktop.network1.policy:176
 msgid "Reconfigure network interface"
-msgstr ""
+msgstr "Ağ arabirimini yeniden yapılandır"
 
 #: src/network/org.freedesktop.network1.policy:177
 #, fuzzy
@@ -967,23 +978,23 @@ msgid ""
 "shall be enabled."
 msgstr "Ağ zaman eş zamanlamasını denetlemek kimlik doğrulaması gerektiriyor."
 
-#: src/core/dbus-unit.c:362
+#: src/core/dbus-unit.c:359
 msgid "Authentication is required to start '$(unit)'."
 msgstr "'$(unit)' başlatmak için kimlik doğrulaması gereklidir."
 
-#: src/core/dbus-unit.c:363
+#: src/core/dbus-unit.c:360
 msgid "Authentication is required to stop '$(unit)'."
 msgstr "'$(unit)' durdurmak için kimlik doğrulaması gereklidir."
 
-#: src/core/dbus-unit.c:364
+#: src/core/dbus-unit.c:361
 msgid "Authentication is required to reload '$(unit)'."
 msgstr "'$(unit)' yeniden yüklemek için kimlik doğrulaması gereklidir."
 
-#: src/core/dbus-unit.c:365 src/core/dbus-unit.c:366
+#: src/core/dbus-unit.c:362 src/core/dbus-unit.c:363
 msgid "Authentication is required to restart '$(unit)'."
 msgstr "'$(unit)' yeniden başlatmak için kimlik doğrulaması gereklidir."
 
-#: src/core/dbus-unit.c:538
+#: src/core/dbus-unit.c:535
 msgid ""
 "Authentication is required to send a UNIX signal to the processes of "
 "'$(unit)'."
@@ -991,19 +1002,19 @@ msgstr ""
 "'$(unit)' süreçlerine bir UNIX sinyali göndermek için kimlik doğrulaması "
 "gereklidir."
 
-#: src/core/dbus-unit.c:569
+#: src/core/dbus-unit.c:566
 msgid "Authentication is required to reset the \"failed\" state of '$(unit)'."
 msgstr ""
 "'$(unit)'in \"failed\" (başarısız) durumunu sıfırlamak için kimlik "
 "doğrulaması gereklidir."
 
-#: src/core/dbus-unit.c:602
+#: src/core/dbus-unit.c:599
 msgid "Authentication is required to set properties on '$(unit)'."
 msgstr ""
 "'$(unit)' üzerindeki özellikleri ayarlamak için kimlik doğrulaması "
 "gereklidir."
 
-#: src/core/dbus-unit.c:711
+#: src/core/dbus-unit.c:708
 #, fuzzy
 #| msgid ""
 #| "Authentication is required to reset the \"failed\" state of '$(unit)'."
@@ -1014,7 +1025,7 @@ msgstr ""
 "'$(unit)'in \"failed\" (başarısız) durumunu sıfırlamak için kimlik "
 "doğrulaması gereklidir."
 
-#: src/core/dbus-unit.c:760
+#: src/core/dbus-unit.c:757
 #, fuzzy
 #| msgid ""
 #| "Authentication is required to send a UNIX signal to the processes of "
index df477897861d0c9726c8a7db276e8e1fd07a644c..8e6f9dce89b74307cb1ec03076136a14a8e66fc9 100644 (file)
--- a/po/uk.po
+++ b/po/uk.po
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 # Ukrainian translation for systemd.
 # Eugene Melnik <jeka7js@gmail.com>, 2014.
 # Daniel Korostil <ted.korostiled@gmail.com>, 2014, 2016, 2018.
index a2c6f06efb75bfdb16c4bce4c5d536c4ed987b52..15a169167f993a6bb38c6980c5b702d4abc8c944 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Simplified Chinese translation for systemd.
 #
@@ -6,13 +6,14 @@
 # Boyuan Yang <073plan@gmail.com>, 2015.
 # Jeff Bai <jeffbai@aosc.xyz>, 2016.
 # Charles Lee <lchopn@gmail.com>, 2020.
+# Whired Planck <fungdaat31@outlook.com>, 2020.
 msgid ""
 msgstr ""
 "Project-Id-Version: systemd\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2020-08-19 18:02+0200\n"
-"PO-Revision-Date: 2020-09-24 04:29+0000\n"
-"Last-Translator: Charles Lee <lchopn@gmail.com>\n"
+"PO-Revision-Date: 2020-11-26 11:35+0000\n"
+"Last-Translator: Whired Planck <fungdaat31@outlook.com>\n"
 "Language-Team: Chinese (Simplified) <https://translate.fedoraproject.org/"
 "projects/systemd/master/zh_CN/>\n"
 "Language: zh_CN\n"
@@ -20,7 +21,7 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.2.2\n"
+"X-Generator: Weblate 4.3.2\n"
 
 #: src/core/org.freedesktop.systemd1.policy.in:22
 msgid "Send passphrase back to system"
@@ -67,70 +68,56 @@ msgstr "重新载入 systemd 状态需要认证。"
 
 #: src/home/org.freedesktop.home1.policy:13
 msgid "Create a home area"
-msgstr ""
+msgstr "创建一个家区域"
 
 #: src/home/org.freedesktop.home1.policy:14
-#, fuzzy
-#| msgid "Authentication is required to reload the systemd state."
 msgid "Authentication is required to create a user's home area."
-msgstr "重新载入 systemd 状态需要认证。"
+msgstr "创建用户家区域需要认证。"
 
 #: src/home/org.freedesktop.home1.policy:23
 msgid "Remove a home area"
-msgstr ""
+msgstr "移除一个家区域"
 
 #: src/home/org.freedesktop.home1.policy:24
-#, fuzzy
-#| msgid "Authentication is required to reload the systemd state."
 msgid "Authentication is required to remove a user's home area."
-msgstr "重新载入 systemd 状态需要认证。"
+msgstr "移除用户家区域需要认证。"
 
 #: src/home/org.freedesktop.home1.policy:33
 msgid "Check credentials of a home area"
-msgstr ""
+msgstr "检查家区域凭证"
 
 #: src/home/org.freedesktop.home1.policy:34
-#, fuzzy
-#| msgid ""
-#| "Authentication is required to manage active sessions, users and seats."
 msgid ""
 "Authentication is required to check credentials against a user's home area."
-msgstr "管理活动会话、用户与会话座位需要认证。"
+msgstr "根据用户家区域检查凭证需要认证。"
 
 #: src/home/org.freedesktop.home1.policy:43
 msgid "Update a home area"
-msgstr ""
+msgstr "更新一个家区域"
 
 # Pay attention to the concept of "seat".
 #
 # To fully understand the meaning, please refer to session management in old ConsoleKit and new systemd-logind.
 #: src/home/org.freedesktop.home1.policy:44
-#, fuzzy
-#| msgid "Authentication is required to attach a device to a seat."
 msgid "Authentication is required to update a user's home area."
-msgstr "允许将设备附加至某个会话座位需要认证。"
+msgstr "更新用户家区域需要认证。"
 
 #: src/home/org.freedesktop.home1.policy:53
 msgid "Resize a home area"
-msgstr ""
+msgstr "调整家区域大小"
 
 #: src/home/org.freedesktop.home1.policy:54
-#, fuzzy
-#| msgid "Authentication is required to set a wall message"
 msgid "Authentication is required to resize a user's home area."
-msgstr "设置 wall æ¶\88æ\81¯需要认证。"
+msgstr "è°\83æ\95´å®¶å\8cºå\9f\9f大å°\8f需要认证。"
 
 #: src/home/org.freedesktop.home1.policy:63
 msgid "Change password of a home area"
-msgstr ""
+msgstr "更改家区域的密码"
 
 #: src/home/org.freedesktop.home1.policy:64
-#, fuzzy
-#| msgid ""
-#| "Authentication is required to manage active sessions, users and seats."
 msgid ""
 "Authentication is required to change the password of a user's home area."
-msgstr "管理活动会话、用户与会话座位需要认证。"
+msgstr "更改家区域密码需要认证。"
 
 #: src/hostname/org.freedesktop.hostname1.policy:20
 msgid "Set hostname"
@@ -148,11 +135,10 @@ msgstr "设置静态主机名"
 #
 # There were some discussions, like https://lists.fedoraprojects.org/pipermail/trans-zh_cn/2012-December/001347.html
 #: src/hostname/org.freedesktop.hostname1.policy:31
-#, fuzzy
 msgid ""
 "Authentication is required to set the statically configured local hostname, "
 "as well as the pretty hostname."
-msgstr "设静态本地主机名或美观主机名需要认证。"
+msgstr "设静态本地主机名或美观主机名需要认证。"
 
 #: src/hostname/org.freedesktop.hostname1.policy:41
 msgid "Set machine information"
@@ -164,13 +150,11 @@ msgstr "设置本地机器信息需要认证。"
 
 #: src/hostname/org.freedesktop.hostname1.policy:51
 msgid "Get product UUID"
-msgstr ""
+msgstr "获取产品 UUID"
 
 #: src/hostname/org.freedesktop.hostname1.policy:52
-#, fuzzy
-#| msgid "Authentication is required to reload '$(unit)'."
 msgid "Authentication is required to get product UUID."
-msgstr "重新载入“$(unit)”需要认证。"
+msgstr "获取产品 UUID 需要认证。"
 
 #: src/import/org.freedesktop.import1.policy:22
 msgid "Import a VM or container image"
@@ -300,10 +284,8 @@ msgid "Allow non-logged-in user to run programs"
 msgstr "允许未登录用户运行程序"
 
 #: src/login/org.freedesktop.login1.policy:118
-#, fuzzy
-#| msgid "Authentication is required to run programs as a non-logged-in user."
 msgid "Explicit request is required to run programs as a non-logged-in user."
-msgstr "允许未登录用户运行程序需要认证。"
+msgstr "要以未登录用户运行程序,需要明确请求。"
 
 #: src/login/org.freedesktop.login1.policy:127
 msgid "Allow non-logged-in users to run programs"
@@ -389,10 +371,8 @@ msgid ""
 msgstr "在其它应用程序阻止重启时重启系统需要认证。"
 
 #: src/login/org.freedesktop.login1.policy:224
-#, fuzzy
-#| msgid "Hibernate the system"
 msgid "Halt the system"
-msgstr "休眠系统"
+msgstr "停止系统"
 
 #: src/login/org.freedesktop.login1.policy:225
 msgid "Authentication is required to halt the system."
@@ -492,13 +472,11 @@ msgstr "对活动会话进行锁定或解锁需要认证。"
 
 #: src/login/org.freedesktop.login1.policy:341
 msgid "Set the reboot \"reason\" in the kernel"
-msgstr ""
+msgstr "在内核中设定重启“原因”"
 
 #: src/login/org.freedesktop.login1.policy:342
-#, fuzzy
-#| msgid "Authentication is required to set the system timezone."
 msgid "Authentication is required to set the reboot \"reason\" in the kernel."
-msgstr "设置系统时区需要认证。"
+msgstr "在内核中设定重启“原因”需要认证。"
 
 #: src/login/org.freedesktop.login1.policy:352
 msgid "Indicate to the firmware to boot to setup interface"
@@ -512,31 +490,23 @@ msgstr "向固件发出启动时进入设置界面的指令需要认证。"
 
 #: src/login/org.freedesktop.login1.policy:363
 msgid "Indicate to the boot loader to boot to the boot loader menu"
-msgstr ""
+msgstr "指示引导加载程序启动至引导加载程序菜单"
 
 #: src/login/org.freedesktop.login1.policy:364
-#, fuzzy
-#| msgid ""
-#| "Authentication is required to indicate to the firmware to boot to setup "
-#| "interface."
 msgid ""
 "Authentication is required to indicate to the boot loader to boot to the "
 "boot loader menu."
-msgstr "向固件发出启动时进入设置界面的指令需要认证。"
+msgstr "指示引导加载程序启动至引导加载程序菜单需要认证。"
 
 #: src/login/org.freedesktop.login1.policy:374
 msgid "Indicate to the boot loader to boot a specific entry"
-msgstr ""
+msgstr "指示引导加载程序启动指定条目"
 
 #: src/login/org.freedesktop.login1.policy:375
-#, fuzzy
-#| msgid ""
-#| "Authentication is required to indicate to the firmware to boot to setup "
-#| "interface."
 msgid ""
 "Authentication is required to indicate to the boot loader to boot into a "
 "specific boot loader entry."
-msgstr "向固件发出启动时进入设置界面的指令需要认证。"
+msgstr "指示引导加载程序启动入指定引导加载条目需要认证。"
 
 #: src/login/org.freedesktop.login1.policy:385
 msgid "Set a wall message"
@@ -548,13 +518,11 @@ msgstr "设置 wall 消息需要认证。"
 
 #: src/login/org.freedesktop.login1.policy:395
 msgid "Change Session"
-msgstr ""
+msgstr "更改会话"
 
 #: src/login/org.freedesktop.login1.policy:396
-#, fuzzy
-#| msgid "Authentication is required to set the local hostname."
 msgid "Authentication is required to change the virtual terminal."
-msgstr "设置本地主机名需要认证。"
+msgstr "更改虚拟终端需要认证。"
 
 #: src/machine/org.freedesktop.machine1.policy:22
 msgid "Log into a local container"
@@ -629,10 +597,8 @@ msgid "Set NTP servers"
 msgstr "设置 NTP 服务器"
 
 #: src/network/org.freedesktop.network1.policy:23
-#, fuzzy
-#| msgid "Authentication is required to set the system time."
 msgid "Authentication is required to set NTP servers."
-msgstr "设置系统时间需要认证。"
+msgstr "设定 NTP 服务器需要认证。"
 
 #: src/network/org.freedesktop.network1.policy:33
 #: src/resolve/org.freedesktop.resolve1.policy:44
@@ -641,10 +607,8 @@ msgstr "设置 DNS 服务器"
 
 #: src/network/org.freedesktop.network1.policy:34
 #: src/resolve/org.freedesktop.resolve1.policy:45
-#, fuzzy
-#| msgid "Authentication is required to set the system time."
 msgid "Authentication is required to set DNS servers."
-msgstr "设置系统时间需要认证。"
+msgstr "设定 DNS 服务器需要认证。"
 
 #: src/network/org.freedesktop.network1.policy:44
 #: src/resolve/org.freedesktop.resolve1.policy:55
@@ -653,10 +617,8 @@ msgstr "设置域名"
 
 #: src/network/org.freedesktop.network1.policy:45
 #: src/resolve/org.freedesktop.resolve1.policy:56
-#, fuzzy
-#| msgid "Authentication is required to stop '$(unit)'."
 msgid "Authentication is required to set domains."
-msgstr "停止“$(unit)”需要认证。"
+msgstr "设定域需要认证。"
 
 #: src/network/org.freedesktop.network1.policy:55
 #: src/resolve/org.freedesktop.resolve1.policy:66
@@ -665,51 +627,43 @@ msgstr "设置默认路由"
 
 #: src/network/org.freedesktop.network1.policy:56
 #: src/resolve/org.freedesktop.resolve1.policy:67
-#, fuzzy
-#| msgid "Authentication is required to set the local hostname."
 msgid "Authentication is required to set default route."
-msgstr "设置本地主机名需要认证。"
+msgstr "设定默认路由需要认证。"
 
 #: src/network/org.freedesktop.network1.policy:66
 #: src/resolve/org.freedesktop.resolve1.policy:77
 msgid "Enable/disable LLMNR"
-msgstr ""
+msgstr "启用/禁用 LLMNR"
 
 #: src/network/org.freedesktop.network1.policy:67
 #: src/resolve/org.freedesktop.resolve1.policy:78
-#, fuzzy
-#| msgid "Authentication is required to hibernate the system."
 msgid "Authentication is required to enable or disable LLMNR."
-msgstr "休眠系统需要认证。"
+msgstr "启用或禁用 LLMNR 需要认证。"
 
 #: src/network/org.freedesktop.network1.policy:77
 #: src/resolve/org.freedesktop.resolve1.policy:88
 msgid "Enable/disable multicast DNS"
-msgstr ""
+msgstr "启用/禁用多播 DNS"
 
 #: src/network/org.freedesktop.network1.policy:78
 #: src/resolve/org.freedesktop.resolve1.policy:89
-#, fuzzy
-#| msgid "Authentication is required to log into the local host."
 msgid "Authentication is required to enable or disable multicast DNS."
-msgstr "登入本地主机需要认证。"
+msgstr "启用或禁用多播 DNS 需要认证。"
 
 #: src/network/org.freedesktop.network1.policy:88
 #: src/resolve/org.freedesktop.resolve1.policy:99
 msgid "Enable/disable DNS over TLS"
-msgstr ""
+msgstr "启用/禁用 DNS over TLS"
 
 #: src/network/org.freedesktop.network1.policy:89
 #: src/resolve/org.freedesktop.resolve1.policy:100
-#, fuzzy
-#| msgid "Authentication is required to set the local hostname."
 msgid "Authentication is required to enable or disable DNS over TLS."
-msgstr "设置本地主机名需要认证。"
+msgstr "启用或禁用 DNS over TLS 需要认证。"
 
 #: src/network/org.freedesktop.network1.policy:99
 #: src/resolve/org.freedesktop.resolve1.policy:110
 msgid "Enable/disable DNSSEC"
-msgstr ""
+msgstr "启用/禁用 DNSSEC"
 
 #: src/network/org.freedesktop.network1.policy:100
 #: src/resolve/org.freedesktop.resolve1.policy:111
index c765b36d55bcaf9e4da05719e8129e8bb3a395fc..e706f70e163110d1b01da68784f07bbdcc313737 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Traditional Chinese translation for systemd.
 # Jeff Huang <s8321414@gmail.com>, 2015, 2016.
index dd268ae1b5fdb710f758daae0aeceeeb388962c1..d26087445c9695ded99f3b620e7985a1a64f4099 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
@@ -37,6 +37,7 @@ disable systemd-networkd-wait-online.service
 disable systemd-time-wait-sync.service
 disable systemd-boot-check-no-failures.service
 disable systemd-network-generator.service
+disable proc-sys-fs-binfmt_misc.mount
 
 disable syslog.socket
 
index 0b16acf59aa9e8574308859f40fb2f4433bb4895..84abeded2fd84d5e1655cd8f5a0b805adc3c6dd0 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 install_data('90-systemd.preset',
              install_dir : systempresetdir)
index 5ee969090ddae4f1fe35e6f8b8ce31336756f19c..7b407567d5359476113c3afbd18c37f6aa97e9fb 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 9e2772388dc3dc8044b1f8ed14a9d6ed2f6de1e6..d2f595d18ee08c2cc8099a1fd1df349caff8f967 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index b4640ab9d423b97f6aff992d9bd952e99b08d63e..7e46abd5592ea6c73935f6dd194252f7748ada59 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 rules = files('''
         60-autosuspend.rules
index abffb205889656d60034354f8f406a712a7d03cc..e76f2544ebf00aafb47aa00fc8dc589b664f4e59 100755 (executable)
@@ -16,11 +16,13 @@ PHASES=(${@:-SETUP RUN})
 UBUNTU_RELEASE="$(lsb_release -cs)"
 
 create_container() {
-    # create autopkgtest LXC image; this sometimes fails with "Unable to fetch
-    # GPG key from keyserver", so retry a few times
-    for retry in {1..5}; do
-        sudo lxc-create -n $CONTAINER -t download -- -d $DISTRO -r $RELEASE -a $ARCH --keyserver hkp://keyserver.ubuntu.com:80 && break
-        sleep $((retry*retry))
+    # Create autopkgtest LXC image; this sometimes fails with "Unable to fetch
+    # GPG key from keyserver", so retry a few times with different keyservers.
+    for keyserver in "" "keys.gnupg.net" "keys.openpgp.org" "keyserver.ubuntu.com"; do
+        for retry in {1..5}; do
+            sudo lxc-create -n $CONTAINER -t download -- -d $DISTRO -r $RELEASE -a $ARCH ${keyserver:+--keyserver "$keyserver"} && break 2
+            sleep $((retry*retry))
+        done
     done
 
     # unconfine the container, otherwise some tests fail
@@ -83,8 +85,11 @@ EOF
             rm -rf debian/patches
             # disable autopkgtests which are not for upstream
             sed -i '/# NOUPSTREAM/ q' debian/tests/control
+            # temporarily disable timedated tests, as they cause timeouts
+            # see: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=975010
+            sed -i '/Tests:/s/timedated, //' debian/tests/control
             # enable more unit tests
-            sed -i '/^CONFFLAGS =/ s/=/= --werror -Dtests=unsafe -Dsplit-usr=true -Dslow-tests=true -Dman=true /' debian/rules
+            sed -i '/^CONFFLAGS =/ s/=/= --werror -Dtests=unsafe -Dsplit-usr=true -Dslow-tests=true -Dfuzz-tests=true -Dman=true /' debian/rules
             # no orig tarball
             echo '1.0' > debian/source/format
 
index 9fc6cb3df544d50dcba42d88bc8f6740ee23adae..391fa67bfc1c4c155112db1fc9747bc9694b28b8 100644 (file)
@@ -1,5 +1,5 @@
 # bootctl(1) completion                               -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index 1ed924e63a733c7073bd70de734399c8abc5418e..5a4acd337ff31e19aea5cadcae7705dc46402408 100644 (file)
@@ -1,5 +1,5 @@
 # busctl(1) completion                               -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index d4366df0d0c0490e278ead427df30e210966adb7..20886932e223b4e7693b692c61c9f22bf298207a 100644 (file)
@@ -1,5 +1,5 @@
 # coredumpctl(1) completion                       -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index 1a1d5229667bb2d82a2015c8099c7c54b504bcc5..fe909fbb41151343a62714efc2c6c2c610cd81d6 100644 (file)
@@ -1,5 +1,5 @@
 # hostctl(1) completion                               -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index 0d829e705a0bd0f7842cfbc42a2dada442baba7b..e3765c315cbf0785af137ae8981c3c0532ec7678 100644 (file)
@@ -1,5 +1,5 @@
 # hostnamectl(1) completion                               -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index 757c3d77f436fefdbe0404bcfdc064d3d6cdfe90..84232e83c2bad5db7a563031b4a986ca1be689fd 100644 (file)
@@ -1,5 +1,5 @@
 # journalctl(1) completion                                -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index 224ea83eb80ff8c85c075424a47c9eb539ddbd19..35c44ea3a84beeb1b3d7d77f21944811f60fbad1 100644 (file)
@@ -1,5 +1,5 @@
 # kernel-install(8) completion                                   -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index fe53112fd4140327c988ef07d6d5ee802db02c72..fa0f8fdca1c9709b62a1d4ac163052cb64ce4925 100644 (file)
@@ -1,5 +1,5 @@
 # localectl(1) completion                                 -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index 69b999c05d5e065115bd1605f9cccda976c6723c..ac85519c1088963b2645b25359d7bf7c5a6d9177 100644 (file)
@@ -1,5 +1,5 @@
 # loginctl(1) completion                                  -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index a89ce812b21bd3e39157f91b4f3af2d5e2c120ce..cd16e47721350060ac4a21617d6c5cd520c0e5d8 100644 (file)
@@ -1,5 +1,5 @@
 # machinectl(1) completion                      -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index 1df70147afcb5dd24904e5db954d94ad211acc91..1afa7977e66680ea7b611afea8dd7966933b6d3a 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 bashcompletiondir = get_option('bashcompletiondir')
 if bashcompletiondir == ''
index 02b9c75c4491378bf2c34b614f54cd93f078f9d5..9282ee873773cabcf429d031529b8408087d0a86 100644 (file)
@@ -1,5 +1,5 @@
 # networkctl(1) completion                               -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index 0b84d5c83487b5702418279d4c923c4d8ca6c021..fe3d925d783eb9b3bcb37033e3e5f2568037629b 100644 (file)
@@ -1,5 +1,5 @@
 # portablectl(1) completion                             -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index 54b241ce90e5f6a7ea66686ca96c089ed5f1390a..dae4330d4c5847a02dc5e1c72ec3367d3879dbf3 100644 (file)
@@ -1,5 +1,5 @@
 # resolvectl(1) completion                                  -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index b5bd727abf06170f468af7102902e9bfd720f301..f6be3827cff6b142c47881599cf6aa039488f235 100644 (file)
@@ -1,5 +1,5 @@
 # systemctl(1) completion                                 -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index 0c61f54504c65341959955a2c7c48491acaae152..92f81a60fc718261a1489546bf9381c9c7980ea2 100644 (file)
@@ -1,5 +1,5 @@
 # systemd-analyze(1) completion                      -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index 62da65da7adaef2c502a6c5031b93d3026647ad7..9413b6fa70ab00ca72a687eef46b214b13c93e82 100644 (file)
@@ -1,5 +1,5 @@
 # systemd-cat(1) completion                  -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index ae41f8ba5a44299379794f4e7eeabff5409dd4e6..7caaf89ddb903a34f32f2a6b2dddfc990283767d 100644 (file)
@@ -1,5 +1,5 @@
 # systemd-cgls(1) completion                  -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index a5e3401959fba21030f2377e3e1d5bdcca35f236..b186f1bd537ca37018ac113a5789309a98c3c2f7 100644 (file)
@@ -1,5 +1,5 @@
 # systemd-cgtop(1) completion                  -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index fcf27ba30e267fdd65942284d74f1e545d1c3284..baf86b081343d64822ce70dcbada1dc1863f0071 100644 (file)
@@ -1,5 +1,5 @@
 # systemd-delta(1) completion                      -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index bea00fc7aec506e7b53c5fb04d62e79f546408c0..fb35efaadb9648faff181d340649cbbc00c66214 100644 (file)
@@ -1,5 +1,5 @@
 # systemd-detect-virt(1) completion             -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index f25848beba2bd71a4c8a0a428138310498a63ea4..937556154a8593e42f815adacb05528aca861653 100644 (file)
@@ -1,5 +1,5 @@
 # networkctl(1) completion                               -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index a8bd406fb3118a11fd1dafc1b1c94e843324a367..ebd97a9de1b683205050814a8e54c53453ad2276 100644 (file)
@@ -1,5 +1,5 @@
 # systemd-nspawn(1) completion                  -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index 189fec093334809df94a2357982188844ba865bc..cae4ac1b3093f4e04c667f7705e296feb5bcf619 100644 (file)
@@ -1,5 +1,5 @@
 # systemd-path(1) completion                               -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index 66f0ae04a0a54abd9061df1f0f1039bc808f446e..ec43948278bf229df4b1fe49e197966378702e87 100644 (file)
@@ -1,5 +1,5 @@
 # systemd-resolve(1) completion                             -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index 88f4443ad9727f00493404f16935a989241ce5b8..884065187bbdc376f7e26b3b79006551ace05eca 100644 (file)
@@ -1,5 +1,5 @@
 # systemd-run(1) completion                       -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index 4605fafc46d00c206a51462dd598cb9a46da695f..3e72ce6655e1b80e8cd4cebbe4b3593243d93a8b 100644 (file)
@@ -1,5 +1,5 @@
 # timedatectl(1) completion                               -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index 76126a63297c79cd21649319c3a4c79433d8def5..8b1b962f2d49d21c01586ff78511cb78f66e9218 100644 (file)
@@ -1,5 +1,5 @@
 # udevadm(8) completion                                   -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index fc051bd87d05a908d5ab30b8d8e7f247f4f507cb..9e024da3418328951e5e33625101264d47e8d18a 100644 (file)
@@ -1,5 +1,5 @@
 #compdef bootctl                    -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 __bootctl() {
     bootctl --no-pager $@ 2>/dev/null
index 0589e993265ac58f886305c038d41c87a7b9307c..8085d5ad114d8ea593f0ab2cfc80e2c4906b2e0f 100644 (file)
@@ -1,5 +1,5 @@
 #compdef busctl                    -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 # busctl(1) completion                               -*- shell-script -*-
 #
index 6b7d14a76617ba0dda0f2f7fda9134baf87fb080..54e935330f5e3046275292bf1016d1e6a76ec32d 100644 (file)
@@ -1,5 +1,5 @@
 #compdef coredumpctl                    -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 (( $+functions[_coredumpctl_commands] )) ||
 _coredumpctl_commands(){
index d1ad85a18fbbe7056b02d1d52db6ed107004d485..d05c46bd43645e8338bdbe99e5047c2eb17eed2d 100644 (file)
@@ -1,5 +1,5 @@
 #compdef hostnamectl                    -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 (( $+functions[_hostnamectl_set-hostname] )) ||
 _hostnamectl_set-hostname() {
index ecc5d0831abd4a599950db51eeada8450c595507..848c4fa1be0a0566096a4479e3d7be61fd6f4f01 100644 (file)
@@ -1,5 +1,5 @@
 #compdef journalctl                    -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 (( $+functions[_journalctl_fields] )) ||
 _journalctl_fields() {
index 4b5dd89d434a9a8699eceb7b335992a4ff213761..b0dd824356dab4393ea44ac18eb367edd8e12ca9 100644 (file)
@@ -1,5 +1,5 @@
 #compdef kernel-install                    -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 (( $+functions[_kernel-install_images] )) ||
 _kernel-install_images(){
index a712473ce248ad1d66617dbdbc6034b853f22e15..1c7ac82b65967731f6a845135ae2fa3c626de307 100644 (file)
@@ -1,5 +1,5 @@
 #compdef localectl                    -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 (( $+functions[_localectl_set-locale] )) ||
 _localectl_set-locale() {
index feb7016770487254727b69486b36083fe5e3c5f9..50c192daad1c63ee752e895f50c134e884d6af3b 100644 (file)
@@ -1,5 +1,5 @@
 #compdef loginctl                    -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 (( $+functions[_loginctl_all_sessions] )) ||
 _loginctl_all_sessions() {
index 5955c765aaac011ce2683cf4b659b75316ebff7b..9a4a32e627c639df6265f219197e7c36643630f5 100644 (file)
@@ -1,5 +1,5 @@
 #compdef machinectl                    -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 (( $+functions[__machinectl_get_machines] )) ||
     __machinectl_get_machines () {
index 13c8009887d667021f14f48f765de71495483efe..165c5411becb8bf20c08a6cad0f873d21a4e968c 100644 (file)
@@ -1,5 +1,5 @@
 #compdef networkctl                    -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 (( $+functions[_networkctl_commands] )) ||
     _networkctl_commands() {
index 3ac069c6b0a73fe9e00945afe7079ed793d3b1c4..8a50fbdbbec46e10a7000363f75320311c74d298 100644 (file)
@@ -1,5 +1,5 @@
 #compdef resolvectl systemd-resolve         -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index a510bf3cf18c46e6fdba2c1131e7fd199953a3c6..8148ed19853a7ff3a1ccd0c493371d5bb55ca220 100644 (file)
@@ -1,5 +1,5 @@
 #autoload
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 _alternative \
     'users-hosts:: _user_at_host' \
index 30b7fd81a31f2bc8b548ad3a8607ca24fff7d3a6..cc0d1e2b4efcca26b5074e919cc0a577e03d753e 100644 (file)
@@ -1,5 +1,5 @@
 #autoload
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 (( $+functions[__sd_machines_get_machines] )) ||
     __sd_machines_get_machines () {
index 763b106f3d93272a47b7013a78b7d557b20020f1..267a2e7bd3ac1d47e14d3e2a25b299cb5be1bf47 100644 (file)
@@ -1,5 +1,5 @@
 #autoload
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 local -a _output_opts
 _output_opts=(short short-full short-iso short-iso-precise short-precise short-monotonic short-unix verbose export json json-pretty json-sse json-seq cat with-unit)
index cce44423e969b6047f23f054bb02faf4b968cc15..654f48fca5eb5a4c99df7c0f3cd585b0ed820ca4 100644 (file)
@@ -1,5 +1,5 @@
 #autoload
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 _sd_unit_files() {
     local files expl
index c59beb157c3d834edaa8eef53421f7165b5db9d6..4830aeba5f744eb1202f716aa34cf4f1c5888561 100644 (file)
@@ -1,5 +1,5 @@
 #compdef systemctl                    -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 (( $+functions[_systemctl_commands] )) || _systemctl_commands()
 {
index 3550c15163a3b427430a815f03d58c877df5074c..5a8af1c918a73c8db93b6b83d18ce5481d3e088e 100644 (file)
@@ -1,5 +1,5 @@
 #compdef systemd-cat systemd-ask-password systemd-cgls systemd-cgtop systemd-detect-virt systemd-machine-id-setup systemd-notify systemd-tty-ask-password-agent                    -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 local curcontext="$curcontext" state lstate line
 case "$service" in
index 75e72439fd85ec8eafa1951ade51c4e38635855e..188d6b7359f6494b45fb5d2dd6e6c6708d9a2e95 100644 (file)
@@ -1,5 +1,5 @@
 #compdef systemd-analyze                    -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 (( $+functions[_systemd-analyze_log-level] )) ||
     _systemd-analyze_log-level() {
index b4361f7860f0065786ee9f80c9401894cf8e2e2f..5cd140d1fc9dd0cd5340a87e95b2f8eb43a467ed 100644 (file)
@@ -1,5 +1,5 @@
 #compdef systemd-delta                    -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 (( $+functions[_systemd-delta_types] )) ||
 _systemd-delta_types() {
index 4536f9bd2e5745c252becdc262e56870c1a1daac..1ff8487bf9ea4888af786b0b4dd3a0ce87cc7587 100644 (file)
@@ -1,5 +1,5 @@
 #compdef systemd-inhibit                    -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 (( $+functions[_systemd-inhibit_commands] )) ||
 _systemd-inhibit_commands(){
index 414d82e2ea8b92038ebed7973ed75ce25b4e0f76..d3cf06016b14720e404de014c01312c925608d1c 100644 (file)
@@ -1,5 +1,5 @@
 #compdef systemd-nspawn                    -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 (( $+functions[_systemd-nspawn_caps] )) ||
 _systemd-nspawn_caps(){
index 22b82d66fd814dcd9ad001df081f2f990e854ffa..d9998e5dfb15ad9942177a277c68e76e841ce2a5 100644 (file)
@@ -1,5 +1,5 @@
 #compdef systemd-run                    -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 # @todo _systemctl has a helper with the same name, so we must redefine
 __systemctl() {
index 8860dc797cfe20da197bb06d9826d7d98b6af2be..8a23360bf082b343be4aa31cec26a38bf457b069 100644 (file)
@@ -1,5 +1,5 @@
 #compdef systemd-tmpfiles                    -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 _arguments \
     {-h,--help}'[Show help]' \
index e2dabc79a727320396a73d61743f1bee24f82b68..eee086ea9ecdf69cc4faee1c9844f7ef26e8acc8 100644 (file)
@@ -1,5 +1,5 @@
 #compdef timedatectl                    -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 _timedatectl_set-timezone(){
     local -a _timezones
index ad0b73d4766052e5c90df32687f2619e1341b3bf..ae82d8aa70b296b928206825c87261c23a65e1e8 100644 (file)
@@ -1,5 +1,5 @@
 #compdef udevadm                    -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 (( $+functions[_udevadm_info] )) ||
 _udevadm_info(){
index ff91cc1134cbd95f87501861285f8435ff93829a..4fff13357f622e27b86e9b21834dac4daf334dfb 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 zshcompletiondir = get_option('zshcompletiondir')
 if zshcompletiondir == ''
index 90ba5d2b68337f317b92b535f4d7edd272aee546..9fabdb9e9f1d690adb4915a69f086cb3eb09867f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 
index bca845ad83b9fa828ff44cc21028bb8063d071aa..1f7a2490e7b79dce7b6807d8f10af6c3c24e52b9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 #include <sys/epoll.h>
index e1365e1805616cc0d82ba52a1b1bb6db9d5402c7..241c188ed6d187a46198ebd2b56843af4fed99d3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdlib.h>
 
index 2ef278eb5c8e251dfb46af08cc2449154bb08434..7b52669d05ea267f0d6cf52e8572d022c3f38837 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "install.h"
index 9c1d63030d18a899c33b85a7c1b7ef8d36235c8a..8d94fbc5d794b744fd0fec5858340edd0cdd07e0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/utsname.h>
 
index c00ae7c80a3f93c0fdc998db577b070e5a7a9228..e8de39f3bc2f76b3adcb68fe14b7198b1a48b895 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 93506482e8b29d512f1edd7b15e0aa0822e10b95..a9c89173bfa9997a66c48e215823e972bb104383 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdlib.h>
 
index 3da2cf7097a46d5f378eaf3b641b11525c4f595d..43bfbcbc8c4eaa35bb8f6b04d3c7ae7f550ec42f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 9a0b1a7bbfe47a7c4db6507b6a14e55a86aa39e4..9920f2a85683a5decec2386923c61694f990586b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2013 Simon Peeters
 ***/
index 58760d609b36650bd45ac964b4dd0538dd288686..9e4d95b03643e22180a1583ba3077f28feb97aa4 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 systemd_analyze_sources = files('''
         analyze.c
index dcbb6394c6b9004f530aa5bb9372acc92688131b..12c32159e56e9c0cd937344357171a06f1d965ed 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #include "analyze-verify.h"
 #include "tests.h"
 
index ca6da40bbc96763ce987844a0ab9eb81437e254b..a24ee9af1c9a0b6d1a4db8686cdb464040c56745 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <getopt.h>
index 9ee2c23683aad0bcc32e6490dfeb419f185a50f3..d1b6a81e33904727d8ac396b8f8be5c2a8dcdb2e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -252,6 +252,7 @@ static int get_max_brightness(sd_device *device, unsigned *ret) {
         if (max_brightness <= 0)
                 return log_device_warning_errno(device, SYNTHETIC_ERRNO(EINVAL), "Maximum brightness is 0, ignoring device.");
 
+        log_device_debug(device, "Maximum brightness is %u", max_brightness);
         *ret = max_brightness;
         return 0;
 }
@@ -348,6 +349,7 @@ static int read_brightness(sd_device *device, unsigned max_brightness, unsigned
                         goto use_brightness;
                 }
 
+                log_device_debug(device, "Current actual_brightness is %u", brightness);
                 *ret_brightness = brightness;
                 return 0;
         }
@@ -366,6 +368,7 @@ use_brightness:
                                               "brightness=%u is larger than max_brightness=%u",
                                               brightness, max_brightness);
 
+        log_device_debug(device, "Current brightness is %u", brightness);
         *ret_brightness = brightness;
         return 0;
 }
@@ -456,10 +459,11 @@ static int run(int argc, char *argv[]) {
                 if (r > 0) {
                         r = safe_atou(value, &brightness);
                         if (r < 0) {
-                                log_error_errno(r, "Failed to parse saved brightness '%s', removing %s.",
-                                                value, saved);
+                                log_warning_errno(r, "Failed to parse saved brightness '%s', removing %s.",
+                                                  value, saved);
                                 (void) unlink(saved);
                         } else {
+                                log_debug("Using saved brightness %u.", brightness);
                                 if (clamp)
                                         (void) clamp_brightness(device, true, max_brightness, &brightness);
 
index 5859af0a81b622e60ccbc580f18c2a1529902751..43a89a0820bf10b76aa8cf22d8da3891b8bb2285 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LicenseRef-murmurhash2-public-domain */
 //-----------------------------------------------------------------------------
 // MurmurHash2 was written by Austin Appleby, and is placed in the public
 // domain. The author hereby disclaims copyright to this source code.
index 1aef3afba0648a245fc8bcb986293f5a3d2a2b35..5758b860398dba7c1740ad86b76f709f299452e9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LicenseRef-murmurhash2-public-domain */
 //-----------------------------------------------------------------------------
 // MurmurHash2 was written by Austin Appleby, and is placed in the public
 // domain. The author hereby disclaims copyright to this source code.
index abad221d58a8afa54df906420cf1e3a1428504b7..7e819d6d11ec9a9600c19d717c6dc55472bd75f9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <string.h>
index 8342323b8a80d5ed0017111f356d6b4ec95cda62..688ac63df755e5167e0283b5c38a14a2961341d8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/socket.h>
index 5951e8c3d590c91f325364454d44aa08087889bd..bad15cc204c953ffa5e3ebb2477d1caa25efe27d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <malloc.h>
 #include <stdint.h>
index 34340e4a39df73d6a83e4981c40c4176e2aeb96c..f3e192ddaf74160943fd6ba5f126f8d5db6a0582 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <alloca.h>
index 85837b5ebf118d955013c192786e0f0954de69fc..409632c3f49d6f0e11d678dc4afc95fc6b39f9aa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/utsname.h>
 
index 443e890eabc370af682a51ac2eb5cd44c027dcc7..1db625cf80595fcb1617fa71a3ff89aef49c8fd6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <endian.h>
index 7e5570ab9faec7ddeb0524c62a64ec2014f4464a..99048d20c80c36c888954c6287568f9a9e2f1cba 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <linux/if_arp.h>
index aae56bc88c6e09ae469fb65e6280d837b687d1bc..bc95b4507b4f72ada52a15ad7afe0ad18ae8ea80 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 const char *arphrd_to_name(int id);
index daa95cd102fb4f5d2487064ae81507f5c9d98d7d..443cfa95ab70abe80c4b7bb51cab000bb9c21b1a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <pthread.h>
index 3160613184b9653cc78c041d6c195623ef9ef18a..9ada32c9948fcfe3294dc6b79239220be8ade614 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int asynchronous_job(void* (*func)(void *p), void *arg);
index 6eb224b2c818a2c326ebfafc620adc0118e4deb9..1bf88b1e52bf6565a04e6772543b6b006b47dc1e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <linux/netlink.h>
index c9fc49871d12ec9313e29f13cc2d204b69542737..aa2177113b1abca2499585bd403d57ee7d6ae6b5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 21ff3ba1b13c018ac283476216d308b12585b19b..0f1e30ccd971ce6a2880858cf79a5ce2874df334 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/file.h>
 #include <unistd.h>
index 58a7050f53b2f1e0eb993b7b769e4c97edf5bd10..10048ff3139ed5e1f64921fdf66d98d1e373a041 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/types.h>
index 50a35268ea1bbfd757142e51063b838cdaf2cd9b..2634659aa0ff7b0f02a9dc625b00105de5b5ac29 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index d9cb95af006740439302796fcd27701f8cd8d47b..c8b44f6162718da606465cfc0423b8add709c236 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
diff --git a/src/basic/build.c b/src/basic/build.c
new file mode 100644 (file)
index 0000000..4507459
--- /dev/null
@@ -0,0 +1,216 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#include "build.h"
+
+const char* const systemd_features =
+
+        /* PAM and MAC frameworks */
+
+#if HAVE_PAM
+        "+PAM"
+#else
+        "-PAM"
+#endif
+
+#if HAVE_AUDIT
+        " +AUDIT"
+#else
+        " -AUDIT"
+#endif
+
+#if HAVE_SELINUX
+        " +SELINUX"
+#else
+        " -SELINUX"
+#endif
+
+#if HAVE_APPARMOR
+        " +APPARMOR"
+#else
+        " -APPARMOR"
+#endif
+
+#if ENABLE_IMA
+        " +IMA"
+#else
+        " -IMA"
+#endif
+
+#if ENABLE_SMACK
+        " +SMACK"
+#else
+        " -SMACK"
+#endif
+
+#if HAVE_SECCOMP
+        " +SECCOMP"
+#else
+        " -SECCOMP"
+#endif
+
+        /* crypto libraries */
+
+#if HAVE_GCRYPT
+        " +GCRYPT"
+#else
+        " -GCRYPT"
+#endif
+
+#if HAVE_GNUTLS
+        " +GNUTLS"
+#else
+        " -GNUTLS"
+#endif
+
+#if HAVE_OPENSSL
+        " +OPENSSL"
+#else
+        " -OPENSSL"
+#endif
+
+        /* all other libraries, sorted alphabetically */
+
+#if HAVE_ACL
+        " +ACL"
+#else
+        " -ACL"
+#endif
+
+#if HAVE_BLKID
+        " +BLKID"
+#else
+        " -BLKID"
+#endif
+
+#if HAVE_LIBCURL
+        " +CURL"
+#else
+        " -CURL"
+#endif
+
+#if HAVE_ELFUTILS
+        " +ELFUTILS"
+#else
+        " -ELFUTILS"
+#endif
+
+#if HAVE_LIBFIDO2
+        " +FIDO2"
+#else
+        " -FIDO2"
+#endif
+
+#if HAVE_LIBIDN2
+        " +IDN2"
+#else
+        " -IDN2"
+#endif
+
+#if HAVE_LIBIDN
+        " +IDN"
+#else
+        " -IDN"
+#endif
+
+#if HAVE_LIBIPTC
+        " +IPTC"
+#else
+        " -IPTC"
+#endif
+
+#if HAVE_KMOD
+        " +KMOD"
+#else
+        " -KMOD"
+#endif
+
+#if HAVE_LIBCRYPTSETUP
+        " +LIBCRYPTSETUP"
+#else
+        " -LIBCRYPTSETUP"
+#endif
+
+#if HAVE_LIBFDISK
+        " +LIBFDISK"
+#else
+        " -LIBFDISK"
+#endif
+
+#if HAVE_PCRE2
+        " +PCRE2"
+#else
+        " -PCRE2"
+#endif
+
+#if HAVE_PWQUALITY
+        " +PWQUALITY"
+#else
+        " -PWQUALITY"
+#endif
+
+#if HAVE_P11KIT
+        " +P11KIT"
+#else
+        " -P11KIT"
+#endif
+
+#if HAVE_QRENCODE
+        " +QRENCODE"
+#else
+        " -QRENCODE"
+#endif
+
+        /* compressors */
+
+#if HAVE_BZIP2
+        " +BZIP2"
+#else
+        " -BZIP2"
+#endif
+
+#if HAVE_LZ4
+        " +LZ4"
+#else
+        " -LZ4"
+#endif
+
+#if HAVE_XZ
+        " +XZ"
+#else
+        " -XZ"
+#endif
+
+#if HAVE_ZLIB
+        " +ZLIB"
+#else
+        " -ZLIB"
+#endif
+
+#if HAVE_ZSTD
+        " +ZSTD"
+#else
+        " -ZSTD"
+#endif
+
+        /* other stuff that doesn't fit above */
+
+#if HAVE_XKBCOMMON
+        " +XKBCOMMON"
+#else
+        " -XKBCOMMON"
+#endif
+
+#if ENABLE_UTMP
+        " +UTMP"
+#else
+        " -UTMP"
+#endif
+
+#if HAVE_SYSV_COMPAT
+        " +SYSVINIT"
+#else
+        " -SYSVINIT"
+#endif
+
+        " default-hierarchy=" DEFAULT_HIERARCHY_NAME
+        ;
index d160af5bc7e6d7e6101c73d54853eb3c37270877..3de0d36cc9ff8a98b9baaeb7d80f1cb14a69c0df 100644 (file)
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "version.h"
 
-#if HAVE_PAM
-#define _PAM_FEATURE_ "+PAM"
-#else
-#define _PAM_FEATURE_ "-PAM"
-#endif
+extern const char* const systemd_features;
 
-#if HAVE_AUDIT
-#define _AUDIT_FEATURE_ "+AUDIT"
-#else
-#define _AUDIT_FEATURE_ "-AUDIT"
-#endif
-
-#if HAVE_SELINUX
-#define _SELINUX_FEATURE_ "+SELINUX"
-#else
-#define _SELINUX_FEATURE_ "-SELINUX"
-#endif
-
-#if HAVE_APPARMOR
-#define _APPARMOR_FEATURE_ "+APPARMOR"
-#else
-#define _APPARMOR_FEATURE_ "-APPARMOR"
-#endif
-
-#if ENABLE_IMA
-#define _IMA_FEATURE_ "+IMA"
-#else
-#define _IMA_FEATURE_ "-IMA"
-#endif
-
-#if ENABLE_SMACK
-#define _SMACK_FEATURE_ "+SMACK"
-#else
-#define _SMACK_FEATURE_ "-SMACK"
-#endif
-
-#if HAVE_SYSV_COMPAT
-#define _SYSVINIT_FEATURE_ "+SYSVINIT"
-#else
-#define _SYSVINIT_FEATURE_ "-SYSVINIT"
-#endif
-
-#if ENABLE_UTMP
-#define _UTMP_FEATURE_ "+UTMP"
-#else
-#define _UTMP_FEATURE_ "-UTMP"
-#endif
-
-#if HAVE_LIBCRYPTSETUP
-#define _LIBCRYPTSETUP_FEATURE_ "+LIBCRYPTSETUP"
-#else
-#define _LIBCRYPTSETUP_FEATURE_ "-LIBCRYPTSETUP"
-#endif
-
-#if HAVE_GCRYPT
-#define _GCRYPT_FEATURE_ "+GCRYPT"
-#else
-#define _GCRYPT_FEATURE_ "-GCRYPT"
-#endif
-
-#if HAVE_GNUTLS
-#define _GNUTLS_FEATURE_ "+GNUTLS"
-#else
-#define _GNUTLS_FEATURE_ "-GNUTLS"
-#endif
-
-#if HAVE_ACL
-#define _ACL_FEATURE_ "+ACL"
-#else
-#define _ACL_FEATURE_ "-ACL"
-#endif
-
-#if HAVE_XZ
-#define _XZ_FEATURE_ "+XZ"
-#else
-#define _XZ_FEATURE_ "-XZ"
-#endif
-
-#if HAVE_LZ4
-#define _LZ4_FEATURE_ "+LZ4"
-#else
-#define _LZ4_FEATURE_ "-LZ4"
-#endif
-
-#if HAVE_ZSTD
-#define _ZSTD_FEATURE_ "+ZSTD"
-#else
-#define _ZSTD_FEATURE_ "-ZSTD"
-#endif
-
-#if HAVE_SECCOMP
-#define _SECCOMP_FEATURE_ "+SECCOMP"
-#else
-#define _SECCOMP_FEATURE_ "-SECCOMP"
-#endif
-
-#if HAVE_BLKID
-#define _BLKID_FEATURE_ "+BLKID"
-#else
-#define _BLKID_FEATURE_ "-BLKID"
-#endif
-
-#if HAVE_ELFUTILS
-#define _ELFUTILS_FEATURE_ "+ELFUTILS"
-#else
-#define _ELFUTILS_FEATURE_ "-ELFUTILS"
-#endif
-
-#if HAVE_KMOD
-#define _KMOD_FEATURE_ "+KMOD"
-#else
-#define _KMOD_FEATURE_ "-KMOD"
-#endif
-
-#if HAVE_LIBIDN2
-#define _IDN2_FEATURE_ "+IDN2"
-#else
-#define _IDN2_FEATURE_ "-IDN2"
-#endif
-
-#if HAVE_LIBIDN
-#define _IDN_FEATURE_ "+IDN"
-#else
-#define _IDN_FEATURE_ "-IDN"
-#endif
-
-#if HAVE_PCRE2
-#define _PCRE2_FEATURE_ "+PCRE2"
-#else
-#define _PCRE2_FEATURE_ "-PCRE2"
-#endif
-
-#define _CGROUP_HIERARCHY_ "default-hierarchy=" DEFAULT_HIERARCHY_NAME
-
-#define SYSTEMD_FEATURES                                                \
-        _PAM_FEATURE_ " "                                               \
-        _AUDIT_FEATURE_ " "                                             \
-        _SELINUX_FEATURE_ " "                                           \
-        _IMA_FEATURE_ " "                                               \
-        _APPARMOR_FEATURE_ " "                                          \
-        _SMACK_FEATURE_ " "                                             \
-        _SYSVINIT_FEATURE_ " "                                          \
-        _UTMP_FEATURE_ " "                                              \
-        _LIBCRYPTSETUP_FEATURE_ " "                                     \
-        _GCRYPT_FEATURE_ " "                                            \
-        _GNUTLS_FEATURE_ " "                                            \
-        _ACL_FEATURE_ " "                                               \
-        _XZ_FEATURE_ " "                                                \
-        _LZ4_FEATURE_ " "                                               \
-        _ZSTD_FEATURE_ " "                                              \
-        _SECCOMP_FEATURE_ " "                                           \
-        _BLKID_FEATURE_ " "                                             \
-        _ELFUTILS_FEATURE_ " "                                          \
-        _KMOD_FEATURE_ " "                                              \
-        _IDN2_FEATURE_ " "                                              \
-        _IDN_FEATURE_ " "                                               \
-        _PCRE2_FEATURE_ " "                                             \
-        _CGROUP_HIERARCHY_
+enum {
+        BUILD_MODE_DEVELOPER,
+        BUILD_MODE_RELEASE,
+};
index 1613cf7fd79b99952bff2491e29d601bcdfc8d44..cd6c58a3d313a6f774d0c4b485ce25147bf30d2c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdlib.h>
 
index 4a1b097a52b8406c5add186981b66777abb58846..446daba7f267af0f8071414853a998fe307d11ae 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stddef.h>
index b483833947518e968b1b1b23ca5f34396a34fc1c..d295a635ca9bbc38c099aad0b4aa06fdf5796a6f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <string.h>
@@ -50,6 +50,9 @@ int capability_from_name(const char *name) {
         return sc->id;
 }
 
+/* This is the number of capability names we are *compiled* with.
+ * For the max capability number of the currently-running kernel,
+ * use cap_last_cap(). */
 int capability_list_length(void) {
         return (int) ELEMENTSOF(capability_names);
 }
index 4bfb1a355b4999877db59281d1da5a9b29b6bb10..71235d6a285ce25b10a36a21a04d2ef628ea9b88 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index ae269e8a8a1b872aa61867ed6529d0852d5604d0..c1520d927901a3cbc7cd911afd835c44ca5d2843 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdio.h>
index fdf6ef84622b3f26f93f0e0f4149c779e0bc7b36..f5ce2905241d8139c05c1187d98feb7c10035ccc 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 6210347553c4088c3df20d85eb8eb00cd0b24140..f28bf1866a0505c4f2fa77a0aef5288892537478 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <ftw.h>
@@ -1685,6 +1685,26 @@ int cg_get_attribute_as_uint64(const char *controller, const char *path, const c
         return 0;
 }
 
+int cg_get_attribute_as_bool(const char *controller, const char *path, const char *attribute, bool *ret) {
+        _cleanup_free_ char *value = NULL;
+        int r;
+
+        assert(ret);
+
+        r = cg_get_attribute(controller, path, attribute, &value);
+        if (r == -ENOENT)
+                return -ENODATA;
+        if (r < 0)
+                return r;
+
+        r = parse_boolean(value);
+        if (r < 0)
+                return r;
+
+        *ret = r;
+        return 0;
+}
+
 int cg_get_keyed_attribute_full(
                 const char *controller,
                 const char *path,
@@ -1855,9 +1875,8 @@ int cg_mask_supported(CGroupMask *ret) {
         if (r > 0) {
                 _cleanup_free_ char *root = NULL, *controllers = NULL, *path = NULL;
 
-                /* In the unified hierarchy we can read the supported
-                 * and accessible controllers from a the top-level
-                 * cgroup attribute */
+                /* In the unified hierarchy we can read the supported and accessible controllers from
+                 * the top-level cgroup attribute */
 
                 r = cg_get_root_path(&root);
                 if (r < 0)
@@ -2161,3 +2180,10 @@ CGroupMask get_cpu_accounting_mask(void) {
 bool cpu_accounting_is_cheap(void) {
         return get_cpu_accounting_mask() == 0;
 }
+
+static const char* const managed_oom_mode_table[_MANAGED_OOM_MODE_MAX] = {
+        [MANAGED_OOM_AUTO] = "auto",
+        [MANAGED_OOM_KILL] = "kill",
+};
+
+DEFINE_STRING_TABLE_LOOKUP(managed_oom_mode, ManagedOOMMode);
index 2b88571bc1c7767d57cc9de9d0a417fe2e0cbb82..bdc0d0d086c9a0bded41a204b1a0959d66474a0d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <dirent.h>
@@ -208,6 +208,9 @@ static inline int cg_get_keyed_attribute_graceful(
 
 int cg_get_attribute_as_uint64(const char *controller, const char *path, const char *attribute, uint64_t *ret);
 
+/* Does a parse_boolean() on the attribute contents and sets ret accordingly */
+int cg_get_attribute_as_bool(const char *controller, const char *path, const char *attribute, bool *ret);
+
 int cg_set_access(const char *controller, const char *path, uid_t uid, gid_t gid);
 
 int cg_set_xattr(const char *controller, const char *path, const char *name, const void *value, size_t size, int flags);
@@ -275,3 +278,13 @@ CGroupController cgroup_controller_from_string(const char *s) _pure_;
 
 bool is_cgroup_fs(const struct statfs *s);
 bool fd_is_cgroup_fs(int fd);
+
+typedef enum ManagedOOMMode {
+        MANAGED_OOM_AUTO,
+        MANAGED_OOM_KILL,
+        _MANAGED_OOM_MODE_MAX,
+        _MANAGED_OOM_MODE_INVALID = -1,
+} ManagedOOMMode;
+
+const char* managed_oom_mode_to_string(ManagedOOMMode m) _const_;
+ManagedOOMMode managed_oom_mode_from_string(const char *s) _pure_;
index 235cfb9bd752e19df84500bd1cffa7a9cf8d1076..c724e17685a6314af9938ebcb7e07cef236c738c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 29070c848a70ee482b31a0165dbe4169d40e01e8..2fcdb644317deaa68e0364d65435367bc691c50e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <linux/fs.h>
index eb19516c2acc2446243c8356ea9a6f2638f3b25a..f8c997673a6b98b3dd44502464dd934da2575edc 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdarg.h>
index 7d7be5c90fc31845c811f83eec91efa785b1fdbb..7774ed705413aff5b8a0b9505e6880f53b09149c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "macro.h"
index be4ca6288a9ec0faae275326fa0fae3f455fcc84..aa805bb8e25acbf9e5303b37e453251dcd5a9cfc 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -1047,18 +1047,29 @@ int copy_file_full(
                 copy_progress_bytes_t progress_bytes,
                 void *userdata) {
 
+        _cleanup_close_ int fdf = -1;
+        struct stat st;
         int fdt = -1, r;
 
         assert(from);
         assert(to);
 
+        fdf = open(from, O_RDONLY|O_CLOEXEC|O_NOCTTY);
+        if (fdf < 0)
+                return -errno;
+
+        if (mode == (mode_t) -1)
+                if (fstat(fdf, &st) < 0)
+                        return -errno;
+
         RUN_WITH_UMASK(0000) {
                 if (copy_flags & COPY_MAC_CREATE) {
                         r = mac_selinux_create_file_prepare(to, S_IFREG);
                         if (r < 0)
                                 return r;
                 }
-                fdt = open(to, flags|O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY, mode);
+                fdt = open(to, flags|O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY,
+                           mode != (mode_t) -1 ? mode : st.st_mode);
                 if (copy_flags & COPY_MAC_CREATE)
                         mac_selinux_create_file_clear();
                 if (fdt < 0)
@@ -1068,13 +1079,16 @@ int copy_file_full(
         if (chattr_mask != 0)
                 (void) chattr_fd(fdt, chattr_flags, chattr_mask & CHATTR_EARLY_FL, NULL);
 
-        r = copy_file_fd_full(from, fdt, copy_flags, progress_bytes, userdata);
+        r = copy_bytes_full(fdf, fdt, (uint64_t) -1, copy_flags, NULL, NULL, progress_bytes, userdata);
         if (r < 0) {
                 close(fdt);
                 (void) unlink(to);
                 return r;
         }
 
+        (void) copy_times(fdf, fdt, copy_flags);
+        (void) copy_xattr(fdf, fdt);
+
         if (chattr_mask != 0)
                 (void) chattr_fd(fdt, chattr_flags, chattr_mask & ~CHATTR_EARLY_FL, NULL);
 
@@ -1103,7 +1117,7 @@ int copy_file_atomic_full(
         assert(from);
         assert(to);
 
-        /* We try to use O_TMPFILE here to create the file if we can. Note that that only works if COPY_REPLACE is not
+        /* We try to use O_TMPFILE here to create the file if we can. Note that this only works if COPY_REPLACE is not
          * set though as we need to use linkat() for linking the O_TMPFILE file into the file system but that system
          * call can't replace existing files. Hence, if COPY_REPLACE is set we create a temporary name in the file
          * system right-away and unconditionally which we then can renameat() to the right name after we completed
index cf2efd8e7bba37073db0ec4a2613a82f0992d7c3..b583dff2c09e966a1ce78956668f927247cc8707 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <fcntl.h>
index 970654a1ade9f90658edfe16ea7a4c04fc035894..2e60abb4f19ec490297104dc1aea98983e2dfd2b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #define DEFAULT_TIMEOUT_USEC (90*USEC_PER_SEC)
@@ -63,3 +63,5 @@
                 .un.sun_family = AF_UNIX,                       \
                 .un.sun_path = "\0/org/freedesktop/plymouthd",  \
         }
+
+#define VARLINK_ADDR_PATH_MANAGED_OOM "/run/systemd/io.system.ManagedOOM"
index 888ef236642e8a4ca696b19f18ad2898a0087fec..7eb9c351b6d4b4d0692ea2be464a15917d0e6dd5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdio.h>
index 0dad8c9c681cd46c4096e750febe336b39251387..9e5c79f67d28fe09fa69b1d116a0ff70a2e63a8b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stddef.h>
index d1d2c0ef46e6bcb2772f0dc470ad7e9e17332840..48aced748a9de2da5b82353f1acccf18588f2610 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/stat.h>
index b1b87679dcc114acbaaa7524f78249611ee2be67..07750c39e0270e628045c41f2406e7a0503cec6f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <dirent.h>
index 08ded96965bc9fe57de02dfcec6d12d0ba2dba02..2dbff0e3589c387d7aefeb62429e7f659cee66e8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "dlfcn-util.h"
 
index df66cdfd38f8a57bbe9424dd2fbe499fb52db424..2c94ed51f34408ee6e908348fbf6631b8d2ca56a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <dlfcn.h>
index 007137cf01277aa5eb4ddbaad04b41e8e7eb869b..5aeddef7e2dfae4ada90b6b4ff8c862df7718f1d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index cb341e452faceb2d042d4718b1dad8d2203ad725..d310dde7d78e7fb2fdcd143a724f7234e4889bfd 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #if !ENABLE_EFI
index dc92b13a6f922305fad661d752d8e9d1c41f03c1..99c3e3f4a31f3a7b41bc5876338c0d8a35b729a9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "env-file.h"
index e1ca195ff073d42c0e712fb2df07d745df603750..de475885acec3a854db7a6c8662ea7048cb52cd4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdarg.h>
index 179408c399402d0257767228765b46bedcc9c112..a84863ff225b31d16128a08c3540ee697190825b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <limits.h>
@@ -16,7 +16,8 @@
 #include "strv.h"
 #include "utf8.h"
 
-#define VALID_CHARS_ENV_NAME                    \
+/* We follow bash for the character set. Different shells have different rules. */
+#define VALID_BASH_ENV_NAME_CHARS               \
         DIGITS LETTERS                          \
         "_"
 
@@ -41,17 +42,14 @@ static bool env_name_is_valid_n(const char *e, size_t n) {
                 return false;
 
         for (p = e; p < e + n; p++)
-                if (!strchr(VALID_CHARS_ENV_NAME, *p))
+                if (!strchr(VALID_BASH_ENV_NAME_CHARS, *p))
                         return false;
 
         return true;
 }
 
 bool env_name_is_valid(const char *e) {
-        if (!e)
-                return false;
-
-        return env_name_is_valid_n(e, strlen(e));
+        return env_name_is_valid_n(e, strlen_ptr(e));
 }
 
 bool env_value_is_valid(const char *e) {
@@ -546,7 +544,7 @@ char *replace_env_n(const char *format, size_t n, char **env, unsigned flags) {
                                 word = e+1;
                                 state = WORD;
 
-                        } else if (flags & REPLACE_ENV_ALLOW_BRACELESS && strchr(VALID_CHARS_ENV_NAME, *e)) {
+                        } else if (flags & REPLACE_ENV_ALLOW_BRACELESS && strchr(VALID_BASH_ENV_NAME_CHARS, *e)) {
                                 k = strnappend(r, word, e-word-1);
                                 if (!k)
                                         return NULL;
@@ -636,7 +634,7 @@ char *replace_env_n(const char *format, size_t n, char **env, unsigned flags) {
                 case VARIABLE_RAW:
                         assert(flags & REPLACE_ENV_ALLOW_BRACELESS);
 
-                        if (!strchr(VALID_CHARS_ENV_NAME, *e)) {
+                        if (!strchr(VALID_BASH_ENV_NAME_CHARS, *e)) {
                                 const char *t;
 
                                 t = strv_env_get_n(env, word+1, e-word-1, flags);
@@ -749,3 +747,15 @@ int getenv_bool_secure(const char *p) {
 
         return parse_boolean(e);
 }
+
+int set_unset_env(const char *name, const char *value, bool overwrite) {
+        int r;
+
+        if (value)
+                r = setenv(name, value, overwrite);
+        else
+                r = unsetenv(name);
+        if (r < 0)
+                return -errno;
+        return 0;
+}
index 92802ed774448ef867ef289c54ecc280cfea368e..6684b3350f09b78839444fd7b2aa964f6902ef60 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
@@ -52,3 +52,6 @@ char *strv_env_get(char **x, const char *n) _pure_;
 
 int getenv_bool(const char *p);
 int getenv_bool_secure(const char *p);
+
+/* Like setenv, but calls unsetenv if value == NULL. */
+int set_unset_env(const char *name, const char *value, bool overwrite);
index 44cc57053966a6cdb0cce16ca9125401a56e5ec8..2aeb38c438dd3783e71a1962bf047d9ed6bc2b63 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <string.h>
index 9c639b4f55f0bad9bf8e992d50aaf8a7e459e2b5..082b833e49192c35622ddbaa415ce4354dc1513a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 0ca650f48f6d957291e9c0694c495d481f00ff52..5609820b882f528a0ab756f1e15a4756391e3ab2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdlib.h>
@@ -50,7 +50,10 @@ static inline int errno_or_else(int fallback) {
 /* Hint #1: ENETUNREACH happens if we try to connect to "non-existing" special IP addresses, such as ::5.
  *
  * Hint #2: The kernel sends e.g., EHOSTUNREACH or ENONET to userspace in some ICMP error cases.  See the
- *          icmp_err_convert[] in net/ipv4/icmp.c in the kernel sources */
+ *          icmp_err_convert[] in net/ipv4/icmp.c in the kernel sources.
+ *
+ * Hint #3: When asynchronous connect() on TCP fails because the host never acknowledges a single packet,
+ *          kernel tells us that with ETIMEDOUT, see tcp(7). */
 static inline bool ERRNO_IS_DISCONNECT(int r) {
         return IN_SET(abs(r),
                       ECONNABORTED,
@@ -66,7 +69,8 @@ static inline bool ERRNO_IS_DISCONNECT(int r) {
                       ENOTCONN,
                       EPIPE,
                       EPROTO,
-                      ESHUTDOWN);
+                      ESHUTDOWN,
+                      ETIMEDOUT);
 }
 
 /* Transient errors we might get on accept() that we should ignore. As per error handling comment in
index 7589d597a2fc9764f7982ed369c466b4a7b3021d..31f3cda472e60668dfd1084d6198d6e4ec42a8bf 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdlib.h>
index fa267813b34e286b9a1531d206a7d85343ba853b..691b6d802c296620f56a51dce15e004af93677f0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
@@ -16,7 +16,7 @@
 
 /* Those that can be escaped or double-quoted.
  *
- * Stricly speaking, ! does not need to be escaped, except in interactive
+ * Strictly speaking, ! does not need to be escaped, except in interactive
  * mode, but let's be extra nice to the user and quote ! in case this
  * output is ever used in interactive mode. */
 #define SHELL_NEED_QUOTES SHELL_NEED_ESCAPE GLOB_CHARS "'()<>|&;!"
index e875696a1a9ea26e066ecf724949460d4b0f8a8c..c8094b6e45ecf6269dce7a290e3fc4ed8adf54c1 100644 (file)
@@ -1,6 +1,7 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
+#include <inttypes.h>
 #include <net/ethernet.h>
 #include <stdio.h>
 #include <sys/types.h>
@@ -9,6 +10,20 @@
 #include "macro.h"
 #include "string-util.h"
 
+char* hw_addr_to_string(const hw_addr_data *addr, char buffer[HW_ADDR_TO_STRING_MAX]) {
+        assert(addr);
+        assert(buffer);
+        assert(addr->length <= HW_ADDR_MAX_SIZE);
+
+        for (size_t i = 0; i < addr->length; i++) {
+                sprintf(&buffer[3*i], "%02"PRIx8, addr->addr.bytes[i]);
+                if (i < addr->length - 1)
+                        buffer[3*i + 2] = ':';
+        }
+
+        return buffer;
+}
+
 char* ether_addr_to_string(const struct ether_addr *addr, char buffer[ETHER_ADDR_TO_STRING_MAX]) {
         assert(addr);
         assert(buffer);
index 4e44b30be98e6fbb7f097e03002baa47d01077e6..942ce55621e16fe56140c42965c252e4051064bf 100644 (file)
@@ -1,11 +1,35 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
+#include <linux/if_infiniband.h>
 #include <net/ethernet.h>
 #include <stdbool.h>
 
 #include "hash-funcs.h"
 
+/* This is MAX_ADDR_LEN as defined in linux/netdevice.h, but net/if_arp.h
+ * defines a macro of the same name with a much lower size. */
+#define HW_ADDR_MAX_SIZE 32
+
+union hw_addr_union {
+        struct ether_addr ether;
+        uint8_t infiniband[INFINIBAND_ALEN];
+        uint8_t bytes[HW_ADDR_MAX_SIZE];
+};
+
+typedef struct hw_addr_data {
+        union hw_addr_union addr;
+        size_t length;
+} hw_addr_data;
+
+#define HW_ADDR_TO_STRING_MAX (3*HW_ADDR_MAX_SIZE)
+char* hw_addr_to_string(const hw_addr_data *addr, char buffer[HW_ADDR_TO_STRING_MAX]);
+
+/* Use only as function argument, never stand-alone! */
+#define HW_ADDR_TO_STR(hw_addr) hw_addr_to_string((hw_addr), (char[HW_ADDR_TO_STRING_MAX]){})
+
+#define HW_ADDR_NULL ((const hw_addr_data){})
+
 #define ETHER_ADDR_FORMAT_STR "%02X%02X%02X%02X%02X%02X"
 #define ETHER_ADDR_FORMAT_VAL(x) (x).ether_addr_octet[0], (x).ether_addr_octet[1], (x).ether_addr_octet[2], (x).ether_addr_octet[3], (x).ether_addr_octet[4], (x).ether_addr_octet[5]
 
index d64dddd641d121fc4be994727b0596e202e47d45..76b3fe12e3b8c4437a6893d29ddbaf84fc9e54be 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdarg.h>
index f028577c40887e91622e32edb0e518fc51b968e3..d1de32e5806d316f3e7cf50564a990089d951e8f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "macro.h"
index e37b6944a8a6fe7c417e68f61ca6a9a5efddfbdc..07a7b3a30639fb6cc057b9ba42c98e1459f4d537 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 93ce95cd036768c3084fd548fe1e457914476059..2162537b80889e2776a9018b93b728565a110b8f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <dirent.h>
index c5a093a85759c5b900b45e2e4d5a089f90522812..f4708bc05f0fee1d2e592e12c3f8d2e45ea09c3e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <ctype.h>
 #include <errno.h>
@@ -117,7 +117,7 @@ int write_string_stream_ts(
                 FILE *f,
                 const char *line,
                 WriteStringFileFlags flags,
-                struct timespec *ts) {
+                const struct timespec *ts) {
 
         bool needs_nl;
         int r, fd;
@@ -161,7 +161,7 @@ int write_string_stream_ts(
                 return r;
 
         if (ts) {
-                struct timespec twice[2] = {*ts, *ts};
+                const struct timespec twice[2] = {*ts, *ts};
 
                 if (futimens(fd, twice) < 0)
                         return -errno;
@@ -174,7 +174,7 @@ static int write_string_file_atomic(
                 const char *fn,
                 const char *line,
                 WriteStringFileFlags flags,
-                struct timespec *ts) {
+                const struct timespec *ts) {
 
         _cleanup_fclose_ FILE *f = NULL;
         _cleanup_free_ char *p = NULL;
@@ -221,7 +221,7 @@ int write_string_file_ts(
                 const char *fn,
                 const char *line,
                 WriteStringFileFlags flags,
-                struct timespec *ts) {
+                const struct timespec *ts) {
 
         _cleanup_fclose_ FILE *f = NULL;
         int q, r, fd;
@@ -252,7 +252,8 @@ int write_string_file_ts(
         /* We manually build our own version of fopen(..., "we") that works without O_CREAT and with O_NOFOLLOW if needed. */
         fd = open(fn, O_WRONLY|O_CLOEXEC|O_NOCTTY |
                   (FLAGS_SET(flags, WRITE_STRING_FILE_NOFOLLOW) ? O_NOFOLLOW : 0) |
-                  (FLAGS_SET(flags, WRITE_STRING_FILE_CREATE) ? O_CREAT : 0),
+                  (FLAGS_SET(flags, WRITE_STRING_FILE_CREATE) ? O_CREAT : 0) |
+                  (FLAGS_SET(flags, WRITE_STRING_FILE_TRUNCATE) ? O_TRUNC : 0),
                   (FLAGS_SET(flags, WRITE_STRING_FILE_MODE_0600) ? 0600 : 0666));
         if (fd < 0) {
                 r = -errno;
@@ -471,12 +472,13 @@ int read_full_virtual_file(const char *filename, char **ret_contents, size_t *re
 int read_full_stream_full(
                 FILE *f,
                 const char *filename,
+                uint64_t offset,
+                size_t size,
                 ReadFullFileFlags flags,
                 char **ret_contents,
                 size_t *ret_size) {
 
         _cleanup_free_ char *buf = NULL;
-        struct stat st;
         size_t n, n_next, l;
         int fd, r;
 
@@ -484,32 +486,45 @@ int read_full_stream_full(
         assert(ret_contents);
         assert(!FLAGS_SET(flags, READ_FULL_FILE_UNBASE64 | READ_FULL_FILE_UNHEX));
 
-        n_next = LINE_MAX; /* Start size */
+        if (offset != UINT64_MAX && offset > LONG_MAX)
+                return -ERANGE;
+
+        n_next = size != SIZE_MAX ? size : LINE_MAX; /* Start size */
 
         fd = fileno(f);
-        if (fd >= 0) { /* If the FILE* object is backed by an fd (as opposed to memory or such, see fmemopen()), let's
-                        * optimize our buffering */
+        if (fd >= 0) { /* If the FILE* object is backed by an fd (as opposed to memory or such, see
+                        * fmemopen()), let's optimize our buffering */
+                struct stat st;
 
                 if (fstat(fd, &st) < 0)
                         return -errno;
 
                 if (S_ISREG(st.st_mode)) {
-
-                        /* Safety check */
-                        if (st.st_size > READ_FULL_BYTES_MAX)
-                                return -E2BIG;
-
-                        /* Start with the right file size. Note that we increase the size
-                         * to read here by one, so that the first read attempt already
-                         * makes us notice the EOF. */
-                        if (st.st_size > 0)
-                                n_next = st.st_size + 1;
+                        if (size == SIZE_MAX) {
+                                uint64_t rsize =
+                                        LESS_BY((uint64_t) st.st_size, offset == UINT64_MAX ? 0 : offset);
+
+                                /* Safety check */
+                                if (rsize > READ_FULL_BYTES_MAX)
+                                        return -E2BIG;
+
+                                /* Start with the right file size. Note that we increase the size to read
+                                 * here by one, so that the first read attempt already makes us notice the
+                                 * EOF. If the reported size of the file is zero, we avoid this logic
+                                 * however, since quite likely it might be a virtual file in procfs that all
+                                 * report a zero file size. */
+                                if (st.st_size > 0)
+                                        n_next = rsize + 1;
+                        }
 
                         if (flags & READ_FULL_FILE_WARN_WORLD_READABLE)
                                 (void) warn_file_is_world_accessible(filename, &st, NULL, 0);
                 }
         }
 
+        if (offset != UINT64_MAX && fseek(f, offset, SEEK_SET) < 0)
+                return -errno;
+
         n = l = 0;
         for (;;) {
                 char *t;
@@ -546,6 +561,11 @@ int read_full_stream_full(
                 if (feof(f))
                         break;
 
+                if (size != SIZE_MAX) { /* If we got asked to read some specific size, we already sized the buffer right, hence leave */
+                        assert(l == size);
+                        break;
+                }
+
                 assert(k > 0); /* we can't have read zero bytes because that would have been EOF */
 
                 /* Safety check */
@@ -601,12 +621,21 @@ finalize:
         return r;
 }
 
-int read_full_file_full(int dir_fd, const char *filename, ReadFullFileFlags flags, char **contents, size_t *size) {
+int read_full_file_full(
+                int dir_fd,
+                const char *filename,
+                uint64_t offset,
+                size_t size,
+                ReadFullFileFlags flags,
+                const char *bind_name,
+                char **ret_contents,
+                size_t *ret_size) {
+
         _cleanup_fclose_ FILE *f = NULL;
         int r;
 
         assert(filename);
-        assert(contents);
+        assert(ret_contents);
 
         r = xfopenat(dir_fd, filename, "re", 0, &f);
         if (r < 0) {
@@ -621,6 +650,10 @@ int read_full_file_full(int dir_fd, const char *filename, ReadFullFileFlags flag
                 if (!FLAGS_SET(flags, READ_FULL_FILE_CONNECT_SOCKET))
                         return -ENXIO;
 
+                /* Seeking is not supported on AF_UNIX sockets */
+                if (offset != UINT64_MAX)
+                        return -ESPIPE;
+
                 if (dir_fd == AT_FDCWD)
                         r = sockaddr_un_set_path(&sa.un, filename);
                 else {
@@ -644,6 +677,20 @@ int read_full_file_full(int dir_fd, const char *filename, ReadFullFileFlags flag
                 if (sk < 0)
                         return -errno;
 
+                if (bind_name) {
+                        /* If the caller specified a socket name to bind to, do so before connecting. This is
+                         * useful to communicate some minor, short meta-information token from the client to
+                         * the server. */
+                        union sockaddr_union bsa;
+
+                        r = sockaddr_un_set_path(&bsa.un, bind_name);
+                        if (r < 0)
+                                return r;
+
+                        if (bind(sk, &bsa.sa, r) < 0)
+                                return r;
+                }
+
                 if (connect(sk, &sa.sa, SOCKADDR_UN_LEN(sa.un)) < 0)
                         return errno == ENOTSOCK ? -ENXIO : -errno; /* propagate original error if this is
                                                                      * not a socket after all */
@@ -660,7 +707,7 @@ int read_full_file_full(int dir_fd, const char *filename, ReadFullFileFlags flag
 
         (void) __fsetlocking(f, FSETLOCKING_BYCALLER);
 
-        return read_full_stream_full(f, filename, flags, contents, size);
+        return read_full_stream_full(f, filename, offset, size, flags, ret_contents, ret_size);
 }
 
 int executable_is_script(const char *path, char **interpreter) {
index 9cba5a90e3f8688bbc9c63ce7f635e58e365354b..498e88035483cfa5716dcb8f521613bafb4a2f88 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <dirent.h>
 
 typedef enum {
         WRITE_STRING_FILE_CREATE            = 1 << 0,
-        WRITE_STRING_FILE_ATOMIC            = 1 << 1,
-        WRITE_STRING_FILE_AVOID_NEWLINE     = 1 << 2,
-        WRITE_STRING_FILE_VERIFY_ON_FAILURE = 1 << 3,
-        WRITE_STRING_FILE_SYNC              = 1 << 4,
-        WRITE_STRING_FILE_DISABLE_BUFFER    = 1 << 5,
-        WRITE_STRING_FILE_NOFOLLOW          = 1 << 6,
-        WRITE_STRING_FILE_MKDIR_0755        = 1 << 7,
-        WRITE_STRING_FILE_MODE_0600         = 1 << 8,
+        WRITE_STRING_FILE_TRUNCATE          = 1 << 1,
+        WRITE_STRING_FILE_ATOMIC            = 1 << 2,
+        WRITE_STRING_FILE_AVOID_NEWLINE     = 1 << 3,
+        WRITE_STRING_FILE_VERIFY_ON_FAILURE = 1 << 4,
+        WRITE_STRING_FILE_SYNC              = 1 << 5,
+        WRITE_STRING_FILE_DISABLE_BUFFER    = 1 << 6,
+        WRITE_STRING_FILE_NOFOLLOW          = 1 << 7,
+        WRITE_STRING_FILE_MKDIR_0755        = 1 << 8,
+        WRITE_STRING_FILE_MODE_0600         = 1 << 9,
 
         /* And before you wonder, why write_string_file_atomic_label_ts() is a separate function instead of just one
            more flag here: it's about linking: we don't want to pull -lselinux into all users of write_string_file()
@@ -47,11 +48,11 @@ DIR* take_fdopendir(int *dfd);
 FILE* open_memstream_unlocked(char **ptr, size_t *sizeloc);
 FILE* fmemopen_unlocked(void *buf, size_t size, const char *mode);
 
-int write_string_stream_ts(FILE *f, const char *line, WriteStringFileFlags flags, struct timespec *ts);
+int write_string_stream_ts(FILE *f, const char *line, WriteStringFileFlags flags, const struct timespec *ts);
 static inline int write_string_stream(FILE *f, const char *line, WriteStringFileFlags flags) {
         return write_string_stream_ts(f, line, flags, NULL);
 }
-int write_string_file_ts(const char *fn, const char *line, WriteStringFileFlags flags, struct timespec *ts);
+int write_string_file_ts(const char *fn, const char *line, WriteStringFileFlags flags, const struct timespec *ts);
 static inline int write_string_file(const char *fn, const char *line, WriteStringFileFlags flags) {
         return write_string_file_ts(fn, line, flags, NULL);
 }
@@ -59,14 +60,14 @@ static inline int write_string_file(const char *fn, const char *line, WriteStrin
 int write_string_filef(const char *fn, WriteStringFileFlags flags, const char *format, ...) _printf_(3, 4);
 
 int read_one_line_file(const char *filename, char **line);
-int read_full_file_full(int dir_fd, const char *filename, ReadFullFileFlags flags, char **contents, size_t *size);
-static inline int read_full_file(const char *filename, char **contents, size_t *size) {
-        return read_full_file_full(AT_FDCWD, filename, 0, contents, size);
+int read_full_file_full(int dir_fd, const char *filename, uint64_t offset, size_t size, ReadFullFileFlags flags, const char *bind_name, char **ret_contents, size_t *ret_size);
+static inline int read_full_file(const char *filename, char **ret_contents, size_t *ret_size) {
+        return read_full_file_full(AT_FDCWD, filename, UINT64_MAX, SIZE_MAX, 0, NULL, ret_contents, ret_size);
 }
 int read_full_virtual_file(const char *filename, char **ret_contents, size_t *ret_size);
-int read_full_stream_full(FILE *f, const char *filename, ReadFullFileFlags flags, char **contents, size_t *size);
-static inline int read_full_stream(FILE *f, char **contents, size_t *size) {
-        return read_full_stream_full(f, NULL, 0, contents, size);
+int read_full_stream_full(FILE *f, const char *filename, uint64_t offset, size_t size, ReadFullFileFlags flags, char **ret_contents, size_t *ret_size);
+static inline int read_full_stream(FILE *f, char **ret_contents, size_t *ret_size) {
+        return read_full_stream_full(f, NULL, UINT64_MAX, SIZE_MAX, 0, ret_contents, ret_size);
 }
 
 int verify_file(const char *fn, const char *blob, bool accept_extra_nl);
index b4144e03521498f0adda6fe99b6d7aa667993a93..bf23037792f12ef8b7856d37f52f8c67f7319805 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "format-util.h"
 #include "memory-util.h"
index c47fa76ea8ff2e709d1b8d92b92fe0aed0609cf8..b7e18768e392e034d0a56b056192dbdc040cf800 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
@@ -72,11 +72,14 @@ typedef enum {
         FORMAT_BYTES_TRAILING_B  = 1 << 2,
 } FormatBytesFlag;
 
-#define FORMAT_BYTES_MAX 16
+#define FORMAT_BYTES_MAX 16U
+
 char *format_bytes_full(char *buf, size_t l, uint64_t t, FormatBytesFlag flag);
+
 static inline char *format_bytes(char *buf, size_t l, uint64_t t) {
         return format_bytes_full(buf, l, t, FORMAT_BYTES_USE_IEC | FORMAT_BYTES_BELOW_POINT | FORMAT_BYTES_TRAILING_B);
 }
+
 static inline char *format_bytes_cgroup_protection(char *buf, size_t l, uint64_t t) {
         if (t == CGROUP_LIMIT_MAX) {
                 (void) snprintf(buf, l, "%s", "infinity");
index 587b3504ee86ad7489663e881b3f8b75fca5b78a..f240f84322476c8a00f03a02236135e395f51bf2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stddef.h>
@@ -810,7 +810,7 @@ int chase_symlinks(const char *path, const char *original_root, unsigned flags,
          *
          * 3. With CHASE_STEP: in this case only a single step of the normalization is executed, i.e. only the first
          *    symlink or ".." component of the path is resolved, and the resulting path is returned. This is useful if
-         *    a caller wants to trace the path through the file system verbosely. Returns < 0 on error, > 0 if the
+         *    a caller wants to trace the path through the file system verbosely. Returns < 0 on error, > 0 if the
          *    path is fully normalized, and == 0 for each normalization step. This may be combined with
          *    CHASE_NONEXISTENT, in which case 1 is returned when a component is not found.
          *
@@ -1613,3 +1613,80 @@ int path_is_encrypted(const char *path) {
 
         return blockdev_is_encrypted(p, 10 /* safety net: maximum recursion depth */);
 }
+
+int conservative_rename(
+                int olddirfd, const char *oldpath,
+                int newdirfd, const char *newpath) {
+
+        _cleanup_close_ int old_fd = -1, new_fd = -1;
+        struct stat old_stat, new_stat;
+
+        /* Renames the old path to thew new path, much like renameat() — except if both are regular files and
+         * have the exact same contents and basic file attributes already. In that case remove the new file
+         * instead. This call is useful for reducing inotify wakeups on files that are updated but don't
+         * actually change. This function is written in a style that we rather rename too often than suppress
+         * too much. i.e. whenever we are in doubt we rather rename than fail. After all reducing inotify
+         * events is an optimization only, not more. */
+
+        old_fd = openat(olddirfd, oldpath, O_CLOEXEC|O_RDONLY|O_NOCTTY|O_NOFOLLOW);
+        if (old_fd < 0)
+                goto do_rename;
+
+        new_fd = openat(newdirfd, newpath, O_CLOEXEC|O_RDONLY|O_NOCTTY|O_NOFOLLOW);
+        if (new_fd < 0)
+                goto do_rename;
+
+        if (fstat(old_fd, &old_stat) < 0)
+                goto do_rename;
+
+        if (!S_ISREG(old_stat.st_mode))
+                goto do_rename;
+
+        if (fstat(new_fd, &new_stat) < 0)
+                goto do_rename;
+
+        if (new_stat.st_ino == old_stat.st_ino &&
+            new_stat.st_dev == old_stat.st_dev)
+                goto is_same;
+
+        if (old_stat.st_mode != new_stat.st_mode ||
+            old_stat.st_size != new_stat.st_size ||
+            old_stat.st_uid != new_stat.st_uid ||
+            old_stat.st_gid != new_stat.st_gid)
+                goto do_rename;
+
+        for (;;) {
+                char buf1[16*1024];
+                char buf2[sizeof(buf1) + 1];
+                ssize_t l1, l2;
+
+                l1 = read(old_fd, buf1, sizeof(buf1));
+                if (l1 < 0)
+                        goto do_rename;
+
+                l2 = read(new_fd, buf2, l1 + 1);
+                if (l1 != l2)
+                        goto do_rename;
+
+                if (l1 == 0) /* EOF on both! And everything's the same so far, yay! */
+                        break;
+
+                if (memcmp(buf1, buf2, l1) != 0)
+                        goto do_rename;
+        }
+
+is_same:
+        /* Everything matches? Then don't rename, instead remove the source file, and leave the existing
+         * destination in place */
+
+        if (unlinkat(olddirfd, oldpath, 0) < 0)
+                goto do_rename;
+
+        return 0;
+
+do_rename:
+        if (renameat(olddirfd, oldpath, newdirfd, newpath) < 0)
+                return -errno;
+
+        return 1;
+}
index 241cc6ef62978772cde3616c208731c0a67ca5dd..9a39473567f88b938d2e07892f2d9ee8ac030155 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <dirent.h>
@@ -132,3 +132,5 @@ int syncfs_path(int atfd, const char *path);
 int open_parent(const char *path, int flags, mode_t mode);
 
 int path_is_encrypted(const char *path);
+
+int conservative_rename(int olddirfd, const char *oldpath, int newdirfd, const char *newpath);
index a82be979dedd26ba2b489792fd2055767f7e13c3..bf0d2106f8d54218e6f000e675e1661760afc455 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if HAVE_GCRYPT
 
index 87eb606891b93e72acadfd9280cad01e52dbf4ad..c07b36cdb9f7588aca2812c499a31569179c6c3c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #pragma once
 
index 1e7e301e09875d0e72579d45a03d895e3c29135d..bc0278e57f5d491052e84f73c7bdb602766ba98f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sys/types.h>
index 3d5f5435085aca376f0362fdad86c8fe8f673d3f..d2f8718d5a800b327546fb7e54e4814b476d1459 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <glob.h>
index c51b1a7a18108fd3e47f8a0dd1395527ce4806e1..36beb957e10014a273115dff5036db83d7b7dcb0 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /* gunicode.c - Unicode manipulation functions
  *
  *  Copyright (C) 1999, 2000 Tom Tromey
index a16b7b6ff1b0deaa082564372519bda40c3d4d6f..6b7183986fd2fc8a08997c60ce5d0aa08c0669ad 100644 (file)
@@ -1,10 +1,10 @@
-#pragma once
-
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /* gunicode.h - Unicode manipulation functions
  *
  *  Copyright (C) 1999, 2000 Tom Tromey
  *  Copyright © 2000, 2005 Red Hat, Inc.
  */
+#pragma once
 
 #include <stdbool.h>
 #include <stdint.h>
index 83016c0fd616ad74047a24b41abe2c08ffcb0bf8..e033de1ae191a37b87ea2d0bce55764b9a0f539d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <string.h>
 
index fb602009416ea10f3e24a5fa08b2a67b49c3d489..5672df1da4e0005d5832b36f0cb2a18c673183f9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "alloc-util.h"
index 61946cea326fc7fe1d4e951b944e82a34cd79b41..dd1b18c87824d5755c23fee6a9022d639aac96f4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <pthread.h>
index 6933c0b1e62b41e8cfe910b1be55426ee3fb5e66..e99448375efa201e472f4bc91a8b58e64ca99e5c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <limits.h>
index 96f7b9ed0fee8181ee247f625b7a4210b67ea7f9..da60202e57c53cf7cfab94962836c3cb64a9c0af 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <ctype.h>
 #include <errno.h>
index dfdff1e9bb0ce0d17993c29a6921859b7dd83b5a..7e2a6892c0a5b66d3606f4ce4a5b2cbc4088684f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 90a3dfc86471d01d93c53d96678151593c796305..09e49ccb7d8f78b33c4472cd265866939ee31f03 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <limits.h>
index cafd6f020bff96eb6b9a1f2bf735774fb67351b5..c1e47a2a53e1a690bef92d9a9437451467778222 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index c102504fdd5b2046044b30144901561936a2cf83..a4f13b620a61d400db2873b0203d3427e8af3656 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <arpa/inet.h>
 #include <endian.h>
index 45c93a0056fcfcda5f7d7a48659127022696eede..24308b702e26e678843325bce94cb137585fb89a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <netinet/in.h>
index 460649dedaf561c7c66538c720b14ea1c4cdc307..4d7405296b8766320eef21f716739db81d5c8ce7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <limits.h>
@@ -291,7 +291,7 @@ int iovw_put(struct iovec_wrapper *iovw, void *data, size_t len) {
                 return -E2BIG;
 
         if (!GREEDY_REALLOC(iovw->iovec, iovw->size_bytes, iovw->count + 1))
-                return log_oom();
+                return -ENOMEM;
 
         iovw->iovec[iovw->count++] = IOVEC_MAKE(data, len);
         return 0;
@@ -303,7 +303,7 @@ int iovw_put_string_field(struct iovec_wrapper *iovw, const char *field, const c
 
         x = strjoin(field, value);
         if (!x)
-                return log_oom();
+                return -ENOMEM;
 
         r = iovw_put(iovw, x, strlen(x));
         if (r >= 0)
index 719e19e85d6124e86b9f7f18ff01393297f1fb88..d817714b050741c3c23b26bc618beaba76024a4b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 17d4022dbe74c24a3ea53003bc6babd8fc8579b8..267803ec2ce21f25f25259bafa2a813a5b0666da 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <ftw.h>
 
index 9efd2c7052982e3c494a33e2a20ea404a3522134..6714aeb9e047ce630ce8a9c0f38c4f9eeb0853ae 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index dbae418282b7c8ccd5f066d6bcd5d8a8a97c932e..6a4d1dd5943c35270b55949707ed183d9bb17461 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/if_alg.h>
 #include <stdbool.h>
@@ -248,8 +248,8 @@ int khash_put(khash *h, const void *buffer, size_t size) {
 
 int khash_put_iovec(khash *h, const struct iovec *iovec, size_t n) {
         struct msghdr mh = {
-                mh.msg_iov = (struct iovec*) iovec,
-                mh.msg_iovlen = n,
+                .msg_iov = (struct iovec*) iovec,
+                .msg_iovlen = n,
         };
         ssize_t k;
 
index a3013b9d6191d20fdb8092fc2beae3c91ebc07b0..a343d306e93569a8019b845a0a46f24748432569 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index 107028e0680ca49c3f882a0eabd47b1451303a2f..1fc492fb3110e6f3417453964002059fd90417eb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sys/stat.h>
index d99d824b4af4c3f697e712b9909eeca49aa3063d..b5118d96d32bfa8614ccb52997f1b4a08d366303 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 9da767a5706f11135cb042d8be6fe3f70cf07278..259c311a678ee5ae9597ce41c9c0c31c7e824257 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "cgroup-util.h"
index 77895cbad480d170361e1eee1376b4e308bfa380..d267fcf1d48b0e09f08b00d70c7bd93f545ea378 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index 9ba64ca6b4ac953310d014ef9d4e3e6719f258b0..6b885982ece68775a97941b5b495d5b551609d2e 100644 (file)
@@ -4,6 +4,11 @@
 
 #include <linux/btrfs.h>
 #include <linux/types.h>
+#ifdef __KERNEL__
+#include <linux/stddef.h>
+#else
+#include <stddef.h>
+#endif
 
 /*
  * This header contains the structure definitions and constants used
@@ -644,6 +649,15 @@ struct btrfs_root_item {
        __le64 reserved[8]; /* for future */
 } __attribute__ ((__packed__));
 
+/*
+ * Btrfs root item used to be smaller than current size.  The old format ends
+ * at where member generation_v2 is.
+ */
+static inline __u32 btrfs_legacy_root_item_size(void)
+{
+       return offsetof(struct btrfs_root_item, generation_v2);
+}
+
 /*
  * this is used for both forward and backward root refs
  */
index c1227aecd38fd7aa5b903a61b65be7342bf2fab0..4c687686aa8f73f8429346208a7223cf6febed54 100644 (file)
@@ -455,10 +455,33 @@ enum {
 enum {
        MDBA_MDB_EATTR_UNSPEC,
        MDBA_MDB_EATTR_TIMER,
+       MDBA_MDB_EATTR_SRC_LIST,
+       MDBA_MDB_EATTR_GROUP_MODE,
+       MDBA_MDB_EATTR_SOURCE,
+       MDBA_MDB_EATTR_RTPROT,
        __MDBA_MDB_EATTR_MAX
 };
 #define MDBA_MDB_EATTR_MAX (__MDBA_MDB_EATTR_MAX - 1)
 
+/* per mdb entry source */
+enum {
+       MDBA_MDB_SRCLIST_UNSPEC,
+       MDBA_MDB_SRCLIST_ENTRY,
+       __MDBA_MDB_SRCLIST_MAX
+};
+#define MDBA_MDB_SRCLIST_MAX (__MDBA_MDB_SRCLIST_MAX - 1)
+
+/* per mdb entry per source attributes
+ * these are embedded in MDBA_MDB_SRCLIST_ENTRY
+ */
+enum {
+       MDBA_MDB_SRCATTR_UNSPEC,
+       MDBA_MDB_SRCATTR_ADDRESS,
+       MDBA_MDB_SRCATTR_TIMER,
+       __MDBA_MDB_SRCATTR_MAX
+};
+#define MDBA_MDB_SRCATTR_MAX (__MDBA_MDB_SRCATTR_MAX - 1)
+
 /* multicast router types */
 enum {
        MDB_RTR_TYPE_DISABLED,
@@ -495,6 +518,8 @@ struct br_mdb_entry {
        __u8 state;
 #define MDB_FLAGS_OFFLOAD      (1 << 0)
 #define MDB_FLAGS_FAST_LEAVE   (1 << 1)
+#define MDB_FLAGS_STAR_EXCL    (1 << 2)
+#define MDB_FLAGS_BLOCKED      (1 << 3)
        __u8 flags;
        __u16 vid;
        struct {
@@ -509,10 +534,23 @@ struct br_mdb_entry {
 enum {
        MDBA_SET_ENTRY_UNSPEC,
        MDBA_SET_ENTRY,
+       MDBA_SET_ENTRY_ATTRS,
        __MDBA_SET_ENTRY_MAX,
 };
 #define MDBA_SET_ENTRY_MAX (__MDBA_SET_ENTRY_MAX - 1)
 
+/* [MDBA_SET_ENTRY_ATTRS] = {
+ *    [MDBE_ATTR_xxx]
+ *    ...
+ * }
+ */
+enum {
+       MDBE_ATTR_UNSPEC,
+       MDBE_ATTR_SOURCE,
+       __MDBE_ATTR_MAX,
+};
+#define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1)
+
 /* Embedded inside LINK_XSTATS_TYPE_BRIDGE */
 enum {
        BRIDGE_XSTATS_UNSPEC,
index 7fba4de511dec7e3877244f625f2a59b91b601b7..c4b23f06f69e0f503585c99d422969086821ce2d 100644 (file)
@@ -7,24 +7,23 @@
 
 /* This struct should be in sync with struct rtnl_link_stats64 */
 struct rtnl_link_stats {
-       __u32   rx_packets;             /* total packets received       */
-       __u32   tx_packets;             /* total packets transmitted    */
-       __u32   rx_bytes;               /* total bytes received         */
-       __u32   tx_bytes;               /* total bytes transmitted      */
-       __u32   rx_errors;              /* bad packets received         */
-       __u32   tx_errors;              /* packet transmit problems     */
-       __u32   rx_dropped;             /* no space in linux buffers    */
-       __u32   tx_dropped;             /* no space available in linux  */
-       __u32   multicast;              /* multicast packets received   */
+       __u32   rx_packets;
+       __u32   tx_packets;
+       __u32   rx_bytes;
+       __u32   tx_bytes;
+       __u32   rx_errors;
+       __u32   tx_errors;
+       __u32   rx_dropped;
+       __u32   tx_dropped;
+       __u32   multicast;
        __u32   collisions;
-
        /* detailed rx_errors: */
        __u32   rx_length_errors;
-       __u32   rx_over_errors;         /* receiver ring buff overflow  */
-       __u32   rx_crc_errors;          /* recved pkt with crc error    */
-       __u32   rx_frame_errors;        /* recv'd frame alignment error */
-       __u32   rx_fifo_errors;         /* recv'r fifo overrun          */
-       __u32   rx_missed_errors;       /* receiver missed packet       */
+       __u32   rx_over_errors;
+       __u32   rx_crc_errors;
+       __u32   rx_frame_errors;
+       __u32   rx_fifo_errors;
+       __u32   rx_missed_errors;
 
        /* detailed tx_errors */
        __u32   tx_aborted_errors;
@@ -37,29 +36,200 @@ struct rtnl_link_stats {
        __u32   rx_compressed;
        __u32   tx_compressed;
 
-       __u32   rx_nohandler;           /* dropped, no handler found    */
+       __u32   rx_nohandler;
 };
 
-/* The main device statistics structure */
+/**
+ * struct rtnl_link_stats64 - The main device statistics structure.
+ *
+ * @rx_packets: Number of good packets received by the interface.
+ *   For hardware interfaces counts all good packets received from the device
+ *   by the host, including packets which host had to drop at various stages
+ *   of processing (even in the driver).
+ *
+ * @tx_packets: Number of packets successfully transmitted.
+ *   For hardware interfaces counts packets which host was able to successfully
+ *   hand over to the device, which does not necessarily mean that packets
+ *   had been successfully transmitted out of the device, only that device
+ *   acknowledged it copied them out of host memory.
+ *
+ * @rx_bytes: Number of good received bytes, corresponding to @rx_packets.
+ *
+ *   For IEEE 802.3 devices should count the length of Ethernet Frames
+ *   excluding the FCS.
+ *
+ * @tx_bytes: Number of good transmitted bytes, corresponding to @tx_packets.
+ *
+ *   For IEEE 802.3 devices should count the length of Ethernet Frames
+ *   excluding the FCS.
+ *
+ * @rx_errors: Total number of bad packets received on this network device.
+ *   This counter must include events counted by @rx_length_errors,
+ *   @rx_crc_errors, @rx_frame_errors and other errors not otherwise
+ *   counted.
+ *
+ * @tx_errors: Total number of transmit problems.
+ *   This counter must include events counter by @tx_aborted_errors,
+ *   @tx_carrier_errors, @tx_fifo_errors, @tx_heartbeat_errors,
+ *   @tx_window_errors and other errors not otherwise counted.
+ *
+ * @rx_dropped: Number of packets received but not processed,
+ *   e.g. due to lack of resources or unsupported protocol.
+ *   For hardware interfaces this counter should not include packets
+ *   dropped by the device which are counted separately in
+ *   @rx_missed_errors (since procfs folds those two counters together).
+ *
+ * @tx_dropped: Number of packets dropped on their way to transmission,
+ *   e.g. due to lack of resources.
+ *
+ * @multicast: Multicast packets received.
+ *   For hardware interfaces this statistic is commonly calculated
+ *   at the device level (unlike @rx_packets) and therefore may include
+ *   packets which did not reach the host.
+ *
+ *   For IEEE 802.3 devices this counter may be equivalent to:
+ *
+ *    - 30.3.1.1.21 aMulticastFramesReceivedOK
+ *
+ * @collisions: Number of collisions during packet transmissions.
+ *
+ * @rx_length_errors: Number of packets dropped due to invalid length.
+ *   Part of aggregate "frame" errors in `/proc/net/dev`.
+ *
+ *   For IEEE 802.3 devices this counter should be equivalent to a sum
+ *   of the following attributes:
+ *
+ *    - 30.3.1.1.23 aInRangeLengthErrors
+ *    - 30.3.1.1.24 aOutOfRangeLengthField
+ *    - 30.3.1.1.25 aFrameTooLongErrors
+ *
+ * @rx_over_errors: Receiver FIFO overflow event counter.
+ *
+ *   Historically the count of overflow events. Such events may be
+ *   reported in the receive descriptors or via interrupts, and may
+ *   not correspond one-to-one with dropped packets.
+ *
+ *   The recommended interpretation for high speed interfaces is -
+ *   number of packets dropped because they did not fit into buffers
+ *   provided by the host, e.g. packets larger than MTU or next buffer
+ *   in the ring was not available for a scatter transfer.
+ *
+ *   Part of aggregate "frame" errors in `/proc/net/dev`.
+ *
+ *   This statistics was historically used interchangeably with
+ *   @rx_fifo_errors.
+ *
+ *   This statistic corresponds to hardware events and is not commonly used
+ *   on software devices.
+ *
+ * @rx_crc_errors: Number of packets received with a CRC error.
+ *   Part of aggregate "frame" errors in `/proc/net/dev`.
+ *
+ *   For IEEE 802.3 devices this counter must be equivalent to:
+ *
+ *    - 30.3.1.1.6 aFrameCheckSequenceErrors
+ *
+ * @rx_frame_errors: Receiver frame alignment errors.
+ *   Part of aggregate "frame" errors in `/proc/net/dev`.
+ *
+ *   For IEEE 802.3 devices this counter should be equivalent to:
+ *
+ *    - 30.3.1.1.7 aAlignmentErrors
+ *
+ * @rx_fifo_errors: Receiver FIFO error counter.
+ *
+ *   Historically the count of overflow events. Those events may be
+ *   reported in the receive descriptors or via interrupts, and may
+ *   not correspond one-to-one with dropped packets.
+ *
+ *   This statistics was used interchangeably with @rx_over_errors.
+ *   Not recommended for use in drivers for high speed interfaces.
+ *
+ *   This statistic is used on software devices, e.g. to count software
+ *   packet queue overflow (can) or sequencing errors (GRE).
+ *
+ * @rx_missed_errors: Count of packets missed by the host.
+ *   Folded into the "drop" counter in `/proc/net/dev`.
+ *
+ *   Counts number of packets dropped by the device due to lack
+ *   of buffer space. This usually indicates that the host interface
+ *   is slower than the network interface, or host is not keeping up
+ *   with the receive packet rate.
+ *
+ *   This statistic corresponds to hardware events and is not used
+ *   on software devices.
+ *
+ * @tx_aborted_errors:
+ *   Part of aggregate "carrier" errors in `/proc/net/dev`.
+ *   For IEEE 802.3 devices capable of half-duplex operation this counter
+ *   must be equivalent to:
+ *
+ *    - 30.3.1.1.11 aFramesAbortedDueToXSColls
+ *
+ *   High speed interfaces may use this counter as a general device
+ *   discard counter.
+ *
+ * @tx_carrier_errors: Number of frame transmission errors due to loss
+ *   of carrier during transmission.
+ *   Part of aggregate "carrier" errors in `/proc/net/dev`.
+ *
+ *   For IEEE 802.3 devices this counter must be equivalent to:
+ *
+ *    - 30.3.1.1.13 aCarrierSenseErrors
+ *
+ * @tx_fifo_errors: Number of frame transmission errors due to device
+ *   FIFO underrun / underflow. This condition occurs when the device
+ *   begins transmission of a frame but is unable to deliver the
+ *   entire frame to the transmitter in time for transmission.
+ *   Part of aggregate "carrier" errors in `/proc/net/dev`.
+ *
+ * @tx_heartbeat_errors: Number of Heartbeat / SQE Test errors for
+ *   old half-duplex Ethernet.
+ *   Part of aggregate "carrier" errors in `/proc/net/dev`.
+ *
+ *   For IEEE 802.3 devices possibly equivalent to:
+ *
+ *    - 30.3.2.1.4 aSQETestErrors
+ *
+ * @tx_window_errors: Number of frame transmission errors due
+ *   to late collisions (for Ethernet - after the first 64B of transmission).
+ *   Part of aggregate "carrier" errors in `/proc/net/dev`.
+ *
+ *   For IEEE 802.3 devices this counter must be equivalent to:
+ *
+ *    - 30.3.1.1.10 aLateCollisions
+ *
+ * @rx_compressed: Number of correctly received compressed packets.
+ *   This counters is only meaningful for interfaces which support
+ *   packet compression (e.g. CSLIP, PPP).
+ *
+ * @tx_compressed: Number of transmitted compressed packets.
+ *   This counters is only meaningful for interfaces which support
+ *   packet compression (e.g. CSLIP, PPP).
+ *
+ * @rx_nohandler: Number of packets received on the interface
+ *   but dropped by the networking stack because the device is
+ *   not designated to receive packets (e.g. backup link in a bond).
+ */
 struct rtnl_link_stats64 {
-       __u64   rx_packets;             /* total packets received       */
-       __u64   tx_packets;             /* total packets transmitted    */
-       __u64   rx_bytes;               /* total bytes received         */
-       __u64   tx_bytes;               /* total bytes transmitted      */
-       __u64   rx_errors;              /* bad packets received         */
-       __u64   tx_errors;              /* packet transmit problems     */
-       __u64   rx_dropped;             /* no space in linux buffers    */
-       __u64   tx_dropped;             /* no space available in linux  */
-       __u64   multicast;              /* multicast packets received   */
+       __u64   rx_packets;
+       __u64   tx_packets;
+       __u64   rx_bytes;
+       __u64   tx_bytes;
+       __u64   rx_errors;
+       __u64   tx_errors;
+       __u64   rx_dropped;
+       __u64   tx_dropped;
+       __u64   multicast;
        __u64   collisions;
 
        /* detailed rx_errors: */
        __u64   rx_length_errors;
-       __u64   rx_over_errors;         /* receiver ring buff overflow  */
-       __u64   rx_crc_errors;          /* recved pkt with crc error    */
-       __u64   rx_frame_errors;        /* recv'd frame alignment error */
-       __u64   rx_fifo_errors;         /* recv'r fifo overrun          */
-       __u64   rx_missed_errors;       /* receiver missed packet       */
+       __u64   rx_over_errors;
+       __u64   rx_crc_errors;
+       __u64   rx_frame_errors;
+       __u64   rx_fifo_errors;
+       __u64   rx_missed_errors;
 
        /* detailed tx_errors */
        __u64   tx_aborted_errors;
@@ -71,8 +241,7 @@ struct rtnl_link_stats64 {
        /* for cslip etc */
        __u64   rx_compressed;
        __u64   tx_compressed;
-
-       __u64   rx_nohandler;           /* dropped, no handler found    */
+       __u64   rx_nohandler;
 };
 
 /* The struct should be in sync with struct ifmap */
index 61158f5a1a5bc272743769adb382d609329a17db..30c80d5ba4bfcba26a2bdd14045cfe0b936fdbfb 100644 (file)
@@ -108,7 +108,7 @@ enum {
        L2TP_ATTR_VLAN_ID,              /* u16 (not used) */
        L2TP_ATTR_COOKIE,               /* 0, 4 or 8 bytes */
        L2TP_ATTR_PEER_COOKIE,          /* 0, 4 or 8 bytes */
-       L2TP_ATTR_DEBUG,                /* u32, enum l2tp_debug_flags */
+       L2TP_ATTR_DEBUG,                /* u32, enum l2tp_debug_flags (not used) */
        L2TP_ATTR_RECV_SEQ,             /* u8 */
        L2TP_ATTR_SEND_SEQ,             /* u8 */
        L2TP_ATTR_LNS_MODE,             /* u8 */
@@ -144,6 +144,7 @@ enum {
        L2TP_ATTR_RX_OOS_PACKETS,       /* u64 */
        L2TP_ATTR_RX_ERRORS,            /* u64 */
        L2TP_ATTR_STATS_PAD,
+       L2TP_ATTR_RX_COOKIE_DISCARDS,   /* u64 */
        __L2TP_ATTR_STATS_MAX,
 };
 
@@ -177,7 +178,9 @@ enum l2tp_seqmode {
 };
 
 /**
- * enum l2tp_debug_flags - debug message categories for L2TP tunnels/sessions
+ * enum l2tp_debug_flags - debug message categories for L2TP tunnels/sessions.
+ *
+ * Unused.
  *
  * @L2TP_MSG_DEBUG: verbose debug (if compiled in)
  * @L2TP_MSG_CONTROL: userspace - kernel interface
diff --git a/src/basic/linux/loadavg.h b/src/basic/linux/loadavg.h
new file mode 100644 (file)
index 0000000..83ec54b
--- /dev/null
@@ -0,0 +1,48 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_SCHED_LOADAVG_H
+#define _LINUX_SCHED_LOADAVG_H
+
+/*
+ * These are the constant used to fake the fixed-point load-average
+ * counting. Some notes:
+ *  - 11 bit fractions expand to 22 bits by the multiplies: this gives
+ *    a load-average precision of 10 bits integer + 11 bits fractional
+ *  - if you want to count load-averages more often, you need more
+ *    precision, or rounding will get you. With 2-second counting freq,
+ *    the EXP_n values would be 1981, 2034 and 2043 if still using only
+ *    11 bit fractions.
+ */
+extern unsigned long avenrun[];                /* Load averages */
+extern void get_avenrun(unsigned long *loads, unsigned long offset, int shift);
+
+#define FSHIFT         11              /* nr of bits of precision */
+#define FIXED_1                (1<<FSHIFT)     /* 1.0 as fixed-point */
+#define LOAD_FREQ      (5*HZ+1)        /* 5 sec intervals */
+#define EXP_1          1884            /* 1/exp(5sec/1min) as fixed-point */
+#define EXP_5          2014            /* 1/exp(5sec/5min) */
+#define EXP_15         2037            /* 1/exp(5sec/15min) */
+
+/*
+ * a1 = a0 * e + a * (1 - e)
+ */
+static inline unsigned long
+calc_load(unsigned long load, unsigned long exp, unsigned long active)
+{
+       unsigned long newload;
+
+       newload = load * exp + active * (FIXED_1 - exp);
+       if (active >= load)
+               newload += FIXED_1-1;
+
+       return newload / FIXED_1;
+}
+
+extern unsigned long calc_load_n(unsigned long load, unsigned long exp,
+                                unsigned long active, unsigned int n);
+
+#define LOAD_INT(x) ((x) >> FSHIFT)
+#define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
+
+extern void calc_global_load(void);
+
+#endif /* _LINUX_SCHED_LOADAVG_H */
index eac8a6a648ea3cd7c6df262f7451c0597e63b24f..c3816ff7bfc32f4bd68315f92cb6c6a01f8cc6fc 100644 (file)
@@ -129,6 +129,7 @@ struct nlmsgerr {
  * @NLMSGERR_ATTR_COOKIE: arbitrary subsystem specific cookie to
  *     be used - in the success case - to identify a created
  *     object or operation or similar (binary)
+ * @NLMSGERR_ATTR_POLICY: policy for a rejected attribute
  * @__NLMSGERR_ATTR_MAX: number of attributes
  * @NLMSGERR_ATTR_MAX: highest attribute number
  */
@@ -137,6 +138,7 @@ enum nlmsgerr_attrs {
        NLMSGERR_ATTR_MSG,
        NLMSGERR_ATTR_OFFS,
        NLMSGERR_ATTR_COOKIE,
+       NLMSGERR_ATTR_POLICY,
 
        __NLMSGERR_ATTR_MAX,
        NLMSGERR_ATTR_MAX = __NLMSGERR_ATTR_MAX - 1
@@ -331,6 +333,7 @@ enum netlink_attribute_type {
  *     the index, if limited inside the nesting (U32)
  * @NL_POLICY_TYPE_ATTR_BITFIELD32_MASK: valid mask for the
  *     bitfield32 type (U32)
+ * @NL_POLICY_TYPE_ATTR_MASK: mask of valid bits for unsigned integers (U64)
  * @NL_POLICY_TYPE_ATTR_PAD: pad attribute for 64-bit alignment
  */
 enum netlink_policy_type_attr {
@@ -346,6 +349,7 @@ enum netlink_policy_type_attr {
        NL_POLICY_TYPE_ATTR_POLICY_MAXTYPE,
        NL_POLICY_TYPE_ATTR_BITFIELD32_MASK,
        NL_POLICY_TYPE_ATTR_PAD,
+       NL_POLICY_TYPE_ATTR_MASK,
 
        /* keep last */
        __NL_POLICY_TYPE_ATTR_MAX,
index b0b0cdc949066bce38410198a14ab2b259c791dd..5595736f21f86579d3570aa6f46a1a38b553b78e 100755 (executable)
@@ -3,7 +3,11 @@
 set -eu
 
 for i in *.h */*.h; do
-    curl https://raw.githubusercontent.com/torvalds/linux/master/include/uapi/linux/$i -o $i
+    if [[ $i == 'loadavg.h' ]]; then
+        curl https://raw.githubusercontent.com/torvalds/linux/master/include/linux/sched/$i -o $i
+    else
+        curl https://raw.githubusercontent.com/torvalds/linux/master/include/uapi/linux/$i -o $i
+    fi
 
     sed -i -e 's/__user //g' -e '/^#include <linux\/compiler.h>/ d' $i
 done
index b62c374985770418b06c3cf1125bf9acc4f124ed..256b7187c2e8ed54a64e549b711850bbaef441c3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "macro.h"
index 8e6a12b602fc3f4a363da9fe73df07862b40e14d..4c81cb94401ab1e1a9f5f57a869eecc4d9b79e2f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index aa25e17f154596ce6803efbd6d1e4f0bc6bbb762..2d672e2f95952a9281c1b371922cadbaf645c413 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <libintl.h>
index 1d796c518079446309915c520f78828083b1a265..d4054cf46a8e87728d43c0f36ab3643439144d34 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index ce8bb42ea175c5d345d75f8051c92e273f1a32f2..a2aae16df29ef8a495da6b22fb0d9ecef1c81cff 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdarg.h>
index 9313926d5a7dece21628a43c43a5806beaaa725a..044e8b7650ec606a0ba6af52902e21bcb50b6ce1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "login-util.h"
 #include "string-util.h"
index e1e62e12b7aa67140e2f714620495a448e3bf523..00a124dc9fbdcbc80ffbcf3724383fcc1e368122 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index e0fe990befff192495fde47a6884b1b8f8fcf76d..278255375617df9b4f56f4e79b29299da555bedb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <assert.h>
@@ -281,6 +281,12 @@ static inline size_t GREEDY_ALLOC_ROUND_UP(size_t l) {
                 MAX(_c, z);                             \
         })
 
+#define MAX4(x, y, z, a)                                \
+        ({                                              \
+                const typeof(x) _d = MAX3(x, y, z);     \
+                MAX(_d, a);                             \
+        })
+
 #undef MIN
 #define MIN(a, b) __MIN(UNIQ, (a), UNIQ, (b))
 #define __MIN(aq, a, bq, b)                             \
@@ -548,10 +554,13 @@ static inline int __coverity_check_and_return__(int condition) {
 #define STRV_MAKE(...) ((char**) ((const char*[]) { __VA_ARGS__, NULL }))
 #define STRV_MAKE_EMPTY ((char*[1]) { NULL })
 
-/* Iterates through a specified list of pointers. Accepts NULL pointers, but uses (void*) -1 as internal marker for EOL. */
-#define FOREACH_POINTER(p, x, ...)                                                      \
-        for (typeof(p) *_l = (typeof(p)[]) { ({ p = x; }), ##__VA_ARGS__, (void*) -1 }; \
-             p != (typeof(p)) (void*) -1;                                               \
+/* Pointers range from NULL to POINTER_MAX */
+#define POINTER_MAX ((void*) UINTPTR_MAX)
+
+/* Iterates through a specified list of pointers. Accepts NULL pointers, but uses POINTER_MAX as internal marker for EOL. */
+#define FOREACH_POINTER(p, x, ...)                                                       \
+        for (typeof(p) *_l = (typeof(p)[]) { ({ p = x; }), ##__VA_ARGS__, POINTER_MAX }; \
+             p != (typeof(p)) POINTER_MAX;                                               \
              p = *(++_l))
 
 /* Define C11 thread_local attribute even on older gcc compiler
@@ -641,4 +650,8 @@ static inline int __coverity_check_and_return__(int condition) {
                 _copy;                                                  \
         })
 
+static inline size_t size_add(size_t x, size_t y) {
+        return y >= SIZE_MAX - x ? SIZE_MAX : x + y;
+}
+
 #include "log.h"
index e06bdcb0a88d587ca973920fbc5be6ac7b297e5a..0b8ecea1b1fd396d40759b39479abb71db31e164 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sys/stat.h>
index 5ebb519931b0cf900ba207765a0a7bb5929c8891..8596c1a3690428a56df90a33249a0b5d9af9e6f0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index 5f327ef0d7aaacf3abaa6b7f197e6f5d41e533fd..3338e355f7b6ce7b62ef708377cec05995d622e6 100644 (file)
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
 #include <unistd.h>
 
 #include "memory-util.h"
index 4f596cffb75bc2d9fd28c94df8b5d9020bcbddd3..179edd247bf63bbd0f5046e1227b918fec00b70c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index 22df42105b9037c673de65b590b816d9344b6df6..9eedc20c4fe1d96abd59f2b29baa060eef661c49 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdint.h>
 #include <stdlib.h>
index 0eecca0f92a9062d3cb46bab223b7215c7e71644..0fe2f2789cda606064921202deb3a14629482ca0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index d144bc2f87b465e870069e2bc1d960a04fb7d44b..a4f97c1fb5270845f04aa700f1d69000ca7772e2 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 basic_sources = files('''
         MurmurHash2.c
@@ -19,6 +19,7 @@ basic_sources = files('''
         blockdev-util.h
         btrfs-util.c
         btrfs-util.h
+        build.c
         build.h
         bus-label.c
         bus-label.h
@@ -111,6 +112,7 @@ basic_sources = files('''
         linux/ipv6_route.h
         linux/l2tp.h
         linux/libc-compat.h
+        linux/loadavg.h
         linux/netdevice.h
         linux/netlink.h
         linux/rtnetlink.h
@@ -332,6 +334,7 @@ libbasic = static_library(
         dependencies : [versiondep,
                         threads,
                         libcap,
+                        libseccomp,
                         libselinux,
                         libm,
                         libdl],
index b00d537be22df5fd73b031791786c4a0760634af..62e3c292f531ef6dd733d17ee938d49f43e5aef9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <linux/audit.h>
index c52cd449339cad29df48a629ccc5eb824cc614ad..4cf31cb839a6ce12980534ab7b6256a570d0609d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <linux/capability.h>
@@ -27,7 +27,7 @@
 
 #ifdef CAP_LAST_CAP
 #  if CAP_LAST_CAP > SYSTEMD_CAP_LAST_CAP
-#    if DEVELOPER_MODE && defined(TEST_CAPABILITY_C)
+#    if BUILD_MODE == BUILD_MODE_DEVELOPER && defined(TEST_CAPABILITY_C)
 #      warning "The capability list here is outdated"
 #    endif
 #  else
index a64f74efdae92ab279b97de6ec6a6095df641257..0dec59114663a71de41b066d80f00dce7531ab0a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #ifndef DRM_IOCTL_SET_MASTER
index 5d1c6352f4ae2450800aca950840224782a4aa27..00937d2af03d91ff58743f76baf8e7487114c501 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <fcntl.h>
index c262a918126bb58ea0309b20b949adae1eef1d47..79c1620e83d08c9e12e126fecb3d5b6d54574f09 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /* linux/fs.h */
index b91ccb6485a88fe28493b13b447bf14d4836eba1..6cf16ffb97b65ff31793627a0e7b7866696993c2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <linux/input.h>
index 7eb709586ce3ce53eb801e5bf7d9aaa01c74b158..5680483bb408fb2f0ab2415975287abd318d62f0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <linux/keyctl.h>
index 53267774190efc11f807d31dc5320a85800f557d..b22ebda9fda26528d0121a6344624dc40cab745f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <linux/loop.h>
index a05b5b5c3c0909871511b57396a94f18644b5f8d..e7466cb6bcf0720a4137d45ce5151650b69d3155 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <linux/magic.h>
index 7ff12f770b9b7716f0850f15f8d14fe45a81ba53..4a109128d00e608d12a36b90728a68cf5cb11c02 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/mman.h>
index a25a1480f0c44b04bdfae862d5806b4426f6d1b2..f9db690d1855f1296ab593acdd4d845be3d59d4c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /* linux/in6.h or netinet/in.h */
index f80cd17f346b072996271bf75373d79608c97bf5..ab851306bac60710747183febc867e59656f3a1a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <linux/prctl.h>
index 17af87a3aefe9b77f88866552d1f0cb2fadcdf74..443b91368558934697d6d2832cd2346d8a81909d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #if USE_SYS_RANDOM_H
index 22ba8abfc6bb4f97d876d149ec3001719dcb4e4b..6e7676527be8d344afbf2ff6aa4005fcb853bc7a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/resource.h>
index baa39132837f36efe856e3dbb260c9f8379d6978..6a889f66d95658b81a68d92cd1acb0ffc16055b5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sched.h>
index c4f33449a3764e26dafd828f6bbca61fdb1f6f5d..17bc1a5a0188f9b622d78239221da79c8ddebe2a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/socket.h>
index 7bdc8a7efa842f117ab7681c8453cde35ff57a02..372fdf90bd374646bac1ded9d6acc444385323d5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <linux/types.h>
index 188a8d44066a24a3b2d3ffb06a290bc3d309e4d9..8c76f93eb2f4af3e7180d6669b02ff5bcac4fb6f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdlib.h>
index 43d08bada72df68444f383c2b3394a72d7f3e349..7e6dd0cb52541f33378146ea4aa097a50849e682 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /* Missing glibc definitions to access certain kernel APIs */
 #endif
 
 #if defined(__x86_64__) && defined(__ILP32__)
-#define systemd_SC_arch_bias(x) ((x) | /* __X32_SYSCALL_BIT */ 0x40000000)
+#  define systemd_SC_arch_bias(x) ((x) | /* __X32_SYSCALL_BIT */ 0x40000000)
+#elif defined(__ia64__)
+#  define systemd_SC_arch_bias(x) (1024 + (x))
+#elif defined __alpha__
+#  define systemd_SC_arch_bias(x) (110 + (x))
+#elif defined _MIPS_SIM
+#  if _MIPS_SIM == _MIPS_SIM_ABI32
+#    define systemd_SC_arch_bias(x) (4000 + (x))
+#  elif _MIPS_SIM == _MIPS_SIM_NABI32
+#    define systemd_SC_arch_bias(x) (6000 + (x))
+#  elif _MIPS_SIM == _MIPS_SIM_ABI64
+#    define systemd_SC_arch_bias(x) (5000 + (x))
+#  else
+#    error "Unknown MIPS ABI"
+#  endif
 #else
-#define systemd_SC_arch_bias(x) (x)
+#  define systemd_SC_arch_bias(x) (x)
 #endif
 
 #include "missing_keyctl.h"
@@ -51,13 +65,11 @@ static inline int missing_pivot_root(const char *new_root, const char *put_old)
 #  define systemd_NR_memfd_create 350
 #elif defined _MIPS_SIM
 #  if _MIPS_SIM == _MIPS_SIM_ABI32
-#    define systemd_NR_memfd_create 4354
-#  endif
-#  if _MIPS_SIM == _MIPS_SIM_NABI32
-#    define systemd_NR_memfd_create 6318
-#  endif
-#  if _MIPS_SIM == _MIPS_SIM_ABI64
-#    define systemd_NR_memfd_create 5314
+#    define systemd_NR_memfd_create systemd_SC_arch_bias(354)
+#  elif _MIPS_SIM == _MIPS_SIM_NABI32
+#    define systemd_NR_memfd_create systemd_SC_arch_bias(318)
+#  elif _MIPS_SIM == _MIPS_SIM_ABI64
+#    define systemd_NR_memfd_create systemd_SC_arch_bias(314)
 #  endif
 #elif defined __i386__
 #  define systemd_NR_memfd_create 356
@@ -105,7 +117,7 @@ static inline int missing_memfd_create(const char *name, unsigned int flags) {
 #elif defined(__aarch64__)
 #  define systemd_NR_getrandom 278
 #elif defined(__ia64__)
-#  define systemd_NR_getrandom 1339
+#  define systemd_NR_getrandom systemd_SC_arch_bias(318)
 #elif defined(__m68k__)
 #  define systemd_NR_getrandom 352
 #elif defined(__s390x__)
@@ -114,13 +126,11 @@ static inline int missing_memfd_create(const char *name, unsigned int flags) {
 #  define systemd_NR_getrandom 359
 #elif defined _MIPS_SIM
 #  if _MIPS_SIM == _MIPS_SIM_ABI32
-#    define systemd_NR_getrandom 4353
-#  endif
-#  if _MIPS_SIM == _MIPS_SIM_NABI32
-#    define systemd_NR_getrandom 6317
-#  endif
-#  if _MIPS_SIM == _MIPS_SIM_ABI64
-#    define systemd_NR_getrandom 5313
+#    define systemd_NR_getrandom systemd_SC_arch_bias(353)
+#  elif _MIPS_SIM == _MIPS_SIM_NABI32
+#    define systemd_NR_getrandom systemd_SC_arch_bias(317)
+#  elif _MIPS_SIM == _MIPS_SIM_ABI64
+#    define systemd_NR_getrandom systemd_SC_arch_bias(313)
 #  endif
 #elif defined(__arc__)
 #  define systemd_NR_getrandom 278
@@ -186,6 +196,14 @@ static inline pid_t missing_gettid(void) {
 #  define systemd_NR_name_to_handle_at 335
 #elif defined(__arc__)
 #  define systemd_NR_name_to_handle_at 264
+#elif defined _MIPS_SIM
+#  if _MIPS_SIM == _MIPS_SIM_ABI32
+#    define systemd_NR_name_to_handle_at systemd_SC_arch_bias(339)
+#  elif _MIPS_SIM == _MIPS_SIM_NABI32
+#    define systemd_NR_name_to_handle_at systemd_SC_arch_bias(303)
+#  elif _MIPS_SIM == _MIPS_SIM_ABI64
+#    define systemd_NR_name_to_handle_at systemd_SC_arch_bias(298)
+#  endif
 #else
 #  warning "name_to_handle_at number is not defined"
 #endif
@@ -239,6 +257,14 @@ static inline int missing_name_to_handle_at(int fd, const char *name, struct fil
 #  define systemd_NR_setns 339
 #elif defined(__arc__)
 #  define systemd_NR_setns 268
+#elif defined _MIPS_SIM
+#  if _MIPS_SIM == _MIPS_SIM_ABI32
+#    define systemd_NR_setns systemd_SC_arch_bias(344)
+#  elif _MIPS_SIM == _MIPS_SIM_NABI32
+#    define systemd_NR_setns systemd_SC_arch_bias(308)
+#  elif _MIPS_SIM == _MIPS_SIM_ABI64
+#    define systemd_NR_setns systemd_SC_arch_bias(303)
+#  endif
 #else
 #  warning "setns() syscall number unknown for your architecture"
 #endif
@@ -290,13 +316,11 @@ static inline pid_t raw_getpid(void) {
 #  define systemd_NR_renameat2 276
 #elif defined _MIPS_SIM
 #  if _MIPS_SIM == _MIPS_SIM_ABI32
-#    define systemd_NR_renameat2 4351
-#  endif
-#  if _MIPS_SIM == _MIPS_SIM_NABI32
-#    define systemd_NR_renameat2 6315
-#  endif
-#  if _MIPS_SIM == _MIPS_SIM_ABI64
-#    define systemd_NR_renameat2 5311
+#    define systemd_NR_renameat2 systemd_SC_arch_bias(351)
+#  elif _MIPS_SIM == _MIPS_SIM_NABI32
+#    define systemd_NR_renameat2 systemd_SC_arch_bias(315)
+#  elif _MIPS_SIM == _MIPS_SIM_ABI64
+#    define systemd_NR_renameat2 systemd_SC_arch_bias(311)
 #  endif
 #elif defined __i386__
 #  define systemd_NR_renameat2 353
@@ -405,6 +429,14 @@ static inline key_serial_t missing_request_key(const char *type, const char *des
 #  define systemd_NR_copy_file_range 379
 #elif defined __arc__
 #  define systemd_NR_copy_file_range 285
+#elif defined _MIPS_SIM
+#  if _MIPS_SIM == _MIPS_SIM_ABI32
+#    define systemd_NR_copy_file_range systemd_SC_arch_bias(360)
+#  elif _MIPS_SIM == _MIPS_SIM_NABI32
+#    define systemd_NR_copy_file_range systemd_SC_arch_bias(324)
+#  elif _MIPS_SIM == _MIPS_SIM_ABI64
+#    define systemd_NR_copy_file_range systemd_SC_arch_bias(320)
+#  endif
 #else
 #  warning "copy_file_range() syscall number unknown for your architecture"
 #endif
@@ -457,6 +489,14 @@ static inline ssize_t missing_copy_file_range(int fd_in, loff_t *off_in,
 #  define systemd_NR_bpf 351
 #elif defined __tilegx__
 #  define systemd_NR_bpf 280
+#elif defined _MIPS_SIM
+#  if _MIPS_SIM == _MIPS_SIM_ABI32
+#    define systemd_NR_bpf systemd_SC_arch_bias(355)
+#  elif _MIPS_SIM == _MIPS_SIM_NABI32
+#    define systemd_NR_bpf systemd_SC_arch_bias(319)
+#  elif _MIPS_SIM == _MIPS_SIM_ABI64
+#    define systemd_NR_bpf systemd_SC_arch_bias(315)
+#  endif
 #else
 #  warning "bpf() syscall number unknown for your architecture"
 #endif
@@ -507,13 +547,11 @@ static inline int missing_bpf(int cmd, union bpf_attr *attr, size_t size) {
 #    define systemd_NR_pkey_mprotect 384
 #  elif defined _MIPS_SIM
 #    if _MIPS_SIM == _MIPS_SIM_ABI32
-#      define systemd_NR_pkey_mprotect 4363
-#    endif
-#    if _MIPS_SIM == _MIPS_SIM_NABI32
-#      define systemd_NR_pkey_mprotect 6327
-#    endif
-#    if _MIPS_SIM == _MIPS_SIM_ABI64
-#      define systemd_NR_pkey_mprotect 5323
+#      define systemd_NR_pkey_mprotect systemd_SC_arch_bias(363)
+#    elif _MIPS_SIM == _MIPS_SIM_NABI32
+#      define systemd_NR_pkey_mprotect systemd_SC_arch_bias(327)
+#    elif _MIPS_SIM == _MIPS_SIM_ABI64
+#      define systemd_NR_pkey_mprotect systemd_SC_arch_bias(323)
 #    endif
 #  else
 #    warning "pkey_mprotect() syscall number unknown for your architecture"
@@ -550,6 +588,14 @@ assert_cc(__NR_pkey_mprotect == systemd_NR_pkey_mprotect);
 #  define systemd_NR_statx 360
 #elif defined __x86_64__
 #  define systemd_NR_statx systemd_SC_arch_bias(332)
+#elif defined _MIPS_SIM
+#  if _MIPS_SIM == _MIPS_SIM_ABI32
+#    define systemd_NR_statx systemd_SC_arch_bias(366)
+#  elif _MIPS_SIM == _MIPS_SIM_NABI32
+#    define systemd_NR_statx systemd_SC_arch_bias(330)
+#  elif _MIPS_SIM == _MIPS_SIM_ABI64
+#    define systemd_NR_statx systemd_SC_arch_bias(326)
+#  endif
 #else
 #  warning "statx() syscall number unknown for your architecture"
 #endif
@@ -634,23 +680,7 @@ static inline long missing_get_mempolicy(int *mode, unsigned long *nodemask,
 /* ======================================================================= */
 
 /* should be always defined, see kernel 39036cd2727395c3369b1051005da74059a85317 */
-#if defined __alpha__
-#  define systemd_NR_pidfd_send_signal 534
-#elif defined _MIPS_SIM
-#  if _MIPS_SIM == _MIPS_SIM_ABI32     /* o32 */
-#    define systemd_NR_pidfd_send_signal (424 + 4000)
-#  endif
-#  if _MIPS_SIM == _MIPS_SIM_NABI32    /* n32 */
-#    define systemd_NR_pidfd_send_signal (424 + 6000)
-#  endif
-#  if _MIPS_SIM == _MIPS_SIM_ABI64     /* n64 */
-#    define systemd_NR_pidfd_send_signal (424 + 5000)
-#  endif
-#elif defined __ia64__
-#  define systemd_NR_pidfd_send_signal (424 + 1024)
-#else
-#  define systemd_NR_pidfd_send_signal systemd_SC_arch_bias(424)
-#endif
+#define systemd_NR_pidfd_send_signal systemd_SC_arch_bias(424)
 
 /* may be (invalid) negative number due to libseccomp, see PR 13319 */
 #if defined __NR_pidfd_send_signal && __NR_pidfd_send_signal >= 0
@@ -678,23 +708,7 @@ static inline int missing_pidfd_send_signal(int fd, int sig, siginfo_t *info, un
 #endif
 
 /* should be always defined, see kernel 7615d9e1780e26e0178c93c55b73309a5dc093d7 */
-#if defined __alpha__
-#  define systemd_NR_pidfd_open 544
-#elif defined _MIPS_SIM
-#  if _MIPS_SIM == _MIPS_SIM_ABI32     /* o32 */
-#    define systemd_NR_pidfd_open (434 + 4000)
-#  endif
-#  if _MIPS_SIM == _MIPS_SIM_NABI32    /* n32 */
-#    define systemd_NR_pidfd_open (434 + 6000)
-#  endif
-#  if _MIPS_SIM == _MIPS_SIM_ABI64     /* n64 */
-#    define systemd_NR_pidfd_open (434 + 5000)
-#  endif
-#elif defined __ia64__
-#  define systemd_NR_pidfd_open (434 + 1024)
-#else
-#  define systemd_NR_pidfd_open systemd_SC_arch_bias(434)
-#endif
+#define systemd_NR_pidfd_open systemd_SC_arch_bias(434)
 
 /* may be (invalid) negative number due to libseccomp, see PR 13319 */
 #if defined __NR_pidfd_open && __NR_pidfd_open >= 0
index 6b0404453aae8e2bd6097b7665e0a78d5b3b72d4..dba3043d2264f0e43cb1b42a224fcd0010e51a2f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/timerfd.h>
index bf8a6caa1b467a87d7e30962a8b5056fd86ce28b..f6233090a905c195b104196e1402359d745f8733 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <uchar.h>
index 9eac76dd67c4ec15e2f831a7cf4f5fd9447ebeaa..ba5fe8128858e85ede5776992df4cf384d077e03 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /* This is currently not exported in the public kernel headers, but the libxfs library code part of xfsprogs
index e844a598060d3e6485ecd126e1e9378dee3d5166..9565117b9256c3b008c1415c226cfb8d34902cd7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 #include <sys/stat.h>
index eea8f1c9aa7b44daa33bc931586c11a8ecb35e03..f91f8f7a089a12736fa051a9aa37a503cc59025b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdbool.h>
index fc66a7d36518063854ec3e3e52a4a7b1d7c6b0b0..3c53d22db973db74eb7a6d8c197f22a2426cd070 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/types.h>
index 681da7402457c2508fb85bd35fe9dcb4439ee573..8bed96069f74a9c4187e9a7e9f4805c35a901725 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index ab4ed193945c74ecad9d55559e75744db71647ee..aadb2123d91680003cf9dd687c1628c1ddc16083 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <fcntl.h>
index b34c532604a5fe85b88e6fae3b49f32300d13de6..833a18a20499d012a6c3f7c5b089bb86e6132925 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/ioctl.h>
index 99d9b977edf118614406faa34f23381040a9acf1..7f7d06687307d6f747a31a21eb173ea25c03df3e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/types.h>
index 29cf22676ae6f3e6e2416d6c4b802dbb8ebe7fb0..dfc0d3fb200e64bd4e06d59d1eeed4f09348d385 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <grp.h>
index b12d0202320fad7d8ff52e60f1fe36f2409b9c5a..49fcbb0f03cefa49ff8f393a1f1681471910c1d2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "nulstr-util.h"
 #include "string-util.h"
index 436b271f3c864923e3744d62b4ca5081f0cd0077..ee9b632a647f0664620a83136ec219a1d77f67e7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 83098435b2106d638359ccc0fdd77ff33ed42cc3..58fa8af1b7371c68035fe3eaf0086e8dbb317da6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "fileio.h"
 #include "ordered-set.h"
index c942aafe811020f8a603050e34379fccbfa7371e..baf82020887517d827e3b1e516ac5862c2f333c1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdio.h>
index 818c9054d6e4d6d21b44137b98d3fbc1fd2f7d2e..5d4dafe3a5956527fea76269de489be172e809a0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <inttypes.h>
@@ -862,3 +862,45 @@ int parse_oom_score_adjust(const char *s, int *ret) {
         *ret = v;
         return 0;
 }
+
+int store_loadavg_fixed_point(unsigned long i, unsigned long f, loadavg_t *ret) {
+        assert(ret);
+
+        if (i >= (~0UL << FSHIFT))
+                return -ERANGE;
+
+        i = i << FSHIFT;
+        f = DIV_ROUND_UP((f << FSHIFT), 100);
+
+        if (f >= FIXED_1)
+                return -ERANGE;
+
+        *ret = i | f;
+        return 0;
+}
+
+int parse_loadavg_fixed_point(const char *s, loadavg_t *ret) {
+        const char *d, *f_str, *i_str;
+        unsigned long i, f;
+        int r;
+
+        assert(s);
+        assert(ret);
+
+        d = strchr(s, '.');
+        if (!d)
+                return -EINVAL;
+
+        i_str = strndupa(s, d - s);
+        f_str = d + 1;
+
+        r = safe_atolu_full(i_str, 10, &i);
+        if (r < 0)
+                return r;
+
+        r = safe_atolu_full(f_str, 10, &f);
+        if (r < 0)
+                return r;
+
+        return store_loadavg_fixed_point(i, f, ret);
+}
index 2cee65c49ae36b6dafc091b4a57c4253d281c1dd..81478ed0591177e21d1a170a0955067af38f5de5 100644 (file)
@@ -1,14 +1,17 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
 #include <limits.h>
+#include <linux/loadavg.h>
 #include <stddef.h>
 #include <stdint.h>
 #include <sys/types.h>
 
 #include "macro.h"
 
+typedef unsigned long loadavg_t;
+
 int parse_boolean(const char *v) _pure_;
 int parse_dev(const char *s, dev_t *ret);
 int parse_pid(const char *s, pid_t* ret_pid);
@@ -88,18 +91,18 @@ static inline int safe_atoux64(const char *s, uint64_t *ret) {
 }
 
 #if LONG_MAX == INT_MAX
-static inline int safe_atolu(const char *s, unsigned long *ret_u) {
+static inline int safe_atolu_full(const char *s, unsigned base, long unsigned *ret_u) {
         assert_cc(sizeof(unsigned long) == sizeof(unsigned));
-        return safe_atou(s, (unsigned*) ret_u);
+        return safe_atou_full(s, base, (unsigned*) ret_u);
 }
 static inline int safe_atoli(const char *s, long int *ret_u) {
         assert_cc(sizeof(long int) == sizeof(int));
         return safe_atoi(s, (int*) ret_u);
 }
 #else
-static inline int safe_atolu(const char *s, unsigned long *ret_u) {
+static inline int safe_atolu_full(const char *s, unsigned base, unsigned long *ret_u) {
         assert_cc(sizeof(unsigned long) == sizeof(unsigned long long));
-        return safe_atollu(s, (unsigned long long*) ret_u);
+        return safe_atollu_full(s, base, (unsigned long long*) ret_u);
 }
 static inline int safe_atoli(const char *s, long int *ret_u) {
         assert_cc(sizeof(long int) == sizeof(long long int));
@@ -107,6 +110,10 @@ static inline int safe_atoli(const char *s, long int *ret_u) {
 }
 #endif
 
+static inline int safe_atolu(const char *s, unsigned long *ret_u) {
+        return safe_atolu_full(s, 0, ret_u);
+}
+
 #if SIZE_MAX == UINT_MAX
 static inline int safe_atozu(const char *s, size_t *ret_u) {
         assert_cc(sizeof(size_t) == sizeof(unsigned));
@@ -137,3 +144,8 @@ int parse_ip_port_range(const char *s, uint16_t *low, uint16_t *high);
 int parse_ip_prefix_length(const char *s, int *ret);
 
 int parse_oom_score_adjust(const char *s, int *ret);
+
+/* Given a Linux load average (e.g. decimal number 34.89 where 34 is passed as i and 89 is passed as f), convert it
+ * to a loadavg_t. */
+int store_loadavg_fixed_point(unsigned long i, unsigned long f, loadavg_t *ret);
+int parse_loadavg_fixed_point(const char *s, loadavg_t *ret);
index e763fd7993f210a1a6d51cb4aba3de6e207c6a60..96b82170d06d93b5ff2e360ae938dd4e692fbe8a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdio.h>
index ee3d8102e0066ef16f6b40a6d64cfbe4d1aec407..088bb9b57cf817b19084eef022222a73794be586 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index c14d885d1a7790dc1a18a773cd0e35ee99939b53..dae8b7341a5c568d86c76e5b709d6831c95d5002 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <limits.h>
@@ -550,7 +550,7 @@ char* path_join_internal(const char *first, ...) {
 
         sz = strlen_ptr(first);
         va_start(ap, first);
-        while ((p = va_arg(ap, char*)) != (const char*) -1)
+        while ((p = va_arg(ap, char*)) != POINTER_MAX)
                 if (!isempty(p))
                         sz += 1 + strlen(p);
         va_end(ap);
@@ -570,7 +570,7 @@ char* path_join_internal(const char *first, ...) {
         }
 
         va_start(ap, first);
-        while ((p = va_arg(ap, char*)) != (const char*) -1) {
+        while ((p = va_arg(ap, char*)) != POINTER_MAX) {
                 if (isempty(p))
                         continue;
 
index 13e87731a6bab71f241f5a18136429b05e596ba3..e7a26c9a843215cc643fff17e61af6fe36a3fd8f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <alloca.h>
@@ -62,7 +62,7 @@ int path_compare(const char *a, const char *b) _pure_;
 bool path_equal(const char *a, const char *b) _pure_;
 bool path_equal_or_files_same(const char *a, const char *b, int flags);
 char* path_join_internal(const char *first, ...);
-#define path_join(x, ...) path_join_internal(x, __VA_ARGS__, (const char*) -1)
+#define path_join(x, ...) path_join_internal(x, __VA_ARGS__, POINTER_MAX)
 
 char* path_simplify(char *path, bool kill_dots);
 
index 76b27fa0a8e65e52c449e6e9bd009609bc0c5fc9..559e5d124d22c63985e147039faeacf9548c4c69 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 /*
  * Priority Queue
index 1fb57bfa4ca433b3c6010fd0def8ebb6414de4f4..951576c021773cadb6143e0beb9c59b6a050da51 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index ba47ca5812bd9b884375f1f09e343721cd01823f..0b6fb137bdc304e3921aed759b56a4871d6e92f6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdbool.h>
 #include <stddef.h>
index 077d3a99fb91e72fc66aa55eb92a02576358a2d2..45f3a27f27483c1f7fb1a940edb1c07f45f06ff9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 80f13048c1065e033daa42c59be79e453d4c318b..0851613fc9ef03c3c57503d7c83290645f4cefab 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <ctype.h>
 #include <errno.h>
index 49bb74ac0ff0c5e026253787628c2d61d8779863..6144f142c47a0f132a8f9ada625c21c9c05fc555 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <errno.h>
index 38f9fa1212b1da8f0440de04320170f773a2a537..ccab71f7d2a8a7d4ec43ed4881db5d7a36c2a98b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index 5a44e9eff7996883cdcc4b300b860c122279ac60..8258c9e3ea72d0a9aef4ec25499aae36a07d96a6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index dc3eaba43669f23af7f2a4386055ff4ce2ad1b2b..113485d044b820f37d3288a165582f63fccbac72 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <pthread.h>
index 96ea9ee3643498ad91ffe0f12b11b66412c6ce6e..fbf8ee50644cf91b2b23fec18fa6ff2248eb5f25 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/quota.h>
 
index ff99e342f969e628d57c5e3852a9d71b48b52fdb..a61bdcbae60ebffdd37714bf1dffcf84cbac99c1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index 2031262389202af45a7187229d807f2b17ba0a1c..c8c34a203472efe3e826c521567ac0707f2a4f4f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if defined(__i386__) || defined(__x86_64__)
 #include <cpuid.h>
index 7824ffacebb9255ac81783b5866acc6afb6600e0..f661fc093aef703ff522504a85b1e2d08bad8cab 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 2e94eed843c60d6d747413482d90c5ab399fbb9d..bae2ec3ffc5f9f6fc6f75839f8466638733ba492 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/time.h>
 
@@ -19,7 +19,7 @@ bool ratelimit_below(RateLimit *r) {
         ts = now(CLOCK_MONOTONIC);
 
         if (r->begin <= 0 ||
-            r->begin + r->interval < ts) {
+            ts - r->begin > r->interval) {
                 r->begin = ts;
 
                 /* Reset counter */
index 9d409b04b3bb33fd81f5f28b516b05d5ebd84be2..ee1d17c0e74e5afcc7b240cd5f6936bfdb2e6ac4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index b12dea2aef6ac7e27d214f770f66975f1d95e45d..becf42e70bf84f0c6b8a2e88ca68aa24df839dcb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index 8ecefe9e213ca2a6df672fee8dd85d82ea351bb2..e6bff300a52ca9c355190eee021f7e375707ec86 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <linux/reboot.h>
index 5b4737505ca192eae6c4a1e4e956200c9fe309fb..01c26ce74c13665cc000af500c417835578260b9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stddef.h>
index e6a489feeec0ed08e21d6085dbb89c915c8f0b54..644d9dfce4c09906d3a0749620da82bac453acac 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 char *replace_var(const char *text, char *(*lookup)(const char *variable, void *userdata), void *userdata);
index 2dc13eabc30d3230e557aae42071f9a8c704c9cd..880976312cb63056c77e218d525e062f96b6b92b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index d4fca2b8556d9b00b3a080c02c11e64737dd8ccb..59bc066798feca5cc34df07615d2753526f5f984 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/resource.h>
index ab331cd677ac2207580198a42978f23838a59149..b0d682f764f3fdb2c2efc807db01f659fb09eea2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 0edf01ee1c05408b3e0ec321f9dd0fddf16d5dc9..ec56232b5dcad68885d1481f0813466171b94106 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/stat.h>
index 1791aeecde79a5b69c3d0dfb6d38639481a1719f..4989f4f37c6b68ef698d08a6c1b193c50a1dfb31 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -133,6 +133,7 @@ static int open_label_db(void) {
 int mac_selinux_init(void) {
 #if HAVE_SELINUX
         int r;
+        bool have_status_page = false;
 
         if (initialized)
                 return 0;
@@ -140,9 +141,15 @@ int mac_selinux_init(void) {
         if (!mac_selinux_use())
                 return 0;
 
-        r = selinux_status_open(/* no netlink fallback */ 0);
-        if (r < 0)
-                return log_enforcing_errno(errno, "Failed to open SELinux status page: %m");
+        r = selinux_status_open(/* netlink fallback */ 1);
+        if (r < 0) {
+                if (!ERRNO_IS_PRIVILEGE(errno))
+                        return log_enforcing_errno(errno, "Failed to open SELinux status page: %m");
+                log_warning_errno(errno, "selinux_status_open() with netlink fallback failed, not checking for policy reloads: %m");
+        } else if (r == 1)
+                log_warning("selinux_status_open() failed to open the status page, using the netlink fallback.");
+        else
+                have_status_page = true;
 
         r = open_label_db();
         if (r < 0) {
@@ -150,13 +157,14 @@ int mac_selinux_init(void) {
                 return r;
         }
 
-        /* save the current policyload sequence number, so `mac_selinux_maybe_reload()` does
-           not trigger on first call without any actual change */
+        /* Save the current policyload sequence number, so mac_selinux_maybe_reload() does not trigger on
+         * first call without any actual change. */
         last_policyload = selinux_status_policyload();
 
-        /* now that the SELinux status page has been successfully opened,
-           retrieve the enforcing status over it (to avoid system calls in `security_getenforce()`) */
-        enforcing_status_func = selinux_status_getenforce;
+        if (have_status_page)
+                /* Now that the SELinux status page has been successfully opened, retrieve the enforcing
+                 * status over it (to avoid system calls in security_getenforce()). */
+                enforcing_status_func = selinux_status_getenforce;
 
         initialized = true;
 #endif
index 43d22b914fd914494c4076eaa86dd0f0f8bc7c5f..1236d6efdfef09da15b62a454a43211712f8fe40 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 7749c18c45748e67eec746733ece98d5e00e5f3f..20abc8f0dcf1866f9345a552134af664bcd723ce 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "extract-word.h"
index a065a45a8c0c8f8a35bc234950fef728690e7c7e..4c2e9ec33ee68ef021d9073c84af68d54383e0ba 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <signal.h>
index 459e19fcaaacadf2bc97671394087b01461f9905..a40b1a87aa061a82d441f317d6879e698eb3a40c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 void sigbus_install(void);
index cb59f6ca0f2639648989e22f2361f545c414f970..63b833b2181043b5a9c110c6cbbbac726bcb62b5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdarg.h>
@@ -49,16 +49,7 @@ static int sigaction_many_ap(const struct sigaction *sa, int sig, va_list ap) {
         int r = 0;
 
         /* negative signal ends the list. 0 signal is skipped. */
-
-        if (sig < 0)
-                return 0;
-
-        if (sig > 0) {
-                if (sigaction(sig, sa, NULL) < 0)
-                        r = -errno;
-        }
-
-        while ((sig = va_arg(ap, int)) >= 0) {
+        for (; sig >= 0; sig = va_arg(ap, int)) {
 
                 if (sig == 0)
                         continue;
index 3909ee341dafacf904d6094cdbf5cd0b7b379ad2..bdd39d429ddaef75eb92043291a12d368bf6e632 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <signal.h>
index 61180819b1bf0f995cddb9ca2ee9f02e1be9bb28..7c61eb145d9ddd3e080cc294d5827a9365ffc616 100644 (file)
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: CC0-1.0 */
+
 /*
    SipHash reference C implementation
 
@@ -10,7 +12,7 @@
    worldwide. This software is distributed without any warranty.
 
    You should have received a copy of the CC0 Public Domain Dedication along with
-   this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
+   this software. If not, see <https://creativecommons.org/publicdomain/zero/1.0/>.
 
    (Minimal changes made by Lennart Poettering, to make clean for inclusion in systemd)
    (Refactored by Tom Gundersen to split up in several functions and follow systemd
index fe43256882eccf86fe112310c11de5887247f9e1..90a6de00e4f2f531849989e705b6c2f6b207fc19 100644 (file)
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: CC0-1.0 */
+
 #pragma once
 
 #include <inttypes.h>
index 7bb0746b6c8c96062f23f0b22cc08d6a0e710760..3362ee3924b04950fb4d1d366bc0ff1237352b57 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2013 Intel Corporation
 
index df2ce370716910741110adab5495b700868ae12a..d0b2352428bdb681fe736ae28cb11281d05c2ccc 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index 718a6953e5b57622c8e26ddf9855e6703b8978e7..ea78762e657678821510a9ff496b03f4e16195ed 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <netinet/in.h>
index f2e1148e8743999869cc08cdf8e07e63b7970708..63ab53b8fc1b87da8966743a0f182c8dd43ed77f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <arpa/inet.h>
 #include <errno.h>
@@ -320,7 +320,7 @@ bool socket_address_matches_fd(const SocketAddress *a, int fd) {
 }
 
 int sockaddr_port(const struct sockaddr *_sa, unsigned *ret_port) {
-        union sockaddr_union *sa = (union sockaddr_union*) _sa;
+        const union sockaddr_union *sa = (const union sockaddr_union*) _sa;
 
         /* Note, this returns the port as 'unsigned' rather than 'uint16_t', as AF_VSOCK knows larger ports */
 
@@ -345,6 +345,25 @@ int sockaddr_port(const struct sockaddr *_sa, unsigned *ret_port) {
         }
 }
 
+const union in_addr_union *sockaddr_in_addr(const struct sockaddr *_sa) {
+        const union sockaddr_union *sa = (const union sockaddr_union*) _sa;
+
+        if (!sa)
+                return NULL;
+
+        switch (sa->sa.sa_family) {
+
+        case AF_INET:
+                return (const union in_addr_union*) &sa->in.sin_addr;
+
+        case AF_INET6:
+                return (const union in_addr_union*) &sa->in6.sin6_addr;
+
+        default:
+                return NULL;
+        }
+}
+
 int sockaddr_pretty(
                 const struct sockaddr *_sa,
                 socklen_t salen,
@@ -1240,6 +1259,9 @@ int socket_set_recvpktinfo(int fd, int af, bool b) {
         case AF_NETLINK:
                 return setsockopt_int(fd, SOL_NETLINK, NETLINK_PKTINFO, b);
 
+        case AF_PACKET:
+                return setsockopt_int(fd, SOL_PACKET, PACKET_AUXDATA, b);
+
         default:
                 return -EAFNOSUPPORT;
         }
index c36f90f75f79e049ef8be79d66ee71e9bfbb9ecc..923898a3fc4ab74d6f36d64a40e0727cd9883f90 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
@@ -102,6 +102,7 @@ const char* socket_address_get_path(const SocketAddress *a);
 bool socket_ipv6_is_supported(void);
 
 int sockaddr_port(const struct sockaddr *_sa, unsigned *port);
+const union in_addr_union *sockaddr_in_addr(const struct sockaddr *sa);
 
 int sockaddr_pretty(const struct sockaddr *_sa, socklen_t salen, bool translate_ipv6, bool include_port, char **ret);
 int getpeername_pretty(int fd, bool include_port, char **ret);
index 5cf0d1d49b6c2da05e7c82482dd166c34e8e1229..92d7b8588d20944eabefcb8b474af39b69514b09 100644 (file)
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
 #include "sort-util.h"
 #include "alloc-util.h"
 
index a8dc3bb6edb10d754ee245778f2f45d8586fffd7..1d194a1f04992504e78bf4b355bc56634652dbbf 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdlib.h>
index 19ee30cd412cc7c915ae327c8735c3c93ee3b0c3..d55b3289dee184ae97f9e4002e826706c53f6fc3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #define SPECIAL_DEFAULT_TARGET "default.target"
 
 /* The root directory. */
 #define SPECIAL_ROOT_MOUNT "-.mount"
+
+/* Special slices valid for the user instance */
+#define SPECIAL_SESSION_SLICE "session.slice"
+#define SPECIAL_APP_SLICE "app.slice"
+#define SPECIAL_BACKGROUND_SLICE "background.slice"
index 574815bc439db896bd6f10c564b33418844558f7..41c92e69de8eef67101507999b164ab8447b239e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -408,7 +408,8 @@ bool stat_inode_unmodified(const struct stat *a, const struct stat *b) {
         return a && b &&
                 (a->st_mode & S_IFMT) != 0 && /* We use the check for .st_mode if the structure was ever initialized */
                 ((a->st_mode ^ b->st_mode) & S_IFMT) == 0 &&  /* same inode type */
-                a->st_mtime == b->st_mtime &&
+                a->st_mtim.tv_sec == b->st_mtim.tv_sec &&
+                a->st_mtim.tv_nsec == b->st_mtim.tv_nsec &&
                 (!S_ISREG(a->st_mode) || a->st_size == b->st_size) && /* if regular file, compare file size */
                 a->st_dev == b->st_dev &&
                 a->st_ino == b->st_ino &&
index 26ecd635f160c8e5af341a237648b31032804dc4..a566114f7c9bd5a734881804930da8ca70822720 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <fcntl.h>
index 8fbc07c5876a8b67bcd80a67120462438f799d01..0f961328ee2a312a92350de4d25bae47556046e7 100644 (file)
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
 #pragma once
 
 #include "alloc-util.h"
index c3b9448d4f4feca25dc3aa5e141e9201233400af..6dc1e72312c8dfc3b02193e59e2fffbb5df6a5e8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <printf.h>
index 769b22aba0ca5280095e293afb7c116e00e67d16..aee6647e35a6efe3f4a16a2509b10f5218fd6f02 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdlib.h>
index a36944ad3922db221b44a35dde6bbb39fc2c4549..82758d721bf329730a78c176bbee9a5ef0321e41 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stddef.h>
index 0168cff886dcf262f2915ebd73f2b5a7ebcdca55..116021df82bb76358092a9cea3d630ba1cd320aa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "string-table.h"
 #include "string-util.h"
index 96924778f55c264e1b7a3c4f33333e1d0a7940fd..4911a455c5864b20dc9e4503f619d64377659104 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #pragma once
 
@@ -28,13 +28,12 @@ ssize_t string_table_lookup(const char * const *table, size_t len, const char *k
 
 #define _DEFINE_STRING_TABLE_LOOKUP_FROM_STRING_WITH_BOOLEAN(name,type,yes,scope) \
         scope type name##_from_string(const char *s) {                  \
-                int b;                                                  \
                 if (!s)                                                 \
                         return -1;                                      \
-                b = parse_boolean(s);                                   \
+                int b = parse_boolean(s);                               \
                 if (b == 0)                                             \
                         return (type) 0;                                \
-                else if (b > 0)                                         \
+                if (b > 0)                                              \
                         return yes;                                     \
                 return (type) string_table_lookup(name##_table, ELEMENTSOF(name##_table), s); \
         }
index ab725d0dab42d655b85da5b1b735e5f8ab9d1c07..7ab460faa5a277b2d66f8e85d4b16f5e8dd975c3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdarg.h>
@@ -145,57 +145,32 @@ char *strnappend(const char *s, const char *suffix, size_t b) {
 
 char *strjoin_real(const char *x, ...) {
         va_list ap;
-        size_t l;
+        size_t l = 1;
         char *r, *p;
 
         va_start(ap, x);
+        for (const char *t = x; t; t = va_arg(ap, const char *)) {
+                size_t n;
 
-        if (x) {
-                l = strlen(x);
-
-                for (;;) {
-                        const char *t;
-                        size_t n;
-
-                        t = va_arg(ap, const char *);
-                        if (!t)
-                                break;
-
-                        n = strlen(t);
-                        if (n > ((size_t) -1) - l) {
-                                va_end(ap);
-                                return NULL;
-                        }
-
-                        l += n;
+                n = strlen(t);
+                if (n > SIZE_MAX - l) {
+                        va_end(ap);
+                        return NULL;
                 }
-        } else
-                l = 0;
-
+                l += n;
+        }
         va_end(ap);
 
-        r = new(char, l+1);
+        p = r = new(char, l);
         if (!r)
                 return NULL;
 
-        if (x) {
-                p = stpcpy(r, x);
-
-                va_start(ap, x);
-
-                for (;;) {
-                        const char *t;
-
-                        t = va_arg(ap, const char *);
-                        if (!t)
-                                break;
-
-                        p = stpcpy(p, t);
-                }
+        va_start(ap, x);
+        for (const char *t = x; t; t = va_arg(ap, const char *))
+                p = stpcpy(p, t);
+        va_end(ap);
 
-                va_end(ap);
-        } else
-                r[0] = 0;
+        *p = 0;
 
         return r;
 }
index cefbda3577b47cadf99461b197ada351f2fe1ac7..fdd3ce7363123fa257ecfadfefd0a9fde0c2931d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
@@ -33,6 +33,12 @@ static inline bool streq_ptr(const char *a, const char *b) {
         return strcmp_ptr(a, b) == 0;
 }
 
+static inline char* strstr_ptr(const char *haystack, const char *needle) {
+        if (!haystack || !needle)
+                return NULL;
+        return strstr(haystack, needle);
+}
+
 static inline const char* strempty(const char *s) {
         return s ?: "";
 }
@@ -53,6 +59,10 @@ static inline const char* true_false(bool b) {
         return b ? "true" : "false";
 }
 
+static inline const char* plus_minus(bool b) {
+        return b ? "+" : "-";
+}
+
 static inline const char* one_zero(bool b) {
         return b ? "1" : "0";
 }
index b2b6de388a9bef9bbcae309b7305da7b1ef55692..492dfe40023a6056cc686debb3ed36d53c014a0f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fnmatch.h>
@@ -123,7 +123,6 @@ size_t strv_length(char * const *l) {
 }
 
 char **strv_new_ap(const char *x, va_list ap) {
-        const char *s;
         _cleanup_strv_free_ char **a = NULL;
         size_t n = 0, i = 0;
         va_list aq;
@@ -133,43 +132,28 @@ char **strv_new_ap(const char *x, va_list ap) {
          * STRV_IFNOTNULL() macro to include possibly NULL strings in
          * the string list. */
 
-        if (x) {
-                n = x == STRV_IGNORE ? 0 : 1;
-
-                va_copy(aq, ap);
-                while ((s = va_arg(aq, const char*))) {
-                        if (s == STRV_IGNORE)
-                                continue;
-
-                        n++;
-                }
+        va_copy(aq, ap);
+        for (const char *s = x; s; s = va_arg(aq, const char*)) {
+                if (s == STRV_IGNORE)
+                        continue;
 
-                va_end(aq);
+                n++;
         }
+        va_end(aq);
 
         a = new(char*, n+1);
         if (!a)
                 return NULL;
 
-        if (x) {
-                if (x != STRV_IGNORE) {
-                        a[i] = strdup(x);
-                        if (!a[i])
-                                return NULL;
-                        i++;
-                }
-
-                while ((s = va_arg(ap, const char*))) {
-
-                        if (s == STRV_IGNORE)
-                                continue;
+        for (const char *s = x; s; s = va_arg(ap, const char*)) {
+                if (s == STRV_IGNORE)
+                        continue;
 
-                        a[i] = strdup(s);
-                        if (!a[i])
-                                return NULL;
+                a[i] = strdup(s);
+                if (!a[i])
+                        return NULL;
 
-                        i++;
-                }
+                i++;
         }
 
         a[i] = NULL;
@@ -537,6 +521,19 @@ int strv_consume_prepend(char ***l, char *value) {
         return r;
 }
 
+int strv_prepend(char ***l, const char *value) {
+        char *v;
+
+        if (!value)
+                return 0;
+
+        v = strdup(value);
+        if (!v)
+                return -ENOMEM;
+
+        return strv_consume_prepend(l, v);
+}
+
 int strv_extend(char ***l, const char *value) {
         char *v;
 
index 919fabf75aa9bac67a3d299bb40f894669bfe4a1..6b3e8e7f8600f57c8e4e99188c8a5b02a03e8136 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <fnmatch.h>
@@ -34,6 +34,7 @@ size_t strv_length(char * const *l) _pure_;
 
 int strv_extend_strv(char ***a, char * const *b, bool filter_duplicates);
 int strv_extend_strv_concat(char ***a, char * const *b, const char *suffix);
+int strv_prepend(char ***l, const char *value);
 int strv_extend(char ***l, const char *value);
 int strv_extendf(char ***l, const char *format, ...) _printf_(2,0);
 int strv_extend_front(char ***l, const char *value);
@@ -62,7 +63,7 @@ char **strv_new_internal(const char *x, ...) _sentinel_;
 char **strv_new_ap(const char *x, va_list ap);
 #define strv_new(...) strv_new_internal(__VA_ARGS__, NULL)
 
-#define STRV_IGNORE ((const char *) -1)
+#define STRV_IGNORE ((const char *) POINTER_MAX)
 
 static inline const char* STRV_IFNOTNULL(const char *x) {
         return x ? x : STRV_IGNORE;
index ef6d3fa32472b4e3d29e82058102a8a5112b66db..dbbf7d08d21a92ae4c5559d5c83c983a2bcf088b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 /*
  * Concatenates/copies strings. In any case, terminates in all cases
index 9b6684124625e1ea1abb999d9af63276bed3122d..cdef492db101964acbe75ead6168b64a1a88f5e5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stddef.h>
index caeba46db43ec191730db3a8a1a9bd339b34a0a8..4eb9eba97c811fa1a2a9c8f65ed1b27a121a409d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <syslog.h>
 
index 998641fa01dc0f93f2d10f00cfb6078182642322..d7aa97fb7d8eebcade098d73583d9631a80954f4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index ac83688531f2530eb27d271a78b19814caa1d1f1..e00e9e87512f00af8410d5d911e60900cfbe86a3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 42a129c7ace349d87bc5b6d62314f55482ed0a2a..5cb1e138f3ad7d8912f50573120651344a581f9b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdarg.h>
index 7fa3b486237606bf22be69daf7a36d2f879c138a..5318d6378de8ac43023a83feb846c92f15709474 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <ctype.h>
 #include <errno.h>
index cecd5efa604ae07970265e91a02332880646c5aa..89ee8b4a9627d4d5a637c43d92f8e85969ba900c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
@@ -63,10 +63,10 @@ typedef enum TimestampStyle {
 
 /* We assume a maximum timezone length of 6. TZNAME_MAX is not defined on Linux, but glibc internally initializes this
  * to 6. Let's rely on that. */
-#define FORMAT_TIMESTAMP_MAX (3+1+10+1+8+1+6+1+6+1)
-#define FORMAT_TIMESTAMP_WIDTH 28 /* when outputting, assume this width */
-#define FORMAT_TIMESTAMP_RELATIVE_MAX 256
-#define FORMAT_TIMESPAN_MAX 64
+#define FORMAT_TIMESTAMP_MAX (3U+1U+10U+1U+8U+1U+6U+1U+6U+1U)
+#define FORMAT_TIMESTAMP_WIDTH 28U /* when outputting, assume this width */
+#define FORMAT_TIMESTAMP_RELATIVE_MAX 256U
+#define FORMAT_TIMESPAN_MAX 64U
 
 #define TIME_T_MAX (time_t)((UINTMAX_C(1) << ((sizeof(time_t) << 3) - 1)) - 1)
 
index a49f7eee702efa7778534e7fcf590d8459926a1e..49c343773cfc3e530f7dcf9a1a9164c26b78bbe0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/mman.h>
 
index 802c85d6d990d0c6e4ba9b971cbc038c5baac700..45255fc062fc954f128c9fd2bb46793ed20a6699 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdio.h>
index cad745170ebfb0d0eec652bb54dbfd97f215c2d1..bd7c2bdb8c7c1e4b52fc85f4e6042e03a8c5c615 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 00c17f8769046c7a4b45a75e897dbbc7abf2e0d3..4100be08031fb1f3a566b42c44c002af1e1d9a70 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <endian.h>
index 94ec1f3d19846307442a2c453ff653c7b00ce730..145399c9639cc16cfabeea0c8037cde1fa054db4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "bus-label.h"
index 1fab6c78ab1601ec96b622dcb09764e54b7cea35..8535fbe06231a02fa889b0fd505d18f55abd18d2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 43d8b3477e17ed4ece831387afdf4aa63ac7cf24..c1529bbeedf509abc7e2207fba550f59e0fefa7d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stddef.h>
index 1cd33396d8e6f3e3595e916f2a12fcdb751aaddc..c25672fad26d1b29b38973f39179870c8221e02b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 0e96a75797a95fdb9412ee7acada798e1ff8d7c0..933a398e7313ff59da6f526357cc9e93c5274725 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 13e2c99e6c22e3e563b5ab448b218ecf83a8892a..20ff415e2e9befc896ebe1f837d66ed066d5db21 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <grp.h>
index f0233397ef2ad344635037c0b8b39f88d34c6a53..59663c0350cccccbc3ec2ec576965cf64572d633 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 /* Parts of this file are based on the GLIB utf8 validation functions. The
  * original license text follows. */
index f315ea0f1ed06eb7c73ac084a033157ce688833d..a6ea942c6240f49ea482d564eb9581c22dd7a129 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 2b3b3918a32fc5c736b702b0469f743be7b764cd..b080ce4e96b6fe2eb0647250c5dc9fd6da7eb0f6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -193,8 +193,8 @@ int container_get_leader(const char *machine, pid_t *pid) {
 }
 
 int version(void) {
-        puts("systemd " STRINGIFY(PROJECT_VERSION) " (" GIT_VERSION ")\n"
-             SYSTEMD_FEATURES);
+        printf("systemd " STRINGIFY(PROJECT_VERSION) " (" GIT_VERSION ")\n%s\n",
+               systemd_features);
         return 0;
 }
 
index 6fc7480fcbd7697b6101832f301a766f78dbd03d..942d773ff11f1e52d5f1716f02428deeb2888e76 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdint.h>
index bb908847f5b1f2b056cfb19654a7db9c649d39f3..7d78a402b33bdae7c8dce168b609b31397165c1e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if defined(__i386__) || defined(__x86_64__)
 #include <cpuid.h>
@@ -345,7 +345,7 @@ int detect_vm(void) {
         /* We have to use the correct order here:
          *
          * → First, try to detect Oracle Virtualbox, even if it uses KVM, as well as Xen even if it cloaks as Microsoft
-         *   Hyper-V.
+         *   Hyper-V. Attempt to detect uml at this stage also since it runs as a user-process nested inside other VMs.
          *
          * → Second, try to detect from CPUID, this will report KVM for whatever software is used even if info in DMI is
          *   overwritten.
@@ -358,6 +358,16 @@ int detect_vm(void) {
                 goto finish;
         }
 
+        /* Detect UML */
+        r = detect_vm_uml();
+        if (r < 0)
+                return r;
+        if (r == VIRTUALIZATION_VM_OTHER)
+                other = true;
+        else if (r != VIRTUALIZATION_NONE)
+                goto finish;
+
+        /* Detect from CPUID */
         r = detect_vm_cpuid();
         if (r < 0)
                 return r;
@@ -406,14 +416,6 @@ int detect_vm(void) {
         else if (r != VIRTUALIZATION_NONE)
                 goto finish;
 
-        r = detect_vm_uml();
-        if (r < 0)
-                return r;
-        if (r == VIRTUALIZATION_VM_OTHER)
-                other = true;
-        else if (r != VIRTUALIZATION_NONE)
-                goto finish;
-
         r = detect_vm_zvm();
         if (r < 0)
                 return r;
index 2f7f7203d2948331be265ee48fca0b2f76862fc4..42d63d513541392f41f1bcaeb7d3261a129b9d18 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index fe0735ed3daba371a5941da665a9a51712b69e78..b9a0dc54c5329bad9fd1638d62983efc7decc768 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index a69e913b7f3d5dc63b3391dadc4f7c97b6a608c2..560e34babda4dc4c20da1ada690dcd8dee5e1d9b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 06aee22dc0f7ac2dc09cec48fed0a0feb54ca10c..43ed2f385bf25220f6e94640e7fd08e1b7a908ea 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <getopt.h>
index c59d8aed90ca528693ecd2d25630665a278467bc..001c85a238cf49964ef17ba4e4edbac549f88b4d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sys/stat.h>
index 0824266a809a89688961ae77870c8e9f5d5ce1ec..cd34f88bb9a395c3f934616fa0da46feec7fbf34 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 #include <stdlib.h>
index 038ce295356dda41939a031ed437c13a6ad1580e..92f3cd4ed059fb10bc3b1a66f2a037660d581276 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <getopt.h>
index f464882186fcc7b65e802c7a29ff1c53f61367c8..511b0105f33bdf3c667f32760d0b070540cc4caa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <ctype.h>
 #include <errno.h>
@@ -1014,24 +1014,25 @@ static int help(int argc, char *argv[], void *userdata) {
         if (r < 0)
                 return log_oom();
 
-        printf("%s  [OPTIONS...] COMMAND ...\n"
-               "\n%sInstall/update/remove the systemd-boot EFI boot manager and list/select entries.%s\n"
-               "\nBoot Loader Commands:\n"
-               "  status              Show status of installed systemd-boot and EFI variables\n"
-               "  install             Install systemd-boot to the ESP and EFI variables\n"
-               "  update              Update systemd-boot in the ESP and EFI variables\n"
-               "  remove              Remove systemd-boot from the ESP and EFI variables\n"
-               "  is-installed        Test whether systemd-boot is installed in the ESP\n"
-               "  random-seed         Initialize random seed in ESP and EFI variables\n"
-               "  systemd-efi-options [STRING]\n"
-               "                      Query or set system options string in EFI variable\n"
+        printf("%1$s  [OPTIONS...] COMMAND ...\n"
+               "\n%5$sControl EFI firmware boot settings and manage boot loader.%6$s\n"
+               "\n%3$sGeneric EFI Firmware/Boot Loader Commands:%4$s\n"
+               "  status              Show status of installed boot loader and EFI variables\n"
                "  reboot-to-firmware [BOOL]\n"
                "                      Query or set reboot-to-firmware EFI flag\n"
-               "\nBoot Loader Entries Commands:\n"
+               "  systemd-efi-options [STRING]\n"
+               "                      Query or set system options string in EFI variable\n"
+               "\n%3$sBoot Loader Specification Commands:%4$s\n"
                "  list                List boot loader entries\n"
                "  set-default ID      Set default boot loader entry\n"
                "  set-oneshot ID      Set default boot loader entry, for next boot only\n"
-               "\nOptions:\n"
+               "\n%3$ssystemd-boot Commands:%4$s\n"
+               "  install             Install systemd-boot to the ESP and EFI variables\n"
+               "  update              Update systemd-boot in the ESP and EFI variables\n"
+               "  remove              Remove systemd-boot from the ESP and EFI variables\n"
+               "  is-installed        Test whether systemd-boot is installed in the ESP\n"
+               "  random-seed         Initialize random seed in ESP and EFI variables\n"
+               "\n%3$sOptions:%4$s\n"
                "  -h --help            Show this help\n"
                "     --version         Print version\n"
                "     --esp-path=PATH   Path to the EFI System Partition (ESP)\n"
@@ -1042,11 +1043,12 @@ static int help(int argc, char *argv[], void *userdata) {
                "     --no-pager        Do not pipe output into a pager\n"
                "     --graceful        Don't fail when the ESP cannot be found or EFI\n"
                "                       variables cannot be written\n"
-               "\nSee the %s for details.\n"
+               "\nSee the %2$s for details.\n"
                , program_invocation_short_name
-               , ansi_highlight()
-               , ansi_normal()
-               , link);
+               , link
+               , ansi_underline(), ansi_normal()
+               , ansi_highlight(), ansi_normal()
+        );
 
         return 0;
 }
@@ -1659,6 +1661,31 @@ static int verb_is_installed(int argc, char *argv[], void *userdata) {
         return EXIT_SUCCESS;
 }
 
+static int parse_loader_entry_target_arg(const char *arg1, char16_t **ret_target, size_t *ret_target_size) {
+        int r;
+        if (streq(arg1, "@current")) {
+                r = efi_get_variable(EFI_VENDOR_LOADER, "LoaderEntrySelected", NULL, (void *) ret_target, ret_target_size);
+                if (r < 0)
+                        return log_error_errno(r, "Failed to get EFI variable 'LoaderEntrySelected': %m");
+        } else if (streq(arg1, "@oneshot")) {
+                r = efi_get_variable(EFI_VENDOR_LOADER, "LoaderEntryOneShot", NULL, (void *) ret_target, ret_target_size);
+                if (r < 0)
+                        return log_error_errno(r, "Failed to get EFI variable 'LoaderEntryOneShot': %m");
+        } else if (streq(arg1, "@default")) {
+                r = efi_get_variable(EFI_VENDOR_LOADER, "LoaderEntryDefault", NULL, (void *) ret_target, ret_target_size);
+                if (r < 0)
+                        return log_error_errno(r, "Failed to get EFI variable 'LoaderEntryDefault': %m");
+        } else {
+                char16_t *encoded = NULL;
+                encoded = utf8_to_utf16(arg1, strlen(arg1));
+                if (!encoded)
+                        return log_oom();
+                *ret_target = encoded;
+                *ret_target_size = char16_strlen(encoded) * 2 + 2;
+        }
+        return 0;
+}
+
 static int verb_set_default(int argc, char *argv[], void *userdata) {
         const char *name;
         int r;
@@ -1691,17 +1718,17 @@ static int verb_set_default(int argc, char *argv[], void *userdata) {
         if (isempty(argv[1])) {
                 r = efi_set_variable(EFI_VENDOR_LOADER, name, NULL, 0);
                 if (r < 0 && r != -ENOENT)
-                        return log_error_errno(r, "Failed to remove EFI variale: %m");
+                        return log_error_errno(r, "Failed to remove EFI variable '%s': %m", name);
         } else {
-                _cleanup_free_ char16_t *encoded = NULL;
+                _cleanup_free_ char16_t *target = NULL;
+                size_t target_size = 0;
 
-                encoded = utf8_to_utf16(argv[1], strlen(argv[1]));
-                if (!encoded)
-                        return log_oom();
-
-                r = efi_set_variable(EFI_VENDOR_LOADER, name, encoded, char16_strlen(encoded) * 2 + 2);
+                r = parse_loader_entry_target_arg(argv[1], &target, &target_size);
+                if (r < 0)
+                        return r;
+                r = efi_set_variable(EFI_VENDOR_LOADER, name, target, target_size);
                 if (r < 0)
-                        return log_error_errno(r, "Failed to update EFI variable: %m");
+                        return log_error_errno(r, "Failed to update EFI variable '%s': %m", name);
         }
 
         return 0;
index 5189d86d1a90f1ba03955e7d39a2b4e3f24de27f..938e5645f9d8b835cb62e0ce92d597f1c9e134aa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <efi.h>
 #include <efigpt.h>
index 7f6bad1538e22d93d789b963137b3775cd0b01b7..2dd4543d515df6cce1c8217831c811f9b462c871 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <efi.h>
 #include <efilib.h>
index b9ed6c70b323c40f2d877308392735e0df683a55..41df3a406e0e0a17ccaed36fa6a45c69f8493cff 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #define EFI_SHIFT_STATE_VALID           0x80000000
index 46b9aeea9070afff4537ef944875a40677d67f43..5dfd3db265f7f03fbc500bfa96bd60004414200f 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LicenseRef-crc32-no-restriction */
 /* This is copied from util-linux, which in turn copied in the version from Gary S. Brown */
 
 /*
index 64150ee948cbfd903d00f84317a4724788f15d84..3af543b84e5241ded57ffaadc905c734e2a8dbf2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LicenseRef-crc32-no-restriction */
 #pragma once
 
 #include <efi.h>
index 49ee81b4d70bdc8fbdffb50853f782ed04ddd6b9..89508f86deacbd34c8d7fa97a4cf4f4e987c82f3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <efi.h>
 #include <efilib.h>
index 41c4cce434d614ac5601ea5254b97a9a08cbd99f..551a9ae63985200d718cac7d4ec0cae028c4af71 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 EFI_STATUS disk_get_part_uuid(EFI_HANDLE *handle, CHAR16 uuid[static 37]);
index 9b5003a85d5fac3b80e82f0e4f6e7e6ef92324cb..f36ecb35b5b37f1e884e216a72329e3eebc3afa9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /*
  * Copyright © 2013 Intel Corporation
  *   Authored by Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
index 809e878d16ce2f951571cb27feada236f8058d0b..116aae28c5f73f05375dfd1b20e81f3fd3c9587c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /*
  * Copyright © 2013 Intel Corporation
  *   Authored by Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
index 00a3551e09a1f9256e5615bc935bc0de945dfb64..4d44671315f858adbd6a45ce425b309defaf16ec 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <efi.h>
 #include <efilib.h>
index ec655ce6479892a7802213a7d1f0ea5d9d486782..b92c27c8b9e6ebcf5e24b33fef3648e021f92391 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #define SETUP_MAGIC             0x53726448      /* "HdrS" */
index b3a1f79dfd141eaf0baa2c32a2fef3277725adec..f07dacb8593fb2e01842cac82bca2879adaf3772 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #ifndef UINT64_C
index 4d87117b00cce9f666474e7278d9792456089a80..ff876a6c5b30e70585c5e402ecf8170b695d6ae0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if ENABLE_TPM
 
index ebb6406ecaac59269a47122ed279a74d459d4a8c..19e148d9225afcc0b1dadbee871fd610c9eba84f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 EFI_STATUS tpm_log_event(UINT32 pcrindex, const EFI_PHYSICAL_ADDRESS buffer, UINTN buffer_size, const CHAR16 *description);
index ed81cefcd5d153878ea0bfcdedb9a55bbd54e5c8..c853f8e95100bfd4e5d958d2c16c5377bf842589 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 efi_headers = files('''
         console.h
index cf301a13422f70376fe4ceec01f6c65923a657ab..1b838af2a4e11c777f60d453fb855a2259341290 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <efi.h>
index 68f50aec410ee5bcf64ce73dff4f55439ed896a5..f99ecd0eda07555f462cadefc15e017d7d52ec0b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <efi.h>
 #include <efilib.h>
index bfbb8d9baf4f9aeddff291fcc4b3636a4320ae76..3e97d43f66d940cd567ba3ed0c1b698bdd4b42c7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 EFI_STATUS pe_memory_locate_sections(CHAR8 *base,
index cc747993b8bbdf4787f9a0d111c74911529ea9e1..eda9260ae0991c6e8105c9b4e9116778fffa2abe 100644 (file)
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
 #include <efi.h>
 #include <efilib.h>
 
index 0f750716fd12c7d9fbb894df5676e97cb233891a..0f443e6a8773f8a2958882bd41380b2ad4b4b1aa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <efi.h>
index 40da636dc712aaa0372dafe8ce595136a27bd200..f23066d0acff34376cd144c74db5a5fbd08a3add 100644 (file)
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
 /* Stolen from glibc and converted to UEFI style. In glibc it comes with the following copyright blurb: */
 
 /* Functions to compute SHA256 message digest of files or memory blocks.
index ca9f2859374c2d6e1f604b5a1caf07f8d9f635e0..464be59c2510ce33a0cc093476cd93a8e314f8de 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <efi.h>
index 8db27547cca3f24ee88291d95a0fd689b4aae8b3..3dc10089c6c02a74b82cf67e071c49e8bd377929 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /*
  * Port to systemd-boot
  * Copyright © 2017 Max Resch <resch.max@gmail.com>
index 209c9d4cf051c95b95f69892c177ab578d19566d..72ecf2ed97935cd8f704cb51cab464d7c8881771 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /*
  * Port to systemd-boot
  * Copyright © 2017 Max Resch <resch.max@gmail.com>
index ba4a2c5da0a808f504040184368d674752851021..e166fec57af62ae491bd169e431696463f18dc86 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <efi.h>
 #include <efilib.h>
index 8928b069a2012425969b2f60130b4b9959f96b54..0ba45a03707cd289d74be7c4afd37a5d8f164c96 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 EFI_STATUS graphics_splash(UINT8 *content, UINTN len, const EFI_GRAPHICS_OUTPUT_BLT_PIXEL *background);
index 02aab1ec7fc29b8491e62cf6dd15a7949bc18f56..a09f47c71194600d4b0a87b767b78bc1bf816d2a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <efi.h>
 #include <efilib.h>
index b44f051d95d0019ad267ca872add8dffb0f01cfc..2712c2d3f0eb081f231a307f87bfb8828eb62eb2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <efi.h>
 #include <efilib.h>
index b13f22476c6737893a11e1df21b62abe849f58ba..916519cdf83ae82dbf0adbf3e1a102f99fb9e751 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <efi.h>
index 7016c90ddc8a69a1c3bd1a395f52aa1f45572913..7a5d57f8c83705b331213d088f2e2d65953899b5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-bus.h"
 
index b17800e83e619c5b473f97091c2243335fbc0281..1a045bea1d53ad90e4e059d990b009c44dccbf91 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 4d98941d748c1891ae09b536f4179810278cc7d6..06a15ddd8061823ae1d8cb7e70fb0173aecc4e73 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 
@@ -129,11 +129,11 @@ static int acquire_bus(bool set_monitor, sd_bus **ret) {
                 }
         }
         if (r < 0)
-                return log_error_errno(r, "Failed to set address: %m");
+                return bus_log_address_error(r);
 
         r = sd_bus_start(bus);
         if (r < 0)
-                return log_error_errno(r, "Failed to connect to bus: %m");
+                return bus_log_connect_error(r);
 
         *ret = TAKE_PTR(bus);
 
index e09adb8b5b1f875c71ff1d9c403b035dbfd5c2cb..693b5047f226c3bd4fdc510c85cf062a2a9c5995 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <getopt.h>
index ace7d6c5ae9c416d48daa743b764a817bdcc2648..eeb4ba80f5f2f734e7bd39274675615f86249033 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdlib.h>
 
index 042d83c495ca9e40162fb62b3dfe5767031b352d..e9e7ed27340ae9fb7b660ecbdccbaea01dc01292 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <getopt.h>
@@ -91,6 +91,15 @@ static Group *group_free(Group *g) {
         return mfree(g);
 }
 
+
+static const char *maybe_format_timespan(char *buf, size_t l, usec_t t, usec_t accuracy) {
+        if (arg_raw) {
+               snprintf(buf, l, USEC_FMT, t);
+               return buf;
+        }
+        return format_timespan(buf, l, t, accuracy);
+}
+
 static const char *maybe_format_bytes(char *buf, size_t l, bool is_valid, uint64_t t) {
         if (!is_valid)
                 return "-";
@@ -586,7 +595,7 @@ static void display(Hashmap *a) {
         Group **array;
         signed path_columns;
         unsigned rows, n = 0, j, maxtcpu = 0, maxtpath = 3; /* 3 for ellipsize() to work properly */
-        char buffer[MAX3(21, FORMAT_BYTES_MAX, FORMAT_TIMESPAN_MAX)];
+        char buffer[MAX4(21U, FORMAT_BYTES_MAX, FORMAT_TIMESPAN_MAX, DECIMAL_STR_MAX(usec_t))];
 
         assert(a);
 
@@ -605,7 +614,7 @@ static void display(Hashmap *a) {
         for (j = 0; j < n; j++) {
                 unsigned cputlen, pathtlen;
 
-                format_timespan(buffer, sizeof(buffer), (usec_t) (array[j]->cpu_usage / NSEC_PER_USEC), 0);
+                maybe_format_timespan(buffer, sizeof(buffer), (usec_t) (array[j]->cpu_usage / NSEC_PER_USEC), 0);
                 cputlen = strlen(buffer);
                 maxtcpu = MAX(maxtcpu, cputlen);
 
@@ -674,7 +683,7 @@ static void display(Hashmap *a) {
                         else
                                 fputs("      -", stdout);
                 } else
-                        printf(" %*s", maxtcpu, format_timespan(buffer, sizeof(buffer), (usec_t) (g->cpu_usage / NSEC_PER_USEC), 0));
+                        printf(" %*s", maxtcpu, maybe_format_timespan(buffer, sizeof(buffer), (usec_t) (g->cpu_usage / NSEC_PER_USEC), 0));
 
                 printf(" %8s", maybe_format_bytes(buffer, sizeof(buffer), g->memory_valid, g->memory));
                 printf(" %8s", maybe_format_bytes(buffer, sizeof(buffer), g->io_valid, g->io_input_bps));
index 23c1999b692f0ab7aaae28379e313cef0d10f75e..fad814bf20f25c6726ed2a3659cd99e6e9414bb0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "unit.h"
index 6cba841a6c5f70dee5fe961a4caa7673c6677ae8..e856f5c1831e58889aec4260f74eabe91b231535 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #if HAVE_APPARMOR
index 100680a5952bae8aaab1da676d0b3cf6ef5b75d8..f3b73825cef3ea8b788a253c00824ed1d29c3f93 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int mac_apparmor_setup(void);
index fdef43392354ba2aebc3ac2665eb13bcd5c37eb6..097bea39b3eb85fede6ff2a52c5cc4dc0f7825da 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index 8c1e471b96b1497aa4897f1a01531aad60a40510..5cdf61e52d419794855b1336d4cec0f8af27c443 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int get_audit_fd(void);
index 9c0dca1b3a78c38fa82340a120e9a23fbb8623f1..5076b351f59c86dfea6b7eb4a33f8b0f4e2e34ef 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -174,19 +174,15 @@ static int automount_verify(Automount *a) {
         assert(a);
         assert(UNIT(a)->load_state == UNIT_LOADED);
 
-        if (path_equal(a->where, "/")) {
-                log_unit_error(UNIT(a), "Cannot have an automount unit for the root directory. Refusing.");
-                return -ENOEXEC;
-        }
+        if (path_equal(a->where, "/"))
+                return log_unit_error_errno(UNIT(a), SYNTHETIC_ERRNO(ENOEXEC), "Cannot have an automount unit for the root directory. Refusing.");
 
         r = unit_name_from_path(a->where, ".automount", &e);
         if (r < 0)
                 return log_unit_error_errno(UNIT(a), r, "Failed to generate unit name from path: %m");
 
-        if (!unit_has_name(UNIT(a), e)) {
-                log_unit_error(UNIT(a), "Where= setting doesn't match unit name. Refusing.");
-                return -ENOEXEC;
-        }
+        if (!unit_has_name(UNIT(a), e))
+                return log_unit_error_errno(UNIT(a), SYNTHETIC_ERRNO(ENOEXEC), "Where= setting doesn't match unit name. Refusing.");
 
         return 0;
 }
@@ -811,10 +807,8 @@ static int automount_start(Unit *u) {
         assert(a);
         assert(IN_SET(a->state, AUTOMOUNT_DEAD, AUTOMOUNT_FAILED));
 
-        if (path_is_mount_point(a->where, NULL, 0) > 0) {
-                log_unit_error(u, "Path %s is already a mount point, refusing start.", a->where);
-                return -EEXIST;
-        }
+        if (path_is_mount_point(a->where, NULL, 0) > 0)
+                return log_unit_error_errno(u, SYNTHETIC_ERRNO(EEXIST), "Path %s is already a mount point, refusing start.", a->where);
 
         r = unit_test_trigger_loaded(u);
         if (r < 0)
@@ -971,6 +965,12 @@ static int automount_dispatch_io(sd_event_source *s, int fd, uint32_t events, vo
         assert(a);
         assert(fd == a->pipe_fd);
 
+        if (events & (EPOLLHUP|EPOLLERR)) {
+                log_unit_error(UNIT(a), "Got hangup/error on autofs pipe from kernel. Likely our automount point has been unmounted by someone or something else?");
+                automount_enter_dead(a, AUTOMOUNT_FAILURE_UNMOUNTED);
+                return 0;
+        }
+
         if (events != EPOLLIN) {
                 log_unit_error(UNIT(a), "Got invalid poll event %"PRIu32" on pipe (fd=%d)", events, fd);
                 goto fail;
@@ -989,7 +989,7 @@ static int automount_dispatch_io(sd_event_source *s, int fd, uint32_t events, vo
                 if (packet.v5_packet.pid > 0) {
                         _cleanup_free_ char *p = NULL;
 
-                        get_process_comm(packet.v5_packet.pid, &p);
+                        (void) get_process_comm(packet.v5_packet.pid, &p);
                         log_unit_info(UNIT(a), "Got automount request for %s, triggered by %"PRIu32" (%s)", a->where, packet.v5_packet.pid, strna(p));
                 } else
                         log_unit_debug(UNIT(a), "Got direct mount request on %s", a->where);
@@ -1070,6 +1070,7 @@ static const char* const automount_result_table[_AUTOMOUNT_RESULT_MAX] = {
         [AUTOMOUNT_FAILURE_RESOURCES] = "resources",
         [AUTOMOUNT_FAILURE_START_LIMIT_HIT] = "start-limit-hit",
         [AUTOMOUNT_FAILURE_MOUNT_START_LIMIT_HIT] = "mount-start-limit-hit",
+        [AUTOMOUNT_FAILURE_UNMOUNTED] = "unmounted",
 };
 
 DEFINE_STRING_TABLE_LOOKUP(automount_result, AutomountResult);
index 21dd1c07744adc8ee29064ae53900bc5b950e754..fe668d97742313aa057cab43f2a437047ab3c371 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct Automount Automount;
@@ -8,6 +8,7 @@ typedef struct Automount Automount;
 typedef enum AutomountResult {
         AUTOMOUNT_SUCCESS,
         AUTOMOUNT_FAILURE_RESOURCES,
+        AUTOMOUNT_FAILURE_UNMOUNTED,
         AUTOMOUNT_FAILURE_START_LIMIT_HIT,
         AUTOMOUNT_FAILURE_MOUNT_START_LIMIT_HIT,
         _AUTOMOUNT_RESULT_MAX,
index 34320e88fb2e701381c6dcb3a0e794f2d0a46576..1ad7ade3065d0a469d2b61730ce45b286a68efb5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fnmatch.h>
 #include <linux/bpf_insn.h>
index e2a08016e374e094355d830a39d1eaf0965355a9..19b4d392ccc0012d3ded87a960317e364c235d7f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index 5da0106a3305751d3436a0b5c058f699b0d0b72c..44aa1bfb1e568941cf13b05d18d6352325948027 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <arpa/inet.h>
 #include <assert.h>
@@ -686,14 +686,10 @@ int bpf_firewall_install(Unit *u) {
         supported = bpf_firewall_supported();
         if (supported < 0)
                 return supported;
-        if (supported == BPF_FIREWALL_UNSUPPORTED) {
-                log_unit_debug(u, "BPF firewalling not supported on this manager, proceeding without.");
-                return -EOPNOTSUPP;
-        }
-        if (supported != BPF_FIREWALL_SUPPORTED_WITH_MULTI && u->type == UNIT_SLICE) {
-                log_unit_debug(u, "BPF_F_ALLOW_MULTI is not supported on this manager, not doing BPF firewall on slice units.");
-                return -EOPNOTSUPP;
-        }
+        if (supported == BPF_FIREWALL_UNSUPPORTED)
+                return log_unit_debug_errno(u, SYNTHETIC_ERRNO(EOPNOTSUPP), "BPF firewalling not supported on this manager, proceeding without.");
+        if (supported != BPF_FIREWALL_SUPPORTED_WITH_MULTI && u->type == UNIT_SLICE)
+                return log_unit_debug_errno(u, SYNTHETIC_ERRNO(EOPNOTSUPP), "BPF_F_ALLOW_MULTI is not supported on this manager, not doing BPF firewall on slice units.");
         if (supported != BPF_FIREWALL_SUPPORTED_WITH_MULTI &&
             (!set_isempty(u->ip_bpf_custom_ingress) || !set_isempty(u->ip_bpf_custom_egress)))
                 return log_unit_debug_errno(u, SYNTHETIC_ERRNO(EOPNOTSUPP), "BPF_F_ALLOW_MULTI not supported on this manager, cannot attach custom BPF programs.");
index f1460d982dd08d8a1aab3335734fc0cdff0cd004..08d77421939aa18159338a46cf0e08b04dd9b1ff 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index 211e4a5945f02f65309b5fdc03f3979e77becbe7..b9d84dcca9356644c661b8f4f70d16fa3eec9588 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 
@@ -128,6 +128,9 @@ void cgroup_context_init(CGroupContext *c) {
                 .startup_blockio_weight = CGROUP_BLKIO_WEIGHT_INVALID,
 
                 .tasks_max = TASKS_MAX_UNSET,
+
+                .moom_swap = MANAGED_OOM_AUTO,
+                .moom_mem_pressure = MANAGED_OOM_AUTO,
         };
 }
 
@@ -411,7 +414,10 @@ void cgroup_context_dump(Unit *u, FILE* f, const char *prefix) {
                 "%sTasksMax: %" PRIu64 "\n"
                 "%sDevicePolicy: %s\n"
                 "%sDisableControllers: %s\n"
-                "%sDelegate: %s\n",
+                "%sDelegate: %s\n"
+                "%sManagedOOMSwap: %s\n"
+                "%sManagedOOMMemoryPressure: %s\n"
+                "%sManagedOOMMemoryPressureLimitPercent: %d%%\n",
                 prefix, yes_no(c->cpu_accounting),
                 prefix, yes_no(c->io_accounting),
                 prefix, yes_no(c->blockio_accounting),
@@ -441,7 +447,10 @@ void cgroup_context_dump(Unit *u, FILE* f, const char *prefix) {
                 prefix, tasks_max_resolve(&c->tasks_max),
                 prefix, cgroup_device_policy_to_string(c->device_policy),
                 prefix, strempty(disable_controllers_str),
-                prefix, yes_no(c->delegate));
+                prefix, yes_no(c->delegate),
+                prefix, managed_oom_mode_to_string(c->moom_swap),
+                prefix, managed_oom_mode_to_string(c->moom_mem_pressure),
+                prefix, c->moom_mem_pressure_limit);
 
         if (c->delegate) {
                 _cleanup_free_ char *t = NULL;
@@ -2413,6 +2422,29 @@ void unit_release_cgroup(Unit *u) {
         }
 }
 
+bool unit_maybe_release_cgroup(Unit *u) {
+        int r;
+
+        assert(u);
+
+        if (!u->cgroup_path)
+                return true;
+
+        /* Don't release the cgroup if there are still processes under it. If we get notified later when all the
+         * processes exit (e.g. the processes were in D-state and exited after the unit was marked as failed)
+         * we need the cgroup paths to continue to be tracked by the manager so they can be looked up and cleaned
+         * up later. */
+        r = cg_is_empty_recursive(SYSTEMD_CGROUP_CONTROLLER, u->cgroup_path);
+        if (r < 0)
+                log_unit_debug_errno(u, r, "Error checking if the cgroup is recursively empty, ignoring: %m");
+        else if (r == 1) {
+                unit_release_cgroup(u);
+                return true;
+        }
+
+        return false;
+}
+
 void unit_prune_cgroup(Unit *u) {
         int r;
         bool is_root_slice;
@@ -2440,7 +2472,8 @@ void unit_prune_cgroup(Unit *u) {
         if (is_root_slice)
                 return;
 
-        unit_release_cgroup(u);
+        if (!unit_maybe_release_cgroup(u)) /* Returns true if the cgroup was released */
+                return;
 
         u->cgroup_realized = false;
         u->cgroup_realized_mask = 0;
@@ -2672,6 +2705,47 @@ static void unit_remove_from_cgroup_empty_queue(Unit *u) {
         u->in_cgroup_empty_queue = false;
 }
 
+int unit_check_oomd_kill(Unit *u) {
+        _cleanup_free_ char *value = NULL;
+        bool increased;
+        uint64_t n = 0;
+        int r;
+
+        if (!u->cgroup_path)
+                return 0;
+
+        r = cg_all_unified();
+        if (r < 0)
+                return log_unit_debug_errno(u, r, "Couldn't determine whether we are in all unified mode: %m");
+        else if (r == 0)
+                return 0;
+
+        r = cg_get_xattr_malloc(SYSTEMD_CGROUP_CONTROLLER, u->cgroup_path, "user.systemd_oomd_kill", &value);
+        if (r < 0 && r != -ENODATA)
+                return r;
+
+        if (!isempty(value)) {
+                 r = safe_atou64(value, &n);
+                 if (r < 0)
+                         return r;
+        }
+
+        increased = n > u->managed_oom_kill_last;
+        u->managed_oom_kill_last = n;
+
+        if (!increased)
+                return 0;
+
+        if (n > 0)
+                log_struct(LOG_NOTICE,
+                           "MESSAGE_ID=" SD_MESSAGE_UNIT_OOMD_KILL_STR,
+                           LOG_UNIT_ID(u),
+                           LOG_UNIT_INVOCATION_ID(u),
+                           LOG_UNIT_MESSAGE(u, "systemd-oomd killed %"PRIu64" process(es) in this unit.", n));
+
+        return 1;
+}
+
 int unit_check_oom(Unit *u) {
         _cleanup_free_ char *oom_kill = NULL;
         bool increased;
@@ -2978,7 +3052,7 @@ int manager_setup_cgroup(Manager *m) {
                 /* On the legacy hierarchy we only get notifications via cgroup agents. (Which isn't really reliable,
                  * since it does not generate events when control groups with children run empty. */
 
-                r = cg_install_release_agent(SYSTEMD_CGROUP_CONTROLLER, SYSTEMD_CGROUP_AGENT_PATH);
+                r = cg_install_release_agent(SYSTEMD_CGROUP_CONTROLLER, SYSTEMD_CGROUPS_AGENT_PATH);
                 if (r < 0)
                         log_warning_errno(r, "Failed to install release agent, ignoring: %m");
                 else if (r > 0)
index 9ac5c8bfc0b993a0a9567335eceeff777c2ce1e4..66f3a63b8210b8a71714273002c3fb79a3ab4666 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
@@ -159,6 +159,11 @@ struct CGroupContext {
 
         /* Common */
         TasksMax tasks_max;
+
+        /* Settings for systemd-oomd */
+        ManagedOOMMode moom_swap;
+        ManagedOOMMode moom_mem_pressure;
+        int moom_mem_pressure_limit;
 };
 
 /* Used when querying IP accounting data */
@@ -218,12 +223,17 @@ int unit_set_cgroup_path(Unit *u, const char *path);
 int unit_pick_cgroup_path(Unit *u);
 
 int unit_realize_cgroup(Unit *u);
-void unit_release_cgroup(Unit *u);
 void unit_prune_cgroup(Unit *u);
 int unit_watch_cgroup(Unit *u);
 int unit_watch_cgroup_memory(Unit *u);
 
+void unit_release_cgroup(Unit *u);
+/* Releases the cgroup only if it is recursively empty.
+ * Returns true if the cgroup was released, false otherwise. */
+bool unit_maybe_release_cgroup(Unit *u);
+
 void unit_add_to_cgroup_empty_queue(Unit *u);
+int unit_check_oomd_kill(Unit *u);
 int unit_check_oom(Unit *u);
 
 int unit_attach_pids_to_cgroup(Unit *u, Set *pids, const char *suffix_path);
index 4bb262bd93d24cfcd426ff7cebb9f405a80049d6..dd6c11ab4d0df9cf69c2546e6e938a7b02ec0f1b 100644 (file)
@@ -1,7 +1,8 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "core-varlink.h"
 #include "mkdir.h"
+#include "strv.h"
 #include "user-util.h"
 #include "varlink.h"
 
@@ -15,6 +16,11 @@ typedef struct LookupParameters {
         const char *service;
 } LookupParameters;
 
+static const char* const managed_oom_mode_properties[] = {
+        "ManagedOOMSwap",
+        "ManagedOOMMemoryPressure",
+};
+
 static int build_user_json(const char *user_name, uid_t uid, JsonVariant **ret) {
         assert(user_name);
         assert(uid_is_valid(uid));
@@ -45,6 +51,147 @@ static bool user_match_lookup_parameters(LookupParameters *p, const char *name,
         return true;
 }
 
+static int build_managed_oom_json_array_element(Unit *u, const char *property, JsonVariant **ret_v) {
+        bool use_limit = false;
+        CGroupContext *c;
+        const char *mode;
+
+        assert(u);
+        assert(property);
+        assert(ret_v);
+
+        if (!UNIT_VTABLE(u)->can_set_managed_oom)
+                return -EOPNOTSUPP;
+
+        c = unit_get_cgroup_context(u);
+        if (!c)
+                return -EINVAL;
+
+        if (UNIT_IS_INACTIVE_OR_FAILED(unit_active_state(u)))
+                /* systemd-oomd should always treat inactive units as though they didn't enable any action since they
+                 * should not have a valid cgroup */
+                mode = managed_oom_mode_to_string(MANAGED_OOM_AUTO);
+        else if (streq(property, "ManagedOOMSwap"))
+                mode = managed_oom_mode_to_string(c->moom_swap);
+        else if (streq(property, "ManagedOOMMemoryPressure")) {
+                mode = managed_oom_mode_to_string(c->moom_mem_pressure);
+                use_limit = true;
+        } else
+                return -EINVAL;
+
+        return json_build(ret_v, JSON_BUILD_OBJECT(
+                                 JSON_BUILD_PAIR("mode", JSON_BUILD_STRING(mode)),
+                                 JSON_BUILD_PAIR("path", JSON_BUILD_STRING(u->cgroup_path)),
+                                 JSON_BUILD_PAIR("property", JSON_BUILD_STRING(property)),
+                                 JSON_BUILD_PAIR_CONDITION(use_limit, "limit", JSON_BUILD_UNSIGNED(c->moom_mem_pressure_limit))));
+}
+
+int manager_varlink_send_managed_oom_update(Unit *u) {
+        _cleanup_(json_variant_unrefp) JsonVariant *arr = NULL, *v = NULL;
+        CGroupContext *c;
+        int r;
+
+        assert(u);
+
+        if (!UNIT_VTABLE(u)->can_set_managed_oom || !u->manager || !u->manager->managed_oom_varlink_request || !u->cgroup_path)
+                return 0;
+
+        c = unit_get_cgroup_context(u);
+        if (!c)
+                return 0;
+
+        r = json_build(&arr, JSON_BUILD_EMPTY_ARRAY);
+        if (r < 0)
+                return r;
+
+        for (size_t i = 0; i < ELEMENTSOF(managed_oom_mode_properties); i++) {
+                _cleanup_(json_variant_unrefp) JsonVariant *e = NULL;
+
+                r = build_managed_oom_json_array_element(u, managed_oom_mode_properties[i], &e);
+                if (r < 0)
+                        return r;
+
+                r = json_variant_append_array(&arr, e);
+                if (r < 0)
+                        return r;
+        }
+
+        r = json_build(&v, JSON_BUILD_OBJECT(JSON_BUILD_PAIR("cgroups", JSON_BUILD_VARIANT(arr))));
+        if (r < 0)
+                return r;
+
+        return varlink_notify(u->manager->managed_oom_varlink_request, v);
+}
+
+static int vl_method_subscribe_managed_oom_cgroups(
+                Varlink *link,
+                JsonVariant *parameters,
+                VarlinkMethodFlags flags,
+                void *userdata) {
+        static const UnitType supported_unit_types[] = { UNIT_SLICE, UNIT_SERVICE, UNIT_SCOPE };
+        _cleanup_(json_variant_unrefp) JsonVariant *v = NULL, *arr = NULL;
+        Manager *m = userdata;
+        int r;
+
+        assert(link);
+        assert(m);
+
+        if (json_variant_elements(parameters) > 0)
+                return varlink_error_invalid_parameter(link, parameters);
+
+        /* We only take one subscriber for this method so return an error if there's already an existing one.
+         * This shouldn't happen since systemd-oomd is the only client of this method. */
+        if (FLAGS_SET(flags, VARLINK_METHOD_MORE) && m->managed_oom_varlink_request)
+                return varlink_error(m->managed_oom_varlink_request, VARLINK_ERROR_SUBSCRIPTION_TAKEN, NULL);
+
+        r = json_build(&arr, JSON_BUILD_EMPTY_ARRAY);
+        if (r < 0)
+                return r;
+
+        for (size_t i = 0; i < ELEMENTSOF(supported_unit_types); i++) {
+                Unit *u;
+
+                LIST_FOREACH(units_by_type, u, m->units_by_type[supported_unit_types[i]]) {
+                        CGroupContext *c;
+
+                        if (UNIT_IS_INACTIVE_OR_FAILED(unit_active_state(u)))
+                                continue;
+
+                        c = unit_get_cgroup_context(u);
+                        if (!c)
+                                continue;
+
+                        for (size_t j = 0; j < ELEMENTSOF(managed_oom_mode_properties); j++) {
+                                _cleanup_(json_variant_unrefp) JsonVariant *e = NULL;
+
+                                /* For the initial varlink call we only care about units that enabled (i.e. mode is not
+                                 * set to "auto") oomd properties. */
+                                if (!(streq(managed_oom_mode_properties[j], "ManagedOOMSwap") && c->moom_swap == MANAGED_OOM_KILL) &&
+                                    !(streq(managed_oom_mode_properties[j], "ManagedOOMMemoryPressure") && c->moom_mem_pressure == MANAGED_OOM_KILL))
+                                        continue;
+
+                                r = build_managed_oom_json_array_element(u, managed_oom_mode_properties[j], &e);
+                                if (r < 0)
+                                        return r;
+
+                                r = json_variant_append_array(&arr, e);
+                                if (r < 0)
+                                        return r;
+                        }
+                }
+        }
+
+        r = json_build(&v, JSON_BUILD_OBJECT(JSON_BUILD_PAIR("cgroups", JSON_BUILD_VARIANT(arr))));
+        if (r < 0)
+                return r;
+
+        if (!FLAGS_SET(flags, VARLINK_METHOD_MORE))
+                return varlink_reply(link, v);
+
+        m->managed_oom_varlink_request = varlink_ref(link);
+        return varlink_notify(m->managed_oom_varlink_request, v);
+}
+
 static int vl_method_get_user_record(Varlink *link, JsonVariant *parameters, VarlinkMethodFlags flags, void *userdata) {
 
         static const JsonDispatch dispatch_table[] = {
@@ -262,6 +409,17 @@ static int vl_method_get_memberships(Varlink *link, JsonVariant *parameters, Var
         return varlink_error(link, "io.systemd.UserDatabase.NoRecordFound", NULL);
 }
 
+static void vl_disconnect(VarlinkServer *s, Varlink *link, void *userdata) {
+        Manager *m = userdata;
+
+        assert(m);
+        assert(s);
+        assert(link);
+
+        if (link == m->managed_oom_varlink_request)
+                m->managed_oom_varlink_request = varlink_unref(link);
+}
+
 int manager_varlink_init(Manager *m) {
         _cleanup_(varlink_server_unrefp) VarlinkServer *s = NULL;
         int r;
@@ -284,16 +442,25 @@ int manager_varlink_init(Manager *m) {
                         s,
                         "io.systemd.UserDatabase.GetUserRecord",  vl_method_get_user_record,
                         "io.systemd.UserDatabase.GetGroupRecord", vl_method_get_group_record,
-                        "io.systemd.UserDatabase.GetMemberships", vl_method_get_memberships);
+                        "io.systemd.UserDatabase.GetMemberships", vl_method_get_memberships,
+                        "io.systemd.ManagedOOM.SubscribeManagedOOMCGroups",  vl_method_subscribe_managed_oom_cgroups);
         if (r < 0)
                 return log_error_errno(r, "Failed to register varlink methods: %m");
 
+        r = varlink_server_bind_disconnect(s, vl_disconnect);
+        if (r < 0)
+                return log_error_errno(r, "Failed to register varlink disconnect handler: %m");
+
         if (!MANAGER_IS_TEST_RUN(m)) {
                 (void) mkdir_p_label("/run/systemd/userdb", 0755);
 
                 r = varlink_server_listen_address(s, "/run/systemd/userdb/io.systemd.DynamicUser", 0666);
                 if (r < 0)
                         return log_error_errno(r, "Failed to bind to varlink socket: %m");
+
+                r = varlink_server_listen_address(s, VARLINK_ADDR_PATH_MANAGED_OOM, 0666);
+                if (r < 0)
+                        return log_error_errno(r, "Failed to bind to varlink socket: %m");
         }
 
         r = varlink_server_attach_event(s, m->event, SD_EVENT_PRIORITY_NORMAL);
@@ -307,5 +474,9 @@ int manager_varlink_init(Manager *m) {
 void manager_varlink_done(Manager *m) {
         assert(m);
 
+        /* Send the final message if we still have a subscribe request open. */
+        if (m->managed_oom_varlink_request)
+                m->managed_oom_varlink_request = varlink_close_unref(m->managed_oom_varlink_request);
+
         m->varlink_server = varlink_server_unref(m->varlink_server);
 }
index 89818e2766caa318cb17f5103509ae12fe7ac619..20507a418746d500b87bf3e5d27d0f343f2ff828 100644 (file)
@@ -1,7 +1,12 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "manager.h"
 
 int manager_varlink_init(Manager *m);
 void manager_varlink_done(Manager *m);
+
+/* The manager is expected to send an update to systemd-oomd if one of the following occurs:
+ * - The value of ManagedOOM*= properties change
+ * - A unit with ManagedOOM*= properties changes unit active state */
+int manager_varlink_send_managed_oom_update(Unit *u);
index 70b85d8023ff0bf0593b7908693d8be8ee3a3d77..3f74488daddb4f3a233b23e474926d1f967073e4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "automount.h"
 #include "bus-get-properties.h"
index 3e165b0566970c236095c31313ea8c372182848c..cfceaecc043da16c16caf22b3655eb5628735d22 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 9fdd3d83caf96562e9c3ffd2bcb480189c0069c4..37c581fb22a2d06febc3984f7fbeaeab5dd9b060 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <arpa/inet.h>
 
@@ -8,6 +8,7 @@
 #include "bus-get-properties.h"
 #include "cgroup-util.h"
 #include "cgroup.h"
+#include "core-varlink.h"
 #include "dbus-cgroup.h"
 #include "dbus-util.h"
 #include "errno-util.h"
@@ -19,6 +20,7 @@
 BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve);
 
 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_cgroup_device_policy, cgroup_device_policy, CGroupDevicePolicy);
+static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_managed_oom_mode, managed_oom_mode, ManagedOOMMode);
 
 static int property_get_cgroup_mask(
                 sd_bus *bus,
@@ -391,6 +393,9 @@ const sd_bus_vtable bus_cgroup_vtable[] = {
         SD_BUS_PROPERTY("IPIngressFilterPath", "as", NULL, offsetof(CGroupContext, ip_filters_ingress), 0),
         SD_BUS_PROPERTY("IPEgressFilterPath", "as", NULL, offsetof(CGroupContext, ip_filters_egress), 0),
         SD_BUS_PROPERTY("DisableControllers", "as", property_get_cgroup_mask, offsetof(CGroupContext, disable_controllers), 0),
+        SD_BUS_PROPERTY("ManagedOOMSwap", "s", property_get_managed_oom_mode, offsetof(CGroupContext, moom_swap), 0),
+        SD_BUS_PROPERTY("ManagedOOMMemoryPressure", "s", property_get_managed_oom_mode, offsetof(CGroupContext, moom_mem_pressure), 0),
+        SD_BUS_PROPERTY("ManagedOOMMemoryPressureLimitPercent", "s", bus_property_get_percent, offsetof(CGroupContext, moom_mem_pressure_limit), 0),
         SD_BUS_VTABLE_END
 };
 
@@ -1667,6 +1672,45 @@ int bus_cgroup_set_property(
                 return 1;
         }
 
+        if (STR_IN_SET(name, "ManagedOOMSwap", "ManagedOOMMemoryPressure")) {
+                ManagedOOMMode *cgroup_mode = streq(name, "ManagedOOMSwap") ? &c->moom_swap : &c->moom_mem_pressure;
+                ManagedOOMMode m;
+                const char *mode;
+
+                if (!UNIT_VTABLE(u)->can_set_managed_oom)
+                        return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Cannot set %s for this unit type", name);
+
+                r = sd_bus_message_read(message, "s", &mode);
+                if (r < 0)
+                        return r;
+
+                m = managed_oom_mode_from_string(mode);
+                if (m < 0)
+                        return -EINVAL;
+
+                if (!UNIT_WRITE_FLAGS_NOOP(flags)) {
+                        *cgroup_mode = m;
+                        unit_write_settingf(u, flags, name, "%s=%s", name, mode);
+                }
+
+                (void) manager_varlink_send_managed_oom_update(u);
+                return 1;
+        }
+
+        if (streq(name, "ManagedOOMMemoryPressureLimitPercent")) {
+                if (!UNIT_VTABLE(u)->can_set_managed_oom)
+                        return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Cannot set %s for this unit type", name);
+
+                r = bus_set_transient_percent(u, name, &c->moom_mem_pressure_limit, message, flags, error);
+                if (r < 0)
+                        return r;
+
+                if (c->moom_mem_pressure == MANAGED_OOM_KILL)
+                        (void) manager_varlink_send_managed_oom_update(u);
+
+                return 1;
+        }
+
         if (streq(name, "DisableControllers") || (u->transient && u->load_state == UNIT_STUB))
                 return bus_cgroup_set_transient_property(u, c, name, message, flags, error);
 
index 5ca68a63bf387cb1b7a5fd25a9c835ea639c9f02..5bf45eb972ed73f13e6eaf348fe3e83f3e3dde08 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 6cf7f58e0299a77f0d180a095a92d108951aab1b..b5e18d80a47632b9b143c7ca46df3a9b1aa3db95 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "dbus-device.h"
 #include "device.h"
index 077a2bf128bc129ca57ff132a4899fcd5afac358..bfb57707d4ed1519d7a385a2f19e5023e154c71e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus-vtable.h"
index 488af98cd325b69f30619547a1410771748508db..abe009c3956a382a3184a38461e3973b7155938b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/mount.h>
 #include <sys/prctl.h>
index cbb2f97cf1dae2f46661d9c14b9bf2ab631cf623..c53834140e5fb82b294c5d8669b35586ff9372fe 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 06443a4be414cd4c9874b318cfeb24c1bc50b843..1526b316cc4e1f3da0b73a0cb6cb88f0f74c41d4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-bus.h"
 
index 96c5b66309a9696aeba1bfd3ac10b36dabada339..6f005811cb2ec0091daef61fbfc3cf3827c0fbc2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index eda3410375a30362a98a83632627a4c0e5b0b791..6333f3bcfef03c23a086bbdd59b740db7f0d8914 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-get-properties.h"
 #include "dbus-kill.h"
index 8192e94fbbee0bf9e94800d4eb1c553c10227480..5a9028795ccede101d3159c90b562461cdc6e966 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 0ac87b56a829f0f1a28cf1b58d92f64ee96b6358..3e1d609aa37b32a48aab2765a8314ae768c5180a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sys/prctl.h>
@@ -49,7 +49,7 @@ static UnitFileFlags unit_file_bools_to_flags(bool runtime, bool force) {
 BUS_DEFINE_PROPERTY_GET_ENUM(bus_property_get_oom_policy, oom_policy, OOMPolicy);
 
 static BUS_DEFINE_PROPERTY_GET_GLOBAL(property_get_version, "s", GIT_VERSION);
-static BUS_DEFINE_PROPERTY_GET_GLOBAL(property_get_features, "s", SYSTEMD_FEATURES);
+static BUS_DEFINE_PROPERTY_GET_GLOBAL(property_get_features, "s", systemd_features);
 static BUS_DEFINE_PROPERTY_GET_GLOBAL(property_get_architecture, "s", architecture_to_string(uname_architecture()));
 static BUS_DEFINE_PROPERTY_GET2(property_get_system_state, "s", Manager, manager_state, manager_state_to_string);
 static BUS_DEFINE_PROPERTY_GET_GLOBAL(property_get_timer_slack_nsec, "t", (uint64_t) prctl(PR_GET_TIMERSLACK));
index 83854b0f59be8f019ec2e08effe6b299fa67d9ea..f3862fca83c37ee37fe2ea152518d1738b8aa14e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus-vtable.h"
index a4fa44dbc990258a592a61d0c7d00f419c5a4590..73702b1a16a382e30f648f58c22c7e0ad8585f65 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-get-properties.h"
 #include "dbus-cgroup.h"
index f7112a9f023deab51b56710dd69090155cdaf6ce..5a848d3104e12171791a9d52fa287f4c4107fe9a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 76cd9d32603d4f86db9e61e3d0e454e69078d882..14e77d783dd929b25a17560907c4dcc48d2ae34f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "bus-get-properties.h"
index ad42b2366270f8ca747ed4a11340318e29c7fb2e..b5018b0116dd0770937b88b871a9f042ac85699c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index d752cd58aa7774e149dc7e0107f926bed79930a3..1bcb4836f63e9790a59c92a8dea5f4c8b33edf97 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "bus-common-errors.h"
index 702f55898dd99ba589162027322c4c26a69086ae..8f1bc02e31c25abfaab4299991a75a704e983b04 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 73052fac6d31d87b4b35644da0b798368fa09253..64f9d4ab362502fc5924fcb4ca38d4e8053f743d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 
index 22d2b887b4cb0ea7760639a8d34614b7abd9b421..69311675c9bcb34e9ebc96a08a67aef87d6ba770 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 28a6a4fe5a4c9b15f7e329710ab89f9226aec0ff..de41d651da15f4f11a689dae951d70083d473f5c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "dbus-cgroup.h"
 #include "dbus-slice.h"
index 88cc48c80852ce790a4b11c67a94050cee820766..eb71916abdaf9f78c89e47cd0fb8a19eea8ea1d9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 07d030adb3a6235f433ff6673d9f74085bb8e648..2c9da7412a1f78be780a3678eaa5d6a9ad698a31 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "bus-get-properties.h"
@@ -20,6 +20,7 @@
 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, socket_result, SocketResult);
 static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_bind_ipv6_only, socket_address_bind_ipv6_only, SocketAddressBindIPv6Only);
 static BUS_DEFINE_PROPERTY_GET(property_get_fdname, "s", Socket, socket_fdname);
+static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_timestamping, socket_timestamping, SocketTimestamping);
 
 static int property_get_listen(
                 sd_bus *bus,
@@ -106,6 +107,7 @@ const sd_bus_vtable bus_socket_vtable[] = {
         SD_BUS_PROPERTY("PassCredentials", "b", bus_property_get_bool, offsetof(Socket, pass_cred), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("PassSecurity", "b", bus_property_get_bool, offsetof(Socket, pass_sec), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("PassPacketInfo", "b", bus_property_get_bool, offsetof(Socket, pass_pktinfo), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("Timestamping", "s", property_get_timestamping, offsetof(Socket, timestamping), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("RemoveOnStop", "b", bus_property_get_bool, offsetof(Socket, remove_on_stop), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("Listen", "a(ss)", property_get_listen, 0, SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("Symlinks", "as", NULL, offsetof(Socket, symlinks), SD_BUS_VTABLE_PROPERTY_CONST),
@@ -159,6 +161,7 @@ static BUS_DEFINE_SET_TRANSIENT_STRING_WITH_CHECK(fdname, fdname_is_valid);
 static BUS_DEFINE_SET_TRANSIENT_STRING_WITH_CHECK(ifname, ifname_valid);
 static BUS_DEFINE_SET_TRANSIENT_TO_STRING_ALLOC(ip_tos, "i", int32_t, int, "%" PRIi32, ip_tos_to_string_alloc);
 static BUS_DEFINE_SET_TRANSIENT_TO_STRING(socket_protocol, "i", int32_t, int, "%" PRIi32, socket_protocol_to_string);
+static BUS_DEFINE_SET_TRANSIENT_PARSE(socket_timestamping, SocketTimestamping, socket_timestamping_from_string_harder);
 
 static int bus_socket_set_transient_property(
                 Socket *s,
@@ -210,6 +213,9 @@ static int bus_socket_set_transient_property(
         if (streq(name, "PassPacketInfo"))
                 return bus_set_transient_bool(u, name, &s->pass_pktinfo, message, flags, error);
 
+        if (streq(name, "Timestamping"))
+                return bus_set_transient_socket_timestamping(u, name, &s->timestamping, message, flags, error);
+
         if (streq(name, "ReusePort"))
                 return bus_set_transient_bool(u, name, &s->reuse_port, message, flags, error);
 
index 9aa8133d1817f97f0b5ffcb8cece76324149efbc..f9f36a244851fa73e36b27f4f1494ee0eaa7699c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index d132c08f0ee6b9f033169378e231508c37b205cd..0fa8dd10e2c86ed7505b879e6937b0aee2424170 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2010 Maarten Lankhorst
 ***/
index b114fe04c758387bf909704cdc9486e371ff5465..9d651b565420b5686243612cfb02bbc96fd9488c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index ba50113641dc260ad8c4627126f8db4f8bcb4362..e979fb7267ef19033d63575f8e45bc0f98deebc1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "dbus-target.h"
 #include "unit.h"
index ad02a1db74125d8548bcc70e319d58d81defde2b..fedd4a93ea4177a0400010256fcc2e4d5cbd420b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus-vtable.h"
index da35fa867862ea64d5fc65e61fbda42aa3e8800a..8e69c173270c289d298ff213b61cb3eab79737ce 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "bus-get-properties.h"
@@ -131,6 +131,7 @@ const sd_bus_vtable bus_timer_vtable[] = {
         SD_BUS_PROPERTY("Result", "s", property_get_result, offsetof(Timer, result), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE),
         SD_BUS_PROPERTY("AccuracyUSec", "t", bus_property_get_usec, offsetof(Timer, accuracy_usec), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("RandomizedDelayUSec", "t", bus_property_get_usec, offsetof(Timer, random_usec), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("FixedRandomDelay", "b", bus_property_get_bool, offsetof(Timer, fixed_random_delay), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("Persistent", "b", bus_property_get_bool, offsetof(Timer, persistent), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("WakeSystem", "b", bus_property_get_bool, offsetof(Timer, wake_system), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("RemainAfterElapse", "b", bus_property_get_bool, offsetof(Timer, remain_after_elapse), SD_BUS_VTABLE_PROPERTY_CONST),
@@ -232,6 +233,9 @@ static int bus_timer_set_transient_property(
         if (streq(name, "RandomizedDelayUSec"))
                 return bus_set_transient_usec(u, name, &t->random_usec, message, flags, error);
 
+        if (streq(name, "FixedRandomDelay"))
+                return bus_set_transient_bool(u, name, &t->fixed_random_delay, message, flags, error);
+
         if (streq(name, "WakeSystem"))
                 return bus_set_transient_bool(u, name, &t->wake_system, message, flags, error);
 
index bb126b22dc49c164a8df066179a19b729a259789..ac436f15aa848d1a24ef4446c4a994d39479d64e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index d38c0f0582cf1e028eb90deee142cbbb710ba4a4..427152a757b77fe35a8dea41c031324493478687 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-bus.h"
 
index f21f23602563aa96e0506786a8d33c9ab7e48d0b..1da3cfeb96b41d264b1dcb3412f441219b5b827f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 951450e53daa418bde5406b806b6fb9e393424df..d6223db305c15537dc42a99d6393f306d6f6d4df 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-util.h"
 #include "dbus-util.h"
@@ -91,6 +91,35 @@ int bus_set_transient_bool(
         return 1;
 }
 
+int bus_set_transient_percent(
+                Unit *u,
+                const char *name,
+                int *p,
+                sd_bus_message *message,
+                UnitWriteFlags flags,
+                sd_bus_error *error) {
+
+        const char *v;
+        int r;
+
+        assert(p);
+
+        r = sd_bus_message_read(message, "s", &v);
+        if (r < 0)
+                return r;
+
+        r = parse_percent(v);
+        if (r < 0)
+                return r;
+
+        if (!UNIT_WRITE_FLAGS_NOOP(flags)) {
+                *p = r;
+                unit_write_settingf(u, flags, name, "%s=%d%%", name, r);
+        }
+
+        return 1;
+}
+
 int bus_set_transient_usec_internal(
                 Unit *u,
                 const char *name,
index 654ceb527950600a6adbdfe2bd572909d3b57571..4e7c68e8439062a836b2c0a7513ab0fee4a37577 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
@@ -240,6 +240,7 @@ int bus_set_transient_user_relaxed(Unit *u, const char *name, char **p, sd_bus_m
 int bus_set_transient_path(Unit *u, const char *name, char **p, sd_bus_message *message, UnitWriteFlags flags, sd_bus_error *error);
 int bus_set_transient_string(Unit *u, const char *name, char **p, sd_bus_message *message, UnitWriteFlags flags, sd_bus_error *error);
 int bus_set_transient_bool(Unit *u, const char *name, bool *p, sd_bus_message *message, UnitWriteFlags flags, sd_bus_error *error);
+int bus_set_transient_percent(Unit *u, const char *name, int *p, sd_bus_message *message, UnitWriteFlags flags, sd_bus_error *error);
 int bus_set_transient_usec_internal(Unit *u, const char *name, usec_t *p, bool fix_0, sd_bus_message *message, UnitWriteFlags flags, sd_bus_error *error);
 static inline int bus_set_transient_usec(Unit *u, const char *name, usec_t *p, sd_bus_message *message, UnitWriteFlags flags, sd_bus_error *error) {
         return bus_set_transient_usec_internal(u, name, p, false, message, flags, error);
index 774ee5632f748f5be645978ccbc0affba42af16a..3e435c98ca2ec64bd9f98a1cf9bc9e24f730f2b5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sys/epoll.h>
index 812f56ea2a58ccdfb3e12f766a9532071147f9f3..369d9f56a289fe422e4115f0dde93dbb53ac41a1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 134c6ee5bbb3c1f68aeeba7a4c2b7d2206d646a4..6440c59e26eeea965344b6f4a6a49a9a656126d9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sys/epoll.h>
@@ -515,11 +515,10 @@ static int device_setup_unit(Manager *m, sd_device *dev, const char *path, bool
                 if (DEVICE(u)->state == DEVICE_PLUGGED &&
                     DEVICE(u)->sysfs &&
                     sysfs &&
-                    !path_equal(DEVICE(u)->sysfs, sysfs)) {
-                        log_unit_debug(u, "Device %s appeared twice with different sysfs paths %s and %s, ignoring the latter.",
-                                       e, DEVICE(u)->sysfs, sysfs);
-                        return -EEXIST;
-                }
+                    !path_equal(DEVICE(u)->sysfs, sysfs))
+                        return log_unit_debug_errno(u, SYNTHETIC_ERRNO(EEXIST),
+                                                    "Device %s appeared twice with different sysfs paths %s and %s, ignoring the latter.",
+                                                    e, DEVICE(u)->sysfs, sysfs);
 
                 delete = false;
 
index 3062be782d635fb0df4508765e571962e1608535..dfe8a13aff93b8a8afee292d71cc63b209df3f6a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "unit.h"
index 8388d53dd12067501a7956296640c5f3d1f8e615..7da87fd818bb4ce0c79202e0e29e4c4d5b0da32c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/file.h>
 #include <sys/stat.h>
index 0a55630ab9b35734d1775e2ed82ae4fe6c9d2682..847ef475ca555d300a8a00a70a240d3ebdf430e6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct DynamicUser DynamicUser;
index b6609e63e548d532c8d1cb6f7433e0371607d7f2..2bc74fab98a5236a54d63e6d4e24cac6ae58cf97 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <unistd.h>
index c1de8671d80e9a25aaa73d32e08b3169f466040a..7d20fff57da317d4d950cffa2f0927c352fe0340 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int efi_take_random_seed(void);
index 1565a799270c01c2d988dfb648d4fb024a1c486e..9e8c79e67a6b4702bb5430040a25352640576274 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/reboot.h>
 
index 706c38a7d746ea36dbf0c4d0dd21c01dda4b2ce0..95d49a816620197c9d40923dc4e9ce18bb9a95c0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef enum EmergencyAction {
index 11e172f61b4d1602ff978f825b2edff806df3ed5..8f901fa7154d460efe03e9367444787e46f89c2e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -73,6 +73,7 @@
 #include "parse-util.h"
 #include "path-util.h"
 #include "process-util.h"
+#include "random-util.h"
 #include "rlimit-util.h"
 #include "rm-rf.h"
 #if HAVE_SECCOMP
@@ -2509,6 +2510,7 @@ static int write_credential(
 static int acquire_credentials(
                 const ExecContext *context,
                 const ExecParameters *params,
+                const char *unit,
                 const char *p,
                 uid_t uid,
                 bool ownership_ok) {
@@ -2546,7 +2548,7 @@ static int acquire_credentials(
         STRV_FOREACH_PAIR(id, fn, context->load_credentials) {
                 ReadFullFileFlags flags = READ_FULL_FILE_SECURE;
                 _cleanup_(erase_and_freep) char *data = NULL;
-                _cleanup_free_ char *j = NULL;
+                _cleanup_free_ char *j = NULL, *bindname = NULL;
                 const char *source;
                 size_t size, add;
 
@@ -2554,6 +2556,12 @@ static int acquire_credentials(
                         /* If this is an absolute path, read the data directly from it, and support AF_UNIX sockets */
                         source = *fn;
                         flags |= READ_FULL_FILE_CONNECT_SOCKET;
+
+                        /* Pass some minimal info about the unit and the credential name we are looking to acquire
+                         * via the source socket address in case we read off an AF_UNIX socket. */
+                        if (asprintf(&bindname, "@%" PRIx64"/unit/%s/%s", random_u64(), unit, *id) < 0)
+                                return -ENOMEM;
+
                 } else if (params->received_credentials) {
                         /* If this is a relative path, take it relative to the credentials we received
                          * ourselves. We don't support the AF_UNIX stuff in this mode, since we are operating
@@ -2566,8 +2574,9 @@ static int acquire_credentials(
                 } else
                         source = NULL;
 
+
                 if (source)
-                        r = read_full_file_full(AT_FDCWD, source, flags, &data, &size);
+                        r = read_full_file_full(AT_FDCWD, source, UINT64_MAX, SIZE_MAX, flags, bindname, &data, &size);
                 else
                         r = -ENOENT;
                 if (r == -ENOENT &&
@@ -2613,6 +2622,7 @@ static int acquire_credentials(
 static int setup_credentials_internal(
                 const ExecContext *context,
                 const ExecParameters *params,
+                const char *unit,
                 const char *final,        /* This is where the credential store shall eventually end up at */
                 const char *workspace,    /* This is where we can prepare it before moving it to the final place */
                 bool reuse_workspace,     /* Whether to reuse any existing workspace mount if it already is a mount */
@@ -2724,7 +2734,7 @@ static int setup_credentials_internal(
         assert(!must_mount || workspace_mounted > 0);
         where = workspace_mounted ? workspace : final;
 
-        r = acquire_credentials(context, params, where, uid, workspace_mounted);
+        r = acquire_credentials(context, params, unit, where, uid, workspace_mounted);
         if (r < 0)
                 return r;
 
@@ -2824,6 +2834,7 @@ static int setup_credentials(
                 r = setup_credentials_internal(
                                 context,
                                 params,
+                                unit,
                                 p,       /* final mount point */
                                 u,       /* temporary workspace to overmount */
                                 true,    /* reuse the workspace if it is already a mount */
@@ -2861,6 +2872,7 @@ static int setup_credentials(
                 r = setup_credentials_internal(
                                 context,
                                 params,
+                                unit,
                                 p,           /* final mount point */
                                 "/dev/shm",  /* temporary workspace to overmount */
                                 false,       /* do not reuse /dev/shm if it is already a mount, under no circumstances */
@@ -3793,23 +3805,20 @@ static int exec_child(
                 r = dynamic_creds_realize(dcreds, suggested_paths, &uid, &gid);
                 if (r < 0) {
                         *exit_status = EXIT_USER;
-                        if (r == -EILSEQ) {
-                                log_unit_error(unit, "Failed to update dynamic user credentials: User or group with specified name already exists.");
-                                return -EOPNOTSUPP;
-                        }
+                        if (r == -EILSEQ)
+                                return log_unit_error_errno(unit, SYNTHETIC_ERRNO(EOPNOTSUPP),
+                                                            "Failed to update dynamic user credentials: User or group with specified name already exists.");
                         return log_unit_error_errno(unit, r, "Failed to update dynamic user credentials: %m");
                 }
 
                 if (!uid_is_valid(uid)) {
                         *exit_status = EXIT_USER;
-                        log_unit_error(unit, "UID validation failed for \""UID_FMT"\"", uid);
-                        return -ESRCH;
+                        return log_unit_error_errno(unit, SYNTHETIC_ERRNO(ESRCH), "UID validation failed for \""UID_FMT"\"", uid);
                 }
 
                 if (!gid_is_valid(gid)) {
                         *exit_status = EXIT_USER;
-                        log_unit_error(unit, "GID validation failed for \""GID_FMT"\"", gid);
-                        return -ESRCH;
+                        return log_unit_error_errno(unit, SYNTHETIC_ERRNO(ESRCH), "GID validation failed for \""GID_FMT"\"", gid);
                 }
 
                 if (dcreds->user)
@@ -4625,15 +4634,11 @@ int exec_spawn(Unit *unit,
             context->std_output == EXEC_OUTPUT_SOCKET ||
             context->std_error == EXEC_OUTPUT_SOCKET) {
 
-                if (params->n_socket_fds > 1) {
-                        log_unit_error(unit, "Got more than one socket.");
-                        return -EINVAL;
-                }
+                if (params->n_socket_fds > 1)
+                        return log_unit_error_errno(unit, SYNTHETIC_ERRNO(EINVAL), "Got more than one socket.");
 
-                if (params->n_socket_fds == 0) {
-                        log_unit_error(unit, "Got no socket.");
-                        return -EINVAL;
-                }
+                if (params->n_socket_fds == 0)
+                        return log_unit_error_errno(unit, SYNTHETIC_ERRNO(EINVAL), "Got no socket.");
 
                 socket_fd = params->fds[0];
         } else {
@@ -6077,7 +6082,12 @@ static int exec_runtime_add(
         return 0;
 }
 
-static int exec_runtime_make(Manager *m, const ExecContext *c, const char *id, ExecRuntime **ret) {
+static int exec_runtime_make(
+                Manager *m,
+                const ExecContext *c,
+                const char *id,
+                ExecRuntime **ret) {
+
         _cleanup_(namespace_cleanup_tmpdirp) char *tmp_dir = NULL, *var_tmp_dir = NULL;
         _cleanup_close_pair_ int netns_storage_socket[2] = { -1, -1 };
         int r;
@@ -6087,8 +6097,10 @@ static int exec_runtime_make(Manager *m, const ExecContext *c, const char *id, E
         assert(id);
 
         /* It is not necessary to create ExecRuntime object. */
-        if (!c->private_network && !c->private_tmp && !c->network_namespace_path)
+        if (!c->private_network && !c->private_tmp && !c->network_namespace_path) {
+                *ret = NULL;
                 return 0;
+        }
 
         if (c->private_tmp &&
             !(prefixed_path_strv_contains(c->inaccessible_paths, "/tmp") &&
@@ -6124,14 +6136,20 @@ int exec_runtime_acquire(Manager *m, const ExecContext *c, const char *id, bool
                 /* We already have a ExecRuntime object, let's increase the ref count and reuse it */
                 goto ref;
 
-        if (!create)
+        if (!create) {
+                *ret = NULL;
                 return 0;
+        }
 
         /* If not found, then create a new object. */
         r = exec_runtime_make(m, c, id, &rt);
-        if (r <= 0)
-                /* When r == 0, it is not necessary to create ExecRuntime object. */
+        if (r < 0)
                 return r;
+        if (r == 0) {
+                /* When r == 0, it is not necessary to create ExecRuntime object. */
+                *ret = NULL;
+                return 0;
+        }
 
 ref:
         /* increment reference counter. */
@@ -6357,7 +6375,7 @@ int exec_runtime_deserialize_one(Manager *m, const char *value, FDSet *fds) {
                 r = safe_atoi(buf, &fdpair[1]);
                 if (r < 0)
                         return log_debug_errno(r, "Unable to parse exec-runtime specification netns-socket-1=%s: %m", buf);
-                if (!fdset_contains(fds, fdpair[0]))
+                if (!fdset_contains(fds, fdpair[1]))
                         return log_debug_errno(SYNTHETIC_ERRNO(EBADF),
                                                "exec-runtime specification netns-socket-1= refers to unknown fd %d: %m", fdpair[1]);
                 fdpair[1] = fdset_remove(fds, fdpair[1]);
index c4345005c1fba24a38e470ff5e0c1ac8a9b35138..33d7e1693d64c89d6ac900547cfb0a809a773d31 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct ExecStatus ExecStatus;
@@ -87,7 +87,7 @@ struct ExecStatus {
         dual_timestamp exit_timestamp;
         pid_t pid;
         int code;     /* as in siginfo_t::si_code */
-        int status;   /* as in sigingo_t::si_status */
+        int status;   /* as in siginfo_t::si_status */
 };
 
 /* Stores information about commands we execute. Covers both configuration settings as well as runtime data. */
index 78ff5909020bd45b00cd73f65a8598db51658e3e..917395173545bb6e09d4a5f04dc4136b88df9ac8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
index 9688601a76e972fb03198a0ae60e87b319504aa6..1cc816b3f539b791416a79336b1f4b49626caf6f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "path-lookup.h"
index 6d047db8388c8e94b3947f75e8c1a4fac35e6ba1..867ea199057ad631df164842209dfde7ddf7cab5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdio.h>
index dc7b9a626260a523ee4b2146d6e1dae3a3a0555a..7fd0a027475024f02b454795e4db852d8b7d3317 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int hostname_setup(void);
index 17072b09af342ceb017f12453ce6e46c1a9c1a16..7f517a09099065b67525a0d005150123d7e17910 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2012 Roberto Sassu - Politecnico di Torino, Italy
                                    TORSEC group — http://security.polito.it
index cf478795a173221aa578670b47db51a374a24acc..f964c7b1fb8e881778e6f86dcd9f2b078f847b94 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index db87b12a78c478c438569e59d30c0751462840e6..a11251e94e64dba85ce0bc4ebfb5d688c0a5f87e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 #include <stdlib.h>
index 8d3ab731f167093410590405fe3e5ad5ee54d602..71b5459e2a27a001f6501f9bee64d772aa4eedaf 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "conf-parser.h"
index 063f3f7892b4bdd44215c5213d743bffce035e26..f3c1a0283167532758525c8d20a094d7db2df7fe 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index 03ad640618e7bf047f9139a2d9df59fa4134dd76..1b3ddc7b4b7cc26e8785936d78558ea5700eda29 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index a9f468e29efaee3ff2a0e2cc3ee86b0c3485fa56..e858ae9607e2372a37573d9579336e986e6d4a99 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "kill.h"
 #include "signal-util.h"
index 1deb0aff9b6ed41fb07ba87ee37517ea4152b18d..012e433b61a14878a0a59cd56f49750201c65732 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct KillContext KillContext;
index 0272fdb0da5def7c35c003f357dad2748072d6e3..6f60f09c4e7d51c4d2b0e48f644019438baa6a38 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2010 ProFUSION embedded systems
 ***/
@@ -214,7 +214,7 @@ static int killall(int sig, Set *pids, bool send_sighup) {
                 if (sig == SIGKILL) {
                         _cleanup_free_ char *s = NULL;
 
-                        get_process_comm(pid, &s);
+                        (void) get_process_comm(pid, &s);
                         log_notice("Sending SIGKILL to PID "PID_FMT" (%s).", pid, strna(s));
                 }
 
index 08ae28d073f4d16317136ed499c7ea1bd0a37fde..d8ef96f7d1c186eb718ba24db94922d0b8024723 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "time-util.h"
index 128674327362e405f9d10db96d3d0b8bf3d2d4d7..8a7f82812a3bc646af2e7aeb4ddf2fbf2ff3cf80 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <ftw.h>
 #include <unistd.h>
index 801c7bf699bd83b414db05e0f1e636a26272a11d..1c842d3617dcc36cd73f8dfe8c2919c39e0c5112 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int kmod_setup(void);
index fb3f68561b38bf629ce793ceacdf14a596bf5c1c..d1c85e23bfaf1a0cc4bdd33be5bd842886dd4f7a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "conf-parser.h"
 #include "fs-util.h"
index 5e2ec0d80abc2e966e38cf2923a14af96ca53415..f0b87d3e9fb2e16f0590a1168983f7d6a251caac 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "dropin.h"
index c60d565eb49efb87a9bd8a67f61535c0b3c2dc72..946862c398a06b51fcd398be7e668683e93c3542 100644 (file)
@@ -20,485 +20,490 @@ struct ConfigPerfItem;
 %%
 m4_dnl Define the context options only once
 m4_define(`EXEC_CONTEXT_CONFIG_ITEMS',
-`$1.WorkingDirectory,            config_parse_working_directory,     0,                             offsetof($1, exec_context)
-$1.RootDirectory,                config_parse_unit_path_printf,      true,                          offsetof($1, exec_context.root_directory)
-$1.RootImage,                    config_parse_unit_path_printf,      true,                          offsetof($1, exec_context.root_image)
-$1.RootImageOptions,             config_parse_root_image_options,    0,                             offsetof($1, exec_context)
-$1.RootHash,                     config_parse_exec_root_hash,        0,                             offsetof($1, exec_context)
-$1.RootHashSignature,            config_parse_exec_root_hash_sig,    0,                             offsetof($1, exec_context)
-$1.RootVerity,                   config_parse_unit_path_printf,      true,                          offsetof($1, exec_context.root_verity)
-$1.MountImages,                  config_parse_mount_images,          0,                             offsetof($1, exec_context)
-$1.User,                         config_parse_user_group_compat,     0,                             offsetof($1, exec_context.user)
-$1.Group,                        config_parse_user_group_compat,     0,                             offsetof($1, exec_context.group)
-$1.SupplementaryGroups,          config_parse_user_group_strv_compat, 0,                            offsetof($1, exec_context.supplementary_groups)
-$1.Nice,                         config_parse_exec_nice,             0,                             offsetof($1, exec_context)
-$1.OOMScoreAdjust,               config_parse_exec_oom_score_adjust, 0,                             offsetof($1, exec_context)
-$1.CoredumpFilter,               config_parse_exec_coredump_filter,  0,                             offsetof($1, exec_context)
-$1.IOSchedulingClass,            config_parse_exec_io_class,         0,                             offsetof($1, exec_context)
-$1.IOSchedulingPriority,         config_parse_exec_io_priority,      0,                             offsetof($1, exec_context)
-$1.CPUSchedulingPolicy,          config_parse_exec_cpu_sched_policy, 0,                             offsetof($1, exec_context)
-$1.CPUSchedulingPriority,        config_parse_exec_cpu_sched_prio,   0,                             offsetof($1, exec_context)
-$1.CPUSchedulingResetOnFork,     config_parse_bool,                  0,                             offsetof($1, exec_context.cpu_sched_reset_on_fork)
-$1.CPUAffinity,                  config_parse_exec_cpu_affinity,     0,                             offsetof($1, exec_context)
-$1.NUMAPolicy,                   config_parse_numa_policy,           0,                             offsetof($1, exec_context.numa_policy.type)
-$1.NUMAMask,                     config_parse_numa_mask,             0,                             offsetof($1, exec_context.numa_policy)
-$1.UMask,                        config_parse_mode,                  0,                             offsetof($1, exec_context.umask)
-$1.Environment,                  config_parse_environ,               0,                             offsetof($1, exec_context.environment)
-$1.EnvironmentFile,              config_parse_unit_env_file,         0,                             offsetof($1, exec_context.environment_files)
-$1.PassEnvironment,              config_parse_pass_environ,          0,                             offsetof($1, exec_context.pass_environment)
-$1.UnsetEnvironment,             config_parse_unset_environ,         0,                             offsetof($1, exec_context.unset_environment)
-$1.DynamicUser,                  config_parse_bool,                  true,                          offsetof($1, exec_context.dynamic_user)
-$1.RemoveIPC,                    config_parse_bool,                  0,                             offsetof($1, exec_context.remove_ipc)
-$1.StandardInput,                config_parse_exec_input,            0,                             offsetof($1, exec_context)
-$1.StandardOutput,               config_parse_exec_output,           0,                             offsetof($1, exec_context)
-$1.StandardError,                config_parse_exec_output,           0,                             offsetof($1, exec_context)
-$1.StandardInputText,            config_parse_exec_input_text,       0,                             offsetof($1, exec_context)
-$1.StandardInputData,            config_parse_exec_input_data,       0,                             offsetof($1, exec_context)
-$1.TTYPath,                      config_parse_unit_path_printf,      0,                             offsetof($1, exec_context.tty_path)
-$1.TTYReset,                     config_parse_bool,                  0,                             offsetof($1, exec_context.tty_reset)
-$1.TTYVHangup,                   config_parse_bool,                  0,                             offsetof($1, exec_context.tty_vhangup)
-$1.TTYVTDisallocate,             config_parse_bool,                  0,                             offsetof($1, exec_context.tty_vt_disallocate)
-$1.SyslogIdentifier,             config_parse_unit_string_printf,    0,                             offsetof($1, exec_context.syslog_identifier)
-$1.SyslogFacility,               config_parse_log_facility,          0,                             offsetof($1, exec_context.syslog_priority)
-$1.SyslogLevel,                  config_parse_log_level,             0,                             offsetof($1, exec_context.syslog_priority)
-$1.SyslogLevelPrefix,            config_parse_bool,                  0,                             offsetof($1, exec_context.syslog_level_prefix)
-$1.LogLevelMax,                  config_parse_log_level,             0,                             offsetof($1, exec_context.log_level_max)
-$1.LogRateLimitIntervalSec,      config_parse_sec,                   0,                             offsetof($1, exec_context.log_ratelimit_interval_usec)
-$1.LogRateLimitBurst,            config_parse_unsigned,              0,                             offsetof($1, exec_context.log_ratelimit_burst)
-$1.LogExtraFields,               config_parse_log_extra_fields,      0,                             offsetof($1, exec_context)
-$1.Capabilities,                 config_parse_warn_compat,           DISABLED_LEGACY,               offsetof($1, exec_context)
-$1.SecureBits,                   config_parse_exec_secure_bits,      0,                             offsetof($1, exec_context.secure_bits)
-$1.CapabilityBoundingSet,        config_parse_capability_set,        0,                             offsetof($1, exec_context.capability_bounding_set)
-$1.AmbientCapabilities,          config_parse_capability_set,        0,                             offsetof($1, exec_context.capability_ambient_set)
-$1.TimerSlackNSec,               config_parse_nsec,                  0,                             offsetof($1, exec_context.timer_slack_nsec)
-$1.NoNewPrivileges,              config_parse_bool,                  0,                             offsetof($1, exec_context.no_new_privileges)
-$1.KeyringMode,                  config_parse_exec_keyring_mode,     0,                             offsetof($1, exec_context.keyring_mode)
-$1.ProtectProc,                  config_parse_protect_proc,          0,                             offsetof($1, exec_context.protect_proc)
-$1.ProcSubset,                   config_parse_proc_subset,           0,                             offsetof($1, exec_context.proc_subset)
+`$1.WorkingDirectory,                    config_parse_working_directory,              0,                                  offsetof($1, exec_context)
+$1.RootDirectory,                        config_parse_unit_path_printf,               true,                               offsetof($1, exec_context.root_directory)
+$1.RootImage,                            config_parse_unit_path_printf,               true,                               offsetof($1, exec_context.root_image)
+$1.RootImageOptions,                     config_parse_root_image_options,             0,                                  offsetof($1, exec_context)
+$1.RootHash,                             config_parse_exec_root_hash,                 0,                                  offsetof($1, exec_context)
+$1.RootHashSignature,                    config_parse_exec_root_hash_sig,             0,                                  offsetof($1, exec_context)
+$1.RootVerity,                           config_parse_unit_path_printf,               true,                               offsetof($1, exec_context.root_verity)
+$1.MountImages,                          config_parse_mount_images,                   0,                                  offsetof($1, exec_context)
+$1.User,                                 config_parse_user_group_compat,              0,                                  offsetof($1, exec_context.user)
+$1.Group,                                config_parse_user_group_compat,              0,                                  offsetof($1, exec_context.group)
+$1.SupplementaryGroups,                  config_parse_user_group_strv_compat,         0,                                  offsetof($1, exec_context.supplementary_groups)
+$1.Nice,                                 config_parse_exec_nice,                      0,                                  offsetof($1, exec_context)
+$1.OOMScoreAdjust,                       config_parse_exec_oom_score_adjust,          0,                                  offsetof($1, exec_context)
+$1.CoredumpFilter,                       config_parse_exec_coredump_filter,           0,                                  offsetof($1, exec_context)
+$1.IOSchedulingClass,                    config_parse_exec_io_class,                  0,                                  offsetof($1, exec_context)
+$1.IOSchedulingPriority,                 config_parse_exec_io_priority,               0,                                  offsetof($1, exec_context)
+$1.CPUSchedulingPolicy,                  config_parse_exec_cpu_sched_policy,          0,                                  offsetof($1, exec_context)
+$1.CPUSchedulingPriority,                config_parse_exec_cpu_sched_prio,            0,                                  offsetof($1, exec_context)
+$1.CPUSchedulingResetOnFork,             config_parse_bool,                           0,                                  offsetof($1, exec_context.cpu_sched_reset_on_fork)
+$1.CPUAffinity,                          config_parse_exec_cpu_affinity,              0,                                  offsetof($1, exec_context)
+$1.NUMAPolicy,                           config_parse_numa_policy,                    0,                                  offsetof($1, exec_context.numa_policy.type)
+$1.NUMAMask,                             config_parse_numa_mask,                      0,                                  offsetof($1, exec_context.numa_policy)
+$1.UMask,                                config_parse_mode,                           0,                                  offsetof($1, exec_context.umask)
+$1.Environment,                          config_parse_environ,                        0,                                  offsetof($1, exec_context.environment)
+$1.EnvironmentFile,                      config_parse_unit_env_file,                  0,                                  offsetof($1, exec_context.environment_files)
+$1.PassEnvironment,                      config_parse_pass_environ,                   0,                                  offsetof($1, exec_context.pass_environment)
+$1.UnsetEnvironment,                     config_parse_unset_environ,                  0,                                  offsetof($1, exec_context.unset_environment)
+$1.DynamicUser,                          config_parse_bool,                           true,                               offsetof($1, exec_context.dynamic_user)
+$1.RemoveIPC,                            config_parse_bool,                           0,                                  offsetof($1, exec_context.remove_ipc)
+$1.StandardInput,                        config_parse_exec_input,                     0,                                  offsetof($1, exec_context)
+$1.StandardOutput,                       config_parse_exec_output,                    0,                                  offsetof($1, exec_context)
+$1.StandardError,                        config_parse_exec_output,                    0,                                  offsetof($1, exec_context)
+$1.StandardInputText,                    config_parse_exec_input_text,                0,                                  offsetof($1, exec_context)
+$1.StandardInputData,                    config_parse_exec_input_data,                0,                                  offsetof($1, exec_context)
+$1.TTYPath,                              config_parse_unit_path_printf,               0,                                  offsetof($1, exec_context.tty_path)
+$1.TTYReset,                             config_parse_bool,                           0,                                  offsetof($1, exec_context.tty_reset)
+$1.TTYVHangup,                           config_parse_bool,                           0,                                  offsetof($1, exec_context.tty_vhangup)
+$1.TTYVTDisallocate,                     config_parse_bool,                           0,                                  offsetof($1, exec_context.tty_vt_disallocate)
+$1.SyslogIdentifier,                     config_parse_unit_string_printf,             0,                                  offsetof($1, exec_context.syslog_identifier)
+$1.SyslogFacility,                       config_parse_log_facility,                   0,                                  offsetof($1, exec_context.syslog_priority)
+$1.SyslogLevel,                          config_parse_log_level,                      0,                                  offsetof($1, exec_context.syslog_priority)
+$1.SyslogLevelPrefix,                    config_parse_bool,                           0,                                  offsetof($1, exec_context.syslog_level_prefix)
+$1.LogLevelMax,                          config_parse_log_level,                      0,                                  offsetof($1, exec_context.log_level_max)
+$1.LogRateLimitIntervalSec,              config_parse_sec,                            0,                                  offsetof($1, exec_context.log_ratelimit_interval_usec)
+$1.LogRateLimitBurst,                    config_parse_unsigned,                       0,                                  offsetof($1, exec_context.log_ratelimit_burst)
+$1.LogExtraFields,                       config_parse_log_extra_fields,               0,                                  offsetof($1, exec_context)
+$1.Capabilities,                         config_parse_warn_compat,                    DISABLED_LEGACY,                    offsetof($1, exec_context)
+$1.SecureBits,                           config_parse_exec_secure_bits,               0,                                  offsetof($1, exec_context.secure_bits)
+$1.CapabilityBoundingSet,                config_parse_capability_set,                 0,                                  offsetof($1, exec_context.capability_bounding_set)
+$1.AmbientCapabilities,                  config_parse_capability_set,                 0,                                  offsetof($1, exec_context.capability_ambient_set)
+$1.TimerSlackNSec,                       config_parse_nsec,                           0,                                  offsetof($1, exec_context.timer_slack_nsec)
+$1.NoNewPrivileges,                      config_parse_bool,                           0,                                  offsetof($1, exec_context.no_new_privileges)
+$1.KeyringMode,                          config_parse_exec_keyring_mode,              0,                                  offsetof($1, exec_context.keyring_mode)
+$1.ProtectProc,                          config_parse_protect_proc,                   0,                                  offsetof($1, exec_context.protect_proc)
+$1.ProcSubset,                           config_parse_proc_subset,                    0,                                  offsetof($1, exec_context.proc_subset)
 m4_ifdef(`HAVE_SECCOMP',
-`$1.SystemCallFilter,            config_parse_syscall_filter,        0,                             offsetof($1, exec_context)
-$1.SystemCallArchitectures,      config_parse_syscall_archs,         0,                             offsetof($1, exec_context.syscall_archs)
-$1.SystemCallErrorNumber,        config_parse_syscall_errno,         0,                             offsetof($1, exec_context)
-$1.SystemCallLog,                config_parse_syscall_log,           0,                             offsetof($1, exec_context)
-$1.MemoryDenyWriteExecute,       config_parse_bool,                  0,                             offsetof($1, exec_context.memory_deny_write_execute)
-$1.RestrictNamespaces,           config_parse_restrict_namespaces,   0,                             offsetof($1, exec_context)
-$1.RestrictRealtime,             config_parse_bool,                  0,                             offsetof($1, exec_context.restrict_realtime)
-$1.RestrictSUIDSGID,             config_parse_bool,                  0,                             offsetof($1, exec_context.restrict_suid_sgid)
-$1.RestrictAddressFamilies,      config_parse_address_families,      0,                             offsetof($1, exec_context)
-$1.LockPersonality,              config_parse_bool,                  0,                             offsetof($1, exec_context.lock_personality)',
-`$1.SystemCallFilter,            config_parse_warn_compat,           DISABLED_CONFIGURATION,        0
-$1.SystemCallArchitectures,      config_parse_warn_compat,           DISABLED_CONFIGURATION,        0
-$1.SystemCallErrorNumber,        config_parse_warn_compat,           DISABLED_CONFIGURATION,        0
-$1.SystemCallLog,                config_parse_warn_compat,           DISABLED_CONFIGURATION,        0
-$1.MemoryDenyWriteExecute,       config_parse_warn_compat,           DISABLED_CONFIGURATION,        0
-$1.RestrictNamespaces,           config_parse_warn_compat,           DISABLED_CONFIGURATION,        0
-$1.RestrictRealtime,             config_parse_warn_compat,           DISABLED_CONFIGURATION,        0
-$1.RestrictSUIDSGID,             config_parse_warn_compat,           DISABLED_CONFIGURATION,        0
-$1.RestrictAddressFamilies,      config_parse_warn_compat,           DISABLED_CONFIGURATION,        0
-$1.LockPersonality,              config_parse_warn_compat,           DISABLED_CONFIGURATION,        0')
-$1.LimitCPU,                     config_parse_rlimit,                RLIMIT_CPU,                    offsetof($1, exec_context.rlimit)
-$1.LimitFSIZE,                   config_parse_rlimit,                RLIMIT_FSIZE,                  offsetof($1, exec_context.rlimit)
-$1.LimitDATA,                    config_parse_rlimit,                RLIMIT_DATA,                   offsetof($1, exec_context.rlimit)
-$1.LimitSTACK,                   config_parse_rlimit,                RLIMIT_STACK,                  offsetof($1, exec_context.rlimit)
-$1.LimitCORE,                    config_parse_rlimit,                RLIMIT_CORE,                   offsetof($1, exec_context.rlimit)
-$1.LimitRSS,                     config_parse_rlimit,                RLIMIT_RSS,                    offsetof($1, exec_context.rlimit)
-$1.LimitNOFILE,                  config_parse_rlimit,                RLIMIT_NOFILE,                 offsetof($1, exec_context.rlimit)
-$1.LimitAS,                      config_parse_rlimit,                RLIMIT_AS,                     offsetof($1, exec_context.rlimit)
-$1.LimitNPROC,                   config_parse_rlimit,                RLIMIT_NPROC,                  offsetof($1, exec_context.rlimit)
-$1.LimitMEMLOCK,                 config_parse_rlimit,                RLIMIT_MEMLOCK,                offsetof($1, exec_context.rlimit)
-$1.LimitLOCKS,                   config_parse_rlimit,                RLIMIT_LOCKS,                  offsetof($1, exec_context.rlimit)
-$1.LimitSIGPENDING,              config_parse_rlimit,                RLIMIT_SIGPENDING,             offsetof($1, exec_context.rlimit)
-$1.LimitMSGQUEUE,                config_parse_rlimit,                RLIMIT_MSGQUEUE,               offsetof($1, exec_context.rlimit)
-$1.LimitNICE,                    config_parse_rlimit,                RLIMIT_NICE,                   offsetof($1, exec_context.rlimit)
-$1.LimitRTPRIO,                  config_parse_rlimit,                RLIMIT_RTPRIO,                 offsetof($1, exec_context.rlimit)
-$1.LimitRTTIME,                  config_parse_rlimit,                RLIMIT_RTTIME,                 offsetof($1, exec_context.rlimit)
-$1.ReadWriteDirectories,         config_parse_namespace_path_strv,   0,                             offsetof($1, exec_context.read_write_paths)
-$1.ReadOnlyDirectories,          config_parse_namespace_path_strv,   0,                             offsetof($1, exec_context.read_only_paths)
-$1.InaccessibleDirectories,      config_parse_namespace_path_strv,   0,                             offsetof($1, exec_context.inaccessible_paths)
-$1.ReadWritePaths,               config_parse_namespace_path_strv,   0,                             offsetof($1, exec_context.read_write_paths)
-$1.ReadOnlyPaths,                config_parse_namespace_path_strv,   0,                             offsetof($1, exec_context.read_only_paths)
-$1.InaccessiblePaths,            config_parse_namespace_path_strv,   0,                             offsetof($1, exec_context.inaccessible_paths)
-$1.BindPaths,                    config_parse_bind_paths,            0,                             offsetof($1, exec_context)
-$1.BindReadOnlyPaths,            config_parse_bind_paths,            0,                             offsetof($1, exec_context)
-$1.TemporaryFileSystem,          config_parse_temporary_filesystems, 0,                             offsetof($1, exec_context)
-$1.PrivateTmp,                   config_parse_bool,                  0,                             offsetof($1, exec_context.private_tmp)
-$1.PrivateDevices,               config_parse_bool,                  0,                             offsetof($1, exec_context.private_devices)
-$1.ProtectKernelTunables,        config_parse_bool,                  0,                             offsetof($1, exec_context.protect_kernel_tunables)
-$1.ProtectKernelModules,         config_parse_bool,                  0,                             offsetof($1, exec_context.protect_kernel_modules)
-$1.ProtectKernelLogs,            config_parse_bool,                  0,                             offsetof($1, exec_context.protect_kernel_logs)
-$1.ProtectClock,                 config_parse_bool,                  0,                             offsetof($1, exec_context.protect_clock)
-$1.ProtectControlGroups,         config_parse_bool,                  0,                             offsetof($1, exec_context.protect_control_groups)
-$1.NetworkNamespacePath,         config_parse_unit_path_printf,      0,                             offsetof($1, exec_context.network_namespace_path)
-$1.LogNamespace,                 config_parse_log_namespace,         0,                             offsetof($1, exec_context)
-$1.PrivateNetwork,               config_parse_bool,                  0,                             offsetof($1, exec_context.private_network)
-$1.PrivateUsers,                 config_parse_bool,                  0,                             offsetof($1, exec_context.private_users)
-$1.PrivateMounts,                config_parse_bool,                  0,                             offsetof($1, exec_context.private_mounts)
-$1.ProtectSystem,                config_parse_protect_system,        0,                             offsetof($1, exec_context.protect_system)
-$1.ProtectHome,                  config_parse_protect_home,          0,                             offsetof($1, exec_context.protect_home)
-$1.MountFlags,                   config_parse_exec_mount_flags,      0,                             offsetof($1, exec_context.mount_flags)
-$1.MountAPIVFS,                  config_parse_bool,                  0,                             offsetof($1, exec_context.mount_apivfs)
-$1.Personality,                  config_parse_personality,           0,                             offsetof($1, exec_context.personality)
-$1.RuntimeDirectoryPreserve,     config_parse_runtime_preserve_mode, 0,                             offsetof($1, exec_context.runtime_directory_preserve_mode)
-$1.RuntimeDirectoryMode,         config_parse_mode,                  0,                             offsetof($1, exec_context.directories[EXEC_DIRECTORY_RUNTIME].mode)
-$1.RuntimeDirectory,             config_parse_exec_directories,      0,                             offsetof($1, exec_context.directories[EXEC_DIRECTORY_RUNTIME].paths)
-$1.StateDirectoryMode,           config_parse_mode,                  0,                             offsetof($1, exec_context.directories[EXEC_DIRECTORY_STATE].mode)
-$1.StateDirectory,               config_parse_exec_directories,      0,                             offsetof($1, exec_context.directories[EXEC_DIRECTORY_STATE].paths)
-$1.CacheDirectoryMode,           config_parse_mode,                  0,                             offsetof($1, exec_context.directories[EXEC_DIRECTORY_CACHE].mode)
-$1.CacheDirectory,               config_parse_exec_directories,      0,                             offsetof($1, exec_context.directories[EXEC_DIRECTORY_CACHE].paths)
-$1.LogsDirectoryMode,            config_parse_mode,                  0,                             offsetof($1, exec_context.directories[EXEC_DIRECTORY_LOGS].mode)
-$1.LogsDirectory,                config_parse_exec_directories,      0,                             offsetof($1, exec_context.directories[EXEC_DIRECTORY_LOGS].paths)
-$1.ConfigurationDirectoryMode,   config_parse_mode,                  0,                             offsetof($1, exec_context.directories[EXEC_DIRECTORY_CONFIGURATION].mode)
-$1.ConfigurationDirectory,       config_parse_exec_directories,      0,                             offsetof($1, exec_context.directories[EXEC_DIRECTORY_CONFIGURATION].paths)
-$1.SetCredential,                config_parse_set_credential,        0,                             offsetof($1, exec_context)
-$1.LoadCredential,               config_parse_load_credential,       0,                             offsetof($1, exec_context)
-$1.TimeoutCleanSec,              config_parse_sec,                   0,                             offsetof($1, exec_context.timeout_clean_usec)
-$1.ProtectHostname,              config_parse_bool,                  0,                             offsetof($1, exec_context.protect_hostname)
+`$1.SystemCallFilter,                    config_parse_syscall_filter,                 0,                                  offsetof($1, exec_context)
+$1.SystemCallArchitectures,              config_parse_syscall_archs,                  0,                                  offsetof($1, exec_context.syscall_archs)
+$1.SystemCallErrorNumber,                config_parse_syscall_errno,                  0,                                  offsetof($1, exec_context)
+$1.SystemCallLog,                        config_parse_syscall_log,                    0,                                  offsetof($1, exec_context)
+$1.MemoryDenyWriteExecute,               config_parse_bool,                           0,                                  offsetof($1, exec_context.memory_deny_write_execute)
+$1.RestrictNamespaces,                   config_parse_restrict_namespaces,            0,                                  offsetof($1, exec_context)
+$1.RestrictRealtime,                     config_parse_bool,                           0,                                  offsetof($1, exec_context.restrict_realtime)
+$1.RestrictSUIDSGID,                     config_parse_bool,                           0,                                  offsetof($1, exec_context.restrict_suid_sgid)
+$1.RestrictAddressFamilies,              config_parse_address_families,               0,                                  offsetof($1, exec_context)
+$1.LockPersonality,                      config_parse_bool,                           0,                                  offsetof($1, exec_context.lock_personality)',
+`$1.SystemCallFilter,                    config_parse_warn_compat,                    DISABLED_CONFIGURATION,             0
+$1.SystemCallArchitectures,              config_parse_warn_compat,                    DISABLED_CONFIGURATION,             0
+$1.SystemCallErrorNumber,                config_parse_warn_compat,                    DISABLED_CONFIGURATION,             0
+$1.SystemCallLog,                        config_parse_warn_compat,                    DISABLED_CONFIGURATION,             0
+$1.MemoryDenyWriteExecute,               config_parse_warn_compat,                    DISABLED_CONFIGURATION,             0
+$1.RestrictNamespaces,                   config_parse_warn_compat,                    DISABLED_CONFIGURATION,             0
+$1.RestrictRealtime,                     config_parse_warn_compat,                    DISABLED_CONFIGURATION,             0
+$1.RestrictSUIDSGID,                     config_parse_warn_compat,                    DISABLED_CONFIGURATION,             0
+$1.RestrictAddressFamilies,              config_parse_warn_compat,                    DISABLED_CONFIGURATION,             0
+$1.LockPersonality,                      config_parse_warn_compat,                    DISABLED_CONFIGURATION,             0')
+$1.LimitCPU,                             config_parse_rlimit,                         RLIMIT_CPU,                         offsetof($1, exec_context.rlimit)
+$1.LimitFSIZE,                           config_parse_rlimit,                         RLIMIT_FSIZE,                       offsetof($1, exec_context.rlimit)
+$1.LimitDATA,                            config_parse_rlimit,                         RLIMIT_DATA,                        offsetof($1, exec_context.rlimit)
+$1.LimitSTACK,                           config_parse_rlimit,                         RLIMIT_STACK,                       offsetof($1, exec_context.rlimit)
+$1.LimitCORE,                            config_parse_rlimit,                         RLIMIT_CORE,                        offsetof($1, exec_context.rlimit)
+$1.LimitRSS,                             config_parse_rlimit,                         RLIMIT_RSS,                         offsetof($1, exec_context.rlimit)
+$1.LimitNOFILE,                          config_parse_rlimit,                         RLIMIT_NOFILE,                      offsetof($1, exec_context.rlimit)
+$1.LimitAS,                              config_parse_rlimit,                         RLIMIT_AS,                          offsetof($1, exec_context.rlimit)
+$1.LimitNPROC,                           config_parse_rlimit,                         RLIMIT_NPROC,                       offsetof($1, exec_context.rlimit)
+$1.LimitMEMLOCK,                         config_parse_rlimit,                         RLIMIT_MEMLOCK,                     offsetof($1, exec_context.rlimit)
+$1.LimitLOCKS,                           config_parse_rlimit,                         RLIMIT_LOCKS,                       offsetof($1, exec_context.rlimit)
+$1.LimitSIGPENDING,                      config_parse_rlimit,                         RLIMIT_SIGPENDING,                  offsetof($1, exec_context.rlimit)
+$1.LimitMSGQUEUE,                        config_parse_rlimit,                         RLIMIT_MSGQUEUE,                    offsetof($1, exec_context.rlimit)
+$1.LimitNICE,                            config_parse_rlimit,                         RLIMIT_NICE,                        offsetof($1, exec_context.rlimit)
+$1.LimitRTPRIO,                          config_parse_rlimit,                         RLIMIT_RTPRIO,                      offsetof($1, exec_context.rlimit)
+$1.LimitRTTIME,                          config_parse_rlimit,                         RLIMIT_RTTIME,                      offsetof($1, exec_context.rlimit)
+$1.ReadWriteDirectories,                 config_parse_namespace_path_strv,            0,                                  offsetof($1, exec_context.read_write_paths)
+$1.ReadOnlyDirectories,                  config_parse_namespace_path_strv,            0,                                  offsetof($1, exec_context.read_only_paths)
+$1.InaccessibleDirectories,              config_parse_namespace_path_strv,            0,                                  offsetof($1, exec_context.inaccessible_paths)
+$1.ReadWritePaths,                       config_parse_namespace_path_strv,            0,                                  offsetof($1, exec_context.read_write_paths)
+$1.ReadOnlyPaths,                        config_parse_namespace_path_strv,            0,                                  offsetof($1, exec_context.read_only_paths)
+$1.InaccessiblePaths,                    config_parse_namespace_path_strv,            0,                                  offsetof($1, exec_context.inaccessible_paths)
+$1.BindPaths,                            config_parse_bind_paths,                     0,                                  offsetof($1, exec_context)
+$1.BindReadOnlyPaths,                    config_parse_bind_paths,                     0,                                  offsetof($1, exec_context)
+$1.TemporaryFileSystem,                  config_parse_temporary_filesystems,          0,                                  offsetof($1, exec_context)
+$1.PrivateTmp,                           config_parse_bool,                           0,                                  offsetof($1, exec_context.private_tmp)
+$1.PrivateDevices,                       config_parse_bool,                           0,                                  offsetof($1, exec_context.private_devices)
+$1.ProtectKernelTunables,                config_parse_bool,                           0,                                  offsetof($1, exec_context.protect_kernel_tunables)
+$1.ProtectKernelModules,                 config_parse_bool,                           0,                                  offsetof($1, exec_context.protect_kernel_modules)
+$1.ProtectKernelLogs,                    config_parse_bool,                           0,                                  offsetof($1, exec_context.protect_kernel_logs)
+$1.ProtectClock,                         config_parse_bool,                           0,                                  offsetof($1, exec_context.protect_clock)
+$1.ProtectControlGroups,                 config_parse_bool,                           0,                                  offsetof($1, exec_context.protect_control_groups)
+$1.NetworkNamespacePath,                 config_parse_unit_path_printf,               0,                                  offsetof($1, exec_context.network_namespace_path)
+$1.LogNamespace,                         config_parse_log_namespace,                  0,                                  offsetof($1, exec_context)
+$1.PrivateNetwork,                       config_parse_bool,                           0,                                  offsetof($1, exec_context.private_network)
+$1.PrivateUsers,                         config_parse_bool,                           0,                                  offsetof($1, exec_context.private_users)
+$1.PrivateMounts,                        config_parse_bool,                           0,                                  offsetof($1, exec_context.private_mounts)
+$1.ProtectSystem,                        config_parse_protect_system,                 0,                                  offsetof($1, exec_context.protect_system)
+$1.ProtectHome,                          config_parse_protect_home,                   0,                                  offsetof($1, exec_context.protect_home)
+$1.MountFlags,                           config_parse_exec_mount_flags,               0,                                  offsetof($1, exec_context.mount_flags)
+$1.MountAPIVFS,                          config_parse_bool,                           0,                                  offsetof($1, exec_context.mount_apivfs)
+$1.Personality,                          config_parse_personality,                    0,                                  offsetof($1, exec_context.personality)
+$1.RuntimeDirectoryPreserve,             config_parse_runtime_preserve_mode,          0,                                  offsetof($1, exec_context.runtime_directory_preserve_mode)
+$1.RuntimeDirectoryMode,                 config_parse_mode,                           0,                                  offsetof($1, exec_context.directories[EXEC_DIRECTORY_RUNTIME].mode)
+$1.RuntimeDirectory,                     config_parse_exec_directories,               0,                                  offsetof($1, exec_context.directories[EXEC_DIRECTORY_RUNTIME].paths)
+$1.StateDirectoryMode,                   config_parse_mode,                           0,                                  offsetof($1, exec_context.directories[EXEC_DIRECTORY_STATE].mode)
+$1.StateDirectory,                       config_parse_exec_directories,               0,                                  offsetof($1, exec_context.directories[EXEC_DIRECTORY_STATE].paths)
+$1.CacheDirectoryMode,                   config_parse_mode,                           0,                                  offsetof($1, exec_context.directories[EXEC_DIRECTORY_CACHE].mode)
+$1.CacheDirectory,                       config_parse_exec_directories,               0,                                  offsetof($1, exec_context.directories[EXEC_DIRECTORY_CACHE].paths)
+$1.LogsDirectoryMode,                    config_parse_mode,                           0,                                  offsetof($1, exec_context.directories[EXEC_DIRECTORY_LOGS].mode)
+$1.LogsDirectory,                        config_parse_exec_directories,               0,                                  offsetof($1, exec_context.directories[EXEC_DIRECTORY_LOGS].paths)
+$1.ConfigurationDirectoryMode,           config_parse_mode,                           0,                                  offsetof($1, exec_context.directories[EXEC_DIRECTORY_CONFIGURATION].mode)
+$1.ConfigurationDirectory,               config_parse_exec_directories,               0,                                  offsetof($1, exec_context.directories[EXEC_DIRECTORY_CONFIGURATION].paths)
+$1.SetCredential,                        config_parse_set_credential,                 0,                                  offsetof($1, exec_context)
+$1.LoadCredential,                       config_parse_load_credential,                0,                                  offsetof($1, exec_context)
+$1.TimeoutCleanSec,                      config_parse_sec,                            0,                                  offsetof($1, exec_context.timeout_clean_usec)
+$1.ProtectHostname,                      config_parse_bool,                           0,                                  offsetof($1, exec_context.protect_hostname)
 m4_ifdef(`HAVE_PAM',
-`$1.PAMName,                     config_parse_unit_string_printf,    0,                             offsetof($1, exec_context.pam_name)',
-`$1.PAMName,                     config_parse_warn_compat,           DISABLED_CONFIGURATION,        0')
-$1.IgnoreSIGPIPE,                config_parse_bool,                  0,                             offsetof($1, exec_context.ignore_sigpipe)
-$1.UtmpIdentifier,               config_parse_unit_string_printf,    0,                             offsetof($1, exec_context.utmp_id)
-$1.UtmpMode,                     config_parse_exec_utmp_mode,        0,                             offsetof($1, exec_context.utmp_mode)
+`$1.PAMName,                             config_parse_unit_string_printf,             0,                                  offsetof($1, exec_context.pam_name)',
+`$1.PAMName,                             config_parse_warn_compat,                    DISABLED_CONFIGURATION,             0')
+$1.IgnoreSIGPIPE,                        config_parse_bool,                           0,                                  offsetof($1, exec_context.ignore_sigpipe)
+$1.UtmpIdentifier,                       config_parse_unit_string_printf,             0,                                  offsetof($1, exec_context.utmp_id)
+$1.UtmpMode,                             config_parse_exec_utmp_mode,                 0,                                  offsetof($1, exec_context.utmp_mode)
 m4_ifdef(`HAVE_SELINUX',
-`$1.SELinuxContext,              config_parse_exec_selinux_context,  0,                             offsetof($1, exec_context)',
-`$1.SELinuxContext,              config_parse_warn_compat,           DISABLED_CONFIGURATION,        0')
+`$1.SELinuxContext,                      config_parse_exec_selinux_context,           0,                                  offsetof($1, exec_context)',
+`$1.SELinuxContext,                      config_parse_warn_compat,                    DISABLED_CONFIGURATION,             0')
 m4_ifdef(`HAVE_APPARMOR',
-`$1.AppArmorProfile,             config_parse_exec_apparmor_profile, 0,                             offsetof($1, exec_context)',
-`$1.AppArmorProfile,             config_parse_warn_compat,           DISABLED_CONFIGURATION,        0')
+`$1.AppArmorProfile,                     config_parse_exec_apparmor_profile,          0,                                  offsetof($1, exec_context)',
+`$1.AppArmorProfile,                     config_parse_warn_compat,                    DISABLED_CONFIGURATION,             0')
 m4_ifdef(`ENABLE_SMACK',
-`$1.SmackProcessLabel,           config_parse_exec_smack_process_label, 0,                          offsetof($1, exec_context)',
-`$1.SmackProcessLabel,           config_parse_warn_compat,           DISABLED_CONFIGURATION,        0')'
+`$1.SmackProcessLabel,                   config_parse_exec_smack_process_label,       0,                                  offsetof($1, exec_context)',
+`$1.SmackProcessLabel,                   config_parse_warn_compat,                    DISABLED_CONFIGURATION,             0')'
 )m4_dnl
 m4_define(`KILL_CONTEXT_CONFIG_ITEMS',
-`$1.SendSIGKILL,                 config_parse_bool,                  0,                             offsetof($1, kill_context.send_sigkill)
-$1.SendSIGHUP,                   config_parse_bool,                  0,                             offsetof($1, kill_context.send_sighup)
-$1.KillMode,                     config_parse_kill_mode,             0,                             offsetof($1, kill_context.kill_mode)
-$1.KillSignal,                   config_parse_signal,                0,                             offsetof($1, kill_context.kill_signal)
-$1.RestartKillSignal,            config_parse_signal,                0,                             offsetof($1, kill_context.restart_kill_signal)
-$1.FinalKillSignal,              config_parse_signal,                0,                             offsetof($1, kill_context.final_kill_signal)
-$1.WatchdogSignal,               config_parse_signal,                0,                             offsetof($1, kill_context.watchdog_signal)'
+`$1.SendSIGKILL,                         config_parse_bool,                           0,                                  offsetof($1, kill_context.send_sigkill)
+$1.SendSIGHUP,                           config_parse_bool,                           0,                                  offsetof($1, kill_context.send_sighup)
+$1.KillMode,                             config_parse_kill_mode,                      0,                                  offsetof($1, kill_context.kill_mode)
+$1.KillSignal,                           config_parse_signal,                         0,                                  offsetof($1, kill_context.kill_signal)
+$1.RestartKillSignal,                    config_parse_signal,                         0,                                  offsetof($1, kill_context.restart_kill_signal)
+$1.FinalKillSignal,                      config_parse_signal,                         0,                                  offsetof($1, kill_context.final_kill_signal)
+$1.WatchdogSignal,                       config_parse_signal,                         0,                                  offsetof($1, kill_context.watchdog_signal)'
 )m4_dnl
 m4_define(`CGROUP_CONTEXT_CONFIG_ITEMS',
-`$1.Slice,                       config_parse_unit_slice,            0,                             0
-$1.AllowedCPUs,                  config_parse_allowed_cpus,          0,                             offsetof($1, cgroup_context)
-$1.AllowedMemoryNodes,           config_parse_allowed_mems,          0,                             offsetof($1, cgroup_context)
-$1.CPUAccounting,                config_parse_bool,                  0,                             offsetof($1, cgroup_context.cpu_accounting)
-$1.CPUWeight,                    config_parse_cg_weight,             0,                             offsetof($1, cgroup_context.cpu_weight)
-$1.StartupCPUWeight,             config_parse_cg_weight,             0,                             offsetof($1, cgroup_context.startup_cpu_weight)
-$1.CPUShares,                    config_parse_cpu_shares,            0,                             offsetof($1, cgroup_context.cpu_shares)
-$1.StartupCPUShares,             config_parse_cpu_shares,            0,                             offsetof($1, cgroup_context.startup_cpu_shares)
-$1.CPUQuota,                     config_parse_cpu_quota,             0,                             offsetof($1, cgroup_context)
-$1.CPUQuotaPeriodSec,            config_parse_sec_def_infinity,      0,                             offsetof($1, cgroup_context.cpu_quota_period_usec)
-$1.MemoryAccounting,             config_parse_bool,                  0,                             offsetof($1, cgroup_context.memory_accounting)
-$1.MemoryMin,                    config_parse_memory_limit,          0,                             offsetof($1, cgroup_context)
-$1.DefaultMemoryMin,             config_parse_memory_limit,          0,                             offsetof($1, cgroup_context)
-$1.DefaultMemoryLow,             config_parse_memory_limit,          0,                             offsetof($1, cgroup_context)
-$1.MemoryLow,                    config_parse_memory_limit,          0,                             offsetof($1, cgroup_context)
-$1.MemoryHigh,                   config_parse_memory_limit,          0,                             offsetof($1, cgroup_context)
-$1.MemoryMax,                    config_parse_memory_limit,          0,                             offsetof($1, cgroup_context)
-$1.MemorySwapMax,                config_parse_memory_limit,          0,                             offsetof($1, cgroup_context)
-$1.MemoryLimit,                  config_parse_memory_limit,          0,                             offsetof($1, cgroup_context)
-$1.DeviceAllow,                  config_parse_device_allow,          0,                             offsetof($1, cgroup_context)
-$1.DevicePolicy,                 config_parse_device_policy,         0,                             offsetof($1, cgroup_context.device_policy)
-$1.IOAccounting,                 config_parse_bool,                  0,                             offsetof($1, cgroup_context.io_accounting)
-$1.IOWeight,                     config_parse_cg_weight,             0,                             offsetof($1, cgroup_context.io_weight)
-$1.StartupIOWeight,              config_parse_cg_weight,             0,                             offsetof($1, cgroup_context.startup_io_weight)
-$1.IODeviceWeight,               config_parse_io_device_weight,      0,                             offsetof($1, cgroup_context)
-$1.IOReadBandwidthMax,           config_parse_io_limit,              0,                             offsetof($1, cgroup_context)
-$1.IOWriteBandwidthMax,          config_parse_io_limit,              0,                             offsetof($1, cgroup_context)
-$1.IOReadIOPSMax,                config_parse_io_limit,              0,                             offsetof($1, cgroup_context)
-$1.IOWriteIOPSMax,               config_parse_io_limit,              0,                             offsetof($1, cgroup_context)
-$1.IODeviceLatencyTargetSec,     config_parse_io_device_latency,     0,                             offsetof($1, cgroup_context)
-$1.BlockIOAccounting,            config_parse_bool,                  0,                             offsetof($1, cgroup_context.blockio_accounting)
-$1.BlockIOWeight,                config_parse_blockio_weight,        0,                             offsetof($1, cgroup_context.blockio_weight)
-$1.StartupBlockIOWeight,         config_parse_blockio_weight,        0,                             offsetof($1, cgroup_context.startup_blockio_weight)
-$1.BlockIODeviceWeight,          config_parse_blockio_device_weight, 0,                             offsetof($1, cgroup_context)
-$1.BlockIOReadBandwidth,         config_parse_blockio_bandwidth,     0,                             offsetof($1, cgroup_context)
-$1.BlockIOWriteBandwidth,        config_parse_blockio_bandwidth,     0,                             offsetof($1, cgroup_context)
-$1.TasksAccounting,              config_parse_bool,                  0,                             offsetof($1, cgroup_context.tasks_accounting)
-$1.TasksMax,                     config_parse_tasks_max,             0,                             offsetof($1, cgroup_context.tasks_max)
-$1.Delegate,                     config_parse_delegate,              0,                             offsetof($1, cgroup_context)
-$1.DisableControllers,           config_parse_disable_controllers,   0,                             offsetof($1, cgroup_context)
-$1.IPAccounting,                 config_parse_bool,                  0,                             offsetof($1, cgroup_context.ip_accounting)
-$1.IPAddressAllow,               config_parse_ip_address_access,     0,                             offsetof($1, cgroup_context.ip_address_allow)
-$1.IPAddressDeny,                config_parse_ip_address_access,     0,                             offsetof($1, cgroup_context.ip_address_deny)
-$1.IPIngressFilterPath,          config_parse_ip_filter_bpf_progs,   0,                             offsetof($1, cgroup_context.ip_filters_ingress)
-$1.IPEgressFilterPath,           config_parse_ip_filter_bpf_progs,   0,                             offsetof($1, cgroup_context.ip_filters_egress)
-$1.NetClass,                     config_parse_warn_compat,           DISABLED_LEGACY,               0'
+`$1.Slice,                               config_parse_unit_slice,                     0,                                  0
+$1.AllowedCPUs,                          config_parse_allowed_cpus,                   0,                                  offsetof($1, cgroup_context)
+$1.AllowedMemoryNodes,                   config_parse_allowed_mems,                   0,                                  offsetof($1, cgroup_context)
+$1.CPUAccounting,                        config_parse_bool,                           0,                                  offsetof($1, cgroup_context.cpu_accounting)
+$1.CPUWeight,                            config_parse_cg_weight,                      0,                                  offsetof($1, cgroup_context.cpu_weight)
+$1.StartupCPUWeight,                     config_parse_cg_weight,                      0,                                  offsetof($1, cgroup_context.startup_cpu_weight)
+$1.CPUShares,                            config_parse_cpu_shares,                     0,                                  offsetof($1, cgroup_context.cpu_shares)
+$1.StartupCPUShares,                     config_parse_cpu_shares,                     0,                                  offsetof($1, cgroup_context.startup_cpu_shares)
+$1.CPUQuota,                             config_parse_cpu_quota,                      0,                                  offsetof($1, cgroup_context)
+$1.CPUQuotaPeriodSec,                    config_parse_sec_def_infinity,               0,                                  offsetof($1, cgroup_context.cpu_quota_period_usec)
+$1.MemoryAccounting,                     config_parse_bool,                           0,                                  offsetof($1, cgroup_context.memory_accounting)
+$1.MemoryMin,                            config_parse_memory_limit,                   0,                                  offsetof($1, cgroup_context)
+$1.DefaultMemoryMin,                     config_parse_memory_limit,                   0,                                  offsetof($1, cgroup_context)
+$1.DefaultMemoryLow,                     config_parse_memory_limit,                   0,                                  offsetof($1, cgroup_context)
+$1.MemoryLow,                            config_parse_memory_limit,                   0,                                  offsetof($1, cgroup_context)
+$1.MemoryHigh,                           config_parse_memory_limit,                   0,                                  offsetof($1, cgroup_context)
+$1.MemoryMax,                            config_parse_memory_limit,                   0,                                  offsetof($1, cgroup_context)
+$1.MemorySwapMax,                        config_parse_memory_limit,                   0,                                  offsetof($1, cgroup_context)
+$1.MemoryLimit,                          config_parse_memory_limit,                   0,                                  offsetof($1, cgroup_context)
+$1.DeviceAllow,                          config_parse_device_allow,                   0,                                  offsetof($1, cgroup_context)
+$1.DevicePolicy,                         config_parse_device_policy,                  0,                                  offsetof($1, cgroup_context.device_policy)
+$1.IOAccounting,                         config_parse_bool,                           0,                                  offsetof($1, cgroup_context.io_accounting)
+$1.IOWeight,                             config_parse_cg_weight,                      0,                                  offsetof($1, cgroup_context.io_weight)
+$1.StartupIOWeight,                      config_parse_cg_weight,                      0,                                  offsetof($1, cgroup_context.startup_io_weight)
+$1.IODeviceWeight,                       config_parse_io_device_weight,               0,                                  offsetof($1, cgroup_context)
+$1.IOReadBandwidthMax,                   config_parse_io_limit,                       0,                                  offsetof($1, cgroup_context)
+$1.IOWriteBandwidthMax,                  config_parse_io_limit,                       0,                                  offsetof($1, cgroup_context)
+$1.IOReadIOPSMax,                        config_parse_io_limit,                       0,                                  offsetof($1, cgroup_context)
+$1.IOWriteIOPSMax,                       config_parse_io_limit,                       0,                                  offsetof($1, cgroup_context)
+$1.IODeviceLatencyTargetSec,             config_parse_io_device_latency,              0,                                  offsetof($1, cgroup_context)
+$1.BlockIOAccounting,                    config_parse_bool,                           0,                                  offsetof($1, cgroup_context.blockio_accounting)
+$1.BlockIOWeight,                        config_parse_blockio_weight,                 0,                                  offsetof($1, cgroup_context.blockio_weight)
+$1.StartupBlockIOWeight,                 config_parse_blockio_weight,                 0,                                  offsetof($1, cgroup_context.startup_blockio_weight)
+$1.BlockIODeviceWeight,                  config_parse_blockio_device_weight,          0,                                  offsetof($1, cgroup_context)
+$1.BlockIOReadBandwidth,                 config_parse_blockio_bandwidth,              0,                                  offsetof($1, cgroup_context)
+$1.BlockIOWriteBandwidth,                config_parse_blockio_bandwidth,              0,                                  offsetof($1, cgroup_context)
+$1.TasksAccounting,                      config_parse_bool,                           0,                                  offsetof($1, cgroup_context.tasks_accounting)
+$1.TasksMax,                             config_parse_tasks_max,                      0,                                  offsetof($1, cgroup_context.tasks_max)
+$1.Delegate,                             config_parse_delegate,                       0,                                  offsetof($1, cgroup_context)
+$1.DisableControllers,                   config_parse_disable_controllers,            0,                                  offsetof($1, cgroup_context)
+$1.IPAccounting,                         config_parse_bool,                           0,                                  offsetof($1, cgroup_context.ip_accounting)
+$1.IPAddressAllow,                       config_parse_ip_address_access,              0,                                  offsetof($1, cgroup_context.ip_address_allow)
+$1.IPAddressDeny,                        config_parse_ip_address_access,              0,                                  offsetof($1, cgroup_context.ip_address_deny)
+$1.IPIngressFilterPath,                  config_parse_ip_filter_bpf_progs,            0,                                  offsetof($1, cgroup_context.ip_filters_ingress)
+$1.IPEgressFilterPath,                   config_parse_ip_filter_bpf_progs,            0,                                  offsetof($1, cgroup_context.ip_filters_egress)
+$1.ManagedOOMSwap,                       config_parse_managed_oom_mode,               0,                                  offsetof($1, cgroup_context.moom_swap)
+$1.ManagedOOMMemoryPressure,             config_parse_managed_oom_mode,               0,                                  offsetof($1, cgroup_context.moom_mem_pressure)
+$1.ManagedOOMMemoryPressureLimitPercent, config_parse_managed_oom_mem_pressure_limit, 0,                                  offsetof($1, cgroup_context.moom_mem_pressure_limit)
+$1.NetClass,                             config_parse_warn_compat,                    DISABLED_LEGACY,                    0'
 )m4_dnl
-Unit.Description,                config_parse_unit_string_printf,    0,                             offsetof(Unit, description)
-Unit.Documentation,              config_parse_documentation,         0,                             offsetof(Unit, documentation)
-Unit.SourcePath,                 config_parse_unit_path_printf,      0,                             offsetof(Unit, source_path)
-Unit.Requires,                   config_parse_unit_deps,             UNIT_REQUIRES,                 0
-Unit.Requisite,                  config_parse_unit_deps,             UNIT_REQUISITE,                0
-Unit.Wants,                      config_parse_unit_deps,             UNIT_WANTS,                    0
-Unit.BindsTo,                    config_parse_unit_deps,             UNIT_BINDS_TO,                 0
-Unit.BindTo,                     config_parse_unit_deps,             UNIT_BINDS_TO,                 0
-Unit.Conflicts,                  config_parse_unit_deps,             UNIT_CONFLICTS,                0
-Unit.Before,                     config_parse_unit_deps,             UNIT_BEFORE,                   0
-Unit.After,                      config_parse_unit_deps,             UNIT_AFTER,                    0
-Unit.OnFailure,                  config_parse_unit_deps,             UNIT_ON_FAILURE,               0
-Unit.PropagatesReloadTo,         config_parse_unit_deps,             UNIT_PROPAGATES_RELOAD_TO,     0
-Unit.PropagateReloadTo,          config_parse_unit_deps,             UNIT_PROPAGATES_RELOAD_TO,     0
-Unit.ReloadPropagatedFrom,       config_parse_unit_deps,             UNIT_RELOAD_PROPAGATED_FROM,   0
-Unit.PropagateReloadFrom,        config_parse_unit_deps,             UNIT_RELOAD_PROPAGATED_FROM,   0
-Unit.PartOf,                     config_parse_unit_deps,             UNIT_PART_OF,                  0
-Unit.JoinsNamespaceOf,           config_parse_unit_deps,             UNIT_JOINS_NAMESPACE_OF,       0
-Unit.RequiresOverridable,        config_parse_obsolete_unit_deps,    UNIT_REQUIRES,                 0
-Unit.RequisiteOverridable,       config_parse_obsolete_unit_deps,    UNIT_REQUISITE,                0
-Unit.RequiresMountsFor,          config_parse_unit_requires_mounts_for, 0,                          0
-Unit.StopWhenUnneeded,           config_parse_bool,                  0,                             offsetof(Unit, stop_when_unneeded)
-Unit.RefuseManualStart,          config_parse_bool,                  0,                             offsetof(Unit, refuse_manual_start)
-Unit.RefuseManualStop,           config_parse_bool,                  0,                             offsetof(Unit, refuse_manual_stop)
-Unit.AllowIsolate,               config_parse_bool,                  0,                             offsetof(Unit, allow_isolate)
-Unit.DefaultDependencies,        config_parse_bool,                  0,                             offsetof(Unit, default_dependencies)
-Unit.OnFailureJobMode,           config_parse_job_mode,              0,                             offsetof(Unit, on_failure_job_mode)
+Unit.Description,                        config_parse_unit_string_printf,             0,                                  offsetof(Unit, description)
+Unit.Documentation,                      config_parse_documentation,                  0,                                  offsetof(Unit, documentation)
+Unit.SourcePath,                         config_parse_unit_path_printf,               0,                                  offsetof(Unit, source_path)
+Unit.Requires,                           config_parse_unit_deps,                      UNIT_REQUIRES,                      0
+Unit.Requisite,                          config_parse_unit_deps,                      UNIT_REQUISITE,                     0
+Unit.Wants,                              config_parse_unit_deps,                      UNIT_WANTS,                         0
+Unit.BindsTo,                            config_parse_unit_deps,                      UNIT_BINDS_TO,                      0
+Unit.BindTo,                             config_parse_unit_deps,                      UNIT_BINDS_TO,                      0
+Unit.Conflicts,                          config_parse_unit_deps,                      UNIT_CONFLICTS,                     0
+Unit.Before,                             config_parse_unit_deps,                      UNIT_BEFORE,                        0
+Unit.After,                              config_parse_unit_deps,                      UNIT_AFTER,                         0
+Unit.OnFailure,                          config_parse_unit_deps,                      UNIT_ON_FAILURE,                    0
+Unit.PropagatesReloadTo,                 config_parse_unit_deps,                      UNIT_PROPAGATES_RELOAD_TO,          0
+Unit.PropagateReloadTo,                  config_parse_unit_deps,                      UNIT_PROPAGATES_RELOAD_TO,          0
+Unit.ReloadPropagatedFrom,               config_parse_unit_deps,                      UNIT_RELOAD_PROPAGATED_FROM,        0
+Unit.PropagateReloadFrom,                config_parse_unit_deps,                      UNIT_RELOAD_PROPAGATED_FROM,        0
+Unit.PartOf,                             config_parse_unit_deps,                      UNIT_PART_OF,                       0
+Unit.JoinsNamespaceOf,                   config_parse_unit_deps,                      UNIT_JOINS_NAMESPACE_OF,            0
+Unit.RequiresOverridable,                config_parse_obsolete_unit_deps,             UNIT_REQUIRES,                      0
+Unit.RequisiteOverridable,               config_parse_obsolete_unit_deps,             UNIT_REQUISITE,                     0
+Unit.RequiresMountsFor,                  config_parse_unit_requires_mounts_for,       0,                                  0
+Unit.StopWhenUnneeded,                   config_parse_bool,                           0,                                  offsetof(Unit, stop_when_unneeded)
+Unit.RefuseManualStart,                  config_parse_bool,                           0,                                  offsetof(Unit, refuse_manual_start)
+Unit.RefuseManualStop,                   config_parse_bool,                           0,                                  offsetof(Unit, refuse_manual_stop)
+Unit.AllowIsolate,                       config_parse_bool,                           0,                                  offsetof(Unit, allow_isolate)
+Unit.DefaultDependencies,                config_parse_bool,                           0,                                  offsetof(Unit, default_dependencies)
+Unit.OnFailureJobMode,                   config_parse_job_mode,                       0,                                  offsetof(Unit, on_failure_job_mode)
 m4_dnl The following is a legacy alias name for compatibility
-Unit.OnFailureIsolate,           config_parse_job_mode_isolate,      0,                             offsetof(Unit, on_failure_job_mode)
-Unit.IgnoreOnIsolate,            config_parse_bool,                  0,                             offsetof(Unit, ignore_on_isolate)
-Unit.IgnoreOnSnapshot,           config_parse_warn_compat,           DISABLED_LEGACY,               0
-Unit.JobTimeoutSec,              config_parse_job_timeout_sec,       0,                             0
-Unit.JobRunningTimeoutSec,       config_parse_job_running_timeout_sec, 0,                           0
-Unit.JobTimeoutAction,           config_parse_emergency_action,      0,                             offsetof(Unit, job_timeout_action)
-Unit.JobTimeoutRebootArgument,   config_parse_unit_string_printf,    0,                             offsetof(Unit, job_timeout_reboot_arg)
-Unit.StartLimitIntervalSec,      config_parse_sec,                   0,                             offsetof(Unit, start_ratelimit.interval)
+Unit.OnFailureIsolate,                   config_parse_job_mode_isolate,               0,                                  offsetof(Unit, on_failure_job_mode)
+Unit.IgnoreOnIsolate,                    config_parse_bool,                           0,                                  offsetof(Unit, ignore_on_isolate)
+Unit.IgnoreOnSnapshot,                   config_parse_warn_compat,                    DISABLED_LEGACY,                    0
+Unit.JobTimeoutSec,                      config_parse_job_timeout_sec,                0,                                  0
+Unit.JobRunningTimeoutSec,               config_parse_job_running_timeout_sec,        0,                                  0
+Unit.JobTimeoutAction,                   config_parse_emergency_action,               0,                                  offsetof(Unit, job_timeout_action)
+Unit.JobTimeoutRebootArgument,           config_parse_unit_string_printf,             0,                                  offsetof(Unit, job_timeout_reboot_arg)
+Unit.StartLimitIntervalSec,              config_parse_sec,                            0,                                  offsetof(Unit, start_ratelimit.interval)
 m4_dnl The following is a legacy alias name for compatibility
-Unit.StartLimitInterval,         config_parse_sec,                   0,                             offsetof(Unit, start_ratelimit.interval)
-Unit.StartLimitBurst,            config_parse_unsigned,              0,                             offsetof(Unit, start_ratelimit.burst)
-Unit.StartLimitAction,           config_parse_emergency_action,      0,                             offsetof(Unit, start_limit_action)
-Unit.FailureAction,              config_parse_emergency_action,      0,                             offsetof(Unit, failure_action)
-Unit.SuccessAction,              config_parse_emergency_action,      0,                             offsetof(Unit, success_action)
-Unit.FailureActionExitStatus,    config_parse_exit_status,           0,                             offsetof(Unit, failure_action_exit_status)
-Unit.SuccessActionExitStatus,    config_parse_exit_status,           0,                             offsetof(Unit, success_action_exit_status)
-Unit.RebootArgument,             config_parse_unit_string_printf,    0,                             offsetof(Unit, reboot_arg)
-Unit.ConditionPathExists,        config_parse_unit_condition_path,   CONDITION_PATH_EXISTS,         offsetof(Unit, conditions)
-Unit.ConditionPathExistsGlob,    config_parse_unit_condition_path,   CONDITION_PATH_EXISTS_GLOB,    offsetof(Unit, conditions)
-Unit.ConditionPathIsDirectory,   config_parse_unit_condition_path,   CONDITION_PATH_IS_DIRECTORY,   offsetof(Unit, conditions)
-Unit.ConditionPathIsSymbolicLink,config_parse_unit_condition_path,   CONDITION_PATH_IS_SYMBOLIC_LINK,offsetof(Unit, conditions)
-Unit.ConditionPathIsMountPoint,  config_parse_unit_condition_path,   CONDITION_PATH_IS_MOUNT_POINT, offsetof(Unit, conditions)
-Unit.ConditionPathIsReadWrite,   config_parse_unit_condition_path,   CONDITION_PATH_IS_READ_WRITE,  offsetof(Unit, conditions)
-Unit.ConditionPathIsEncrypted,   config_parse_unit_condition_path,   CONDITION_PATH_IS_ENCRYPTED,   offsetof(Unit, conditions)
-Unit.ConditionDirectoryNotEmpty, config_parse_unit_condition_path,   CONDITION_DIRECTORY_NOT_EMPTY, offsetof(Unit, conditions)
-Unit.ConditionFileNotEmpty,      config_parse_unit_condition_path,   CONDITION_FILE_NOT_EMPTY,      offsetof(Unit, conditions)
-Unit.ConditionFileIsExecutable,  config_parse_unit_condition_path,   CONDITION_FILE_IS_EXECUTABLE,  offsetof(Unit, conditions)
-Unit.ConditionNeedsUpdate,       config_parse_unit_condition_path,   CONDITION_NEEDS_UPDATE,        offsetof(Unit, conditions)
-Unit.ConditionFirstBoot,         config_parse_unit_condition_string, CONDITION_FIRST_BOOT,          offsetof(Unit, conditions)
-Unit.ConditionArchitecture,      config_parse_unit_condition_string, CONDITION_ARCHITECTURE,        offsetof(Unit, conditions)
-Unit.ConditionVirtualization,    config_parse_unit_condition_string, CONDITION_VIRTUALIZATION,      offsetof(Unit, conditions)
-Unit.ConditionHost,              config_parse_unit_condition_string, CONDITION_HOST,                offsetof(Unit, conditions)
-Unit.ConditionKernelCommandLine, config_parse_unit_condition_string, CONDITION_KERNEL_COMMAND_LINE, offsetof(Unit, conditions)
-Unit.ConditionKernelVersion,     config_parse_unit_condition_string, CONDITION_KERNEL_VERSION,      offsetof(Unit, conditions)
-Unit.ConditionSecurity,          config_parse_unit_condition_string, CONDITION_SECURITY,            offsetof(Unit, conditions)
-Unit.ConditionCapability,        config_parse_unit_condition_string, CONDITION_CAPABILITY,          offsetof(Unit, conditions)
-Unit.ConditionACPower,           config_parse_unit_condition_string, CONDITION_AC_POWER,            offsetof(Unit, conditions)
-Unit.ConditionMemory,            config_parse_unit_condition_string, CONDITION_MEMORY,              offsetof(Unit, conditions)
-Unit.ConditionCPUs,              config_parse_unit_condition_string, CONDITION_CPUS,                offsetof(Unit, conditions)
-Unit.ConditionEnvironment,       config_parse_unit_condition_string, CONDITION_ENVIRONMENT,         offsetof(Unit, conditions)
-Unit.ConditionUser,              config_parse_unit_condition_string, CONDITION_USER,                offsetof(Unit, conditions)
-Unit.ConditionGroup,             config_parse_unit_condition_string, CONDITION_GROUP,               offsetof(Unit, conditions)
-Unit.ConditionControlGroupController, config_parse_unit_condition_string, CONDITION_CONTROL_GROUP_CONTROLLER, offsetof(Unit, conditions)
-Unit.AssertPathExists,           config_parse_unit_condition_path,   CONDITION_PATH_EXISTS,         offsetof(Unit, asserts)
-Unit.AssertPathExistsGlob,       config_parse_unit_condition_path,   CONDITION_PATH_EXISTS_GLOB,    offsetof(Unit, asserts)
-Unit.AssertPathIsDirectory,      config_parse_unit_condition_path,   CONDITION_PATH_IS_DIRECTORY,   offsetof(Unit, asserts)
-Unit.AssertPathIsSymbolicLink,   config_parse_unit_condition_path,   CONDITION_PATH_IS_SYMBOLIC_LINK,offsetof(Unit, asserts)
-Unit.AssertPathIsMountPoint,     config_parse_unit_condition_path,   CONDITION_PATH_IS_MOUNT_POINT, offsetof(Unit, asserts)
-Unit.AssertPathIsReadWrite,      config_parse_unit_condition_path,   CONDITION_PATH_IS_READ_WRITE,  offsetof(Unit, asserts)
-Unit.AssertPathIsEncrypted,      config_parse_unit_condition_path,   CONDITION_PATH_IS_ENCRYPTED,   offsetof(Unit, asserts)
-Unit.AssertDirectoryNotEmpty,    config_parse_unit_condition_path,   CONDITION_DIRECTORY_NOT_EMPTY, offsetof(Unit, asserts)
-Unit.AssertFileNotEmpty,         config_parse_unit_condition_path,   CONDITION_FILE_NOT_EMPTY,      offsetof(Unit, asserts)
-Unit.AssertFileIsExecutable,     config_parse_unit_condition_path,   CONDITION_FILE_IS_EXECUTABLE,  offsetof(Unit, asserts)
-Unit.AssertNeedsUpdate,          config_parse_unit_condition_path,   CONDITION_NEEDS_UPDATE,        offsetof(Unit, asserts)
-Unit.AssertFirstBoot,            config_parse_unit_condition_string, CONDITION_FIRST_BOOT,          offsetof(Unit, asserts)
-Unit.AssertArchitecture,         config_parse_unit_condition_string, CONDITION_ARCHITECTURE,        offsetof(Unit, asserts)
-Unit.AssertVirtualization,       config_parse_unit_condition_string, CONDITION_VIRTUALIZATION,      offsetof(Unit, asserts)
-Unit.AssertHost,                 config_parse_unit_condition_string, CONDITION_HOST,                offsetof(Unit, asserts)
-Unit.AssertKernelCommandLine,    config_parse_unit_condition_string, CONDITION_KERNEL_COMMAND_LINE, offsetof(Unit, asserts)
-Unit.AssertKernelVersion,        config_parse_unit_condition_string, CONDITION_KERNEL_VERSION,      offsetof(Unit, asserts)
-Unit.AssertSecurity,             config_parse_unit_condition_string, CONDITION_SECURITY,            offsetof(Unit, asserts)
-Unit.AssertCapability,           config_parse_unit_condition_string, CONDITION_CAPABILITY,          offsetof(Unit, asserts)
-Unit.AssertACPower,              config_parse_unit_condition_string, CONDITION_AC_POWER,            offsetof(Unit, asserts)
-Unit.AssertMemory,               config_parse_unit_condition_string, CONDITION_MEMORY,              offsetof(Unit, asserts)
-Unit.AssertCPUs,                 config_parse_unit_condition_string, CONDITION_CPUS,                offsetof(Unit, asserts)
-Unit.AssertEnvironment,          config_parse_unit_condition_string, CONDITION_ENVIRONMENT,         offsetof(Unit, asserts)
-Unit.AssertUser,                 config_parse_unit_condition_string, CONDITION_USER,                offsetof(Unit, asserts)
-Unit.AssertGroup,                config_parse_unit_condition_string, CONDITION_GROUP,               offsetof(Unit, asserts)
-Unit.AssertControlGroupController, config_parse_unit_condition_string, CONDITION_CONTROL_GROUP_CONTROLLER, offsetof(Unit, asserts)
-Unit.CollectMode,                config_parse_collect_mode,          0,                             offsetof(Unit, collect_mode)
+Unit.StartLimitInterval,                 config_parse_sec,                            0,                                  offsetof(Unit, start_ratelimit.interval)
+Unit.StartLimitBurst,                    config_parse_unsigned,                       0,                                  offsetof(Unit, start_ratelimit.burst)
+Unit.StartLimitAction,                   config_parse_emergency_action,               0,                                  offsetof(Unit, start_limit_action)
+Unit.FailureAction,                      config_parse_emergency_action,               0,                                  offsetof(Unit, failure_action)
+Unit.SuccessAction,                      config_parse_emergency_action,               0,                                  offsetof(Unit, success_action)
+Unit.FailureActionExitStatus,            config_parse_exit_status,                    0,                                  offsetof(Unit, failure_action_exit_status)
+Unit.SuccessActionExitStatus,            config_parse_exit_status,                    0,                                  offsetof(Unit, success_action_exit_status)
+Unit.RebootArgument,                     config_parse_unit_string_printf,             0,                                  offsetof(Unit, reboot_arg)
+Unit.ConditionPathExists,                config_parse_unit_condition_path,            CONDITION_PATH_EXISTS,              offsetof(Unit, conditions)
+Unit.ConditionPathExistsGlob,            config_parse_unit_condition_path,            CONDITION_PATH_EXISTS_GLOB,         offsetof(Unit, conditions)
+Unit.ConditionPathIsDirectory,           config_parse_unit_condition_path,            CONDITION_PATH_IS_DIRECTORY,        offsetof(Unit, conditions)
+Unit.ConditionPathIsSymbolicLink,        config_parse_unit_condition_path,            CONDITION_PATH_IS_SYMBOLIC_LINK,    offsetof(Unit, conditions)
+Unit.ConditionPathIsMountPoint,          config_parse_unit_condition_path,            CONDITION_PATH_IS_MOUNT_POINT,      offsetof(Unit, conditions)
+Unit.ConditionPathIsReadWrite,           config_parse_unit_condition_path,            CONDITION_PATH_IS_READ_WRITE,       offsetof(Unit, conditions)
+Unit.ConditionPathIsEncrypted,           config_parse_unit_condition_path,            CONDITION_PATH_IS_ENCRYPTED,        offsetof(Unit, conditions)
+Unit.ConditionDirectoryNotEmpty,         config_parse_unit_condition_path,            CONDITION_DIRECTORY_NOT_EMPTY,      offsetof(Unit, conditions)
+Unit.ConditionFileNotEmpty,              config_parse_unit_condition_path,            CONDITION_FILE_NOT_EMPTY,           offsetof(Unit, conditions)
+Unit.ConditionFileIsExecutable,          config_parse_unit_condition_path,            CONDITION_FILE_IS_EXECUTABLE,       offsetof(Unit, conditions)
+Unit.ConditionNeedsUpdate,               config_parse_unit_condition_path,            CONDITION_NEEDS_UPDATE,             offsetof(Unit, conditions)
+Unit.ConditionFirstBoot,                 config_parse_unit_condition_string,          CONDITION_FIRST_BOOT,               offsetof(Unit, conditions)
+Unit.ConditionArchitecture,              config_parse_unit_condition_string,          CONDITION_ARCHITECTURE,             offsetof(Unit, conditions)
+Unit.ConditionVirtualization,            config_parse_unit_condition_string,          CONDITION_VIRTUALIZATION,           offsetof(Unit, conditions)
+Unit.ConditionHost,                      config_parse_unit_condition_string,          CONDITION_HOST,                     offsetof(Unit, conditions)
+Unit.ConditionKernelCommandLine,         config_parse_unit_condition_string,          CONDITION_KERNEL_COMMAND_LINE,      offsetof(Unit, conditions)
+Unit.ConditionKernelVersion,             config_parse_unit_condition_string,          CONDITION_KERNEL_VERSION,           offsetof(Unit, conditions)
+Unit.ConditionSecurity,                  config_parse_unit_condition_string,          CONDITION_SECURITY,                 offsetof(Unit, conditions)
+Unit.ConditionCapability,                config_parse_unit_condition_string,          CONDITION_CAPABILITY,               offsetof(Unit, conditions)
+Unit.ConditionACPower,                   config_parse_unit_condition_string,          CONDITION_AC_POWER,                 offsetof(Unit, conditions)
+Unit.ConditionMemory,                    config_parse_unit_condition_string,          CONDITION_MEMORY,                   offsetof(Unit, conditions)
+Unit.ConditionCPUs,                      config_parse_unit_condition_string,          CONDITION_CPUS,                     offsetof(Unit, conditions)
+Unit.ConditionEnvironment,               config_parse_unit_condition_string,          CONDITION_ENVIRONMENT,              offsetof(Unit, conditions)
+Unit.ConditionUser,                      config_parse_unit_condition_string,          CONDITION_USER,                     offsetof(Unit, conditions)
+Unit.ConditionGroup,                     config_parse_unit_condition_string,          CONDITION_GROUP,                    offsetof(Unit, conditions)
+Unit.ConditionControlGroupController,    config_parse_unit_condition_string,          CONDITION_CONTROL_GROUP_CONTROLLER, offsetof(Unit, conditions)
+Unit.AssertPathExists,                   config_parse_unit_condition_path,            CONDITION_PATH_EXISTS,              offsetof(Unit, asserts)
+Unit.AssertPathExistsGlob,               config_parse_unit_condition_path,            CONDITION_PATH_EXISTS_GLOB,         offsetof(Unit, asserts)
+Unit.AssertPathIsDirectory,              config_parse_unit_condition_path,            CONDITION_PATH_IS_DIRECTORY,        offsetof(Unit, asserts)
+Unit.AssertPathIsSymbolicLink,           config_parse_unit_condition_path,            CONDITION_PATH_IS_SYMBOLIC_LINK,    offsetof(Unit, asserts)
+Unit.AssertPathIsMountPoint,             config_parse_unit_condition_path,            CONDITION_PATH_IS_MOUNT_POINT,      offsetof(Unit, asserts)
+Unit.AssertPathIsReadWrite,              config_parse_unit_condition_path,            CONDITION_PATH_IS_READ_WRITE,       offsetof(Unit, asserts)
+Unit.AssertPathIsEncrypted,              config_parse_unit_condition_path,            CONDITION_PATH_IS_ENCRYPTED,        offsetof(Unit, asserts)
+Unit.AssertDirectoryNotEmpty,            config_parse_unit_condition_path,            CONDITION_DIRECTORY_NOT_EMPTY,      offsetof(Unit, asserts)
+Unit.AssertFileNotEmpty,                 config_parse_unit_condition_path,            CONDITION_FILE_NOT_EMPTY,           offsetof(Unit, asserts)
+Unit.AssertFileIsExecutable,             config_parse_unit_condition_path,            CONDITION_FILE_IS_EXECUTABLE,       offsetof(Unit, asserts)
+Unit.AssertNeedsUpdate,                  config_parse_unit_condition_path,            CONDITION_NEEDS_UPDATE,             offsetof(Unit, asserts)
+Unit.AssertFirstBoot,                    config_parse_unit_condition_string,          CONDITION_FIRST_BOOT,               offsetof(Unit, asserts)
+Unit.AssertArchitecture,                 config_parse_unit_condition_string,          CONDITION_ARCHITECTURE,             offsetof(Unit, asserts)
+Unit.AssertVirtualization,               config_parse_unit_condition_string,          CONDITION_VIRTUALIZATION,           offsetof(Unit, asserts)
+Unit.AssertHost,                         config_parse_unit_condition_string,          CONDITION_HOST,                     offsetof(Unit, asserts)
+Unit.AssertKernelCommandLine,            config_parse_unit_condition_string,          CONDITION_KERNEL_COMMAND_LINE,      offsetof(Unit, asserts)
+Unit.AssertKernelVersion,                config_parse_unit_condition_string,          CONDITION_KERNEL_VERSION,           offsetof(Unit, asserts)
+Unit.AssertSecurity,                     config_parse_unit_condition_string,          CONDITION_SECURITY,                 offsetof(Unit, asserts)
+Unit.AssertCapability,                   config_parse_unit_condition_string,          CONDITION_CAPABILITY,               offsetof(Unit, asserts)
+Unit.AssertACPower,                      config_parse_unit_condition_string,          CONDITION_AC_POWER,                 offsetof(Unit, asserts)
+Unit.AssertMemory,                       config_parse_unit_condition_string,          CONDITION_MEMORY,                   offsetof(Unit, asserts)
+Unit.AssertCPUs,                         config_parse_unit_condition_string,          CONDITION_CPUS,                     offsetof(Unit, asserts)
+Unit.AssertEnvironment,                  config_parse_unit_condition_string,          CONDITION_ENVIRONMENT,              offsetof(Unit, asserts)
+Unit.AssertUser,                         config_parse_unit_condition_string,          CONDITION_USER,                     offsetof(Unit, asserts)
+Unit.AssertGroup,                        config_parse_unit_condition_string,          CONDITION_GROUP,                    offsetof(Unit, asserts)
+Unit.AssertControlGroupController,       config_parse_unit_condition_string,          CONDITION_CONTROL_GROUP_CONTROLLER, offsetof(Unit, asserts)
+Unit.CollectMode,                        config_parse_collect_mode,                   0,                                  offsetof(Unit, collect_mode)
 m4_dnl
-Service.PIDFile,                 config_parse_pid_file,              0,                             offsetof(Service, pid_file)
-Service.ExecCondition,           config_parse_exec,                  SERVICE_EXEC_CONDITION,        offsetof(Service, exec_command)
-Service.ExecStartPre,            config_parse_exec,                  SERVICE_EXEC_START_PRE,        offsetof(Service, exec_command)
-Service.ExecStart,               config_parse_exec,                  SERVICE_EXEC_START,            offsetof(Service, exec_command)
-Service.ExecStartPost,           config_parse_exec,                  SERVICE_EXEC_START_POST,       offsetof(Service, exec_command)
-Service.ExecReload,              config_parse_exec,                  SERVICE_EXEC_RELOAD,           offsetof(Service, exec_command)
-Service.ExecStop,                config_parse_exec,                  SERVICE_EXEC_STOP,             offsetof(Service, exec_command)
-Service.ExecStopPost,            config_parse_exec,                  SERVICE_EXEC_STOP_POST,        offsetof(Service, exec_command)
-Service.RestartSec,              config_parse_sec,                   0,                             offsetof(Service, restart_usec)
-Service.TimeoutSec,              config_parse_service_timeout,       0,                             0
-Service.TimeoutStartSec,         config_parse_service_timeout,       0,                             0
-Service.TimeoutStopSec,          config_parse_sec_fix_0,             0,                             offsetof(Service, timeout_stop_usec)
-Service.TimeoutAbortSec,         config_parse_service_timeout_abort, 0,                             0
-Service.TimeoutStartFailureMode, config_parse_service_timeout_failure_mode,  0,                     offsetof(Service, timeout_start_failure_mode)
-Service.TimeoutStopFailureMode,  config_parse_service_timeout_failure_mode,  0,                     offsetof(Service, timeout_stop_failure_mode)
-Service.RuntimeMaxSec,           config_parse_sec,                   0,                             offsetof(Service, runtime_max_usec)
-Service.WatchdogSec,             config_parse_sec,                   0,                             offsetof(Service, watchdog_usec)
+Service.PIDFile,                         config_parse_pid_file,                       0,                                  offsetof(Service, pid_file)
+Service.ExecCondition,                   config_parse_exec,                           SERVICE_EXEC_CONDITION,             offsetof(Service, exec_command)
+Service.ExecStartPre,                    config_parse_exec,                           SERVICE_EXEC_START_PRE,             offsetof(Service, exec_command)
+Service.ExecStart,                       config_parse_exec,                           SERVICE_EXEC_START,                 offsetof(Service, exec_command)
+Service.ExecStartPost,                   config_parse_exec,                           SERVICE_EXEC_START_POST,            offsetof(Service, exec_command)
+Service.ExecReload,                      config_parse_exec,                           SERVICE_EXEC_RELOAD,                offsetof(Service, exec_command)
+Service.ExecStop,                        config_parse_exec,                           SERVICE_EXEC_STOP,                  offsetof(Service, exec_command)
+Service.ExecStopPost,                    config_parse_exec,                           SERVICE_EXEC_STOP_POST,             offsetof(Service, exec_command)
+Service.RestartSec,                      config_parse_sec,                            0,                                  offsetof(Service, restart_usec)
+Service.TimeoutSec,                      config_parse_service_timeout,                0,                                  0
+Service.TimeoutStartSec,                 config_parse_service_timeout,                0,                                  0
+Service.TimeoutStopSec,                  config_parse_sec_fix_0,                      0,                                  offsetof(Service, timeout_stop_usec)
+Service.TimeoutAbortSec,                 config_parse_service_timeout_abort,          0,                                  0
+Service.TimeoutStartFailureMode,         config_parse_service_timeout_failure_mode,   0,                                  offsetof(Service, timeout_start_failure_mode)
+Service.TimeoutStopFailureMode,          config_parse_service_timeout_failure_mode,   0,                                  offsetof(Service, timeout_stop_failure_mode)
+Service.RuntimeMaxSec,                   config_parse_sec,                            0,                                  offsetof(Service, runtime_max_usec)
+Service.WatchdogSec,                     config_parse_sec,                            0,                                  offsetof(Service, watchdog_usec)
 m4_dnl The following five only exist for compatibility, they moved into Unit, see above
-Service.StartLimitInterval,      config_parse_sec,                   0,                             offsetof(Unit, start_ratelimit.interval)
-Service.StartLimitBurst,         config_parse_unsigned,              0,                             offsetof(Unit, start_ratelimit.burst)
-Service.StartLimitAction,        config_parse_emergency_action,      0,                             offsetof(Unit, start_limit_action)
-Service.FailureAction,           config_parse_emergency_action,      0,                             offsetof(Unit, failure_action)
-Service.RebootArgument,          config_parse_unit_string_printf,    0,                             offsetof(Unit, reboot_arg)
-Service.Type,                    config_parse_service_type,          0,                             offsetof(Service, type)
-Service.Restart,                 config_parse_service_restart,       0,                             offsetof(Service, restart)
-Service.PermissionsStartOnly,    config_parse_bool,                  0,                             offsetof(Service, permissions_start_only)
-Service.RootDirectoryStartOnly,  config_parse_bool,                  0,                             offsetof(Service, root_directory_start_only)
-Service.RemainAfterExit,         config_parse_bool,                  0,                             offsetof(Service, remain_after_exit)
-Service.GuessMainPID,            config_parse_bool,                  0,                             offsetof(Service, guess_main_pid)
-Service.RestartPreventExitStatus, config_parse_set_status,           0,                             offsetof(Service, restart_prevent_status)
-Service.RestartForceExitStatus,  config_parse_set_status,            0,                             offsetof(Service, restart_force_status)
-Service.SuccessExitStatus,       config_parse_set_status,            0,                             offsetof(Service, success_status)
-Service.SysVStartPriority,       config_parse_warn_compat,           DISABLED_LEGACY,               0
-Service.NonBlocking,             config_parse_bool,                  0,                             offsetof(Service, exec_context.non_blocking)
-Service.BusName,                 config_parse_bus_name,              0,                             offsetof(Service, bus_name)
-Service.FileDescriptorStoreMax,  config_parse_unsigned,              0,                             offsetof(Service, n_fd_store_max)
-Service.NotifyAccess,            config_parse_notify_access,         0,                             offsetof(Service, notify_access)
-Service.Sockets,                 config_parse_service_sockets,       0,                             0
-Service.BusPolicy,               config_parse_warn_compat,           DISABLED_LEGACY,               0
-Service.USBFunctionDescriptors,  config_parse_unit_path_printf,      0,                             offsetof(Service, usb_function_descriptors)
-Service.USBFunctionStrings,      config_parse_unit_path_printf,      0,                             offsetof(Service, usb_function_strings)
-Service.OOMPolicy,               config_parse_oom_policy,            0,                             offsetof(Service, oom_policy)
+Service.StartLimitInterval,              config_parse_sec,                            0,                                  offsetof(Unit, start_ratelimit.interval)
+Service.StartLimitBurst,                 config_parse_unsigned,                       0,                                  offsetof(Unit, start_ratelimit.burst)
+Service.StartLimitAction,                config_parse_emergency_action,               0,                                  offsetof(Unit, start_limit_action)
+Service.FailureAction,                   config_parse_emergency_action,               0,                                  offsetof(Unit, failure_action)
+Service.RebootArgument,                  config_parse_unit_string_printf,             0,                                  offsetof(Unit, reboot_arg)
+Service.Type,                            config_parse_service_type,                   0,                                  offsetof(Service, type)
+Service.Restart,                         config_parse_service_restart,                0,                                  offsetof(Service, restart)
+Service.PermissionsStartOnly,            config_parse_bool,                           0,                                  offsetof(Service, permissions_start_only)
+Service.RootDirectoryStartOnly,          config_parse_bool,                           0,                                  offsetof(Service, root_directory_start_only)
+Service.RemainAfterExit,                 config_parse_bool,                           0,                                  offsetof(Service, remain_after_exit)
+Service.GuessMainPID,                    config_parse_bool,                           0,                                  offsetof(Service, guess_main_pid)
+Service.RestartPreventExitStatus,        config_parse_set_status,                     0,                                  offsetof(Service, restart_prevent_status)
+Service.RestartForceExitStatus,          config_parse_set_status,                     0,                                  offsetof(Service, restart_force_status)
+Service.SuccessExitStatus,               config_parse_set_status,                     0,                                  offsetof(Service, success_status)
+Service.SysVStartPriority,               config_parse_warn_compat,                    DISABLED_LEGACY,                    0
+Service.NonBlocking,                     config_parse_bool,                           0,                                  offsetof(Service, exec_context.non_blocking)
+Service.BusName,                         config_parse_bus_name,                       0,                                  offsetof(Service, bus_name)
+Service.FileDescriptorStoreMax,          config_parse_unsigned,                       0,                                  offsetof(Service, n_fd_store_max)
+Service.NotifyAccess,                    config_parse_notify_access,                  0,                                  offsetof(Service, notify_access)
+Service.Sockets,                         config_parse_service_sockets,                0,                                  0
+Service.BusPolicy,                       config_parse_warn_compat,                    DISABLED_LEGACY,                    0
+Service.USBFunctionDescriptors,          config_parse_unit_path_printf,               0,                                  offsetof(Service, usb_function_descriptors)
+Service.USBFunctionStrings,              config_parse_unit_path_printf,               0,                                  offsetof(Service, usb_function_strings)
+Service.OOMPolicy,                       config_parse_oom_policy,                     0,                                  offsetof(Service, oom_policy)
 EXEC_CONTEXT_CONFIG_ITEMS(Service)m4_dnl
 CGROUP_CONTEXT_CONFIG_ITEMS(Service)m4_dnl
 KILL_CONTEXT_CONFIG_ITEMS(Service)m4_dnl
 m4_dnl
-Socket.ListenStream,             config_parse_socket_listen,         SOCKET_SOCKET,                 0
-Socket.ListenDatagram,           config_parse_socket_listen,         SOCKET_SOCKET,                 0
-Socket.ListenSequentialPacket,   config_parse_socket_listen,         SOCKET_SOCKET,                 0
-Socket.ListenFIFO,               config_parse_socket_listen,         SOCKET_FIFO,                   0
-Socket.ListenNetlink,            config_parse_socket_listen,         SOCKET_SOCKET,                 0
-Socket.ListenSpecial,            config_parse_socket_listen,         SOCKET_SPECIAL,                0
-Socket.ListenMessageQueue,       config_parse_socket_listen,         SOCKET_MQUEUE,                 0
-Socket.ListenUSBFunction,        config_parse_socket_listen,         SOCKET_USB_FUNCTION,           0
-Socket.SocketProtocol,           config_parse_socket_protocol,       0,                             offsetof(Socket, socket_protocol)
-Socket.BindIPv6Only,             config_parse_socket_bind,           0,                             offsetof(Socket, bind_ipv6_only)
-Socket.Backlog,                  config_parse_unsigned,              0,                             offsetof(Socket, backlog)
-Socket.BindToDevice,             config_parse_socket_bindtodevice,   0,                             0
-Socket.ExecStartPre,             config_parse_exec,                  SOCKET_EXEC_START_PRE,         offsetof(Socket, exec_command)
-Socket.ExecStartPost,            config_parse_exec,                  SOCKET_EXEC_START_POST,        offsetof(Socket, exec_command)
-Socket.ExecStopPre,              config_parse_exec,                  SOCKET_EXEC_STOP_PRE,          offsetof(Socket, exec_command)
-Socket.ExecStopPost,             config_parse_exec,                  SOCKET_EXEC_STOP_POST,         offsetof(Socket, exec_command)
-Socket.TimeoutSec,               config_parse_sec_fix_0,             0,                             offsetof(Socket, timeout_usec)
-Socket.SocketUser,               config_parse_user_group_compat,     0,                             offsetof(Socket, user)
-Socket.SocketGroup,              config_parse_user_group_compat,     0,                             offsetof(Socket, group)
-Socket.SocketMode,               config_parse_mode,                  0,                             offsetof(Socket, socket_mode)
-Socket.DirectoryMode,            config_parse_mode,                  0,                             offsetof(Socket, directory_mode)
-Socket.Accept,                   config_parse_bool,                  0,                             offsetof(Socket, accept)
-Socket.FlushPending,             config_parse_bool,                  0,                             offsetof(Socket, flush_pending)
-Socket.Writable,                 config_parse_bool,                  0,                             offsetof(Socket, writable)
-Socket.MaxConnections,           config_parse_unsigned,              0,                             offsetof(Socket, max_connections)
-Socket.MaxConnectionsPerSource,  config_parse_unsigned,              0,                             offsetof(Socket, max_connections_per_source)
-Socket.KeepAlive,                config_parse_bool,                  0,                             offsetof(Socket, keep_alive)
-Socket.KeepAliveTimeSec,         config_parse_sec,                   0,                             offsetof(Socket, keep_alive_time)
-Socket.KeepAliveIntervalSec,     config_parse_sec,                   0,                             offsetof(Socket, keep_alive_interval)
-Socket.KeepAliveProbes,          config_parse_unsigned,              0,                             offsetof(Socket, keep_alive_cnt)
-Socket.DeferAcceptSec,           config_parse_sec,                   0,                             offsetof(Socket, defer_accept)
-Socket.NoDelay,                  config_parse_bool,                  0,                             offsetof(Socket, no_delay)
-Socket.Priority,                 config_parse_int,                   0,                             offsetof(Socket, priority)
-Socket.ReceiveBuffer,            config_parse_iec_size,              0,                             offsetof(Socket, receive_buffer)
-Socket.SendBuffer,               config_parse_iec_size,              0,                             offsetof(Socket, send_buffer)
-Socket.IPTOS,                    config_parse_ip_tos,                0,                             offsetof(Socket, ip_tos)
-Socket.IPTTL,                    config_parse_int,                   0,                             offsetof(Socket, ip_ttl)
-Socket.Mark,                     config_parse_int,                   0,                             offsetof(Socket, mark)
-Socket.PipeSize,                 config_parse_iec_size,              0,                             offsetof(Socket, pipe_size)
-Socket.FreeBind,                 config_parse_bool,                  0,                             offsetof(Socket, free_bind)
-Socket.Transparent,              config_parse_bool,                  0,                             offsetof(Socket, transparent)
-Socket.Broadcast,                config_parse_bool,                  0,                             offsetof(Socket, broadcast)
-Socket.PassCredentials,          config_parse_bool,                  0,                             offsetof(Socket, pass_cred)
-Socket.PassSecurity,             config_parse_bool,                  0,                             offsetof(Socket, pass_sec)
-Socket.PassPacketInfo,           config_parse_bool,                  0,                             offsetof(Socket, pass_pktinfo)
-Socket.TCPCongestion,            config_parse_string,                0,                             offsetof(Socket, tcp_congestion)
-Socket.ReusePort,                config_parse_bool,                  0,                             offsetof(Socket, reuse_port)
-Socket.MessageQueueMaxMessages,  config_parse_long,                  0,                             offsetof(Socket, mq_maxmsg)
-Socket.MessageQueueMessageSize,  config_parse_long,                  0,                             offsetof(Socket, mq_msgsize)
-Socket.RemoveOnStop,             config_parse_bool,                  0,                             offsetof(Socket, remove_on_stop)
-Socket.Symlinks,                 config_parse_unit_path_strv_printf, 0,                             offsetof(Socket, symlinks)
-Socket.FileDescriptorName,       config_parse_fdname,                0,                             0
-Socket.Service,                  config_parse_socket_service,        0,                             0
-Socket.TriggerLimitIntervalSec,  config_parse_sec,                   0,                             offsetof(Socket, trigger_limit.interval)
-Socket.TriggerLimitBurst,        config_parse_unsigned,              0,                             offsetof(Socket, trigger_limit.burst)
+Socket.ListenStream,                     config_parse_socket_listen,                  SOCKET_SOCKET,                      0
+Socket.ListenDatagram,                   config_parse_socket_listen,                  SOCKET_SOCKET,                      0
+Socket.ListenSequentialPacket,           config_parse_socket_listen,                  SOCKET_SOCKET,                      0
+Socket.ListenFIFO,                       config_parse_socket_listen,                  SOCKET_FIFO,                        0
+Socket.ListenNetlink,                    config_parse_socket_listen,                  SOCKET_SOCKET,                      0
+Socket.ListenSpecial,                    config_parse_socket_listen,                  SOCKET_SPECIAL,                     0
+Socket.ListenMessageQueue,               config_parse_socket_listen,                  SOCKET_MQUEUE,                      0
+Socket.ListenUSBFunction,                config_parse_socket_listen,                  SOCKET_USB_FUNCTION,                0
+Socket.SocketProtocol,                   config_parse_socket_protocol,                0,                                  offsetof(Socket, socket_protocol)
+Socket.BindIPv6Only,                     config_parse_socket_bind,                    0,                                  offsetof(Socket, bind_ipv6_only)
+Socket.Backlog,                          config_parse_unsigned,                       0,                                  offsetof(Socket, backlog)
+Socket.BindToDevice,                     config_parse_socket_bindtodevice,            0,                                  0
+Socket.ExecStartPre,                     config_parse_exec,                           SOCKET_EXEC_START_PRE,              offsetof(Socket, exec_command)
+Socket.ExecStartPost,                    config_parse_exec,                           SOCKET_EXEC_START_POST,             offsetof(Socket, exec_command)
+Socket.ExecStopPre,                      config_parse_exec,                           SOCKET_EXEC_STOP_PRE,               offsetof(Socket, exec_command)
+Socket.ExecStopPost,                     config_parse_exec,                           SOCKET_EXEC_STOP_POST,              offsetof(Socket, exec_command)
+Socket.TimeoutSec,                       config_parse_sec_fix_0,                      0,                                  offsetof(Socket, timeout_usec)
+Socket.SocketUser,                       config_parse_user_group_compat,              0,                                  offsetof(Socket, user)
+Socket.SocketGroup,                      config_parse_user_group_compat,              0,                                  offsetof(Socket, group)
+Socket.SocketMode,                       config_parse_mode,                           0,                                  offsetof(Socket, socket_mode)
+Socket.DirectoryMode,                    config_parse_mode,                           0,                                  offsetof(Socket, directory_mode)
+Socket.Accept,                           config_parse_bool,                           0,                                  offsetof(Socket, accept)
+Socket.FlushPending,                     config_parse_bool,                           0,                                  offsetof(Socket, flush_pending)
+Socket.Writable,                         config_parse_bool,                           0,                                  offsetof(Socket, writable)
+Socket.MaxConnections,                   config_parse_unsigned,                       0,                                  offsetof(Socket, max_connections)
+Socket.MaxConnectionsPerSource,          config_parse_unsigned,                       0,                                  offsetof(Socket, max_connections_per_source)
+Socket.KeepAlive,                        config_parse_bool,                           0,                                  offsetof(Socket, keep_alive)
+Socket.KeepAliveTimeSec,                 config_parse_sec,                            0,                                  offsetof(Socket, keep_alive_time)
+Socket.KeepAliveIntervalSec,             config_parse_sec,                            0,                                  offsetof(Socket, keep_alive_interval)
+Socket.KeepAliveProbes,                  config_parse_unsigned,                       0,                                  offsetof(Socket, keep_alive_cnt)
+Socket.DeferAcceptSec,                   config_parse_sec,                            0,                                  offsetof(Socket, defer_accept)
+Socket.NoDelay,                          config_parse_bool,                           0,                                  offsetof(Socket, no_delay)
+Socket.Priority,                         config_parse_int,                            0,                                  offsetof(Socket, priority)
+Socket.ReceiveBuffer,                    config_parse_iec_size,                       0,                                  offsetof(Socket, receive_buffer)
+Socket.SendBuffer,                       config_parse_iec_size,                       0,                                  offsetof(Socket, send_buffer)
+Socket.IPTOS,                            config_parse_ip_tos,                         0,                                  offsetof(Socket, ip_tos)
+Socket.IPTTL,                            config_parse_int,                            0,                                  offsetof(Socket, ip_ttl)
+Socket.Mark,                             config_parse_int,                            0,                                  offsetof(Socket, mark)
+Socket.PipeSize,                         config_parse_iec_size,                       0,                                  offsetof(Socket, pipe_size)
+Socket.FreeBind,                         config_parse_bool,                           0,                                  offsetof(Socket, free_bind)
+Socket.Transparent,                      config_parse_bool,                           0,                                  offsetof(Socket, transparent)
+Socket.Broadcast,                        config_parse_bool,                           0,                                  offsetof(Socket, broadcast)
+Socket.PassCredentials,                  config_parse_bool,                           0,                                  offsetof(Socket, pass_cred)
+Socket.PassSecurity,                     config_parse_bool,                           0,                                  offsetof(Socket, pass_sec)
+Socket.PassPacketInfo,                   config_parse_bool,                           0,                                  offsetof(Socket, pass_pktinfo)
+Socket.Timestamping,                     config_parse_socket_timestamping,            0,                                  offsetof(Socket, timestamping)
+Socket.TCPCongestion,                    config_parse_string,                         0,                                  offsetof(Socket, tcp_congestion)
+Socket.ReusePort,                        config_parse_bool,                           0,                                  offsetof(Socket, reuse_port)
+Socket.MessageQueueMaxMessages,          config_parse_long,                           0,                                  offsetof(Socket, mq_maxmsg)
+Socket.MessageQueueMessageSize,          config_parse_long,                           0,                                  offsetof(Socket, mq_msgsize)
+Socket.RemoveOnStop,                     config_parse_bool,                           0,                                  offsetof(Socket, remove_on_stop)
+Socket.Symlinks,                         config_parse_unit_path_strv_printf,          0,                                  offsetof(Socket, symlinks)
+Socket.FileDescriptorName,               config_parse_fdname,                         0,                                  0
+Socket.Service,                          config_parse_socket_service,                 0,                                  0
+Socket.TriggerLimitIntervalSec,          config_parse_sec,                            0,                                  offsetof(Socket, trigger_limit.interval)
+Socket.TriggerLimitBurst,                config_parse_unsigned,                       0,                                  offsetof(Socket, trigger_limit.burst)
 m4_ifdef(`ENABLE_SMACK',
-`Socket.SmackLabel,              config_parse_unit_string_printf,    0,                             offsetof(Socket, smack)
-Socket.SmackLabelIPIn,           config_parse_unit_string_printf,    0,                             offsetof(Socket, smack_ip_in)
-Socket.SmackLabelIPOut,          config_parse_unit_string_printf,    0,                             offsetof(Socket, smack_ip_out)',
-`Socket.SmackLabel,              config_parse_warn_compat,           DISABLED_CONFIGURATION,        0
-Socket.SmackLabelIPIn,           config_parse_warn_compat,           DISABLED_CONFIGURATION,        0
-Socket.SmackLabelIPOut,          config_parse_warn_compat,           DISABLED_CONFIGURATION,        0')
+`Socket.SmackLabel,                      config_parse_unit_string_printf,             0,                                  offsetof(Socket, smack)
+Socket.SmackLabelIPIn,                   config_parse_unit_string_printf,             0,                                  offsetof(Socket, smack_ip_in)
+Socket.SmackLabelIPOut,                  config_parse_unit_string_printf,             0,                                  offsetof(Socket, smack_ip_out)',
+`Socket.SmackLabel,                      config_parse_warn_compat,                    DISABLED_CONFIGURATION,             0
+Socket.SmackLabelIPIn,                   config_parse_warn_compat,                    DISABLED_CONFIGURATION,             0
+Socket.SmackLabelIPOut,                  config_parse_warn_compat,                    DISABLED_CONFIGURATION,             0')
 m4_ifdef(`HAVE_SELINUX',
-`Socket.SELinuxContextFromNet,   config_parse_bool,                  0,                             offsetof(Socket, selinux_context_from_net)',
-`Socket.SELinuxContextFromNet,   config_parse_warn_compat,           DISABLED_CONFIGURATION,        0')
+`Socket.SELinuxContextFromNet,           config_parse_bool,                           0,                                  offsetof(Socket, selinux_context_from_net)',
+`Socket.SELinuxContextFromNet,           config_parse_warn_compat,                    DISABLED_CONFIGURATION,             0')
 EXEC_CONTEXT_CONFIG_ITEMS(Socket)m4_dnl
 CGROUP_CONTEXT_CONFIG_ITEMS(Socket)m4_dnl
 KILL_CONTEXT_CONFIG_ITEMS(Socket)m4_dnl
 m4_dnl
-Mount.What,                      config_parse_unit_string_printf,    0,                             offsetof(Mount, parameters_fragment.what)
-Mount.Where,                     config_parse_unit_path_printf,      0,                             offsetof(Mount, where)
-Mount.Options,                   config_parse_unit_string_printf,    0,                             offsetof(Mount, parameters_fragment.options)
-Mount.Type,                      config_parse_unit_string_printf,    0,                             offsetof(Mount, parameters_fragment.fstype)
-Mount.TimeoutSec,                config_parse_sec_fix_0,             0,                             offsetof(Mount, timeout_usec)
-Mount.DirectoryMode,             config_parse_mode,                  0,                             offsetof(Mount, directory_mode)
-Mount.SloppyOptions,             config_parse_bool,                  0,                             offsetof(Mount, sloppy_options)
-Mount.LazyUnmount,               config_parse_bool,                  0,                             offsetof(Mount, lazy_unmount)
-Mount.ForceUnmount,              config_parse_bool,                  0,                             offsetof(Mount, force_unmount)
-Mount.ReadWriteOnly,             config_parse_bool,                  0,                             offsetof(Mount, read_write_only)
+Mount.What,                              config_parse_unit_string_printf,             0,                                  offsetof(Mount, parameters_fragment.what)
+Mount.Where,                             config_parse_unit_path_printf,               0,                                  offsetof(Mount, where)
+Mount.Options,                           config_parse_unit_string_printf,             0,                                  offsetof(Mount, parameters_fragment.options)
+Mount.Type,                              config_parse_unit_string_printf,             0,                                  offsetof(Mount, parameters_fragment.fstype)
+Mount.TimeoutSec,                        config_parse_sec_fix_0,                      0,                                  offsetof(Mount, timeout_usec)
+Mount.DirectoryMode,                     config_parse_mode,                           0,                                  offsetof(Mount, directory_mode)
+Mount.SloppyOptions,                     config_parse_bool,                           0,                                  offsetof(Mount, sloppy_options)
+Mount.LazyUnmount,                       config_parse_bool,                           0,                                  offsetof(Mount, lazy_unmount)
+Mount.ForceUnmount,                      config_parse_bool,                           0,                                  offsetof(Mount, force_unmount)
+Mount.ReadWriteOnly,                     config_parse_bool,                           0,                                  offsetof(Mount, read_write_only)
 EXEC_CONTEXT_CONFIG_ITEMS(Mount)m4_dnl
 CGROUP_CONTEXT_CONFIG_ITEMS(Mount)m4_dnl
 KILL_CONTEXT_CONFIG_ITEMS(Mount)m4_dnl
 m4_dnl
-Automount.Where,                 config_parse_unit_path_printf,      0,                             offsetof(Automount, where)
-Automount.DirectoryMode,         config_parse_mode,                  0,                             offsetof(Automount, directory_mode)
-Automount.TimeoutIdleSec,        config_parse_sec_fix_0,             0,                             offsetof(Automount, timeout_idle_usec)
+Automount.Where,                         config_parse_unit_path_printf,               0,                                  offsetof(Automount, where)
+Automount.DirectoryMode,                 config_parse_mode,                           0,                                  offsetof(Automount, directory_mode)
+Automount.TimeoutIdleSec,                config_parse_sec_fix_0,                      0,                                  offsetof(Automount, timeout_idle_usec)
 m4_dnl
-Swap.What,                       config_parse_unit_path_printf,      0,                             offsetof(Swap, parameters_fragment.what)
-Swap.Priority,                   config_parse_swap_priority,         0,                             0
-Swap.Options,                    config_parse_unit_string_printf,    0,                             offsetof(Swap, parameters_fragment.options)
-Swap.TimeoutSec,                 config_parse_sec_fix_0,             0,                             offsetof(Swap, timeout_usec)
+Swap.What,                               config_parse_unit_path_printf,               0,                                  offsetof(Swap, parameters_fragment.what)
+Swap.Priority,                           config_parse_swap_priority,                  0,                                  0
+Swap.Options,                            config_parse_unit_string_printf,             0,                                  offsetof(Swap, parameters_fragment.options)
+Swap.TimeoutSec,                         config_parse_sec_fix_0,                      0,                                  offsetof(Swap, timeout_usec)
 EXEC_CONTEXT_CONFIG_ITEMS(Swap)m4_dnl
 CGROUP_CONTEXT_CONFIG_ITEMS(Swap)m4_dnl
 KILL_CONTEXT_CONFIG_ITEMS(Swap)m4_dnl
 m4_dnl
-Timer.OnCalendar,                config_parse_timer,                 TIMER_CALENDAR,                0
-Timer.OnActiveSec,               config_parse_timer,                 TIMER_ACTIVE,                  0
-Timer.OnBootSec,                 config_parse_timer,                 TIMER_BOOT,                    0
-Timer.OnStartupSec,              config_parse_timer,                 TIMER_STARTUP,                 0
-Timer.OnUnitActiveSec,           config_parse_timer,                 TIMER_UNIT_ACTIVE,             0
-Timer.OnUnitInactiveSec,         config_parse_timer,                 TIMER_UNIT_INACTIVE,           0
-Timer.OnClockChange,             config_parse_bool,                  0,                             offsetof(Timer, on_clock_change)
-Timer.OnTimezoneChange,          config_parse_bool,                  0,                             offsetof(Timer, on_timezone_change)
-Timer.Persistent,                config_parse_bool,                  0,                             offsetof(Timer, persistent)
-Timer.WakeSystem,                config_parse_bool,                  0,                             offsetof(Timer, wake_system)
-Timer.RemainAfterElapse,         config_parse_bool,                  0,                             offsetof(Timer, remain_after_elapse)
-Timer.AccuracySec,               config_parse_sec,                   0,                             offsetof(Timer, accuracy_usec)
-Timer.RandomizedDelaySec,        config_parse_sec,                   0,                             offsetof(Timer, random_usec)
-Timer.Unit,                      config_parse_trigger_unit,          0,                             0
+Timer.OnCalendar,                        config_parse_timer,                          TIMER_CALENDAR,                     0
+Timer.OnActiveSec,                       config_parse_timer,                          TIMER_ACTIVE,                       0
+Timer.OnBootSec,                         config_parse_timer,                          TIMER_BOOT,                         0
+Timer.OnStartupSec,                      config_parse_timer,                          TIMER_STARTUP,                      0
+Timer.OnUnitActiveSec,                   config_parse_timer,                          TIMER_UNIT_ACTIVE,                  0
+Timer.OnUnitInactiveSec,                 config_parse_timer,                          TIMER_UNIT_INACTIVE,                0
+Timer.OnClockChange,                     config_parse_bool,                           0,                                  offsetof(Timer, on_clock_change)
+Timer.OnTimezoneChange,                  config_parse_bool,                           0,                                  offsetof(Timer, on_timezone_change)
+Timer.Persistent,                        config_parse_bool,                           0,                                  offsetof(Timer, persistent)
+Timer.WakeSystem,                        config_parse_bool,                           0,                                  offsetof(Timer, wake_system)
+Timer.RemainAfterElapse,                 config_parse_bool,                           0,                                  offsetof(Timer, remain_after_elapse)
+Timer.FixedRandomDelay,                  config_parse_bool,                           0,                                  offsetof(Timer, fixed_random_delay)
+Timer.AccuracySec,                       config_parse_sec,                            0,                                  offsetof(Timer, accuracy_usec)
+Timer.RandomizedDelaySec,                config_parse_sec,                            0,                                  offsetof(Timer, random_usec)
+Timer.Unit,                              config_parse_trigger_unit,                   0,                                  0
 m4_dnl
-Path.PathExists,                 config_parse_path_spec,             0,                             0
-Path.PathExistsGlob,             config_parse_path_spec,             0,                             0
-Path.PathChanged,                config_parse_path_spec,             0,                             0
-Path.PathModified,               config_parse_path_spec,             0,                             0
-Path.DirectoryNotEmpty,          config_parse_path_spec,             0,                             0
-Path.Unit,                       config_parse_trigger_unit,          0,                             0
-Path.MakeDirectory,              config_parse_bool,                  0,                             offsetof(Path, make_directory)
-Path.DirectoryMode,              config_parse_mode,                  0,                             offsetof(Path, directory_mode)
+Path.PathExists,                         config_parse_path_spec,                      0,                                  0
+Path.PathExistsGlob,                     config_parse_path_spec,                      0,                                  0
+Path.PathChanged,                        config_parse_path_spec,                      0,                                  0
+Path.PathModified,                       config_parse_path_spec,                      0,                                  0
+Path.DirectoryNotEmpty,                  config_parse_path_spec,                      0,                                  0
+Path.Unit,                               config_parse_trigger_unit,                   0,                                  0
+Path.MakeDirectory,                      config_parse_bool,                           0,                                  offsetof(Path, make_directory)
+Path.DirectoryMode,                      config_parse_mode,                           0,                                  offsetof(Path, directory_mode)
 m4_dnl
 CGROUP_CONTEXT_CONFIG_ITEMS(Slice)m4_dnl
 m4_dnl
 CGROUP_CONTEXT_CONFIG_ITEMS(Scope)m4_dnl
 KILL_CONTEXT_CONFIG_ITEMS(Scope)m4_dnl
-Scope.RuntimeMaxSec,             config_parse_sec,                   0,                             offsetof(Scope, runtime_max_usec)
-Scope.TimeoutStopSec,            config_parse_sec,                   0,                             offsetof(Scope, timeout_stop_usec)
+Scope.RuntimeMaxSec,                     config_parse_sec,                            0,                                  offsetof(Scope, runtime_max_usec)
+Scope.TimeoutStopSec,                    config_parse_sec,                            0,                                  offsetof(Scope, timeout_stop_usec)
 m4_dnl The [Install] section is ignored here.
-Install.Alias,                   NULL,                               0,                             0
-Install.WantedBy,                NULL,                               0,                             0
-Install.RequiredBy,              NULL,                               0,                             0
-Install.Also,                    NULL,                               0,                             0
-Install.DefaultInstance,         NULL,                               0,                             0
+Install.Alias,                           NULL,                                        0,                                  0
+Install.WantedBy,                        NULL,                                        0,                                  0
+Install.RequiredBy,                      NULL,                                        0,                                  0
+Install.Also,                            NULL,                                        0,                                  0
+Install.DefaultInstance,                 NULL,                                        0,                                  0
index df4011917582cd4a24ea349b7315a301c81181c9..ffc58dde9cd92aa8be1d5b5220fa6c8f0f0ef385 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2012 Holger Hans Peter Freyther
 ***/
@@ -26,6 +26,7 @@
 #include "capability-util.h"
 #include "cgroup-setup.h"
 #include "conf-parser.h"
+#include "core-varlink.h"
 #include "cpu-set-util.h"
 #include "env-util.h"
 #include "errno-list.h"
@@ -139,6 +140,7 @@ DEFINE_CONFIG_PARSE_PTR(config_parse_cpu_shares, cg_cpu_shares_parse, uint64_t,
 DEFINE_CONFIG_PARSE_PTR(config_parse_exec_mount_flags, mount_propagation_flags_from_string, unsigned long, "Failed to parse mount flag");
 DEFINE_CONFIG_PARSE_ENUM_WITH_DEFAULT(config_parse_numa_policy, mpol, int, -1, "Invalid NUMA policy type");
 DEFINE_CONFIG_PARSE_ENUM(config_parse_status_unit_format, status_unit_format, StatusUnitFormat, "Failed to parse status unit format");
+DEFINE_CONFIG_PARSE_ENUM_FULL(config_parse_socket_timestamping, socket_timestamping_from_string_harder, SocketTimestamping, "Failed to parse timestamping precision");
 
 int config_parse_unit_deps(
                 const char *unit,
@@ -3812,6 +3814,76 @@ int config_parse_delegate(
         return 0;
 }
 
+int config_parse_managed_oom_mode(
+                const char *unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
+        ManagedOOMMode *mode = data, m;
+        UnitType t;
+
+        t = unit_name_to_type(unit);
+        assert(t != _UNIT_TYPE_INVALID);
+
+        if (!unit_vtable[t]->can_set_managed_oom)
+                return log_syntax(unit, LOG_WARNING, filename, line, 0, "%s= is not supported for this unit type, ignoring.", lvalue);
+
+        if (isempty(rvalue)) {
+                *mode = MANAGED_OOM_AUTO;
+                return 0;
+        }
+
+        m = managed_oom_mode_from_string(rvalue);
+        if (m < 0) {
+                log_syntax(unit, LOG_WARNING, filename, line, 0, "Invalid syntax, ignoring: %s", rvalue);
+                return 0;
+        }
+        *mode = m;
+        return 0;
+}
+
+int config_parse_managed_oom_mem_pressure_limit(
+                const char *unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
+        int *limit = data;
+        UnitType t;
+        int r;
+
+        t = unit_name_to_type(unit);
+        assert(t != _UNIT_TYPE_INVALID);
+
+        if (!unit_vtable[t]->can_set_managed_oom)
+                return log_syntax(unit, LOG_WARNING, filename, line, 0, "%s= is not supported for this unit type, ignoring.", lvalue);
+
+        if (isempty(rvalue)) {
+                *limit = 0;
+                return 0;
+        }
+
+        r = parse_percent(rvalue);
+        if (r < 0) {
+                log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse limit percent value, ignoring: %s", rvalue);
+                return 0;
+        }
+
+        *limit = r;
+        return 0;
+}
+
 int config_parse_device_allow(
                 const char *unit,
                 const char *filename,
@@ -5574,9 +5646,7 @@ void unit_dump_config_items(FILE *f) {
         NULSTR_FOREACH(i, load_fragment_gperf_nulstr) {
                 const char *rvalue = "OTHER", *lvalue;
                 const ConfigPerfItem *p;
-                size_t prefix_len;
                 const char *dot;
-                unsigned j;
 
                 assert_se(p = load_fragment_gperf_lookup(i, strlen(i)));
 
@@ -5585,7 +5655,7 @@ void unit_dump_config_items(FILE *f) {
                     p->ltype == DISABLED_LEGACY)
                         continue;
 
-                for (j = 0; j < ELEMENTSOF(table); j++)
+                for (size_t j = 0; j < ELEMENTSOF(table); j++)
                         if (p->parse == table[j].callback) {
                                 rvalue = table[j].rvalue;
                                 break;
@@ -5593,15 +5663,17 @@ void unit_dump_config_items(FILE *f) {
 
                 dot = strchr(i, '.');
                 lvalue = dot ? dot + 1 : i;
-                prefix_len = dot-i;
 
-                if (dot)
+                if (dot) {
+                        size_t prefix_len = dot - i;
+
                         if (!prev || !strneq(prev, i, prefix_len+1)) {
                                 if (prev)
                                         fputc('\n', f);
 
                                 fprintf(f, "[%.*s]\n", (int) prefix_len, i);
                         }
+                }
 
                 fprintf(f, "%s=%s\n", lvalue, rvalue);
                 prev = i;
index d67852a74d0fb8ac7dec9cf90e9ecd4ed2bc2707..6b2175cd2afe45d010430b2bed643cbef368e215 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "conf-parser.h"
@@ -76,6 +76,8 @@ CONFIG_PARSER_PROTOTYPE(config_parse_cpu_shares);
 CONFIG_PARSER_PROTOTYPE(config_parse_memory_limit);
 CONFIG_PARSER_PROTOTYPE(config_parse_tasks_max);
 CONFIG_PARSER_PROTOTYPE(config_parse_delegate);
+CONFIG_PARSER_PROTOTYPE(config_parse_managed_oom_mode);
+CONFIG_PARSER_PROTOTYPE(config_parse_managed_oom_mem_pressure_limit);
 CONFIG_PARSER_PROTOTYPE(config_parse_device_policy);
 CONFIG_PARSER_PROTOTYPE(config_parse_device_allow);
 CONFIG_PARSER_PROTOTYPE(config_parse_io_device_latency);
@@ -134,6 +136,7 @@ CONFIG_PARSER_PROTOTYPE(config_parse_crash_chvt);
 CONFIG_PARSER_PROTOTYPE(config_parse_timeout_abort);
 CONFIG_PARSER_PROTOTYPE(config_parse_swap_priority);
 CONFIG_PARSER_PROTOTYPE(config_parse_mount_images);
+CONFIG_PARSER_PROTOTYPE(config_parse_socket_timestamping);
 
 /* gperf prototypes */
 const struct ConfigPerfItem* load_fragment_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
index 33728b0ff28c1d62a2ab96bf56998406ba7b6bbd..64761ddb118127c80a6a5e80e467264fb1499d6e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdlib.h>
index 01fadd06c73575af18165194784ce23716ce42aa..d554ad30606cc0a20c5a1a08cc622fb8dc710ace 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int locale_setup(char ***environment);
index 27d5a11d7843cbfe101d107505605fc07bfbf1c0..76022ce423a90a0fedc456da863f43c2525daac5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 #include <stdlib.h>
index c0eea100ede8c4283131e6b9c5f3f3678eab127e..a7ee2dadb031c5b88a8ebcb4702a486e4bc98f5d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int loopback_setup(void);
index 6aecd36fe6c087802602527a4388b70f4a310fe3..6d15f9cd09cf7647e0195e73122b14533b745453 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sched.h>
@@ -11,6 +11,7 @@
 #include "fd-util.h"
 #include "fs-util.h"
 #include "id128-util.h"
+#include "io-util.h"
 #include "log.h"
 #include "machine-id-setup.h"
 #include "macro.h"
@@ -86,7 +87,7 @@ static int generate_machine_id(const char *root, sd_id128_t *ret) {
         return 0;
 }
 
-int machine_id_setup(const char *root, sd_id128_t machine_id, sd_id128_t *ret) {
+int machine_id_setup(const char *root, bool force_transient, sd_id128_t machine_id, sd_id128_t *ret) {
         const char *etc_machine_id, *run_machine_id;
         _cleanup_close_ int fd = -1;
         bool writable;
@@ -143,13 +144,31 @@ int machine_id_setup(const char *root, sd_id128_t machine_id, sd_id128_t *ret) {
                 if (ftruncate(fd, 0) < 0)
                         return log_error_errno(errno, "Failed to truncate %s: %m", etc_machine_id);
 
-                if (id128_write_fd(fd, ID128_PLAIN, machine_id, true) >= 0)
-                        goto finish;
+                /* If the caller requested a transient machine-id, write the string "uninitialized\n" to
+                 * disk and overmount it with a transient file.
+                 *
+                 * Otherwise write the machine-id directly to disk. */
+                if (force_transient) {
+                        r = loop_write(fd, "uninitialized\n", strlen("uninitialized\n"), false);
+                        if (r < 0)
+                                return log_error_errno(r, "Failed to write uninitialized %s: %m", etc_machine_id);
+
+                        r = fsync_full(fd);
+                        if (r < 0)
+                                return log_error_errno(r, "Failed to sync %s: %m", etc_machine_id);
+                } else {
+                        r = id128_write_fd(fd, ID128_PLAIN, machine_id, true);
+                        if (r < 0)
+                                return log_error_errno(r, "Failed to write %s: %m", etc_machine_id);
+                        else
+                                goto finish;
+                }
         }
 
         fd = safe_close(fd);
 
-        /* Hmm, we couldn't write it? So let's write it to /run/machine-id as a replacement */
+        /* Hmm, we couldn't or shouldn't write the machine-id to /etc?
+         * So let's write it to /run/machine-id as a replacement */
 
         run_machine_id = prefix_roota(root, "/run/machine-id");
 
@@ -167,7 +186,7 @@ int machine_id_setup(const char *root, sd_id128_t machine_id, sd_id128_t *ret) {
                 return r;
         }
 
-        log_info("Installed transient %s file.", etc_machine_id);
+        log_full(force_transient ? LOG_DEBUG : LOG_INFO, "Installed transient %s file.", etc_machine_id);
 
         /* Mark the mount read-only */
         r = mount_follow_verbose(LOG_WARNING, NULL, etc_machine_id, NULL, MS_BIND|MS_RDONLY|MS_REMOUNT, NULL);
@@ -183,10 +202,22 @@ finish:
 
 int machine_id_commit(const char *root) {
         _cleanup_close_ int fd = -1, initial_mntns_fd = -1;
-        const char *etc_machine_id;
+        const char *etc_machine_id, *sync_path;
         sd_id128_t id;
         int r;
 
+        /* Before doing anything, sync everything to ensure any changes by first-boot units are persisted.
+         *
+         * First, explicitly sync the file systems we care about and check if it worked. */
+        FOREACH_STRING(sync_path, "/etc/", "/var/") {
+                r = syncfs_path(AT_FDCWD, sync_path);
+                if (r < 0)
+                        return log_error_errno(r, "Cannot sync %s: %m", sync_path);
+        }
+
+        /* Afterwards, sync() the rest too, but we can't check the return value for these. */
+        sync();
+
         /* Replaces a tmpfs bind mount of /etc/machine-id by a proper file, atomically. For this, the umount is removed
          * in a mount namespace, a new file is created at the right place. Afterwards the mount is also removed in the
          * original mount namespace, thus revealing the file that was just created. */
index d6ac62a88243f3f763ccd9706a5242ee00426f84..cce58192e526a1654929c25b43b3844ecaf85353 100644 (file)
@@ -1,5 +1,7 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
+#include <stdbool.h>
+
 int machine_id_commit(const char *root);
-int machine_id_setup(const char *root, sd_id128_t requested, sd_id128_t *ret);
+int machine_id_setup(const char *root, bool force_transient, sd_id128_t requested, sd_id128_t *ret);
index 8832c4a6f40726dfe9e4bd0e5d46187ca3b9d5c4..6988500f4c990170bf63044847e2945beb2f8ba7 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- Mode: rpm-spec; indent-tabs-mode: nil -*- */
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 
index 6cd596fa79b323833271d265d8b9fc811ca6e2e9..9cb6afcd8219056acb393fd65cde89fafe036087 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -1418,9 +1418,8 @@ static int fixup_environment(void) {
                 return -errno;
 
         /* The kernels sets HOME=/ for init. Let's undo this. */
-        if (path_equal_ptr(getenv("HOME"), "/") &&
-            unsetenv("HOME") < 0)
-                log_warning_errno(errno, "Failed to unset $HOME: %m");
+        if (path_equal_ptr(getenv("HOME"), "/"))
+                assert_se(unsetenv("HOME") == 0);
 
         return 0;
 }
@@ -1988,8 +1987,9 @@ static void log_execution_mode(bool *ret_first_boot) {
         if (arg_system) {
                 int v;
 
-                log_info("systemd " GIT_VERSION " running in %ssystem mode. (" SYSTEMD_FEATURES ")",
-                         arg_action == ACTION_TEST ? "test " : "" );
+                log_info("systemd " GIT_VERSION " running in %ssystem mode. (%s)",
+                         arg_action == ACTION_TEST ? "test " : "",
+                         systemd_features);
 
                 v = detect_virtualization();
                 if (v > 0)
@@ -2001,23 +2001,35 @@ static void log_execution_mode(bool *ret_first_boot) {
                         *ret_first_boot = false;
                         log_info("Running in initial RAM disk.");
                 } else {
-                        /* Let's check whether we are in first boot, i.e. whether /etc is still unpopulated. We use
-                         * /etc/machine-id as flag file, for this: if it exists we assume /etc is populated, if it
-                         * doesn't it's unpopulated. This allows container managers and installers to provision a
-                         * couple of files already. If the container manager wants to provision the machine ID itself
-                         * it should pass $container_uuid to PID 1. */
-
-                        *ret_first_boot = access("/etc/machine-id", F_OK) < 0;
-                        if (*ret_first_boot)
-                                log_info("Running with unpopulated /etc.");
+                        int r;
+                        _cleanup_free_ char *id_text = NULL;
+
+                        /* Let's check whether we are in first boot.  We use /etc/machine-id as flag file
+                         * for this: If it is missing or contains the value "uninitialized", this is the
+                         * first boot.  In any other case, it is not.  This allows container managers and
+                         * installers to provision a couple of files already.  If the container manager
+                         * wants to provision the machine ID itself it should pass $container_uuid to PID 1. */
+
+                        r = read_one_line_file("/etc/machine-id", &id_text);
+                        if (r < 0 || streq(id_text, "uninitialized")) {
+                                if (r < 0 && r != -ENOENT)
+                                        log_warning_errno(r, "Unexpected error while reading /etc/machine-id, ignoring: %m");
+
+                                *ret_first_boot = true;
+                                log_info("Detected first boot.");
+                        } else {
+                                *ret_first_boot = false;
+                                log_debug("Detected initialized system, this is not the first boot.");
+                        }
                 }
         } else {
                 if (DEBUG_LOGGING) {
                         _cleanup_free_ char *t;
 
                         t = uid_to_name(getuid());
-                        log_debug("systemd " GIT_VERSION " running in %suser mode for user " UID_FMT "/%s. (" SYSTEMD_FEATURES ")",
-                                  arg_action == ACTION_TEST ? " test" : "", getuid(), strna(t));
+                        log_debug("systemd " GIT_VERSION " running in %suser mode for user " UID_FMT "/%s. (%s)",
+                                  arg_action == ACTION_TEST ? " test" : "",
+                                  getuid(), strna(t), systemd_features);
                 }
 
                 *ret_first_boot = false;
@@ -2026,6 +2038,7 @@ static void log_execution_mode(bool *ret_first_boot) {
 
 static int initialize_runtime(
                 bool skip_setup,
+                bool first_boot,
                 struct rlimit *saved_rlimit_nofile,
                 struct rlimit *saved_rlimit_memlock,
                 const char **ret_error_message) {
@@ -2059,7 +2072,8 @@ static int initialize_runtime(
 
                         status_welcome();
                         hostname_setup();
-                        machine_id_setup(NULL, arg_machine_id, NULL);
+                        /* Force transient machine-id on first boot. */
+                        machine_id_setup(NULL, first_boot, arg_machine_id, NULL);
                         (void) loopback_setup();
                         bump_unix_max_dgram_qlen();
                         bump_file_max_and_nr_open();
@@ -2787,6 +2801,7 @@ int main(int argc, char *argv[]) {
         log_execution_mode(&first_boot);
 
         r = initialize_runtime(skip_setup,
+                               first_boot,
                                &saved_rlimit_nofile,
                                &saved_rlimit_memlock,
                                &error_message);
index d85d938e7bab25f665bc3e4194da3b671636b2aa..1f1450b97c171b8dc31e1aca13d5cce0d6aef116 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -2578,6 +2578,11 @@ static int manager_dispatch_sigchld(sd_event_source *source, void *userdata) {
                          * We only do this for the cgroup the PID belonged to. */
                         (void) unit_check_oom(u1);
 
+                        /* This only logs for now. In the future when the interface for kills/notifications
+                         * is more stable we can extend service results table similar to how kernel oom kills
+                         * are managed. */
+                        (void) unit_check_oomd_kill(u1);
+
                         manager_invoke_sigchld_event(m, u1, &si);
                 }
                 if (u2)
@@ -2933,7 +2938,7 @@ int manager_loop(Manager *m) {
 
                 watchdog_usec = manager_get_watchdog(m, WATCHDOG_RUNTIME);
                 if (timestamp_is_set(watchdog_usec))
-                        watchdog_ping();
+                        (void) watchdog_ping();
 
                 if (!ratelimit_below(&rl)) {
                         /* Yay, something is going seriously wrong, pause a little */
@@ -3492,6 +3497,24 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
         assert(m);
         assert(f);
 
+        if (DEBUG_LOGGING) {
+                if (fdset_isempty(fds))
+                        log_debug("No file descriptors passed");
+                else {
+                        int fd;
+
+                        FDSET_FOREACH(fd, fds) {
+                                _cleanup_free_ char *fn = NULL;
+
+                                r = fd_get_path(fd, &fn);
+                                if (r < 0)
+                                        log_debug_errno(r, "Received serialized fd %i → %m", fd);
+                                else
+                                        log_debug("Received serialized fd %i → %s", fd, strna(fn));
+                        }
+                }
+        }
+
         log_debug("Deserializing state...");
 
         /* If we are not in reload mode yet, enter it now. Not that this is recursive, a caller might already have
index 9e98b31c4bd1085d55e37a5cdb1e60f2498a00bf..d22c801da8d818502921e502e3d112515540b4c8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
@@ -434,6 +434,8 @@ struct Manager {
         bool honor_device_enumeration;
 
         VarlinkServer *varlink_server;
+        /* Only systemd-oomd should be using this to subscribe to changes in ManagedOOM settings */
+        Varlink *managed_oom_varlink_request;
 };
 
 static inline usec_t manager_default_timeout_abort_usec(Manager *m) {
index 72a00f1955b1be24f70c52251db2393045d7ad30..77767eb603397b97402ae350482311a6693548c2 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 libcore_shared_sources = '''
         killall.c
@@ -192,12 +192,14 @@ in_files = [['macros.systemd',   rpmmacrosdir],
 foreach item : in_files
         file = item[0]
         dir = item[1]
+        if install_sysconfdir or dir != pkgsysconfdir
+                configure_file(
+                        input : file + '.in',
+                        output : file,
+                        configuration : substs,
+                        install_dir : dir == 'no' ? '' : dir)
+        endif
 
-        configure_file(
-                input : file + '.in',
-                output : file,
-                configuration : substs,
-                install_dir : dir == 'no' ? '' : dir)
 endforeach
 
 install_data('org.freedesktop.systemd1.conf',
@@ -217,6 +219,8 @@ meson.add_install_script('sh', '-c', mkdir_p.format(systemsleepdir))
 meson.add_install_script('sh', '-c', mkdir_p.format(systemgeneratordir))
 meson.add_install_script('sh', '-c', mkdir_p.format(usergeneratordir))
 
-meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'system')))
-meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'user')))
-meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(sysconfdir, 'xdg/systemd')))
+if install_sysconfdir
+        meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'system')))
+        meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(pkgsysconfdir, 'user')))
+        meson.add_install_script('sh', '-c', mkdir_p.format(join_paths(sysconfdir, 'xdg/systemd')))
+endif
index e1ecb448ea24ade2a1e2a3583abd3637dca51987..915b1016b8623618b6f1eba41a49519d8724c689 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <ftw.h>
@@ -112,17 +112,6 @@ static const MountPoint mount_table[] = {
           NULL,          MNT_NONE,                  },
 };
 
-/* These are API file systems that might be mounted by other software,
- * we just list them here so that we know that we should ignore them */
-
-static const char ignore_paths[] =
-        /* SELinux file systems */
-        "/sys/fs/selinux\0"
-        /* Container bind mounts */
-        "/proc/sys\0"
-        "/dev/console\0"
-        "/proc/kmsg\0";
-
 bool mount_point_is_api(const char *path) {
         unsigned i;
 
@@ -137,12 +126,26 @@ bool mount_point_is_api(const char *path) {
 }
 
 bool mount_point_ignore(const char *path) {
+
         const char *i;
 
-        NULSTR_FOREACH(i, ignore_paths)
+        /* These are API file systems that might be mounted by other software, we just list them here so that
+         * we know that we should ignore them. */
+        FOREACH_STRING(i,
+                       /* SELinux file systems */
+                       "/sys/fs/selinux",
+                       /* Container bind mounts */
+                       "/dev/console",
+                       "/proc/kmsg",
+                       "/proc/sys",
+                       "/proc/sys/kernel/random/boot_id")
                 if (path_equal(path, i))
                         return true;
 
+        if (path_startswith(path, "/run/host")) /* All mounts passed in from the container manager are
+                                                 * something we better ignore. */
+                return true;
+
         return false;
 }
 
index bccd094961152c996d38acbc7111399723eadcbc..29bd62f6bf12f6aee02d6e5bee35b1845821dc25 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index dbbb73f3d537dffed4648bfcbb244f476b0af4c5..5479cf7bf21f4dfbed808dcc992994ee5493484b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <signal.h>
@@ -412,8 +412,9 @@ static int mount_add_quota_dependencies(Mount *m) {
         return 0;
 }
 
-static bool mount_is_extrinsic(Mount *m) {
+static bool mount_is_extrinsic(Unit *u) {
         MountParameters *p;
+        Mount *m = MOUNT(u);
         assert(m);
 
         /* Returns true for all units that are "magic" and should be excluded from the usual
@@ -422,10 +423,7 @@ static bool mount_is_extrinsic(Mount *m) {
          * ourselves but it's fine if the user operates on them with us. */
 
         /* We only automatically manage mounts if we are in system mode */
-        if (!MANAGER_IS_SYSTEM(UNIT(m)->manager))
-                return true;
-
-        if (UNIT(m)->perpetual) /* All perpetual units never change state */
+        if (MANAGER_IS_USER(u->manager))
                 return true;
 
         p = get_mount_parameters(m);
@@ -493,7 +491,7 @@ static int mount_add_default_dependencies(Mount *m) {
          * guaranteed to stay mounted the whole time, since our system is on it.  Also, don't
          * bother with anything mounted below virtual file systems, it's also going to be virtual,
          * and hence not worth the effort. */
-        if (mount_is_extrinsic(m))
+        if (mount_is_extrinsic(UNIT(m)))
                 return 0;
 
         p = get_mount_parameters(m);
@@ -551,25 +549,19 @@ static int mount_verify(Mount *m) {
         if (r < 0)
                 return log_unit_error_errno(UNIT(m), r, "Failed to generate unit name from mount path: %m");
 
-        if (!unit_has_name(UNIT(m), e)) {
-                log_unit_error(UNIT(m), "Where= setting doesn't match unit name. Refusing.");
-                return -ENOEXEC;
-        }
+        if (!unit_has_name(UNIT(m), e))
+                return log_unit_error_errno(UNIT(m), SYNTHETIC_ERRNO(ENOEXEC), "Where= setting doesn't match unit name. Refusing.");
 
-        if (mount_point_is_api(m->where) || mount_point_ignore(m->where)) {
-                log_unit_error(UNIT(m), "Cannot create mount unit for API file system %s. Refusing.", m->where);
-                return -ENOEXEC;
-        }
+        if (mount_point_is_api(m->where) || mount_point_ignore(m->where))
+                return log_unit_error_errno(UNIT(m), SYNTHETIC_ERRNO(ENOEXEC), "Cannot create mount unit for API file system %s. Refusing.", m->where);
 
         p = get_mount_parameters_fragment(m);
         if (p && !p->what && !UNIT(m)->perpetual)
                 return log_unit_error_errno(UNIT(m), SYNTHETIC_ERRNO(ENOEXEC),
                                             "What= setting is missing. Refusing.");
 
-        if (m->exec_context.pam_name && m->kill_context.kill_mode != KILL_CONTROL_GROUP) {
-                log_unit_error(UNIT(m), "Unit has PAM enabled. Kill mode must be set to control-group'. Refusing.");
-                return -ENOEXEC;
-        }
+        if (m->exec_context.pam_name && m->kill_context.kill_mode != KILL_CONTROL_GROUP)
+                return log_unit_error_errno(UNIT(m), SYNTHETIC_ERRNO(ENOEXEC), "Unit has PAM enabled. Kill mode must be set to control-group'. Refusing.");
 
         return 0;
 }
@@ -790,7 +782,7 @@ static void mount_dump(Unit *u, FILE *f, const char *prefix) {
                 prefix, p ? strna(p->options) : "n/a",
                 prefix, yes_no(m->from_proc_self_mountinfo),
                 prefix, yes_no(m->from_fragment),
-                prefix, yes_no(mount_is_extrinsic(m)),
+                prefix, yes_no(mount_is_extrinsic(u)),
                 prefix, m->directory_mode,
                 prefix, yes_no(m->sloppy_options),
                 prefix, yes_no(m->lazy_unmount),
@@ -1146,7 +1138,7 @@ static int mount_start(Unit *u) {
                 return -EAGAIN;
 
         /* Already on it! */
-        if (m->state == MOUNT_MOUNTING)
+        if (IN_SET(m->state, MOUNT_MOUNTING, MOUNT_MOUNTING_DONE))
                 return 0;
 
         assert(IN_SET(m->state, MOUNT_DEAD, MOUNT_FAILED));
@@ -1863,6 +1855,12 @@ static void mount_enumerate(Manager *m) {
                         goto fail;
                 }
 
+                r = sd_event_source_set_ratelimit(m->mount_event_source, 1 * USEC_PER_SEC, 5);
+                if (r < 0) {
+                        log_error_errno(r, "Failed to enable rate limit for mount events: %m");
+                        goto fail;
+                }
+
                 (void) sd_event_source_set_description(m->mount_event_source, "mount-monitor-dispatch");
         }
 
@@ -1950,6 +1948,15 @@ static int mount_process_proc_self_mountinfo(Manager *m) {
                                 mount_enter_dead(mount, MOUNT_SUCCESS);
                                 break;
 
+                        case MOUNT_MOUNTING_DONE:
+                                /* The mount command may add the corresponding proc mountinfo entry and
+                                 * then remove it because of an internal error. E.g., fuse.sshfs seems
+                                 * to do that when the connection fails. See #17617. To handle such the
+                                 * case, let's once set the state back to mounting. Then, the unit can
+                                 * correctly enter the failed state later in mount_sigchld(). */
+                                mount_set_state(mount, MOUNT_MOUNTING);
+                                break;
+
                         default:
                                 break;
                         }
@@ -2161,6 +2168,7 @@ const UnitVTable mount_vtable = {
         .will_restart = unit_will_restart_default,
 
         .may_gc = mount_may_gc,
+        .is_extrinsic = mount_is_extrinsic,
 
         .sigchld_event = mount_sigchld_event,
 
index a1bc2d71a64db0ac07bb288d3ab1bdefdfedd992..ad0e0160838a65e49bffdd24838960a863cf59aa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct Mount Mount;
index 05bd4da154455ff5b2fb02a1a08479c6fffd33d6..0d30f17b9a05e1800c2401d6d7d7eddbc3f72002 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <linux/loop.h>
index 908e57c42c777df8597d3a50d515f0b338cc3bf4..da0861c4061678652e3698a25437acb06a71be3a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index 9a5912c10f3e2caccca84b83bad045bce34271b1..8b32379835d604f1e8b1c5ff4201f19231e05c77 100644 (file)
@@ -3,7 +3,7 @@
         "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   This file is part of systemd.
 
index 001408d34ae3ec13180632e68868bf70396695cc..a6d40d7e8f177e3ec77bac45ba9cb84cd125bc38 100644 (file)
@@ -3,7 +3,7 @@
         "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   This file is part of systemd.
 
index 8bd7302d6ca013b908e793ac4217e84001b2daec..082125f52e4ef6a92db87e981ff9fe6bca7ad18c 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 4f4e7100cffe0af5a197f6870bac49c3ad5b283f..b954ee1f47d30f33d84e05db5e08f792f1380bda 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sys/epoll.h>
@@ -283,10 +283,8 @@ static int path_verify(Path *p) {
         assert(p);
         assert(UNIT(p)->load_state == UNIT_LOADED);
 
-        if (!p->specs) {
-                log_unit_error(UNIT(p), "Path unit lacks path setting. Refusing.");
-                return -ENOEXEC;
-        }
+        if (!p->specs)
+                return log_unit_error_errno(UNIT(p), SYNTHETIC_ERRNO(ENOEXEC), "Path unit lacks path setting. Refusing.");
 
         return 0;
 }
index 4043650fe0497d76b89d93615c55b342b8385f01..fb33b12ab1ddc155c9b8fe33a68fd361d86d9445 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct Path Path;
index 42c51b08651641664183950ea874c110dbc1139c..a247da206ffa95e76ea7c04649ef12a009d1dd74 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <unistd.h>
@@ -8,6 +8,7 @@
 #include "dbus-unit.h"
 #include "load-dropin.h"
 #include "log.h"
+#include "process-util.h"
 #include "scope.h"
 #include "serialize.h"
 #include "special.h"
@@ -130,10 +131,8 @@ static int scope_verify(Scope *s) {
 
         if (set_isempty(UNIT(s)->pids) &&
             !MANAGER_IS_RELOADING(UNIT(s)->manager) &&
-            !unit_has_name(UNIT(s), SPECIAL_INIT_SCOPE)) {
-                log_unit_error(UNIT(s), "Scope has no PIDs. Refusing.");
-                return -ENOENT;
-        }
+            !unit_has_name(UNIT(s), SPECIAL_INIT_SCOPE))
+                return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOENT), "Scope has no PIDs. Refusing.");
 
         return 0;
 }
@@ -235,8 +234,18 @@ static int scope_coldplug(Unit *u) {
         if (r < 0)
                 return r;
 
-        if (!IN_SET(s->deserialized_state, SCOPE_DEAD, SCOPE_FAILED))
-                (void) unit_enqueue_rewatch_pids(u);
+        if (!IN_SET(s->deserialized_state, SCOPE_DEAD, SCOPE_FAILED)) {
+                if (u->pids) {
+                        void *pidp;
+
+                        SET_FOREACH(pidp, u->pids) {
+                                r = unit_watch_pid(u, PTR_TO_PID(pidp), false);
+                                if (r < 0 && r != -EEXIST)
+                                        return r;
+                        }
+                } else
+                        (void) unit_enqueue_rewatch_pids(u);
+        }
 
         bus_scope_track_controller(s);
 
@@ -373,7 +382,13 @@ static int scope_start(Unit *u) {
         /* Set the maximum runtime timeout. */
         scope_arm_timer(s, usec_add(UNIT(s)->active_enter_timestamp.monotonic, s->runtime_max_usec));
 
-        /* Start watching the PIDs currently in the scope */
+        /* On unified we use proper notifications hence we can unwatch the PIDs
+         * we just attached to the scope. This can also be done on legacy as
+         * we're going to update the list of the processes we watch with the
+         * PIDs currently in the scope anyway. */
+        unit_unwatch_all_pids(u);
+
+        /* Start watching the PIDs currently in the scope (legacy hierarchy only) */
         (void) unit_enqueue_rewatch_pids(u);
         return 1;
 }
@@ -427,6 +442,7 @@ static int scope_get_timeout(Unit *u, usec_t *timeout) {
 
 static int scope_serialize(Unit *u, FILE *f, FDSet *fds) {
         Scope *s = SCOPE(u);
+        void *pidp;
 
         assert(s);
         assert(f);
@@ -438,6 +454,9 @@ static int scope_serialize(Unit *u, FILE *f, FDSet *fds) {
         if (s->controller)
                 (void) serialize_item(f, "controller", s->controller);
 
+        SET_FOREACH(pidp, u->pids)
+                serialize_item_format(f, "pids", PID_FMT, PTR_TO_PID(pidp));
+
         return 0;
 }
 
@@ -473,6 +492,16 @@ static int scope_deserialize_item(Unit *u, const char *key, const char *value, F
                 if (r < 0)
                         return log_oom();
 
+        } else if (streq(key, "pids")) {
+                pid_t pid;
+
+                if (parse_pid(value, &pid) < 0)
+                        log_unit_debug(u, "Failed to parse pids value: %s", value);
+                else {
+                        r = set_ensure_put(&u->pids, NULL, PID_TO_PTR(pid));
+                        if (r < 0)
+                                return r;
+                }
         } else
                 log_unit_debug(u, "Unknown serialization key: %s", key);
 
@@ -487,6 +516,11 @@ static void scope_notify_cgroup_empty_event(Unit *u) {
 
         if (IN_SET(s->state, SCOPE_RUNNING, SCOPE_ABANDONED, SCOPE_STOP_SIGTERM, SCOPE_STOP_SIGKILL))
                 scope_enter_dead(s, SCOPE_SUCCESS);
+
+        /* If the cgroup empty notification comes when the unit is not active, we must have failed to clean
+         * up the cgroup earlier and should do it now. */
+        if (IN_SET(s->state, SCOPE_DEAD, SCOPE_FAILED))
+                unit_prune_cgroup(u);
 }
 
 static void scope_sigchld_event(Unit *u, pid_t pid, int code, int status) {
@@ -621,6 +655,7 @@ const UnitVTable scope_vtable = {
         .can_delegate = true,
         .can_fail = true,
         .once_only = true,
+        .can_set_managed_oom = true,
 
         .init = scope_init,
         .load = scope_load,
index ae2bb80e55679e4f9bca22378f920d90c520c73d..5f791b7d1916310459cb4c3c0310922761da6e9b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct Scope Scope;
index b81714faa6ed3294aa4ae02ccb174639d3979ef5..18f6fb59bc0a0a75b17799032dcc887940937c99 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "selinux-access.h"
 
index 58f737de0971be154e489707bf7eec16a9728fb2..c6bfb3254436c35dd7a546cad3abb5c28f4ff2e6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 8c67352ddb478ab5d9d750511b8549a84688b921..1ac05b81e8e9a19aa032f40db15e98a35d59e683 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdio.h>
index ad0d4f65dc67ca560392fbdaf54844692e000a89..cdff51d747bbdb1346d552f12c75e038c5b19d4c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index d23384c4758fef928c8979cb58425ba6cb764aae..b1a4d0bf181da42bf65c8c8ac53dc2aee4e7ee29 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sys/stat.h>
@@ -548,51 +548,35 @@ static int service_verify(Service *s) {
         assert(s);
         assert(UNIT(s)->load_state == UNIT_LOADED);
 
-        if (!s->exec_command[SERVICE_EXEC_START] && !s->exec_command[SERVICE_EXEC_STOP]
-            && UNIT(s)->success_action == EMERGENCY_ACTION_NONE) {
+        if (!s->exec_command[SERVICE_EXEC_START] && !s->exec_command[SERVICE_EXEC_STOP] &&
+            UNIT(s)->success_action == EMERGENCY_ACTION_NONE)
                 /* FailureAction= only makes sense if one of the start or stop commands is specified.
                  * SuccessAction= will be executed unconditionally if no commands are specified. Hence,
                  * either a command or SuccessAction= are required. */
 
-                log_unit_error(UNIT(s), "Service has no ExecStart=, ExecStop=, or SuccessAction=. Refusing.");
-                return -ENOEXEC;
-        }
+                return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Service has no ExecStart=, ExecStop=, or SuccessAction=. Refusing.");
 
-        if (s->type != SERVICE_ONESHOT && !s->exec_command[SERVICE_EXEC_START]) {
-                log_unit_error(UNIT(s), "Service has no ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.");
-                return -ENOEXEC;
-        }
+        if (s->type != SERVICE_ONESHOT && !s->exec_command[SERVICE_EXEC_START])
+                return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Service has no ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.");
 
-        if (!s->remain_after_exit && !s->exec_command[SERVICE_EXEC_START] && UNIT(s)->success_action == EMERGENCY_ACTION_NONE) {
-                log_unit_error(UNIT(s), "Service has no ExecStart= and no SuccessAction= settings and does not have RemainAfterExit=yes set. Refusing.");
-                return -ENOEXEC;
-        }
+        if (!s->remain_after_exit && !s->exec_command[SERVICE_EXEC_START] && UNIT(s)->success_action == EMERGENCY_ACTION_NONE)
+                return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Service has no ExecStart= and no SuccessAction= settings and does not have RemainAfterExit=yes set. Refusing.");
 
-        if (s->type != SERVICE_ONESHOT && s->exec_command[SERVICE_EXEC_START]->command_next) {
-                log_unit_error(UNIT(s), "Service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.");
-                return -ENOEXEC;
-        }
+        if (s->type != SERVICE_ONESHOT && s->exec_command[SERVICE_EXEC_START]->command_next)
+                return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.");
 
-        if (s->type == SERVICE_ONESHOT
-            && !IN_SET(s->restart, SERVICE_RESTART_NO, SERVICE_RESTART_ON_FAILURE, SERVICE_RESTART_ON_ABNORMAL, SERVICE_RESTART_ON_WATCHDOG, SERVICE_RESTART_ON_ABORT)) {
-                log_unit_error(UNIT(s), "Service has Restart= set to either always or on-success, which isn't allowed for Type=oneshot services. Refusing.");
-                return -ENOEXEC;
-        }
+        if (s->type == SERVICE_ONESHOT &&
+            !IN_SET(s->restart, SERVICE_RESTART_NO, SERVICE_RESTART_ON_FAILURE, SERVICE_RESTART_ON_ABNORMAL, SERVICE_RESTART_ON_WATCHDOG, SERVICE_RESTART_ON_ABORT))
+                return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Service has Restart= set to either always or on-success, which isn't allowed for Type=oneshot services. Refusing.");
 
-        if (s->type == SERVICE_ONESHOT && !exit_status_set_is_empty(&s->restart_force_status)) {
-                log_unit_error(UNIT(s), "Service has RestartForceStatus= set, which isn't allowed for Type=oneshot services. Refusing.");
-                return -ENOEXEC;
-        }
+        if (s->type == SERVICE_ONESHOT && !exit_status_set_is_empty(&s->restart_force_status))
+                return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Service has RestartForceStatus= set, which isn't allowed for Type=oneshot services. Refusing.");
 
-        if (s->type == SERVICE_DBUS && !s->bus_name) {
-                log_unit_error(UNIT(s), "Service is of type D-Bus but no D-Bus service name has been specified. Refusing.");
-                return -ENOEXEC;
-        }
+        if (s->type == SERVICE_DBUS && !s->bus_name)
+                return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Service is of type D-Bus but no D-Bus service name has been specified. Refusing.");
 
-        if (s->exec_context.pam_name && !IN_SET(s->kill_context.kill_mode, KILL_CONTROL_GROUP, KILL_MIXED)) {
-                log_unit_error(UNIT(s), "Service has PAM enabled. Kill mode must be set to 'control-group' or 'mixed'. Refusing.");
-                return -ENOEXEC;
-        }
+        if (s->exec_context.pam_name && !IN_SET(s->kill_context.kill_mode, KILL_CONTROL_GROUP, KILL_MIXED))
+                return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Service has PAM enabled. Kill mode must be set to 'control-group' or 'mixed'. Refusing.");
 
         if (s->usb_function_descriptors && !s->usb_function_strings)
                 log_unit_warning(UNIT(s), "Service has USBFunctionDescriptors= setting, but no USBFunctionStrings=. Ignoring.");
@@ -914,20 +898,14 @@ static int service_is_suitable_main_pid(Service *s, pid_t pid, int prio) {
          * PID is questionnable but should be accepted if the source of configuration is trusted. > 0 if the PID is
          * good */
 
-        if (pid == getpid_cached() || pid == 1) {
-                log_unit_full(UNIT(s), prio, "New main PID "PID_FMT" is the manager, refusing.", pid);
-                return -EPERM;
-        }
+        if (pid == getpid_cached() || pid == 1)
+                return log_unit_full_errno(UNIT(s), prio, SYNTHETIC_ERRNO(EPERM), "New main PID "PID_FMT" is the manager, refusing.", pid);
 
-        if (pid == s->control_pid) {
-                log_unit_full(UNIT(s), prio, "New main PID "PID_FMT" is the control process, refusing.", pid);
-                return -EPERM;
-        }
+        if (pid == s->control_pid)
+                return log_unit_full_errno(UNIT(s), prio, SYNTHETIC_ERRNO(EPERM), "New main PID "PID_FMT" is the control process, refusing.", pid);
 
-        if (!pid_is_alive(pid)) {
-                log_unit_full(UNIT(s), prio, "New main PID "PID_FMT" does not exist or is a zombie.", pid);
-                return -ESRCH;
-        }
+        if (!pid_is_alive(pid))
+                return log_unit_full_errno(UNIT(s), prio, SYNTHETIC_ERRNO(ESRCH), "New main PID "PID_FMT" does not exist or is a zombie.", pid);
 
         owner = manager_get_unit_by_pid(UNIT(s)->manager, pid);
         if (owner == UNIT(s)) {
@@ -988,20 +966,18 @@ static int service_load_pid_file(Service *s, bool may_warn) {
         if (r == 0) {
                 struct stat st;
 
-                if (questionable_pid_file) {
-                        log_unit_error(UNIT(s), "Refusing to accept PID outside of service control group, acquired through unsafe symlink chain: %s", s->pid_file);
-                        return -EPERM;
-                }
+                if (questionable_pid_file)
+                        return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(EPERM),
+                                                    "Refusing to accept PID outside of service control group, acquired through unsafe symlink chain: %s", s->pid_file);
 
                 /* Hmm, it's not clear if the new main PID is safe. Let's allow this if the PID file is owned by root */
 
                 if (fstat(fd, &st) < 0)
                         return log_unit_error_errno(UNIT(s), errno, "Failed to fstat() PID file O_PATH fd: %m");
 
-                if (st.st_uid != 0) {
-                        log_unit_error(UNIT(s), "New main PID "PID_FMT" does not belong to service, and PID file is not owned by root. Refusing.", pid);
-                        return -EPERM;
-                }
+                if (st.st_uid != 0)
+                        return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(EPERM),
+                                                    "New main PID "PID_FMT" does not belong to service, and PID file is not owned by root. Refusing.", pid);
 
                 log_unit_debug(UNIT(s), "New main PID "PID_FMT" does not belong to service, but we'll accept it since PID file is owned by root.", pid);
         }
@@ -2127,8 +2103,7 @@ static void service_enter_start(Service *s) {
                         /* There's no command line configured for the main command? Hmm, that is strange.
                          * This can only happen if the configuration changes at runtime. In this case,
                          * let's enter a failure state. */
-                        log_unit_error(UNIT(s), "There's no 'start' task anymore we could start.");
-                        r = -ENXIO;
+                        r = log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENXIO), "There's no 'start' task anymore we could start.");
                         goto fail;
                 }
 
@@ -3330,6 +3305,13 @@ static void service_notify_cgroup_empty_event(Unit *u) {
 
                 break;
 
+        /* If the cgroup empty notification comes when the unit is not active, we must have failed to clean
+         * up the cgroup earlier and should do it now. */
+        case SERVICE_DEAD:
+        case SERVICE_FAILED:
+                unit_prune_cgroup(u);
+                break;
+
         default:
                 ;
         }
@@ -4533,6 +4515,7 @@ const UnitVTable service_vtable = {
         .can_transient = true,
         .can_delegate = true,
         .can_fail = true,
+        .can_set_managed_oom = true,
 
         .init = service_init,
         .done = service_done,
index 4423f893bb743394379b25fc0d0047372cb660d3..11c3d3f3709e2971e4ce3afafa05a4ca9062e959 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct Service Service;
index 9d7358a9c12d741d7283be51a88be4124a9716e9..a74423cb85d5455923477640883eae288857afd9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/stat.h>
index 178f624d6ce0f3ddd4abf1d7cfc8e5cf14da4c3d..c37ccd90871983811595ed354bfa26b8f047d601 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 49541aacab452f97048a4a80d0e03e1f604364a1..94eb56e1ca4389aea169360aebdb33195b02775e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
@@ -94,19 +94,15 @@ static int slice_verify(Slice *s) {
         assert(s);
         assert(UNIT(s)->load_state == UNIT_LOADED);
 
-        if (!slice_name_is_valid(UNIT(s)->id)) {
-                log_unit_error(UNIT(s), "Slice name %s is not valid. Refusing.", UNIT(s)->id);
-                return -ENOEXEC;
-        }
+        if (!slice_name_is_valid(UNIT(s)->id))
+                return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Slice name %s is not valid. Refusing.", UNIT(s)->id);
 
         r = slice_build_parent_slice(UNIT(s)->id, &parent);
         if (r < 0)
                 return log_unit_error_errno(UNIT(s), r, "Failed to determine parent slice: %m");
 
-        if (parent ? !unit_has_name(UNIT_DEREF(UNIT(s)->slice), parent) : UNIT_ISSET(UNIT(s)->slice)) {
-                log_unit_error(UNIT(s), "Located outside of parent slice. Refusing.");
-                return -ENOEXEC;
-        }
+        if (parent ? !unit_has_name(UNIT_DEREF(UNIT(s)->slice), parent) : UNIT_ISSET(UNIT(s)->slice))
+                return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Located outside of parent slice. Refusing.");
 
         return 0;
 }
@@ -435,6 +431,7 @@ const UnitVTable slice_vtable = {
         .private_section = "Slice",
 
         .can_transient = true,
+        .can_set_managed_oom = true,
 
         .init = slice_init,
         .load = slice_load,
index 4678c085c39c2147d9475bc6aa83bd1d1e6e818d..e2f92746556c8da3cb8c5af8f45801cd9fd3a10a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "unit.h"
index 4427397f27153f31ff8a63f2cde7951db1a10200..8cc1696a4fa47b754f83e207bcdf3251a79fca03 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2013 Intel Corporation
   Authors:
@@ -384,8 +384,7 @@ int mac_smack_setup(bool *loaded_policy) {
                 log_info("Successfully wrote Smack onlycap list.");
                 break;
         default:
-                log_emergency_errno(r, "Failed to write Smack onlycap list: %m");
-                return r;
+                return log_emergency_errno(r, "Failed to write Smack onlycap list: %m");
         }
 
         *loaded_policy = true;
index b65daafcd8a50d326f2597b59279550ffda4ddca..d29370d1e993555a51462f5ab0d9a88084f3a1fe 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index f71fa34300b8a3b5a86e44755d2be29fdc46120a..1f799830d1650421abb8d72f46623563de46223f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <arpa/inet.h>
 #include <errno.h>
@@ -402,35 +402,23 @@ static int socket_verify(Socket *s) {
         assert(s);
         assert(UNIT(s)->load_state == UNIT_LOADED);
 
-        if (!s->ports) {
-                log_unit_error(UNIT(s), "Unit has no Listen setting (ListenStream=, ListenDatagram=, ListenFIFO=, ...). Refusing.");
-                return -ENOEXEC;
-        }
+        if (!s->ports)
+                return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Unit has no Listen setting (ListenStream=, ListenDatagram=, ListenFIFO=, ...). Refusing.");
 
-        if (s->accept && have_non_accept_socket(s)) {
-                log_unit_error(UNIT(s), "Unit configured for accepting sockets, but sockets are non-accepting. Refusing.");
-                return -ENOEXEC;
-        }
+        if (s->accept && have_non_accept_socket(s))
+                return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Unit configured for accepting sockets, but sockets are non-accepting. Refusing.");
 
-        if (s->accept && s->max_connections <= 0) {
-                log_unit_error(UNIT(s), "MaxConnection= setting too small. Refusing.");
-                return -ENOEXEC;
-        }
+        if (s->accept && s->max_connections <= 0)
+                return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "MaxConnection= setting too small. Refusing.");
 
-        if (s->accept && UNIT_DEREF(s->service)) {
-                log_unit_error(UNIT(s), "Explicit service configuration for accepting socket units not supported. Refusing.");
-                return -ENOEXEC;
-        }
+        if (s->accept && UNIT_DEREF(s->service))
+                return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Explicit service configuration for accepting socket units not supported. Refusing.");
 
-        if (s->exec_context.pam_name && s->kill_context.kill_mode != KILL_CONTROL_GROUP) {
-                log_unit_error(UNIT(s), "Unit has PAM enabled. Kill mode must be set to 'control-group'. Refusing.");
-                return -ENOEXEC;
-        }
+        if (s->exec_context.pam_name && s->kill_context.kill_mode != KILL_CONTROL_GROUP)
+                return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Unit has PAM enabled. Kill mode must be set to 'control-group'. Refusing.");
 
-        if (!strv_isempty(s->symlinks) && !socket_find_symlink_target(s)) {
-                log_unit_error(UNIT(s), "Unit has symlinks set but none or more than one node in the file system. Refusing.");
-                return -ENOEXEC;
-        }
+        if (!strv_isempty(s->symlinks) && !socket_find_symlink_target(s))
+                return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Unit has symlinks set but none or more than one node in the file system. Refusing.");
 
         return 0;
 }
@@ -629,6 +617,11 @@ static void socket_dump(Unit *u, FILE *f, const char *prefix) {
                 prefix, socket_fdname(s),
                 prefix, yes_no(s->selinux_context_from_net));
 
+        if (s->timestamping != SOCKET_TIMESTAMPING_OFF)
+                fprintf(f,
+                        "%sTimestamping: %s\n",
+                        prefix, socket_timestamping_to_string(s->timestamping));
+
         if (s->control_pid > 0)
                 fprintf(f,
                         "%sControl PID: "PID_FMT"\n",
@@ -1051,6 +1044,14 @@ static void socket_apply_socket_options(Socket *s, SocketPort *p, int fd) {
                         log_unit_warning_errno(UNIT(s), r, "Failed to enable packet info socket option: %m");
         }
 
+        if (s->timestamping != SOCKET_TIMESTAMPING_OFF) {
+                r = setsockopt_int(fd, SOL_SOCKET,
+                                   s->timestamping == SOCKET_TIMESTAMPING_NS ? SO_TIMESTAMPNS : SO_TIMESTAMP,
+                                   true);
+                if (r < 0)
+                        log_unit_warning_errno(UNIT(s), r, "Failed to enable timestamping socket option, ignoring: %m");
+        }
+
         if (s->priority >= 0) {
                 r = setsockopt_int(fd, SOL_SOCKET, SO_PRIORITY, s->priority);
                 if (r < 0)
@@ -1697,6 +1698,8 @@ static int socket_open_fds(Socket *_s) {
                         _cleanup_free_ char *ep = NULL;
 
                         ep = path_make_absolute("ep0", p->path);
+                        if (!ep)
+                                return -ENOMEM;
 
                         p->fd = usbffs_address_create(ep);
                         if (p->fd < 0)
@@ -2492,17 +2495,13 @@ static int socket_start(Unit *u) {
 
                 service = SERVICE(UNIT_DEREF(s->service));
 
-                if (UNIT(service)->load_state != UNIT_LOADED) {
-                        log_unit_error(u, "Socket service %s not loaded, refusing.", UNIT(service)->id);
-                        return -ENOENT;
-                }
+                if (UNIT(service)->load_state != UNIT_LOADED)
+                        return log_unit_error_errno(u, SYNTHETIC_ERRNO(ENOENT), "Socket service %s not loaded, refusing.", UNIT(service)->id);
 
                 /* If the service is already active we cannot start the
                  * socket */
-                if (!IN_SET(service->state, SERVICE_DEAD, SERVICE_FAILED, SERVICE_AUTO_RESTART)) {
-                        log_unit_error(u, "Socket service %s already active, refusing.", UNIT(service)->id);
-                        return -EBUSY;
-                }
+                if (!IN_SET(service->state, SERVICE_DEAD, SERVICE_FAILED, SERVICE_AUTO_RESTART))
+                        return log_unit_error_errno(u, SYNTHETIC_ERRNO(EBUSY), "Socket service %s already active, refusing.", UNIT(service)->id);
         }
 
         assert(IN_SET(s->state, SOCKET_DEAD, SOCKET_FAILED));
@@ -3409,6 +3408,39 @@ static const char* const socket_result_table[_SOCKET_RESULT_MAX] = {
 
 DEFINE_STRING_TABLE_LOOKUP(socket_result, SocketResult);
 
+static const char* const socket_timestamping_table[_SOCKET_TIMESTAMPING_MAX] = {
+        [SOCKET_TIMESTAMPING_OFF] = "off",
+        [SOCKET_TIMESTAMPING_US] = "us",
+        [SOCKET_TIMESTAMPING_NS] = "ns",
+};
+
+DEFINE_STRING_TABLE_LOOKUP(socket_timestamping, SocketTimestamping);
+
+SocketTimestamping socket_timestamping_from_string_harder(const char *p) {
+        SocketTimestamping t;
+        int r;
+
+        if (!p)
+                return _SOCKET_TIMESTAMPING_INVALID;
+
+        t = socket_timestamping_from_string(p);
+        if (t >= 0)
+                return t;
+
+        /* Let's alternatively support the various other aliases parse_time() accepts for ns and µs here,
+         * too. */
+        if (streq(p, "nsec"))
+                return SOCKET_TIMESTAMPING_NS;
+        if (STR_IN_SET(p, "usec", "µs"))
+                return SOCKET_TIMESTAMPING_US;
+
+        r = parse_boolean(p);
+        if (r < 0)
+                return _SOCKET_TIMESTAMPING_INVALID;
+
+        return r ? SOCKET_TIMESTAMPING_NS : SOCKET_TIMESTAMPING_OFF; /* If boolean yes, default to ns accuracy */
+}
+
 const UnitVTable socket_vtable = {
         .object_size = sizeof(Socket),
         .exec_context_offset = offsetof(Socket, exec_context),
index cf475e26389fe079e700a9a4c6061c6c5920ac6e..ebe85c2aa4ad4fdbbeb801dc1846862100f46904 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct Socket Socket;
@@ -58,6 +58,14 @@ typedef struct SocketPort {
         LIST_FIELDS(struct SocketPort, port);
 } SocketPort;
 
+typedef enum SocketTimestamping {
+        SOCKET_TIMESTAMPING_OFF,
+        SOCKET_TIMESTAMPING_US,  /* SO_TIMESTAMP */
+        SOCKET_TIMESTAMPING_NS,  /* SO_TIMESTAMPNS */
+        _SOCKET_TIMESTAMPING_MAX,
+        _SOCKET_TIMESTAMPING_INVALID = -1,
+} SocketTimestamping;
+
 struct Socket {
         Unit meta;
 
@@ -123,6 +131,7 @@ struct Socket {
         bool pass_cred;
         bool pass_sec;
         bool pass_pktinfo;
+        SocketTimestamping timestamping;
 
         /* Only for INET6 sockets: issue IPV6_V6ONLY sockopt */
         SocketAddressBindIPv6Only bind_ipv6_only;
@@ -182,4 +191,8 @@ SocketResult socket_result_from_string(const char *s) _pure_;
 const char* socket_port_type_to_string(SocketPort *p) _pure_;
 SocketType socket_port_type_from_string(const char *p) _pure_;
 
+const char* socket_timestamping_to_string(SocketTimestamping p) _const_;
+SocketTimestamping socket_timestamping_from_string(const char *p) _pure_;
+SocketTimestamping socket_timestamping_from_string_harder(const char *p) _pure_;
+
 DEFINE_CAST(SOCKET, Socket);
index fa600a9797c3bcb5663c9c0ad0fff889970c05e8..ed06cf4b4b8cab68cb7a97f7a3822292276be67c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sys/epoll.h>
@@ -56,6 +56,35 @@ static bool SWAP_STATE_WITH_PROCESS(SwapState state) {
                       SWAP_CLEANING);
 }
 
+_pure_ static UnitActiveState swap_active_state(Unit *u) {
+        assert(u);
+
+        return state_translation_table[SWAP(u)->state];
+}
+
+_pure_ static const char *swap_sub_state_to_string(Unit *u) {
+        assert(u);
+
+        return swap_state_to_string(SWAP(u)->state);
+}
+
+_pure_ static bool swap_may_gc(Unit *u) {
+        Swap *s = SWAP(u);
+
+        assert(s);
+
+        if (s->from_proc_swaps)
+                return false;
+
+        return true;
+}
+
+_pure_ static bool swap_is_extrinsic(Unit *u) {
+        assert(SWAP(u));
+
+        return MANAGER_IS_USER(u->manager);
+}
+
 static void swap_unset_proc_swaps(Swap *s) {
         assert(s);
 
@@ -258,15 +287,11 @@ static int swap_verify(Swap *s) {
         if (r < 0)
                 return log_unit_error_errno(UNIT(s), r, "Failed to generate unit name from path: %m");
 
-        if (!unit_has_name(UNIT(s), e)) {
-                log_unit_error(UNIT(s), "Value of What= and unit name do not match, not loading.");
-                return -ENOEXEC;
-        }
+        if (!unit_has_name(UNIT(s), e))
+                return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Value of What= and unit name do not match, not loading.");
 
-        if (s->exec_context.pam_name && s->kill_context.kill_mode != KILL_CONTROL_GROUP) {
-                log_unit_error(UNIT(s), "Unit has PAM enabled. Kill mode must be set to 'control-group'. Refusing to load.");
-                return -ENOEXEC;
-        }
+        if (s->exec_context.pam_name && s->kill_context.kill_mode != KILL_CONTROL_GROUP)
+                return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Unit has PAM enabled. Kill mode must be set to 'control-group'. Refusing to load.");
 
         return 0;
 }
@@ -610,13 +635,15 @@ static void swap_dump(Unit *u, FILE *f, const char *prefix) {
                 "%sClean Result: %s\n"
                 "%sWhat: %s\n"
                 "%sFrom /proc/swaps: %s\n"
-                "%sFrom fragment: %s\n",
+                "%sFrom fragment: %s\n"
+                "%sExtrinsic: %s\n",
                 prefix, swap_state_to_string(s->state),
                 prefix, swap_result_to_string(s->result),
                 prefix, swap_result_to_string(s->clean_result),
                 prefix, s->what,
                 prefix, yes_no(s->from_proc_swaps),
-                prefix, yes_no(s->from_fragment));
+                prefix, yes_no(s->from_fragment),
+                prefix, yes_no(swap_is_extrinsic(u)));
 
         if (s->devnode)
                 fprintf(f, "%sDevice Node: %s\n", prefix, s->devnode);
@@ -1028,29 +1055,6 @@ static int swap_deserialize_item(Unit *u, const char *key, const char *value, FD
         return 0;
 }
 
-_pure_ static UnitActiveState swap_active_state(Unit *u) {
-        assert(u);
-
-        return state_translation_table[SWAP(u)->state];
-}
-
-_pure_ static const char *swap_sub_state_to_string(Unit *u) {
-        assert(u);
-
-        return swap_state_to_string(SWAP(u)->state);
-}
-
-_pure_ static bool swap_may_gc(Unit *u) {
-        Swap *s = SWAP(u);
-
-        assert(s);
-
-        if (s->from_proc_swaps)
-                return false;
-
-        return true;
-}
-
 static void swap_sigchld_event(Unit *u, pid_t pid, int code, int status) {
         Swap *s = SWAP(u);
         SwapResult f;
@@ -1649,6 +1653,7 @@ const UnitVTable swap_vtable = {
         .will_restart = unit_will_restart_default,
 
         .may_gc = swap_may_gc,
+        .is_extrinsic = swap_is_extrinsic,
 
         .sigchld_event = swap_sigchld_event,
 
index cb24cec7aafce8277562668eb7df627d8bec3aa0..6ce9bfd9b43094c3e81cb14f19ce1540ed800813 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index c0554649dea2598706bab2ba51b4838ea7affe88..f2c045511d00e2706adf0d1b59e48c4b3660fd76 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 3f85773b240b24a6e31e5a0e20532191668f61e7..a422056803da68786c83a8534f67ad1ae4e35bbf 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "dbus-target.h"
 #include "dbus-unit.h"
index 28f78888dc53eeaf5c513d5f80022a3183e6b6bf..bb909d664f278f91b77380f205f0260f68626c51 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "unit.h"
index 94388f0727ffbe4ebd201e2e462b43ed3edbd0b7..f42c86da765f3e21d4d63d8f3a6fca11bfdb130a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -75,10 +75,8 @@ static int timer_verify(Timer *t) {
         assert(t);
         assert(UNIT(t)->load_state == UNIT_LOADED);
 
-        if (!t->values && !t->on_clock_change && !t->on_timezone_change) {
-                log_unit_error(UNIT(t), "Timer unit lacks value setting. Refusing.");
-                return -ENOEXEC;
-        }
+        if (!t->values && !t->on_clock_change && !t->on_timezone_change)
+                return log_unit_error_errno(UNIT(t), SYNTHETIC_ERRNO(ENOEXEC), "Timer unit lacks value setting. Refusing.");
 
         return 0;
 }
@@ -101,14 +99,13 @@ static int timer_add_default_dependencies(Timer *t) {
                 if (r < 0)
                         return r;
 
-                LIST_FOREACH(value, v, t->values) {
+                LIST_FOREACH(value, v, t->values)
                         if (v->base == TIMER_CALENDAR) {
                                 r = unit_add_dependency_by_name(UNIT(t), UNIT_AFTER, SPECIAL_TIME_SYNC_TARGET, true, UNIT_DEPENDENCY_DEFAULT);
                                 if (r < 0)
                                         return r;
                                 break;
                         }
-                }
         }
 
         return unit_add_two_dependencies_by_name(UNIT(t), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, true, UNIT_DEPENDENCY_DEFAULT);
@@ -169,6 +166,36 @@ static int timer_setup_persistent(Timer *t) {
         return 0;
 }
 
+static uint64_t timer_get_fixed_delay_hash(Timer *t) {
+        static const uint8_t hash_key[] = {
+                0x51, 0x0a, 0xdb, 0x76, 0x29, 0x51, 0x42, 0xc2,
+                0x80, 0x35, 0xea, 0xe6, 0x8e, 0x3a, 0x37, 0xbd
+        };
+
+        struct siphash state;
+        sd_id128_t machine_id;
+        uid_t uid;
+        int r;
+
+        assert(t);
+
+        uid = getuid();
+        r = sd_id128_get_machine(&machine_id);
+        if (r < 0) {
+                log_unit_debug_errno(UNIT(t), r,
+                                     "Failed to get machine ID for the fixed delay calculation, proceeding with 0: %m");
+                machine_id = SD_ID128_NULL;
+        }
+
+        siphash24_init(&state, hash_key);
+        siphash24_compress(&machine_id, sizeof(sd_id128_t), &state);
+        siphash24_compress_boolean(MANAGER_IS_SYSTEM(UNIT(t)->manager), &state);
+        siphash24_compress(&uid, sizeof(uid_t), &state);
+        siphash24_compress_string(UNIT(t)->id, &state);
+
+        return siphash24_finalize(&state);
+}
+
 static int timer_load(Unit *u) {
         Timer *t = TIMER(u);
         int r;
@@ -215,6 +242,7 @@ static void timer_dump(Unit *u, FILE *f, const char *prefix) {
                 "%sWakeSystem: %s\n"
                 "%sAccuracy: %s\n"
                 "%sRemainAfterElapse: %s\n"
+                "%sFixedRandomDelay: %s\n"
                 "%sOnClockChange: %s\n"
                 "%sOnTimeZoneChange: %s\n",
                 prefix, timer_state_to_string(t->state),
@@ -224,11 +252,11 @@ static void timer_dump(Unit *u, FILE *f, const char *prefix) {
                 prefix, yes_no(t->wake_system),
                 prefix, format_timespan(buf, sizeof(buf), t->accuracy_usec, 1),
                 prefix, yes_no(t->remain_after_elapse),
+                prefix, yes_no(t->fixed_random_delay),
                 prefix, yes_no(t->on_clock_change),
                 prefix, yes_no(t->on_timezone_change));
 
-        LIST_FOREACH(value, v, t->values) {
-
+        LIST_FOREACH(value, v, t->values)
                 if (v->base == TIMER_CALENDAR) {
                         _cleanup_free_ char *p = NULL;
 
@@ -248,7 +276,6 @@ static void timer_dump(Unit *u, FILE *f, const char *prefix) {
                                 timer_base_to_string(v->base),
                                 format_timespan(timespan1, sizeof(timespan1), v->value, 0));
                 }
-        }
 }
 
 static void timer_set_state(Timer *t, TimerState state) {
@@ -332,7 +359,7 @@ static void add_random(Timer *t, usec_t *v) {
         if (*v == USEC_INFINITY)
                 return;
 
-        add = random_u64() % t->random_usec;
+        add = (t->fixed_random_delay ? timer_get_fixed_delay_hash(t) : random_u64()) % t->random_usec;
 
         if (*v + add < *v) /* overflow */
                 *v = (usec_t) -2; /* Highest possible value, that is not USEC_INFINITY */
@@ -638,9 +665,7 @@ static int timer_start(Unit *u) {
                         }
 
                 } else if (errno == ENOENT)
-                        /* The timer has never run before,
-                         * make sure a stamp file exists.
-                         */
+                        /* The timer has never run before, make sure a stamp file exists. */
                         (void) touch_file(t->stamp_path, true, USEC_INFINITY, UID_INVALID, GID_INVALID, MODE_INVALID);
         }
 
index ab66a201adc23c6b48028bbea4ebfb09e22c4d26..14fa317064eb6bfaec760525fe995bc5997cc552 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct Timer Timer;
@@ -59,6 +59,7 @@ struct Timer {
         bool remain_after_elapse;
         bool on_clock_change;
         bool on_timezone_change;
+        bool fixed_random_delay;
 
         char *stamp_path;
 };
index f4cdbfe6f5d823573b36842af31704c341827d2b..ae77bae65edcd6214be64d0442927bdef54d0f25 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <unistd.h>
index ba42f58e073736dbb97cd2e50bb805528326ccce..c431271eb2a3e45c7e51857451dc2ffad0875293 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct Transaction Transaction;
index 10b1889b5780015010318667627cbff4b9d7cf7f..2d25db3696d54008af5f2677b1b62526d094787d 100644 (file)
@@ -1,5 +1,5 @@
 #  -*- Mode: rpm-spec; indent-tabs-mode: nil -*- */
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #  Copyright © 2018 Neal Gompa
index 4fee5dc6dc3e83362397d5eaf1e474102dd70578..8e50a81b975f3e0b0820e0691ac351707dc6cdcd 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "cgroup-util.h"
@@ -177,46 +177,23 @@ int unit_name_printf(const Unit *u, const char* format, char **ret) {
          * This will use the passed string as format string and replace the following specifiers (which should all be
          * safe for inclusion in unit names):
          *
-         * %n: the full id of the unit                 (foo@bar.waldo)
-         * %N: the id of the unit without the suffix   (foo@bar)
-         * %p: the prefix                              (foo)
+         * %n: the full id of the unit                 (foo-aaa@bar.waldo)
+         * %N: the id of the unit without the suffix   (foo-aaa@bar)
+         * %p: the prefix                              (foo-aaa)
          * %i: the instance                            (bar)
-         *
-         * %U: the UID of the running user
-         * %u: the username of the running user
-         *
-         * %m: the machine ID of the running system
-         * %b: the boot ID of the running system
-         * %H: the hostname of the running system
-         * %v: the kernel version
-         * %a: the native userspace architecture
-         * %o: the OS ID according to /etc/os-release
-         * %w: the OS version ID, according to /etc/os-release
-         * %B: the OS build ID, according to /etc/os-release
-         * %W: the OS variant ID, according to /etc/os-release
+         * %j: the last component of the prefix        (aaa)
          */
 
         const Specifier table[] = {
+                { 'i', specifier_string,              u->instance },
+                { 'j', specifier_last_component,      NULL },
                 { 'n', specifier_string,              u->id },
                 { 'N', specifier_prefix_and_instance, NULL },
                 { 'p', specifier_prefix,              NULL },
-                { 'i', specifier_string,              u->instance },
-                { 'j', specifier_last_component,      NULL },
 
-                { 'g', specifier_group_name,          NULL },
-                { 'G', specifier_group_id,            NULL },
-                { 'U', specifier_user_id,             NULL },
-                { 'u', specifier_user_name,           NULL },
-
-                { 'm', specifier_machine_id,          NULL },
-                { 'b', specifier_boot_id,             NULL },
-                { 'H', specifier_host_name,           NULL },
-                { 'v', specifier_kernel_release,      NULL },
-                { 'a', specifier_architecture,        NULL },
-                { 'o', specifier_os_id,               NULL },
-                { 'w', specifier_os_version_id,       NULL },
-                { 'B', specifier_os_build_id,         NULL },
-                { 'W', specifier_os_variant_id,       NULL },
+                COMMON_SYSTEM_SPECIFIERS,
+
+                COMMON_CREDS_SPECIFIERS,
                 {}
         };
 
@@ -237,19 +214,15 @@ int unit_full_printf(const Unit *u, const char *format, char **ret) {
          * %r: where units in this slice are placed in the cgroup tree (deprecated)
          * %R: the root of this systemd's instance tree (deprecated)
          *
-         * %t: the runtime directory root (e.g. /run or $XDG_RUNTIME_DIR)
-         * %S: the state directory root (e.g. /var/lib or $XDG_CONFIG_HOME)
          * %C: the cache directory root (e.g. /var/cache or $XDG_CACHE_HOME)
-         * %L: the log directory root (e.g. /var/log or $XDG_CONFIG_HOME/log)
          * %E: the configuration directory root (e.g. /etc or $XDG_CONFIG_HOME)
-         * %T: the temporary directory (e.g. /tmp, or $TMPDIR, $TEMP, $TMP)
-         * %V: the temporary directory for large, persistent stuff (e.g. /var/tmp, or $TMPDIR, $TEMP, $TMP)
+         * %L: the log directory root (e.g. /var/log or $XDG_CONFIG_HOME/log)
+         * %S: the state directory root (e.g. /var/lib or $XDG_CONFIG_HOME)
+         * %t: the runtime directory root (e.g. /run or $XDG_RUNTIME_DIR)
          *
          * %h: the homedir of the running user
          * %s: the shell of the running user
          *
-         * %v: `uname -r` of the running system
-         *
          * NOTICE: When you add new entries here, please be careful: specifiers which depend on settings of the unit
          * file itself are broken by design, as they would resolve differently depending on whether they are used
          * before or after the relevant configuration setting. Hence: don't add them.
@@ -260,40 +233,35 @@ int unit_full_printf(const Unit *u, const char *format, char **ret) {
         assert(ret);
 
         const Specifier table[] = {
-                { 'n', specifier_string,                   u->id },
-                { 'N', specifier_prefix_and_instance,      NULL },
-                { 'p', specifier_prefix,                   NULL },
-                { 'P', specifier_prefix_unescaped,         NULL },
                 { 'i', specifier_string,                   u->instance },
                 { 'I', specifier_instance_unescaped,       NULL },
                 { 'j', specifier_last_component,           NULL },
                 { 'J', specifier_last_component_unescaped, NULL },
+                { 'n', specifier_string,                   u->id },
+                { 'N', specifier_prefix_and_instance,      NULL },
+                { 'p', specifier_prefix,                   NULL },
+                { 'P', specifier_prefix_unescaped,         NULL },
 
                 { 'f', specifier_filename,                 NULL },
+
                 { 'c', specifier_cgroup,                   NULL },
                 { 'r', specifier_cgroup_slice,             NULL },
                 { 'R', specifier_cgroup_root,              NULL },
 
-                { 't', specifier_special_directory,        UINT_TO_PTR(EXEC_DIRECTORY_RUNTIME) },
-                { 'S', specifier_special_directory,        UINT_TO_PTR(EXEC_DIRECTORY_STATE) },
                 { 'C', specifier_special_directory,        UINT_TO_PTR(EXEC_DIRECTORY_CACHE) },
-                { 'L', specifier_special_directory,        UINT_TO_PTR(EXEC_DIRECTORY_LOGS) },
                 { 'E', specifier_special_directory,        UINT_TO_PTR(EXEC_DIRECTORY_CONFIGURATION) },
-                { 'T', specifier_tmp_dir,                  NULL },
-                { 'V', specifier_var_tmp_dir,              NULL },
+                { 'L', specifier_special_directory,        UINT_TO_PTR(EXEC_DIRECTORY_LOGS) },
+                { 'S', specifier_special_directory,        UINT_TO_PTR(EXEC_DIRECTORY_STATE) },
+                { 't', specifier_special_directory,        UINT_TO_PTR(EXEC_DIRECTORY_RUNTIME) },
 
-                { 'g', specifier_group_name,               NULL },
-                { 'G', specifier_group_id,                 NULL },
-                { 'U', specifier_user_id,                  NULL },
-                { 'u', specifier_user_name,                NULL },
                 { 'h', specifier_user_home,                NULL },
                 { 's', specifier_user_shell,               NULL },
 
-                { 'm', specifier_machine_id,               NULL },
-                { 'H', specifier_host_name,                NULL },
-                { 'l', specifier_short_host_name,          NULL },
-                { 'b', specifier_boot_id,                  NULL },
-                { 'v', specifier_kernel_release,           NULL },
+                COMMON_SYSTEM_SPECIFIERS,
+
+                COMMON_CREDS_SPECIFIERS,
+
+                COMMON_TMP_SPECIFIERS,
                 {}
         };
 
index cb75448ae5c83a87b758ea513b09ce3153b46207..de5183c113af161de35b2775a6f16342e6a89c92 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "unit.h"
index 1165d4ea8b048c783c7b76846114770cb059e311..e209efd4a66594abc4b6fcaacd50b06910ee3b6b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdlib.h>
@@ -15,6 +15,7 @@
 #include "bus-util.h"
 #include "cgroup-setup.h"
 #include "cgroup-util.h"
+#include "core-varlink.h"
 #include "dbus-unit.h"
 #include "dbus.h"
 #include "dropin.h"
@@ -1573,6 +1574,31 @@ static int unit_add_mount_dependencies(Unit *u) {
         return 0;
 }
 
+static int unit_add_oomd_dependencies(Unit *u) {
+        CGroupContext *c;
+        bool wants_oomd;
+        int r;
+
+        assert(u);
+
+        if (!u->default_dependencies)
+                return 0;
+
+        c = unit_get_cgroup_context(u);
+        if (!c)
+                return 0;
+
+        wants_oomd = (c->moom_swap == MANAGED_OOM_KILL || c->moom_mem_pressure == MANAGED_OOM_KILL);
+        if (!wants_oomd)
+                return 0;
+
+        r = unit_add_two_dependencies_by_name(u, UNIT_AFTER, UNIT_WANTS, "systemd-oomd.service", true, UNIT_DEPENDENCY_FILE);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
 static int unit_add_startup_units(Unit *u) {
         CGroupContext *c;
 
@@ -1633,13 +1659,17 @@ int unit_load(Unit *u) {
                 if (r < 0)
                         goto fail;
 
+                r = unit_add_oomd_dependencies(u);
+                if (r < 0)
+                        goto fail;
+
                 r = unit_add_startup_units(u);
                 if (r < 0)
                         goto fail;
 
                 if (u->on_failure_job_mode == JOB_ISOLATE && hashmap_size(u->dependencies[UNIT_ON_FAILURE]) > 1) {
-                        log_unit_error(u, "More than one OnFailure= dependencies specified but OnFailureJobMode=isolate set. Refusing.");
-                        r = -ENOEXEC;
+                        r = log_unit_error_errno(u, SYNTHETIC_ERRNO(ENOEXEC),
+                                                 "More than one OnFailure= dependencies specified but OnFailureJobMode=isolate set. Refusing.");
                         goto fail;
                 }
 
@@ -1654,6 +1684,7 @@ int unit_load(Unit *u) {
 
         unit_add_to_dbus_queue(unit_follow_merge(u));
         unit_add_to_gc_queue(u);
+        (void) manager_varlink_send_managed_oom_update(u);
 
         return 0;
 
@@ -1957,6 +1988,10 @@ int unit_stop(Unit *u) {
 bool unit_can_stop(Unit *u) {
         assert(u);
 
+        /* Note: if we return true here, it does not mean that the unit may be successfully stopped.
+         * Extrinsic units follow external state and they may stop following external state changes
+         * (hence we return true here), but an attempt to do this through the manager will fail. */
+
         if (!unit_type_supported(u->type))
                 return false;
 
@@ -1987,10 +2022,8 @@ int unit_reload(Unit *u) {
         if (state == UNIT_RELOADING)
                 return -EAGAIN;
 
-        if (state != UNIT_ACTIVE) {
-                log_unit_warning(u, "Unit cannot be reloaded because it is inactive.");
-                return -ENOEXEC;
-        }
+        if (state != UNIT_ACTIVE)
+                return log_unit_warning_errno(u, SYNTHETIC_ERRNO(ENOEXEC), "Unit cannot be reloaded because it is inactive.");
 
         following = unit_following(u);
         if (following) {
@@ -2592,6 +2625,18 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, UnitNotifyFlag
          * the bus queue, so that any job change signal queued will force out the unit change signal first. */
         unit_add_to_dbus_queue(u);
 
+        /* Update systemd-oomd on the property/state change */
+        if (os != ns) {
+                /* Always send an update if the unit is going into an inactive state so systemd-oomd knows to stop
+                 * monitoring.
+                 * Also send an update whenever the unit goes active; this is to handle a case where an override file
+                 * sets one of the ManagedOOM*= properties to "kill", then later removes it. systemd-oomd needs to
+                 * know to stop monitoring when the unit changes from "kill" -> "auto" on daemon-reload, but we don't
+                 * have the information on the property. Thus, indiscriminately send an update. */
+                if (UNIT_IS_INACTIVE_OR_FAILED(ns) || UNIT_IS_ACTIVE_OR_RELOADING(ns))
+                        (void) manager_varlink_send_managed_oom_update(u);
+        }
+
         /* Update timestamps for state changes */
         if (!MANAGER_IS_RELOADING(m)) {
                 dual_timestamp_get(&u->state_change_timestamp);
@@ -3302,12 +3347,17 @@ int unit_set_default_slice(Unit *u) {
                 if (MANAGER_IS_SYSTEM(u->manager))
                         slice_name = strjoina("system-", escaped, ".slice");
                 else
-                        slice_name = strjoina(escaped, ".slice");
-        } else
-                slice_name =
-                        MANAGER_IS_SYSTEM(u->manager) && !unit_has_name(u, SPECIAL_INIT_SCOPE)
-                        ? SPECIAL_SYSTEM_SLICE
-                        : SPECIAL_ROOT_SLICE;
+                        slice_name = strjoina("app-", escaped, ".slice");
+
+        } else if (unit_is_extrinsic(u))
+                /* Keep all extrinsic units (e.g. perpetual units and swap and mount units in user mode) in
+                 * the root slice. They don't really belong in one of the subslices. */
+                slice_name = SPECIAL_ROOT_SLICE;
+
+        else if (MANAGER_IS_SYSTEM(u->manager))
+                slice_name = SPECIAL_SYSTEM_SLICE;
+        else
+                slice_name = SPECIAL_APP_SLICE;
 
         r = manager_load_unit(u->manager, slice_name, NULL, NULL, &slice);
         if (r < 0)
@@ -3558,6 +3608,9 @@ int unit_serialize(Unit *u, FILE *f, FDSet *fds, bool serialize_jobs) {
         if (u->cpu_usage_last != NSEC_INFINITY)
                 (void) serialize_item_format(f, "cpu-usage-last", "%" PRIu64, u->cpu_usage_last);
 
+        if (u->managed_oom_kill_last > 0)
+                (void) serialize_item_format(f, "managed-oom-kill-last", "%" PRIu64, u->managed_oom_kill_last);
+
         if (u->oom_kill_last > 0)
                 (void) serialize_item_format(f, "oom-kill-last", "%" PRIu64, u->oom_kill_last);
 
@@ -3803,6 +3856,14 @@ int unit_deserialize(Unit *u, FILE *f, FDSet *fds) {
 
                         continue;
 
+                } else if (streq(l, "managed-oom-kill-last")) {
+
+                        r = safe_atou64(v, &u->managed_oom_kill_last);
+                        if (r < 0)
+                                log_unit_debug(u, "Failed to read managed OOM kill last %s, ignoring.", v);
+
+                        continue;
+
                 } else if (streq(l, "oom-kill-last")) {
 
                         r = safe_atou64(v, &u->oom_kill_last);
@@ -4267,6 +4328,19 @@ static Set *unit_pid_set(pid_t main_pid, pid_t control_pid) {
         return TAKE_PTR(pid_set);
 }
 
+static int kill_common_log(pid_t pid, int signo, void *userdata) {
+        _cleanup_free_ char *comm = NULL;
+        Unit *u = userdata;
+
+        assert(u);
+
+        (void) get_process_comm(pid, &comm);
+        log_unit_info(u, "Sending signal SIG%s to process " PID_FMT " (%s) on client request.",
+                      signal_to_string(signo), pid, strna(comm));
+
+        return 1;
+}
+
 int unit_kill_common(
                 Unit *u,
                 KillWho who,
@@ -4278,34 +4352,67 @@ int unit_kill_common(
         int r = 0;
         bool killed = false;
 
+        /* This is the common implementation for explicit user-requested killing of unit processes, shared by
+         * various unit types. Do not confuse with unit_kill_context(), which is what we use when we want to
+         * stop a service ourselves. */
+
         if (IN_SET(who, KILL_MAIN, KILL_MAIN_FAIL)) {
                 if (main_pid < 0)
                         return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_PROCESS, "%s units have no main processes", unit_type_to_string(u->type));
-                else if (main_pid == 0)
+                if (main_pid == 0)
                         return sd_bus_error_set_const(error, BUS_ERROR_NO_SUCH_PROCESS, "No main process to kill");
         }
 
         if (IN_SET(who, KILL_CONTROL, KILL_CONTROL_FAIL)) {
                 if (control_pid < 0)
                         return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_PROCESS, "%s units have no control processes", unit_type_to_string(u->type));
-                else if (control_pid == 0)
+                if (control_pid == 0)
                         return sd_bus_error_set_const(error, BUS_ERROR_NO_SUCH_PROCESS, "No control process to kill");
         }
 
         if (IN_SET(who, KILL_CONTROL, KILL_CONTROL_FAIL, KILL_ALL, KILL_ALL_FAIL))
                 if (control_pid > 0) {
-                        if (kill(control_pid, signo) < 0)
-                                r = -errno;
-                        else
+                        _cleanup_free_ char *comm = NULL;
+                        (void) get_process_comm(control_pid, &comm);
+
+                        if (kill(control_pid, signo) < 0) {
+                                /* Report this failure both to the logs and to the client */
+                                sd_bus_error_set_errnof(
+                                                error, errno,
+                                                "Failed to send signal SIG%s to control process " PID_FMT " (%s): %m",
+                                                signal_to_string(signo), control_pid, strna(comm));
+                                r = log_unit_warning_errno(
+                                                u, errno,
+                                                "Failed to send signal SIG%s to control process " PID_FMT " (%s) on client request: %m",
+                                                signal_to_string(signo), control_pid, strna(comm));
+                        } else {
+                                log_unit_info(u, "Sent signal SIG%s to control process " PID_FMT " (%s) on client request.",
+                                              signal_to_string(signo), control_pid, strna(comm));
                                 killed = true;
+                        }
                 }
 
         if (IN_SET(who, KILL_MAIN, KILL_MAIN_FAIL, KILL_ALL, KILL_ALL_FAIL))
                 if (main_pid > 0) {
-                        if (kill(main_pid, signo) < 0)
-                                r = -errno;
-                        else
+                        _cleanup_free_ char *comm = NULL;
+                        (void) get_process_comm(main_pid, &comm);
+
+                        if (kill(main_pid, signo) < 0) {
+                                if (r == 0)
+                                        sd_bus_error_set_errnof(
+                                                        error, errno,
+                                                        "Failed to send signal SIG%s to main process " PID_FMT " (%s): %m",
+                                                        signal_to_string(signo), main_pid, strna(comm));
+
+                                r = log_unit_warning_errno(
+                                                u, errno,
+                                                "Failed to send signal SIG%s to main process " PID_FMT " (%s) on client request: %m",
+                                                signal_to_string(signo), main_pid, strna(comm));
+                        } else {
+                                log_unit_info(u, "Sent signal SIG%s to main process " PID_FMT " (%s) on client request.",
+                                              signal_to_string(signo), main_pid, strna(comm));
                                 killed = true;
+                        }
                 }
 
         if (IN_SET(who, KILL_ALL, KILL_ALL_FAIL) && u->cgroup_path) {
@@ -4315,17 +4422,29 @@ int unit_kill_common(
                 /* Exclude the main/control pids from being killed via the cgroup */
                 pid_set = unit_pid_set(main_pid, control_pid);
                 if (!pid_set)
-                        return -ENOMEM;
+                        return log_oom();
 
-                q = cg_kill_recursive(SYSTEMD_CGROUP_CONTROLLER, u->cgroup_path, signo, 0, pid_set, NULL, NULL);
-                if (q < 0 && !IN_SET(q, -EAGAIN, -ESRCH, -ENOENT))
-                        r = q;
-                else
+                q = cg_kill_recursive(SYSTEMD_CGROUP_CONTROLLER, u->cgroup_path, signo, 0, pid_set, kill_common_log, u);
+                if (q < 0) {
+                        if (!IN_SET(q, -ESRCH, -ENOENT)) {
+                                if (r == 0)
+                                        sd_bus_error_set_errnof(
+                                                        error, q,
+                                                        "Failed to send signal SIG%s to auxiliary processes: %m",
+                                                        signal_to_string(signo));
+
+                                r = log_unit_warning_errno(
+                                                u, q,
+                                                "Failed to send signal SIG%s to auxiliary processes on client request: %m",
+                                                signal_to_string(signo));
+                        }
+                } else
                         killed = true;
         }
 
-        if (r == 0 && !killed && IN_SET(who, KILL_ALL_FAIL, KILL_CONTROL_FAIL))
-                return -ESRCH;
+        /* If the "fail" versions of the operation are requested, then complain if the set of processes we killed is empty */
+        if (r == 0 && !killed && IN_SET(who, KILL_ALL_FAIL, KILL_CONTROL_FAIL, KILL_MAIN_FAIL))
+                return sd_bus_error_set_const(error, BUS_ERROR_NO_SUCH_PROCESS, "No matching processes to kill");
 
         return r;
 }
@@ -4911,8 +5030,9 @@ int unit_kill_context(
         assert(u);
         assert(c);
 
-        /* Kill the processes belonging to this unit, in preparation for shutting the unit down.
-         * Returns > 0 if we killed something worth waiting for, 0 otherwise. */
+        /* Kill the processes belonging to this unit, in preparation for shutting the unit down.  Returns > 0
+         * if we killed something worth waiting for, 0 otherwise. Do not confuse with unit_kill_common()
+         * which is used for user-requested killing of unit processes. */
 
         if (c->kill_mode == KILL_NONE)
                 return 0;
index 35873d57bc341c89dbe6bb3ec5db9187cfa2be9a..02b2b24206f393bbcd476b958c301a487c7e856c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
@@ -260,7 +260,10 @@ typedef struct Unit {
         nsec_t cpu_usage_base;
         nsec_t cpu_usage_last; /* the most recently read value */
 
-        /* The  current counter of the oom_kill field in the memory.events cgroup attribute */
+        /* The current counter of processes sent SIGKILL by systemd-oomd */
+        uint64_t managed_oom_kill_last;
+
+        /* The current counter of the oom_kill field in the memory.events cgroup attribute */
         uint64_t oom_kill_last;
 
         /* Where the io.stat data was at the time the unit was started */
@@ -528,6 +531,9 @@ typedef struct UnitVTable {
          * even though nothing references it and it isn't active in any way. */
         bool (*may_gc)(Unit *u);
 
+        /* Return true when the unit is not controlled by the manager (e.g. extrinsic mounts). */
+        bool (*is_extrinsic)(Unit *u);
+
         /* When the unit is not running and no job for it queued we shall release its runtime resources */
         void (*release_resources)(Unit *u);
 
@@ -625,6 +631,9 @@ typedef struct UnitVTable {
 
         /* True if queued jobs of this type should be GC'ed if no other job needs them anymore */
         bool gc_jobs:1;
+
+        /* True if systemd-oomd can monitor and act on this unit's recursive children's cgroup(s)  */
+        bool can_set_managed_oom:1;
 } UnitVTable;
 
 extern const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX];
@@ -678,6 +687,11 @@ int unit_set_description(Unit *u, const char *description);
 
 bool unit_may_gc(Unit *u);
 
+static inline bool unit_is_extrinsic(Unit *u) {
+        return u->perpetual ||
+                (UNIT_VTABLE(u)->is_extrinsic && UNIT_VTABLE(u)->is_extrinsic(u));
+}
+
 void unit_add_to_load_queue(Unit *u);
 void unit_add_to_dbus_queue(Unit *u);
 void unit_add_to_cleanup_queue(Unit *u);
index 35885dfb47c4dfa2b35476c37b41045f858c6a0d..30c67ffe7c9a95a52b126db7dd9bea0597e2d9c7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/statvfs.h>
 #include <sys/stat.h>
index 0db116736cafd42530b785bc36ba1b8503f0e2d7..8ad5bafc15a65ab7f9fee13097752f4d7d23fe85 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index 104a051688e57d285eec6243f4233d55c9653720..0a1cb9103a99f556697ae27dd18f839e7fee070b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdio.h>
index f252c8175861f0eea9929a4f51320f17e50cd308..91356ad3c999971bd7dde426a579de8af702c2e2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <getopt.h>
index 7fa5942697c57b3ee0103df1679610c2cb5eac73..ebd99bd379dfa08171cf1d4cacb986b7eeb413ca 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 systemd_coredump_sources = files('''
         coredump.c
@@ -13,7 +13,7 @@ endif
 
 coredumpctl_sources = files('coredumpctl.c')
 
-if conf.get('ENABLE_COREDUMP') == 1
+if conf.get('ENABLE_COREDUMP') == 1 and install_sysconfdir
         install_data('coredump.conf',
                      install_dir : pkgsysconfdir)
 endif
index 4e0d3e76987e5a376509d7147bfaa1a1f20aebea..a29ab1211c2feae5a5f4e6f59301639a0abf8df6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <dwarf.h>
 #include <elfutils/libdwfl.h>
index 2462c763f911608346ae75427c5ea9dc9fe084e2..b93574840424e5161366382d4da2a6a90c6f64ad 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 void coredump_make_stack_trace(int fd, const char *executable, char **ret);
index 75fb442873fe9fb3f9874123287c4f1d40bcf057..ac212ea23b885085d79094b6bcb8ba2717edd4ea 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdlib.h>
 
index bfd71cd595c5dd9ec4569e11b344d87252343eca..0ae8ab35aaf46c75eecdddf1b902f1e077f80e20 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -29,6 +29,8 @@ typedef struct crypto_device {
         char *uuid;
         char *keyfile;
         char *keydev;
+        char *headerdev;
+        char *datadev;
         char *name;
         char *options;
         bool create;
@@ -48,62 +50,64 @@ STATIC_DESTRUCTOR_REGISTER(arg_disks, hashmap_freep);
 STATIC_DESTRUCTOR_REGISTER(arg_default_options, freep);
 STATIC_DESTRUCTOR_REGISTER(arg_default_keyfile, freep);
 
-static int split_keyspec(const char *keyspec, char **ret_keyfile, char **ret_keydev) {
-        _cleanup_free_ char *keyfile = NULL, *keydev = NULL;
+static int split_locationspec(const char *locationspec, char **ret_file, char **ret_device) {
+        _cleanup_free_ char *file = NULL, *device = NULL;
         const char *c;
 
-        assert(ret_keyfile);
-        assert(ret_keydev);
+        assert(ret_file);
+        assert(ret_device);
 
-        if (!keyspec) {
-                *ret_keyfile = *ret_keydev = NULL;
+        if (!locationspec) {
+                *ret_file = *ret_device = NULL;
                 return 0;
         }
 
-        c = strrchr(keyspec, ':');
+        c = strrchr(locationspec, ':');
         if (c) {
-                /* The keydev part has to be either an absolute path to device node (/dev/something,
+                /* The device part has to be either an absolute path to device node (/dev/something,
                  * /dev/foo/something, or even possibly /dev/foo/something:part), or a fstab device
-                 * specification starting with LABEL= or similar. The keyfile part has the same syntax.
+                 * specification starting with LABEL= or similar. The file part has the same syntax.
                  *
-                 * Let's try to guess if the second part looks like a keydev specification, or just part of a
+                 * Let's try to guess if the second part looks like a device specification, or just part of a
                  * filename with a colon. fstab_node_to_udev_node() will convert the fstab device syntax to
                  * an absolute path. If we didn't get an absolute path, assume that it is just part of the
-                 * first keyfile argument. */
+                 * first file argument. */
 
-                keydev = fstab_node_to_udev_node(c + 1);
-                if (!keydev)
+                device = fstab_node_to_udev_node(c + 1);
+                if (!device)
                         return log_oom();
 
-                if (path_is_absolute(keydev))
-                        keyfile = strndup(keyspec, c-keyspec);
+                if (path_is_absolute(device))
+                        file = strndup(locationspec, c-locationspec);
                 else {
-                        log_debug("Keyspec argument contains a colon, but \"%s\" doesn't look like a device specification.\n"
+                        log_debug("Location specification argument contains a colon, but \"%s\" doesn't look like a device specification.\n"
                                   "Assuming that \"%s\" is a single device specification.",
-                                  c + 1, keyspec);
-                        keydev = mfree(keydev);
+                                  c + 1, locationspec);
+                        device = mfree(device);
                         c = NULL;
                 }
         }
 
         if (!c)
-                /* No keydev specified */
-                keyfile = strdup(keyspec);
+                /* No device specified */
+                file = strdup(locationspec);
 
-        if (!keyfile)
+        if (!file)
                 return log_oom();
 
-        *ret_keyfile = TAKE_PTR(keyfile);
-        *ret_keydev = TAKE_PTR(keydev);
+        *ret_file = TAKE_PTR(file);
+        *ret_device = TAKE_PTR(device);
 
         return 0;
 }
 
-static int generate_keydev_mount(
+static int generate_device_mount(
                 const char *name,
-                const char *keydev,
-                const char *keydev_timeout,
+                const char *device,
+                const char *type_prefix, /* "keydev" or "headerdev" */
+                const char *device_timeout,
                 bool canfail,
+                bool readonly,
                 char **unit,
                 char **mount) {
 
@@ -113,7 +117,7 @@ static int generate_keydev_mount(
         usec_t timeout_us;
 
         assert(name);
-        assert(keydev);
+        assert(device);
         assert(unit);
         assert(mount);
 
@@ -129,7 +133,7 @@ static int generate_keydev_mount(
         if (!name_escaped)
                 return -ENOMEM;
 
-        where = strjoin(arg_runtime_directory, "/keydev-", name_escaped);
+        where = strjoin(arg_runtime_directory, "/", type_prefix, "-", name_escaped);
         if (!where)
                 return -ENOMEM;
 
@@ -151,23 +155,23 @@ static int generate_keydev_mount(
                 "[Mount]\n"
                 "What=%s\n"
                 "Where=%s\n"
-                "Options=ro%s\n", keydev, where, canfail ? ",nofail" : "");
+                "Options=%s%s\n", device, where, readonly ? "ro" : "rw", canfail ? ",nofail" : "");
 
-        if (keydev_timeout) {
-                r = parse_sec_fix_0(keydev_timeout, &timeout_us);
+        if (device_timeout) {
+                r = parse_sec_fix_0(device_timeout, &timeout_us);
                 if (r >= 0) {
-                        r = unit_name_from_path(keydev, ".device", &device_unit);
+                        r = unit_name_from_path(device, ".device", &device_unit);
                         if (r < 0)
                                 return log_error_errno(r, "Failed to generate unit name: %m");
 
                         r = write_drop_in_format(arg_dest, device_unit, 90, "device-timeout",
                                 "# Automatically generated by systemd-cryptsetup-generator \n\n"
-                                "[Unit]\nJobRunningTimeoutSec=%s", keydev_timeout);
+                                "[Unit]\nJobRunningTimeoutSec=%s", device_timeout);
                         if (r < 0)
                                 return log_error_errno(r, "Failed to write device drop-in: %m");
 
                 } else
-                        log_warning_errno(r, "Failed to parse %s, ignoring: %m", keydev_timeout);
+                        log_warning_errno(r, "Failed to parse %s, ignoring: %m", device_timeout);
 
         }
 
@@ -181,8 +185,9 @@ static int generate_keydev_mount(
         return 0;
 }
 
-static int generate_keydev_umount(const char *name,
-                                  const char *keydev_mount,
+static int generate_device_umount(const char *name,
+                                  const char *device_mount,
+                                  const char *type_prefix, /* "keydev" or "headerdev" */
                                   char **ret_umount_unit) {
         _cleanup_fclose_ FILE *f = NULL;
         _cleanup_free_ char *u = NULL, *name_escaped = NULL, *mount = NULL;
@@ -195,11 +200,11 @@ static int generate_keydev_umount(const char *name,
         if (!name_escaped)
                 return -ENOMEM;
 
-        u = strjoin("keydev-", name_escaped, "-umount.service");
+        u = strjoin(type_prefix, "-", name_escaped, "-umount.service");
         if (!u)
                 return -ENOMEM;
 
-        r = unit_name_from_path(keydev_mount, ".mount", &mount);
+        r = unit_name_from_path(device_mount, ".mount", &mount);
         if (r < 0)
                 return r;
 
@@ -212,7 +217,7 @@ static int generate_keydev_umount(const char *name,
                 "DefaultDependencies=no\n"
                 "After=%s\n\n"
                 "[Service]\n"
-                "ExecStart=-" UMOUNT_PATH " %s\n\n", mount, keydev_mount);
+                "ExecStart=-" UMOUNT_PATH " %s\n\n", mount, device_mount);
 
         r = fflush_and_check(f);
         if (r < 0)
@@ -274,13 +279,14 @@ static int create_disk(
                 const char *device,
                 const char *password,
                 const char *keydev,
+                const char *headerdev,
                 const char *options,
                 const char *source) {
 
         _cleanup_free_ char *n = NULL, *d = NULL, *u = NULL, *e = NULL,
                 *keydev_mount = NULL, *keyfile_timeout_value = NULL,
                 *filtered = NULL, *u_escaped = NULL, *name_escaped = NULL, *header_path = NULL, *password_buffer = NULL,
-                *tmp_fstype = NULL;
+                *tmp_fstype = NULL, *filtered_header = NULL, *headerdev_mount = NULL;
         _cleanup_fclose_ FILE *f = NULL;
         const char *dmname;
         bool noauto, nofail, swap, netdev, attach_in_initrd;
@@ -299,7 +305,12 @@ static int create_disk(
         if (keyfile_can_timeout < 0)
                 return log_error_errno(keyfile_can_timeout, "Failed to parse keyfile-timeout= option value: %m");
 
-        detached_header = fstab_filter_options(options, "header\0", NULL, &header_path, NULL);
+        detached_header = fstab_filter_options(
+                options,
+                "header\0",
+                NULL,
+                &header_path,
+                headerdev ? &filtered_header : NULL);
         if (detached_header < 0)
                 return log_error_errno(detached_header, "Failed to parse header= option value: %m");
 
@@ -358,11 +369,19 @@ static int create_disk(
         if (keydev) {
                 _cleanup_free_ char *unit = NULL, *umount_unit = NULL;
 
-                r = generate_keydev_mount(name, keydev, keyfile_timeout_value, keyfile_can_timeout > 0, &unit, &keydev_mount);
+                r = generate_device_mount(
+                        name,
+                        keydev,
+                        "keydev",
+                        keyfile_timeout_value,
+                        /* canfail = */ keyfile_can_timeout > 0,
+                        /* readonly= */ true,
+                        &unit,
+                        &keydev_mount);
                 if (r < 0)
                         return log_error_errno(r, "Failed to generate keydev mount unit: %m");
 
-                r = generate_keydev_umount(name, keydev_mount, &umount_unit);
+                r = generate_device_umount(name, keydev_mount, "keydev", &umount_unit);
                 if (r < 0)
                         return log_error_errno(r, "Failed to generate keydev umount unit: %m");
 
@@ -387,6 +406,54 @@ static int create_disk(
                         );
         }
 
+        if (headerdev) {
+                _cleanup_free_ char *unit = NULL, *umount_unit = NULL, *p = NULL;
+
+                r = generate_device_mount(
+                        name,
+                        headerdev,
+                        "headerdev",
+                        NULL,
+                        /* canfail=  */ false, /* header is always necessary */
+                        /* readonly= */ false, /* LUKS2 recovery requires rw header access */
+                        &unit,
+                        &headerdev_mount);
+                if (r < 0)
+                        return log_error_errno(r, "Failed to generate header device mount unit: %m");
+
+                r = generate_device_umount(name, headerdev_mount, "headerdev", &umount_unit);
+                if (r < 0)
+                        return log_error_errno(r, "Failed to generate header device umount unit: %m");
+
+                p = path_join(headerdev_mount, header_path);
+                if (!p)
+                        return log_oom();
+
+                free_and_replace(header_path, p);
+
+                if (isempty(filtered_header))
+                        p = strjoin("header=", header_path);
+                else
+                        p = strjoin(filtered_header, ",header=", header_path);
+
+                if (!p)
+                        return log_oom();
+
+                free_and_replace(filtered_header, p);
+                options = filtered_header;
+
+                fprintf(f, "After=%s\n"
+                           "Requires=%s\n", unit, unit);
+
+                if (umount_unit)
+                        fprintf(f,
+                                "Wants=%s\n"
+                                "Before=%s\n",
+                                umount_unit,
+                                umount_unit
+                        );
+        }
+
         if (!nofail)
                 fprintf(f,
                         "Before=%s\n",
@@ -399,7 +466,7 @@ static int create_disk(
         }
 
         /* Check if a header option was specified */
-        if (detached_header > 0) {
+        if (detached_header > 0 && !headerdev) {
                 r = print_dependencies(f, header_path);
                 if (r < 0)
                         return r;
@@ -514,6 +581,52 @@ static crypto_device *get_crypto_device(const char *uuid) {
         return d;
 }
 
+static bool warn_uuid_invalid(const char *uuid, const char *key) {
+        assert(key);
+
+        if (!id128_is_valid(uuid)) {
+                log_warning("Failed to parse %s= kernel command line switch. UUID is invalid, ignoring.", key);
+                return true;
+        }
+
+        return false;
+}
+
+static int filter_header_device(const char *options,
+                                char **ret_headerdev,
+                                char **ret_filtered_headerdev_options) {
+        int r;
+        _cleanup_free_ char *headerfile = NULL, *headerdev = NULL, *headerspec = NULL,
+                            *filtered_headerdev = NULL, *filtered_headerspec = NULL;
+
+        assert(ret_headerdev);
+        assert(ret_filtered_headerdev_options);
+
+        r = fstab_filter_options(options, "header\0", NULL, &headerspec, &filtered_headerspec);
+        if (r < 0)
+                return log_error_errno(r, "Failed to parse header= option value: %m");
+
+        if (r > 0) {
+                r = split_locationspec(headerspec, &headerfile, &headerdev);
+                if (r < 0)
+                        return r;
+
+                if (isempty(filtered_headerspec))
+                        filtered_headerdev = strjoin("header=", headerfile);
+                else
+                        filtered_headerdev = strjoin(filtered_headerspec, ",header=", headerfile);
+
+                if (!filtered_headerdev)
+                        return log_oom();
+        } else
+                filtered_headerdev = TAKE_PTR(filtered_headerspec);
+
+        *ret_filtered_headerdev_options = TAKE_PTR(filtered_headerdev);
+        *ret_headerdev = TAKE_PTR(headerdev);
+
+        return 0;
+}
+
 static int parse_proc_cmdline_item(const char *key, const char *value, void *data) {
         _cleanup_free_ char *uuid = NULL, *uuid_value = NULL;
         crypto_device *d;
@@ -547,20 +660,28 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat
                 d->create = arg_allow_list = true;
 
         } else if (streq(key, "luks.options")) {
+                _cleanup_free_ char *headerdev = NULL, *filtered_headerdev_options = NULL;
 
                 if (proc_cmdline_value_missing(key, value))
                         return 0;
 
                 r = sscanf(value, "%m[0-9a-fA-F-]=%ms", &uuid, &uuid_value);
-                if (r == 2) {
-                        d = get_crypto_device(uuid);
-                        if (!d)
-                                return log_oom();
+                if (r != 2)
+                        return free_and_strdup(&arg_default_options, value) < 0 ? log_oom() : 0;
+
+                if (warn_uuid_invalid(uuid, key))
+                        return 0;
 
-                        free_and_replace(d->options, uuid_value);
-                } else if (free_and_strdup(&arg_default_options, value) < 0)
+                d = get_crypto_device(uuid);
+                if (!d)
                         return log_oom();
 
+                r = filter_header_device(uuid_value, &headerdev, &filtered_headerdev_options);
+                if (r < 0)
+                        return r;
+
+                free_and_replace(d->options, filtered_headerdev_options);
+                free_and_replace(d->headerdev, headerdev);
         } else if (streq(key, "luks.key")) {
                 size_t n;
                 _cleanup_free_ char *keyfile = NULL, *keydev = NULL;
@@ -569,7 +690,7 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat
                 if (proc_cmdline_value_missing(key, value))
                         return 0;
 
-                n = strspn(value, LETTERS DIGITS "-");
+                n = strspn(value, ALPHANUMERICAL "-");
                 if (value[n] != '=') {
                         if (free_and_strdup(&arg_default_keyfile, value) < 0)
                                  return log_oom();
@@ -580,23 +701,49 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat
                 if (!uuid)
                         return log_oom();
 
-                if (!id128_is_valid(uuid)) {
-                        log_warning("Failed to parse luks.key= kernel command line switch. UUID is invalid, ignoring.");
+                if (warn_uuid_invalid(uuid, key))
                         return 0;
-                }
 
                 d = get_crypto_device(uuid);
                 if (!d)
                         return log_oom();
 
                 keyspec = value + n + 1;
-                r = split_keyspec(keyspec, &keyfile, &keydev);
+                r = split_locationspec(keyspec, &keyfile, &keydev);
                 if (r < 0)
                         return r;
 
                 free_and_replace(d->keyfile, keyfile);
                 free_and_replace(d->keydev, keydev);
+        } else if (streq(key, "luks.data")) {
+                size_t n;
+                _cleanup_free_ char *datadev = NULL;
+
+                if (proc_cmdline_value_missing(key, value))
+                        return 0;
 
+                n = strspn(value, ALPHANUMERICAL "-");
+                if (value[n] != '=') {
+                        log_warning("Failed to parse luks.data= kernel command line switch. UUID is invalid, ignoring.");
+                        return 0;
+                }
+
+                uuid = strndup(value, n);
+                if (!uuid)
+                        return log_oom();
+
+                if (warn_uuid_invalid(uuid, key))
+                        return 0;
+
+                d = get_crypto_device(uuid);
+                if (!d)
+                        return log_oom();
+
+                datadev = fstab_node_to_udev_node(value + n + 1);
+                if (!datadev)
+                        return log_oom();
+
+                free_and_replace(d->datadev, datadev);
         } else if (streq(key, "luks.name")) {
 
                 if (proc_cmdline_value_missing(key, value))
@@ -634,7 +781,8 @@ static int add_crypttab_devices(void) {
         }
 
         for (;;) {
-                _cleanup_free_ char *line = NULL, *name = NULL, *device = NULL, *keyspec = NULL, *options = NULL, *keyfile = NULL, *keydev = NULL;
+                _cleanup_free_ char *line = NULL, *name = NULL, *device = NULL, *keyspec = NULL, *options = NULL,
+                                    *keyfile = NULL, *keydev = NULL, *headerdev = NULL, *filtered_header = NULL;
                 crypto_device *d = NULL;
                 char *l, *uuid;
                 int k;
@@ -670,11 +818,24 @@ static int add_crypttab_devices(void) {
                         continue;
                 }
 
-                r = split_keyspec(keyspec, &keyfile, &keydev);
+                r = split_locationspec(keyspec, &keyfile, &keydev);
                 if (r < 0)
                         return r;
 
-                r = create_disk(name, device, keyfile, keydev, (d && d->options) ? d->options : options, arg_crypttab);
+                if (options && (!d || !d->options)) {
+                        r = filter_header_device(options, &headerdev, &filtered_header);
+                        if (r < 0)
+                                return r;
+                        free_and_replace(options, filtered_header);
+                }
+
+                r = create_disk(name,
+                                device,
+                                keyfile,
+                                keydev,
+                                (d && d->options) ? d->headerdev : headerdev,
+                                (d && d->options) ? d->options : options,
+                                arg_crypttab);
                 if (r < 0)
                         return r;
 
@@ -706,9 +867,10 @@ static int add_proc_cmdline_devices(void) {
                         return log_oom();
 
                 r = create_disk(d->name,
-                                device,
+                                d->datadev ?: device,
                                 d->keyfile ?: arg_default_keyfile,
                                 d->keydev,
+                                d->headerdev,
                                 d->options ?: arg_default_options,
                                 "/proc/cmdline");
                 if (r < 0)
index ebf4cb1b6b02d1b5afab075b961f279b2fece4a7..a6281fbdeeeafb616c4c75af4f8b0f39fce26ed3 100644 (file)
@@ -1,29 +1,18 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
-
-#include <unistd.h>
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "cryptsetup-keyfile.h"
-#include "fd-util.h"
-#include "format-util.h"
-#include "memory-util.h"
+#include "fileio.h"
 #include "path-util.h"
-#include "stat-util.h"
 #include "strv.h"
 
-#define KEY_FILE_SIZE_MAX (16U*1024U*1024U) /* 16 MiB */
-
-int load_key_file(
+int find_key_file(
                 const char *key_file,
                 char **search_path,
-                size_t key_file_size,
-                uint64_t key_file_offset,
+                const char *bindname,
                 void **ret_key,
                 size_t *ret_key_size) {
 
-        _cleanup_(erase_and_freep) char *buffer = NULL;
-        _cleanup_free_ char *discovered_path = NULL;
-        _cleanup_close_ int fd = -1;
-        ssize_t n;
+        char **i;
         int r;
 
         assert(key_file);
@@ -31,80 +20,38 @@ int load_key_file(
         assert(ret_key_size);
 
         if (strv_isempty(search_path) || path_is_absolute(key_file)) {
-                fd = open(key_file, O_RDONLY|O_CLOEXEC);
-                if (fd < 0)
-                        return log_error_errno(errno, "Failed to load key file '%s': %m", key_file);
-        } else {
-                char **i;
-
-                STRV_FOREACH(i, search_path) {
-                        _cleanup_free_ char *joined;
-
-                        joined = path_join(*i, key_file);
-                        if (!joined)
-                                return log_oom();
-
-                        fd = open(joined, O_RDONLY|O_CLOEXEC);
-                        if (fd >= 0) {
-                                discovered_path = TAKE_PTR(joined);
-                                break;
-                        }
-                        if (errno != ENOENT)
-                                return log_error_errno(errno, "Failed to load key file '%s': %m", joined);
-                }
-
-                if (!discovered_path) {
-                        /* Search path supplied, but file not found, report by returning NULL, but not failing */
-                        *ret_key = NULL;
-                        *ret_key_size = 0;
-                        return 0;
-                }
-
-                assert(fd >= 0);
-                key_file = discovered_path;
-        }
 
-        if (key_file_size == 0) {
-                struct stat st;
-
-                if (fstat(fd, &st) < 0)
-                        return log_error_errno(errno, "Failed to stat key file '%s': %m", key_file);
-
-                r = stat_verify_regular(&st);
+                r = read_full_file_full(
+                                AT_FDCWD, key_file, UINT64_MAX, SIZE_MAX,
+                                READ_FULL_FILE_SECURE|READ_FULL_FILE_WARN_WORLD_READABLE|READ_FULL_FILE_CONNECT_SOCKET,
+                                bindname,
+                                (char**) ret_key, ret_key_size);
                 if (r < 0)
-                        return log_error_errno(r, "Key file is not a regular file: %m");
-
-                if (st.st_size == 0)
-                        return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Key file is empty, refusing.");
-                if ((uint64_t) st.st_size > KEY_FILE_SIZE_MAX) {
-                        char buf1[FORMAT_BYTES_MAX], buf2[FORMAT_BYTES_MAX];
-                        return log_error_errno(SYNTHETIC_ERRNO(ERANGE),
-                                               "Key file larger (%s) than allowed maximum size (%s), refusing.",
-                                               format_bytes(buf1, sizeof(buf1), st.st_size),
-                                               format_bytes(buf2, sizeof(buf2), KEY_FILE_SIZE_MAX));
-                }
-
-                if (key_file_offset >= (uint64_t) st.st_size)
-                        return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Key file offset too large for file, refusing.");
+                        return log_error_errno(r, "Failed to load key file '%s': %m", key_file);
 
-                key_file_size = st.st_size - key_file_offset;
+                return 1;
         }
 
-        buffer = malloc(key_file_size);
-        if (!buffer)
-                return log_oom();
-
-        if (key_file_offset > 0)
-                n = pread(fd, buffer, key_file_size, key_file_offset);
-        else
-                n = read(fd, buffer, key_file_size);
-        if (n < 0)
-                return log_error_errno(errno, "Failed to read key file '%s': %m", key_file);
-        if (n == 0)
-                return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Empty encrypted key found, refusing.");
-
-        *ret_key = TAKE_PTR(buffer);
-        *ret_key_size = (size_t) n;
+        STRV_FOREACH(i, search_path) {
+                _cleanup_free_ char *joined;
+
+                joined = path_join(*i, key_file);
+                if (!joined)
+                        return log_oom();
+
+                r = read_full_file_full(
+                                AT_FDCWD, joined, UINT64_MAX, SIZE_MAX,
+                                READ_FULL_FILE_SECURE|READ_FULL_FILE_WARN_WORLD_READABLE|READ_FULL_FILE_CONNECT_SOCKET,
+                                bindname,
+                                (char**) ret_key, ret_key_size);
+                if (r >= 0)
+                        return 1;
+                if (r != -ENOENT)
+                        return log_error_errno(r, "Failed to load key file '%s': %m", key_file);
+        }
 
-        return 1;
+        /* Search path supplied, but file not found, report by returning NULL, but not failing */
+        *ret_key = NULL;
+        *ret_key_size = 0;
+        return 0;
 }
index 7bb78227dcfd4e26c2789e6e330ed8ec1176c379..83bd1fbed2bb3a0438193b6b44c22bd96550cf5a 100644 (file)
@@ -1,13 +1,12 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
 #include <sys/types.h>
 
-int load_key_file(
+int find_key_file(
                 const char *key_file,
                 char **search_path,
-                size_t key_file_size,
-                uint64_t key_file_offset,
+                const char *bindname,
                 void **ret_key,
                 size_t *ret_key_size);
index bbc0122002248734362f229888c55c9d02e7eb48..b645ff28e01bcb55e8ac23990f262b820989aa00 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <unistd.h>
 #include "alloc-util.h"
 #include "ask-password-api.h"
 #include "cryptsetup-pkcs11.h"
-#include "cryptsetup-keyfile.h"
 #include "escape.h"
 #include "fd-util.h"
+#include "fileio.h"
 #include "format-util.h"
 #include "macro.h"
 #include "memory-util.h"
 #include "pkcs11-util.h"
+#include "random-util.h"
 #include "stat-util.h"
 #include "strv.h"
 
@@ -95,6 +96,7 @@ static int pkcs11_callback(
 }
 
 int decrypt_pkcs11_key(
+                const char *volume_name,
                 const char *friendly_name,
                 const char *pkcs11_uri,
                 const char *key_file,         /* We either expect key_file and associated parameters to be set (for file keys) … */
@@ -126,7 +128,19 @@ int decrypt_pkcs11_key(
 
                 data.free_encrypted_key = false;
         } else {
-                r = load_key_file(key_file, NULL, key_file_size, key_file_offset, &data.encrypted_key, &data.encrypted_key_size);
+                _cleanup_free_ char *bindname = NULL;
+
+                /* If we read the key via AF_UNIX, make this client recognizable */
+                if (asprintf(&bindname, "@%" PRIx64"/cryptsetup-pkcs11/%s", random_u64(), volume_name) < 0)
+                        return log_oom();
+
+                r = read_full_file_full(
+                                AT_FDCWD, key_file,
+                                key_file_offset == 0 ? UINT64_MAX : key_file_offset,
+                                key_file_size == 0 ? SIZE_MAX : key_file_size,
+                                READ_FULL_FILE_CONNECT_SOCKET,
+                                bindname,
+                                (char**) &data.encrypted_key, &data.encrypted_key_size);
                 if (r < 0)
                         return r;
 
index af2487e75bdfc5d8c38dc0297af42f015d70363d..522ed28bd3c64a452ddacac534feb2123027f163 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/types.h>
@@ -9,6 +9,7 @@
 #if HAVE_P11KIT
 
 int decrypt_pkcs11_key(
+                const char *volume_name,
                 const char *friendly_name,
                 const char *pkcs11_uri,
                 const char *key_file,
@@ -23,6 +24,7 @@ int decrypt_pkcs11_key(
 #else
 
 static inline int decrypt_pkcs11_key(
+                const char *volume_name,
                 const char *friendly_name,
                 const char *pkcs11_uri,
                 const char *key_file,
index fb08b4a1a0bbdecb2aceee630dadaac4b4952ec9..78d8eec1d7056b0f93b4baffd1eff93d0ead9da6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <mntent.h>
@@ -29,6 +29,7 @@
 #include "path-util.h"
 #include "pkcs11-util.h"
 #include "pretty-print.h"
+#include "random-util.h"
 #include "string-util.h"
 #include "strv.h"
 
@@ -353,7 +354,8 @@ static char *disk_mount_point(const char *label) {
 
         /* Yeah, we don't support native systemd unit files here for now */
 
-        if (asprintf(&device, "/dev/mapper/%s", label) < 0)
+        device = strjoin("/dev/mapper/", label);
+        if (!device)
                 return NULL;
 
         f = setmntent(fstab_path(), "re");
@@ -447,10 +449,9 @@ static int get_password(
 
                 assert(strv_length(passwords2) == 1);
 
-                if (!streq(passwords[0], passwords2[0])) {
-                        log_warning("Passwords did not match, retrying.");
-                        return -EAGAIN;
-                }
+                if (!streq(passwords[0], passwords2[0]))
+                        return log_warning_errno(SYNTHETIC_ERRNO(EAGAIN),
+                                                 "Passwords did not match, retrying.");
         }
 
         strv_uniq(passwords);
@@ -550,6 +551,15 @@ static int attach_tcrypt(
         return 0;
 }
 
+static char *make_bindname(const char *volume) {
+        char *s;
+
+        if (asprintf(&s, "@%" PRIx64"/cryptsetup/%s", random_u64(), volume) < 0)
+                return NULL;
+
+        return s;
+}
+
 static int attach_luks_or_plain_or_bitlk(
                 struct crypt_device *cd,
                 const char *name,
@@ -636,6 +646,7 @@ static int attach_luks_or_plain_or_bitlk(
                         bool processed = false;
 
                         r = decrypt_pkcs11_key(
+                                        name,
                                         friendly,
                                         arg_pkcs11_uri,
                                         key_file, arg_keyfile_size, arg_keyfile_offset,
@@ -735,13 +746,30 @@ static int attach_luks_or_plain_or_bitlk(
                         return log_error_errno(r, "Failed to activate: %m");
 
         } else if (key_file) {
-                r = crypt_activate_by_keyfile_device_offset(cd, name, arg_key_slot, key_file, arg_keyfile_size, arg_keyfile_offset, flags);
-                if (r == -EPERM) {
-                        log_error_errno(r, "Failed to activate with key file '%s'. (Key data incorrect?)", key_file);
+                _cleanup_(erase_and_freep) char *kfdata = NULL;
+                _cleanup_free_ char *bindname = NULL;
+                size_t kfsize;
+
+                /* If we read the key via AF_UNIX, make this client recognizable */
+                bindname = make_bindname(name);
+                if (!bindname)
+                        return log_oom();
+
+                r = read_full_file_full(
+                                AT_FDCWD, key_file,
+                                arg_keyfile_offset == 0 ? UINT64_MAX : arg_keyfile_offset,
+                                arg_keyfile_size == 0 ? SIZE_MAX : arg_keyfile_size,
+                                READ_FULL_FILE_SECURE|READ_FULL_FILE_WARN_WORLD_READABLE|READ_FULL_FILE_CONNECT_SOCKET,
+                                bindname,
+                                &kfdata, &kfsize);
+                if (r == -ENOENT) {
+                        log_error_errno(r, "Failed to activate, key file '%s' missing.", key_file);
                         return -EAGAIN; /* Log actual error, but return EAGAIN */
                 }
-                if (r == -EINVAL) {
-                        log_error_errno(r, "Failed to activate with key file '%s'. (Key file missing?)", key_file);
+
+                r = crypt_activate_by_passphrase(cd, name, arg_key_slot, kfdata, kfsize, flags);
+                if (r == -EPERM) {
+                        log_error_errno(r, "Failed to activate with key file '%s'. (Key data incorrect?)", key_file);
                         return -EAGAIN; /* Log actual error, but return EAGAIN */
                 }
                 if (r < 0)
@@ -880,16 +908,22 @@ static int run(int argc, char *argv[]) {
                 (void) mlockall(MCL_FUTURE);
 
                 if (!key_file) {
+                        _cleanup_free_ char *bindname = NULL;
                         const char *fn;
 
+                        bindname = make_bindname(argv[2]);
+                        if (!bindname)
+                                return log_oom();
+
                         /* If a key file is not explicitly specified, search for a key in a well defined
                          * search path, and load it. */
 
                         fn = strjoina(argv[2], ".key");
-                        r = load_key_file(fn,
-                                          STRV_MAKE("/etc/cryptsetup-keys.d", "/run/cryptsetup-keys.d"),
-                                          0, 0,  /* Note we leave arg_keyfile_offset/arg_keyfile_size as something that only applies to arg_keyfile! */
-                                          &key_data, &key_data_size);
+                        r = find_key_file(
+                                        fn,
+                                        STRV_MAKE("/etc/cryptsetup-keys.d", "/run/cryptsetup-keys.d"),
+                                        bindname,
+                                        &key_data, &key_data_size);
                         if (r < 0)
                                 return r;
                         if (r > 0)
index 4e41eca3521b037b7c5f15cecccf870916e05ddc..c6e4d79e3a39ac31e5de14326dface02b9bd62ed 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
index a88eed098db097074c539bc546eb8bd232a4a9a7..4295abdc30b3b4a3020c960acc15f23730f1ddf1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <getopt.h>
index 4f38de8e29fb8315bcae96c45222e9c7402441d6..14d649c6ed4f3a9306516d7a2f82652de53c7c2c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <getopt.h>
index 237395a4444c2f93faa45840e48e4211e3018ebd..dc7e9dc626dc4cb39634a3dc0831aa3f74b77a6e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <getopt.h>
index 4a14c23f11499dceb7555459033da17eb30172b3..1c51cf6b2cf7eb06d4a03e9e59e6459ec8ca3d09 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-path.h"
 
index 3f3dc0a89475d365eb23affb7adba90bb29b6bfd..05d03ad762bf31b3c8bcd0a8d0c2f822d71c4182 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 #include <stdio.h>
index 3109f9cdfcc214ca764c48146469e19683ae8177..742b43f9fca7743a174042efa9819b7d5a7a0b22 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <getopt.h>
index 472ba6d54985e08e64363dbe80384e215182d08c..04752fe9dc6fe86bcbc4789868d8ca5a00c799e2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2014 Holger Hans Peter Freyther
 ***/
index 6c560d547b20cb784da94a20ad2cc1b84049b06e..15f5892228733edf753660fceb512893b86338b8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdio.h>
index 46a3d23dc4ad9f48e8a3967f2d8b667f8b825e93..93bac9adf4957fcb9695ce5838acf8c165cea7a1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index 3d1ac7e68a03ed56bb00d8e1a7644b0fef84e16a..af3dbf4d57b0f8b4c9828730ef21f76ffcde0fab 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "bus-dump.h"
index 8f031503e9534b1837f64bc3e31e423d8d1af1fe..80801723fdda42cd552dd6b6b4374138c256ff89 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "calendarspec.h"
index ecf25b18d7f9b214f8ba16f6b7dc5bcdc36845f7..f0134557301eaef598fa08831eb01336100fbf5f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "catalog.h"
 #include "fd-util.h"
index 9c5dfc92c05d7e87a04362ddf55c29364c271c97..f94fd0673e4f4300d6360be464ba654be276032e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index 71bb99a381cc9e608eb829637b799af188bea2ca..c854d921c00eb09ceabf809170cf76ad18662bd2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/stat.h>
index 6d887eaf1f8d1c07baa95b7312621053699af791..e5e70dd606ef9b1bf2df455125bb3927579b0222 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
index 9bf95b9c7655e0c4517b2758dce671aa16d46de4..b9a0aa1216a63bd945bc0f9eaeaf25001499935b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "fuzz.h"
 #include "memory-util.h"
index d945dfc02c5a7c01e73ecdb9b19a09d7e5deb386..e0dac260b00ed6f61b6cd07873fbb66991c48933 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 
index 2130a4a81170aea83cb1aab1e3436e2e8d7b23f2..0a81e74424f16a5753d950bd7064566a99300a26 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "fd-util.h"
index 3ab4eb07fafd93e6d7f7aa1405e3cdee8e717a07..9adbd43748d851cc05cae19dfa2fb479fb0f1578 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "fuzz.h"
 
index 3f3ce7e8eed96f144675c1f8bf4fe39108955674..6e8e18048ecf649255338bdccb20de642dba3f20 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "fuzz.h"
 #include "fuzz-journald.h"
index f7426c84002a81338f0b035bdcd4bede289cae09..1b423d5cba275bea35b6b452aa9a53c291d6e04c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "fuzz.h"
 #include "fuzz-journald.h"
index 8e3e850fbb96fd35b93ff82c5205aa727bfc9486..fcfc5dfaba4a0259130264925bf94538a45504a2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "fd-util.h"
 #include "fs-util.h"
index f4de5fd8ebfae1384de8bf118fc58122439bd6b5..6531c4f6686f406c310a25c30e8b6dd75de53a60 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "fuzz.h"
 #include "fuzz-journald.h"
index 0991b287c944e6c1b89d4d2f5a6bfbc93d1d855e..038b335cb32bcdf25028273b0c961d00132e2b21 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/sockios.h>
 #include <sys/ioctl.h>
index 100f0ce691b429a0b536e407c20fa37b69a8c705..72ec610fbfc29bf9d033740b493f87816775c515 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "fuzz.h"
 #include "fuzz-journald.h"
index 950e885cae3d8e679add48490732efea6029bce7..e2f73ffa7e564ea4f1f9c750d2d0f6a810062c3a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "fuzz-journald.h"
index 77e3b0c064c4f6ec03814bb7aa1317596df1bf33..4abb1005ca3c5349a933637a521c9032bd9c11e7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "journald-server.h"
index c01e2a570c50a6189d2b1f2c9cb2c34d11be6ac0..f9a0e818c4b29214c34c0f3a41f33fd0c5edb7c8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "fileio.h"
index 7f252309cd51d66474f39eb199911ed1d270efc4..5747135b32f7a7ec077b9392d58323f13b261e22 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <unistd.h>
index d5c998498971a88c16fa35a2a3545ad1a6f8d22f..2df2993cbfbee03e6d8ad03bea523be41799a0de 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "log.h"
index d8d256d12710e6b837942fb82866d128bacab940..d74cd2fffc7f50fffc1adf576a76e64ae52170e8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <arpa/inet.h>
 #include <netinet/icmp6.h>
index 004230eafe2a7c52ade002eb20bc7b54f9157e44..cfebf65c003efefa131ff326dc661ab47a9f1ca0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "fd-util.h"
index aa0a8225b47d7b8722b080554decbe2890743fff..bd98ed26e8f8de8ee35adf63ae67f45e42c689ef 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "fd-util.h"
index 22b2496fcb2bec00af3d6c19e6421e8d796e0292..bf2a66336cadf05cbbed0512bc3ed683c8264936 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "fd-util.h"
index 9d7c0fa3e12a63ab84003bda021c25255c79ba3a..2a48c14961f64565d4f72d42936a817dc11b5546 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "device-internal.h"
 #include "device-private.h"
diff --git a/src/fuzz/fuzz-udev-rule-parse-value.c b/src/fuzz/fuzz-udev-rule-parse-value.c
new file mode 100644 (file)
index 0000000..404d0cd
--- /dev/null
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#include <string.h>
+
+#include "alloc-util.h"
+#include "fuzz.h"
+#include "udev-util.h"
+
+int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
+        _cleanup_free_ char *str = NULL;
+        int r;
+        char *value = UINT_TO_PTR(0x12345678U);
+        char *endpos = UINT_TO_PTR(0x87654321U);
+
+        assert_se(str = malloc(size + 1));
+        memcpy(str, data, size);
+        str[size] = '\0';
+
+        r = udev_rule_parse_value(str, &value, &endpos);
+
+        if (r < 0) {
+                /* not modified on failure */
+                assert_se(value == UINT_TO_PTR(0x12345678U));
+                assert_se(endpos == UINT_TO_PTR(0x87654321U));
+        } else {
+                assert_se(endpos <= str + size);
+                assert_se(endpos > str + 1);
+        }
+
+        return 0;
+}
index 7530d80befe171ea10cabdfdb68c6d7d1bc8873d..e1140bc68ef4c3c126abf1b31ab3d815d48909a7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 
index c0661433a31588a843ae437bb9fa2f9ce4520e88..e67f6e9199d4011e2dc963c0d2390a18fbdccb70 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "conf-parser.h"
 #include "fd-util.h"
index 31c13e2bea6e60e2aeec0ff52807cedc9d9701e2..f26050cf0ed14ad9bd2dea21ee7673cb63f8540b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
index f8a1b5b28b23b9a85c6901c08f5a8493daff4a4f..23077e48dce2e876e55c0f7981aa7cf6b5e363a4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "fd-util.h"
index 1e56526259b20ff3fa48c019406c5e0352b0555f..579b0eed730d625c01c86f38509c85687c3c83b4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stddef.h>
index 01f119fcd0b374586ba98979b3a87aec77065c77..f8f0c386b39c214b172b38eff9e56271e8afcf7d 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 fuzzers += [
         [['src/fuzz/fuzz-bus-message.c'],
@@ -108,7 +108,6 @@ fuzzers += [
         [['src/fuzz/fuzz-udev-rules.c'],
          [libudev_core,
           libudev_static,
-          libsystemd_network,
           libshared],
          [threads,
           libacl]],
@@ -152,4 +151,8 @@ fuzzers += [
           'src/xdg-autostart-generator/xdg-autostart-service.c'],
          [],
          []],
+
+        [['src/fuzz/fuzz-udev-rule-parse-value.c'],
+         [libshared],
+         []],
 ]
index 04dcacfd59a476b324fb0f8089e47b5c9c74f495..2f26214ec306b1a2425f365d6edc392c86da03a4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 0d18c91c629fd10f34a0dd965cc5d2853cf9afd0..f9d0ca54214749a2ce6f94ad6c43d04158d16c77 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdlib.h>
 #include <unistd.h>
index 95af8efa7e2e96ff5ca3fc105fe25dcc847dd78a..04a28c90537bd73ddab22084abbc672fd9a75264 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdio.h>
index 17e7cd1a009b96eb0c9242131f0bd58e1d5932af..d8f91f4e663f36a230aaac729e190148e1618217 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdio.h>
index 8e28e3ab76af00ddd397f8d5aec0fe699f932603..cd971b7cda4298cd506dd23498a347ae95eabe67 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "dns-domain.h"
 #include "home-util.h"
index 73602e4f8ec0462ded7226dd208d0d8558da4cbf..fba1c7d8f1d4efb73c79201787f13bdcc770ec7d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 0019f59f0f676ce6a5bac70ec0bcd2837a4d82b1..5557b70e67485331dc48854fcdc8ff316bd5e0ad 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if HAVE_LIBFIDO2
 #include <fido.h>
index 0d9faefa8164bb6ba513852c3126b1522352f853..d0349f54050c33fa46e874436d799c88ff803271 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "json.h"
index 592a6413e1d319e737b08df6d2393bbcf8851efe..4b7f8336aa0b28481f81b37ecbe402462c43f811 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "errno-util.h"
 #include "format-table.h"
index 0403c73ea1afd3583a73242bb3bafb0d2eafa6ae..5c30feeed4881c0d262e1e56d7126d415a95f0fe 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "json.h"
index c63d3415f4bb3878e393a6297ef9fe2740772f1f..4a6649d25c69a20dfd3d452de394fd6ee83582d9 100644 (file)
@@ -1,17 +1,12 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#if HAVE_QRENCODE
-#include <qrencode.h>
-#include "qrcode-util.h"
-#endif
-
-#include "dlfcn-util.h"
 #include "errno-util.h"
 #include "homectl-recovery-key.h"
 #include "libcrypt-util.h"
 #include "locale-util.h"
 #include "memory-util.h"
 #include "modhex.h"
+#include "qrcode-util.h"
 #include "random-util.h"
 #include "strv.h"
 #include "terminal-util.h"
@@ -140,48 +135,6 @@ static int add_secret(JsonVariant **v, const char *password) {
         return 0;
 }
 
-static int print_qr_code(const char *secret) {
-#if HAVE_QRENCODE
-        QRcode* (*sym_QRcode_encodeString)(const char *string, int version, QRecLevel level, QRencodeMode hint, int casesensitive);
-        void (*sym_QRcode_free)(QRcode *qrcode);
-        _cleanup_(dlclosep) void *dl = NULL;
-        QRcode* qr;
-        int r;
-
-        /* If this is not an UTF-8 system or ANSI colors aren't supported/disabled don't print any QR
-         * codes */
-        if (!is_locale_utf8() || !colors_enabled())
-                return -EOPNOTSUPP;
-
-        dl = dlopen("libqrencode.so.4", RTLD_LAZY);
-        if (!dl)
-                return log_debug_errno(SYNTHETIC_ERRNO(EOPNOTSUPP),
-                                       "QRCODE support is not installed: %s", dlerror());
-
-        r = dlsym_many_and_warn(
-                        dl,
-                        LOG_DEBUG,
-                        &sym_QRcode_encodeString, "QRcode_encodeString",
-                        &sym_QRcode_free, "QRcode_free",
-                        NULL);
-        if (r < 0)
-                return r;
-
-        qr = sym_QRcode_encodeString(secret, 0, QR_ECLEVEL_L, QR_MODE_8, 0);
-        if (!qr)
-                return -ENOMEM;
-
-        fprintf(stderr, "\nYou may optionally scan the recovery key off screen:\n\n");
-
-        write_qrcode(stderr, qr);
-
-        fputc('\n', stderr);
-
-        sym_QRcode_free(qr);
-#endif
-        return 0;
-}
-
 int identity_add_recovery_key(JsonVariant **v) {
         _cleanup_(erase_and_freep) char *password = NULL, *hashed = NULL;
         int r;
@@ -240,7 +193,7 @@ int identity_add_recovery_key(JsonVariant **v) {
               "whenever authentication is requested.\n", stderr);
         fflush(stderr);
 
-        print_qr_code(password);
+        (void) print_qrcode(stderr, "You may optionally scan the recovery key off screen", password);
 
         return 0;
 }
index 489d35fa5be2ef452f65daf2c16979263c566922..ab195f94db1f5870b3289f73b9eebd33fd739859 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "json.h"
index 4629499504c22f5c78f1a283abda19946cf297a4..7cfda7ed2fd3321b3b93782033b1a9a3fe8c37b3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 
@@ -99,7 +99,7 @@ static int acquire_bus(sd_bus **bus) {
 
         r = bus_connect_transport(arg_transport, arg_host, false, bus);
         if (r < 0)
-                return log_error_errno(r, "Failed to connect to bus: %m");
+                return bus_log_connect_error(r);
 
         (void) sd_bus_set_allow_interactive_authorization(*bus, arg_ask_password);
 
@@ -215,9 +215,7 @@ static int acquire_existing_password(const char *user_name, UserRecord *hr, bool
                         return log_error_errno(r, "Failed to store password: %m");
 
                 string_erase(e);
-
-                if (unsetenv("PASSWORD") < 0)
-                        return log_error_errno(errno, "Failed to unset $PASSWORD: %m");
+                assert_se(unsetenv("PASSWORD") == 0);
 
                 return 0;
         }
@@ -255,9 +253,7 @@ static int acquire_token_pin(const char *user_name, UserRecord *hr) {
                         return log_error_errno(r, "Failed to store token PIN: %m");
 
                 string_erase(e);
-
-                if (unsetenv("PIN") < 0)
-                        return log_error_errno(errno, "Failed to unset $PIN: %m");
+                assert_se(unsetenv("PIN") == 0);
 
                 return 0;
         }
@@ -997,9 +993,7 @@ static int acquire_new_password(
                         return log_error_errno(r, "Failed to store password: %m");
 
                 string_erase(e);
-
-                if (unsetenv("NEWPASSWORD") < 0)
-                        return log_error_errno(errno, "Failed to unset $NEWPASSWORD: %m");
+                assert_se(unsetenv("NEWPASSWORD") == 0);
 
                 if (ret)
                         *ret = TAKE_PTR(copy);
index a5627d0a1f9b218512870b8d795092dc8b1f0bfc..d70fda5f4403e5d13b99db230cb8217b9ac811fb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "homed-bus.h"
 #include "strv.h"
index 20f13b43ade3839fabfb5633d88183baa02845f5..977679b10ad3f85297c98e6c943c207f3ad94445 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index c6c2e1787fd65bd40b9a9dc8b35ccf82d7e0b597..4f46b0c886e7e94bead2c2b2cff9c0b5341b38c5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "conf-parser.h"
 #include "def.h"
index 00eb3fdb684c0d92542a33e43527713b33d4fc04..1defaa998b6b93e4675d9cfba9814ef6c327c3be 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "conf-parser.h"
index 08f77b4f5131631b67fe8d02816cb18a0700f713..5643a9a6e43981b7f14c53b5775f1c45c48b27dd 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/capability.h>
 
index 8ac7ff9995478d3f825e266d4fadcdf58e26d750..552217805560cb47bda8b193af37993379f1e509 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 6d0f0fbd0e52b53d41365129851a3040c803ef00..7f4532e0cc7bf46ecf70869f816c2711521c26bb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if HAVE_LINUX_MEMFD_H
 #include <linux/memfd.h>
index 97879940df201a8937cbe40e8d22d5ff7421f06c..4c24ee72a79798847b89641d6c9c7dcf98af2e5e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct Home Home;
index a599c582976c72e3b79011f24ffff5edd9c2c893..d3ac98f901ce355f77b08cbc131371257bc3177e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/capability.h>
 
index 93bef9df8eb905332cc7c6b29e62d5bf6dd7ffe4..7db29fa88fd1dcc07bdf91cd8b177e5f40758f89 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "bus-util.h"
index 049003241606efdfa250cd219e1faf2aecec69db..365ea4d234682a947b14cd2dc1bac71cd9c330ba 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <grp.h>
 #include <linux/fs.h>
@@ -159,7 +159,7 @@ static int on_home_inotify(sd_event_source *s, const struct inotify_event *event
                 (void) bus_manager_emit_auto_login_changed(m);
         }
 
-        if ((event->mask & (IN_DELETE|IN_MOVED_FROM|IN_DELETE)) != 0) {
+        if ((event->mask & (IN_DELETE | IN_CLOSE_WRITE | IN_MOVED_FROM)) != 0) {
                 Home *h;
 
                 if (FLAGS_SET(event->mask, IN_DELETE))
index c86bf4300b35a9d72290558a1fa5ceb1ede3d5dd..851b302f59346b7cb7ace7f5f1a09f8140207902 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <openssl/evp.h>
index 156a25ec816138908ce57bea6fc7825034eb758e..3847fc5d6878aff350860dfebacf7eb92e17337d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "fd-util.h"
 #include "homed-operation.h"
index 0771dc6be0e51e48cba01f2c065c482fa4f09381..6721363b2a171bd7d162a435c7d52b71c13c56f9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sd-bus.h>
index dfc615a0973836ff7d7e28db0a6dad34b19e5ba7..c42908349a54d61a592165ada596046d6a981fc1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "group-record.h"
 #include "homed-varlink.h"
index 4454d2344221fff16234ad5337f930309d4b321f..2e404f02fadab29cbfba91d1d28a0d92024499af 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "homed-manager.h"
index eb5a4a2ea50b2e486a9c7e11f1b54e84463fe800..e4d64bdfda15d0fab6c68fcd397323ed085cd644 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/stat.h>
 #include <sys/types.h>
index cfceaed74274fdd2dd98ccc41d5d5103a5b03371..2736095f939789839c40a16b336c9237b483ab46 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "dirent-util.h"
 #include "fd-util.h"
index ee799e2a4b8ed9ed2dc7bb3c62c5f5011b3e14df..da2e50a795a30dff063350ba8d571f08a11aafb4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "homework.h"
index bffeac0a5ef32f624277f6716bf87f5f936313df..2d800033ee65a12fc299c9e1c9819df480a79b15 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/mount.h>
 
index 717837f348f6078ff54901d5aeff03191321db49..27d640f380398e2a8599497e51b87c9105005fac 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "homework.h"
index 36fe059ab3c64b96f5e3a5b5dc9d883447b5aaa5..2f717a59380d6b707c63b3a4477184c8f58b5565 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fido.h>
 
index d3b142a923d573ac69a8e18d9f8bd06fc26d317f..a1dcba2d86c3d29431ecd3b4cf60b11c51fa723e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "user-record.h"
index da9bb64b712cb7b5e5a35e4094cfecdb83a69b07..d0676f8ae6dffdb8d825ca5b432636b2bd4522aa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/fs.h>
 #include <openssl/evp.h>
index e5cf7baaaa456585ea50b0268fa1e8d3021a3734..50b03993e03d0c75f4cc0fc1d68123578b2201d0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "homework.h"
index 947a559c2671d8f8a79fbfe848be4e513e61e6ee..b0b2d8029fb3517c5f61d51dde6eb76496a1ca1f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <libfdisk.h>
 #include <linux/loop.h>
index af0ad4b5043c9421e9cdc0fac4b4aeab31079dc0..c43bdfcba3f31c039ead6cc385d7eb20f63669a7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "cryptsetup-util.h"
index 853181b80d81ae8789ace2b569b92f76cd39ebd0..5e737687d1193150611c1e4a0665d89cad425ae9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sched.h>
 #include <sys/mount.h>
index cf7c8cfcab4bd848ed98d6c71d4115cd479c76e1..2a4591c1f42c0e4e0ec8bff1a4be168bd1ea6cc8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 3a03fb7200d1b6cc2bcc266d049181f546469837..15402b1002c05ff88885cbbb2abae49c690afe40 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "hexdecoct.h"
 #include "homework-pkcs11.h"
index 469ba7152f14b7386be0e0b24b9892e9e2894fa2..c8674e0bc7f5ca8864b2ab1c86aaaf33f5301afe 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #if HAVE_P11KIT
index ba3917b9cee8d7221c4a590f44554c1b0d4d0c1a..7001870dfb85ac9d1b9b1b9202b804336e988665 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #include <sys/quota.h>
 
 #include "blockdev-util.h"
index e6cc16df5035de193e892fcc320e32f487658eea..a21c9ba8b15a20a3a090813446f0b28b57e1b862 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "user-record.h"
index 4b924b2a7c0117afe93d0a195e76850fa40558f3..b61f650662d3994137a6f2cb2055cd0c687ecf5c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stddef.h>
 #include <sys/mount.h>
index c9b0d3b4325dcd9627822c5340ad75be63c60e9e..fb53fd49b0376d9fc77718caea8c59739d7a44f2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <linux/fs.h>
index 69bacacf8083f0d680930ed69d590d2acae00480..444dc476196ee319053046338aaaf828ecdec93a 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 systemd_homework_sources = files('''
         home-util.c
@@ -107,8 +107,10 @@ if conf.get('ENABLE_HOMED') == 1
         install_data('org.freedesktop.home1.policy',
                      install_dir : polkitpolicydir)
 
-        install_data('homed.conf',
-                     install_dir : pkgsysconfdir)
+        if install_sysconfdir
+                install_data('homed.conf',
+                             install_dir : pkgsysconfdir)
+        endif
 endif
 
 tests += [
index 82a5b20d3f5817c5f07727cfdf0c8beb81a2e865..ae5f895722eeb652569bd05a818bbb12b16131b6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index e0067ae44b152662c3359b54c90a7f9482984ab4..7776ed0ee1aec04ffb7eb3dfed96e0321c227749 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /* 256 bit keys = 32 bytes */
index d615501054d741192919f18cb0a596959640c02d..1975d5f1a2bf8cf8ab04e0e5bd6ac45f55a8925b 100644 (file)
@@ -2,7 +2,7 @@
 <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
         "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
 
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <busconfig>
 
index 43a373d633390af1869cc9dcf656ee759a8086ef..10ad7c283a958abf05b4fe34253f8ca46b9d9976 100644 (file)
@@ -2,7 +2,7 @@
 <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
         "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
 
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <policyconfig>
 
index cff19b38617df18152061c13513df5d06280ab81..fb03914592dd1d1917420246bf1750b482223978 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 [D-BUS Service]
 Name=org.freedesktop.home1
index 8fe52f44aac607cb8c6683e04fbeaaded485629e..a91df91447ee789fe2c9a2ca7d44a52e273ae2ed 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <security/pam_ext.h>
 #include <security/pam_modules.h>
@@ -142,7 +142,7 @@ static int acquire_user_record(
         if (r == PAM_SUCCESS && json) {
                 /* We determined earlier that this is not a homed user? Then exit early. (We use -1 as
                  * negative cache indicator) */
-                if (json == (void*) -1)
+                if (json == POINTER_MAX)
                         return PAM_USER_UNKNOWN;
         } else {
                 _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
@@ -235,7 +235,7 @@ static int acquire_user_record(
 
 user_unknown:
         /* Cache this, so that we don't check again */
-        r = pam_set_data(handle, homed_field, (void*) -1, NULL);
+        r = pam_set_data(handle, homed_field, POINTER_MAX, NULL);
         if (r != PAM_SUCCESS)
                 pam_syslog(handle, LOG_ERR, "Failed to set PAM user record data '%s' to invalid, ignoring: %s",
                            homed_field, pam_strerror(handle, r));
@@ -625,6 +625,15 @@ static int acquire_home(
                 do_auth = true;
         }
 
+        /* Later PAM modules may need the auth token, but only during pam_authenticate. */
+        if (please_authenticate && !strv_isempty(secret->password)) {
+                r = pam_set_item(handle, PAM_AUTHTOK, *secret->password);
+                if (r < 0) {
+                        pam_syslog(handle, LOG_ERR, "Failed to set PAM auth token: %s", pam_strerror(handle, r));
+                        return r;
+                }
+        }
+
         r = pam_set_data(handle, fd_field, FD_TO_PTR(acquired_fd), cleanup_home_fd);
         if (r < 0) {
                 pam_syslog(handle, LOG_ERR, "Failed to set PAM bus data: %s", pam_strerror(handle, r));
@@ -833,8 +842,6 @@ _public_ PAM_EXTERN int pam_sm_acct_mgmt(
                 pam_syslog(handle, LOG_DEBUG, "pam-systemd-homed account management");
 
         r = acquire_home(handle, /* please_authenticate = */ false, please_suspend, debug);
-        if (r == PAM_USER_UNKNOWN)
-                return PAM_SUCCESS; /* we don't have anything to say about users we don't manage */
         if (r != PAM_SUCCESS)
                 return r;
 
index daec0499e114848ce50be75415deb8527f3b109b..293c06fe2c17675b9ebe5909b781394402394e7c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 {
 global:
index 4eebeeaaeab9f725b82a1d0f7e36c790a6710a2a..1bd9061a7b0551a082f898937bcffcecbeb86e82 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "modhex.h"
 #include "alloc-util.h"
index 08d7dc01695bbda398c9ce917ceb3948a9519533..23c3357836cf16241cbf7ebc3dcc556652f8ae66 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-common-errors.h"
 #include "errno-util.h"
index a37d369181078da161983fa382b4e0222185840c..b3b2690f7e3f1c879b01cafb9b34cfe1e7df1740 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 91f86399976d2887d2a65c2f3172ede071a80d7a..8cd3a462513fea312afb7c9ea895a25c3d0a8d22 100644 (file)
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
 #include <openssl/pem.h>
 
 #include "fd-util.h"
index f045c8837bced31330029eac21dfca2019a469f0..87c6813e92825bc2baac1d4b34c8c8df6b26d0fe 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <openssl/evp.h>
index 3ed64128b2edc7a48b147b7f617430d28aeb5ad4..6bcbb56aac377de1973f06d32defeed2c0372b81 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/xattr.h>
 
index f8bae707bcf36fb28b3a70ccbae3f03ba44f5b99..302e7a5dff0c66e5664402a2611202341e81a00e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index c38600b9c3f2c8e72afc23292861dc00229922a5..0d39e9176f351b08778abf824f5fa59e94cf4f0b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 #include <locale.h>
index 44c2b9a631986b5dcadefeb5a09a94ffd7c5e55c..a1794bdab1e36a9715dfec29b3b16063b1fc7c42 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sys/utsname.h>
index db66ba5531dcfd0da2cdced3c85eec6180939eab..718a7bd4f1e0b0bfa0f2a4ea0239be7a2466c3f2 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 if conf.get('ENABLE_HOSTNAMED') == 1
         install_data('org.freedesktop.hostname1.conf',
index e2658c6c9596d9f2026ef5e154a467f37d0c493a..2f34102e98fb29dca8f9211455d887a238200525 100644 (file)
@@ -3,7 +3,7 @@
         "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   This file is part of systemd.
 
index 5969a82b29917547b337e7cddc2a0b5fc8d8c863..7d28c395cff18e076679957eed1d98701d13f767 100644 (file)
@@ -3,7 +3,7 @@
         "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   systemd is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
index 98c7bcbd84983fbb51fff34289dbd9cfa9ae3a66..1d6b9c8fe763e7ca497ce3172f698b019b6f6b5f 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  systemd is free software; you can redistribute it and/or modify it
 #  under the terms of the GNU Lesser General Public License as published by
index eb038a8b55ea8d833b4b5b6dd6cbee78d927f9fd..1246d6896959463834564f94d94190c13a59829d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 
index 236043bf8a4c06c7aec0f2bc1405cc0977fb8f47..086f398108112f3241fb6dd9b66521d54007a5cc 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 #include <stdio.h>
index a1b3147f658bb8ec93ea341b50150d28dc4d93cc..5e0904379e18edcadb5724b761e3d702020b9b90 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 
@@ -50,7 +50,7 @@ static int curl_glue_on_io(sd_event_source *s, int fd, uint32_t revents, void *u
         return 0;
 }
 
-static int curl_glue_socket_callback(CURLM *curl, curl_socket_t s, int action, void *userdata, void *socketp) {
+static int curl_glue_socket_callback(CURL *curl, curl_socket_t s, int action, void *userdata, void *socketp) {
         sd_event_source *io = socketp;
         CurlGlue *g = userdata;
         uint32_t events = 0;
@@ -178,7 +178,7 @@ CurlGlue *curl_glue_unref(CurlGlue *g) {
 
 int curl_glue_new(CurlGlue **glue, sd_event *event) {
         _cleanup_(curl_glue_unrefp) CurlGlue *g = NULL;
-        _cleanup_(curl_multi_cleanupp) CURL *c = NULL;
+        _cleanup_(curl_multi_cleanupp) CURLM *c = NULL;
         _cleanup_(sd_event_unrefp) sd_event *e = NULL;
         int r;
 
index fa80b233422c080b273cca422a695ce937984448..4ab52d73a4f1b5becb0318838d2ba53f1ac2abbe 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <curl/curl.h>
@@ -35,5 +35,5 @@ int curl_header_strdup(const void *contents, size_t sz, const char *field, char
 int curl_parse_http_time(const char *t, usec_t *ret);
 
 DEFINE_TRIVIAL_CLEANUP_FUNC(CURL*, curl_easy_cleanup);
-DEFINE_TRIVIAL_CLEANUP_FUNC(CURL*, curl_multi_cleanup);
+DEFINE_TRIVIAL_CLEANUP_FUNC(CURLM*, curl_multi_cleanup);
 DEFINE_TRIVIAL_CLEANUP_FUNC(struct curl_slist*, curl_slist_free_all);
index a0ac6bc7f485a47298a49f80c9588ce8c1461602..3e0348f4c160f074cc9328e4ee70378863438228 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/sendfile.h>
 
index 196b8ef28f19ed0df203f7edcf7874a436f54ae9..27009e4e350f0aff6c83e9d4d0fcf78a7aa50e9c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-event.h"
index 5f89880ed60e2a65a9cfdfb309538d5e512939a4..b8b650f01e1d88605fb5c4bb1df45451494d3e1c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-daemon.h"
 
index 6abb7d383abe0efc7cb8e9b464d70c06b1df71dd..3b55d12c1f9dc40a57e19441d470651ed2d3591b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-event.h"
index 77d24b8635c0f3e14e00ec13a7b5c82d5c7a8fe8..83990df64c69fb08688472193ddebcf17fc6595b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 #include <locale.h>
index ebd747289288e4a87933d7a67894cc1d9acb23e1..250270511da6c2611e13aa365915eb8cd633e7ea 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sched.h>
 #include <sys/prctl.h>
index 94d224f4129889b557cfd9f8463a403748b680a8..b27a980839040bf68ca86770366f6873b67bbc3e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/types.h>
index 3fbd0677906c5b572b8303eb7181706614d8a9ea..b89ffb1b2ac925000609f03210c6d6356deb567e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "import-compress.h"
 #include "string-table.h"
index 859bd0e1a47fddf05b5f7622310e721a4ffd883d..e40f4dba0a78959bad1782be4afb9070bbd7db9a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #if HAVE_BZIP2
index f631f857fc9ccbe932f7e8695a41b77172dcea60..3b43ea112d9d5587ccb549dd349db72bbd71054b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 #include <locale.h>
index 7e9f3441f4da67ed8dea23c240cdccda08382db8..9f5c13ba1634a84121803b3d0beaf17b931c2956 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/fs.h>
 
index de4c3ea337a3a754369dad970e3c8204540b0308..4612a9ffef162e7cde69690a9417a00cae1e2e7a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-event.h"
index 5d2bf22fb25d7d5d27ee561aaf1edfa5506f9fb4..9f68d45eacb615584633808f0a53b4e076979b3b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/fs.h>
 
index 347f522614ebdd9b63ae30c1344f425f73054b5e..afbe98ad055d1f41d3d561439211db827c7f80c5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-event.h"
index 64ec066a8f326e74921b4103d186075b53189bc3..eade0f0ec881f73a44a6539893ee0f02a025c1e6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 #include <locale.h>
index 17944b8dd3aca7782c2ecea917a3d81bfd078840..63f80e0e38bdbba8f94742e84cc4955914086e14 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/prctl.h>
 #include <sys/wait.h>
index 1c15fd883fec6761499a6280cbb67c9db6e57c9a..2207b8620ed2239818d6c00289f9a8a56734ab18 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 systemd_importd_sources = files('''
         importd.c
index 2fdb2ba77c5fd0197abb2b0d894823751c68315b..4838e79a15ccc39175f9a11cba87db668cbb6c2a 100644 (file)
@@ -3,7 +3,7 @@
         "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   This file is part of systemd.
 
index beea5fea676a0c9f2ef9ae409a0a04d6dbc22f86..9736816e332913a1e5665e6ea7feea827947ccd4 100644 (file)
@@ -3,7 +3,7 @@
         "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   This file is part of systemd.
 
index 34d26d07325084a6d9e8ed1ee0901f750f424ee9..4fe921f26e45a8480252f555bb7efd2256012b48 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index fdc70447e1286854b6d9d1473f52afc747d09e42..33be609aec57310dd08bd63302d20db9d611962a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/prctl.h>
 
index 65f239da2ea164616bb04b15bf036c924f4be8f2..025bcee2bd70168fa0b28058ba6ea874c560d453 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 456179454869a724362fc5c450ef2f93c116d70d..eea00380a4918c0468133f669c8f0f9517bdb53c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/stat.h>
index c907e74060982a6d554d08d3c89b123f4e9b9f08..719196caec9fde7a56cf7b5613330cf2ff9a9e34 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <gcrypt.h>
index c32b77f14b84e6497a0b355e70b1f1f5be4f8243..7956ef0395bdd61aa21cff148cdd3cc38019bc6e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <curl/curl.h>
 #include <linux/fs.h>
index 4ccd65b7e67ebdf30127271d6291d4cf3f9a67f8..e1d450d9dfd83d1efc87ca8632492361ec56f637 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-event.h"
index ede28bee1b1d0c88a856bb75b881062af3f0f218..72e5b8be2701a2ce318496a04b89518e2534e1ea 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <curl/curl.h>
 #include <sys/prctl.h>
index 76f920eea966fe596c94306c47b55c2f0f975981..78d982cf5a055465af3491b50279e6d8557efa8f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-event.h"
index 9b27ec26306e7fbd19cf99580cc8d61f8158e855..9aff377b93fad217efe13de40e78645eb37f0346 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 #include <locale.h>
index e927b60fcee858fcd929d62055336128c87a4349..5a7232d3edcbb1e5596167583e48069b546a1594 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <zlib.h>
 
index 7393d9837ad2f911a72d25863f58fe2a0be8fd3a..f17c159ee4465f2381dfb627afc233d54832bfd7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int qcow2_detect(int fd);
index 1703cfd16752ecbaade6a8d54d632c7edd6098e2..77fed01dd375b87e725d53f961684a8444547ade 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/stat.h>
index 050424e66cc5c483654860fe481e82725b5bf410..e0b78334f5d3cdbb1331020d7c12d266ba897f0a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <ctype.h>
 #include <errno.h>
index c4d45020803d6a425d21d4d106d7a32128985714..534de51b0f60a7345fc32c98836983b9cf31db9e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <getopt.h>
@@ -22,6 +22,7 @@
 #include "log.h"
 #include "logs-show.h"
 #include "main-func.h"
+#include "memory-util.h"
 #include "microhttpd-util.h"
 #include "os-util.h"
 #include "parse-util.h"
@@ -37,7 +38,7 @@ static char *arg_cert_pem = NULL;
 static char *arg_trust_pem = NULL;
 static const char *arg_directory = NULL;
 
-STATIC_DESTRUCTOR_REGISTER(arg_key_pem, freep);
+STATIC_DESTRUCTOR_REGISTER(arg_key_pem, erase_and_freep);
 STATIC_DESTRUCTOR_REGISTER(arg_cert_pem, freep);
 STATIC_DESTRUCTOR_REGISTER(arg_trust_pem, freep);
 
@@ -896,7 +897,11 @@ static int parse_argv(int argc, char *argv[]) {
                         if (arg_key_pem)
                                 return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
                                                        "Key file specified twice");
-                        r = read_full_file_full(AT_FDCWD, optarg, READ_FULL_FILE_CONNECT_SOCKET, &arg_key_pem, NULL);
+                        r = read_full_file_full(
+                                        AT_FDCWD, optarg, UINT64_MAX, SIZE_MAX,
+                                        READ_FULL_FILE_SECURE|READ_FULL_FILE_WARN_WORLD_READABLE|READ_FULL_FILE_CONNECT_SOCKET,
+                                        NULL,
+                                        &arg_key_pem, NULL);
                         if (r < 0)
                                 return log_error_errno(r, "Failed to read key file: %m");
                         assert(arg_key_pem);
@@ -906,7 +911,11 @@ static int parse_argv(int argc, char *argv[]) {
                         if (arg_cert_pem)
                                 return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
                                                        "Certificate file specified twice");
-                        r = read_full_file_full(AT_FDCWD, optarg, READ_FULL_FILE_CONNECT_SOCKET, &arg_cert_pem, NULL);
+                        r = read_full_file_full(
+                                        AT_FDCWD, optarg, UINT64_MAX, SIZE_MAX,
+                                        READ_FULL_FILE_CONNECT_SOCKET,
+                                        NULL,
+                                        &arg_cert_pem, NULL);
                         if (r < 0)
                                 return log_error_errno(r, "Failed to read certificate file: %m");
                         assert(arg_cert_pem);
@@ -917,14 +926,18 @@ static int parse_argv(int argc, char *argv[]) {
                         if (arg_trust_pem)
                                 return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
                                                        "CA certificate file specified twice");
-                        r = read_full_file_full(AT_FDCWD, optarg, READ_FULL_FILE_CONNECT_SOCKET, &arg_trust_pem, NULL);
+                        r = read_full_file_full(
+                                        AT_FDCWD, optarg, UINT64_MAX, SIZE_MAX,
+                                        READ_FULL_FILE_CONNECT_SOCKET,
+                                        NULL,
+                                        &arg_trust_pem, NULL);
                         if (r < 0)
                                 return log_error_errno(r, "Failed to read CA certificate file: %m");
                         assert(arg_trust_pem);
                         break;
 #else
                         return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
-                                               "Option --trust is not available.");
+                                               "Option --trust= is not available.");
 #endif
                 case 'D':
                         arg_directory = optarg;
index 0e028a9e4a7a51ca0c4c13e8a51b9c07d7926494..af8cde7eef4060354bc86eb32394e6f46c5f1200 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 #include <unistd.h>
@@ -13,6 +13,7 @@
 #include "journal-remote-write.h"
 #include "journal-remote.h"
 #include "main-func.h"
+#include "memory-util.h"
 #include "pretty-print.h"
 #include "process-util.h"
 #include "rlimit-util.h"
@@ -1077,12 +1078,20 @@ static int parse_argv(int argc, char *argv[]) {
 static int load_certificates(char **key, char **cert, char **trust) {
         int r;
 
-        r = read_full_file_full(AT_FDCWD, arg_key ?: PRIV_KEY_FILE, READ_FULL_FILE_CONNECT_SOCKET, key, NULL);
+        r = read_full_file_full(
+                        AT_FDCWD, arg_key ?: PRIV_KEY_FILE, UINT64_MAX, SIZE_MAX,
+                        READ_FULL_FILE_SECURE|READ_FULL_FILE_WARN_WORLD_READABLE|READ_FULL_FILE_CONNECT_SOCKET,
+                        NULL,
+                        key, NULL);
         if (r < 0)
                 return log_error_errno(r, "Failed to read key from file '%s': %m",
                                        arg_key ?: PRIV_KEY_FILE);
 
-        r = read_full_file_full(AT_FDCWD, arg_cert ?: CERT_FILE, READ_FULL_FILE_CONNECT_SOCKET, cert, NULL);
+        r = read_full_file_full(
+                        AT_FDCWD, arg_cert ?: CERT_FILE, UINT64_MAX, SIZE_MAX,
+                        READ_FULL_FILE_CONNECT_SOCKET,
+                        NULL,
+                        cert, NULL);
         if (r < 0)
                 return log_error_errno(r, "Failed to read certificate from file '%s': %m",
                                        arg_cert ?: CERT_FILE);
@@ -1090,7 +1099,11 @@ static int load_certificates(char **key, char **cert, char **trust) {
         if (arg_trust_all)
                 log_info("Certificate checking disabled.");
         else {
-                r = read_full_file_full(AT_FDCWD, arg_trust ?: TRUST_FILE, READ_FULL_FILE_CONNECT_SOCKET, trust, NULL);
+                r = read_full_file_full(
+                                AT_FDCWD, arg_trust ?: TRUST_FILE, UINT64_MAX, SIZE_MAX,
+                                READ_FULL_FILE_CONNECT_SOCKET,
+                                NULL,
+                                trust, NULL);
                 if (r < 0)
                         return log_error_errno(r, "Failed to read CA certificate file '%s': %m",
                                                arg_trust ?: TRUST_FILE);
@@ -1106,7 +1119,8 @@ static int load_certificates(char **key, char **cert, char **trust) {
 static int run(int argc, char **argv) {
         _cleanup_(journal_remote_server_destroy) RemoteServer s = {};
         _cleanup_(notify_on_cleanup) const char *notify_message = NULL;
-        _cleanup_free_ char *key = NULL, *cert = NULL, *trust = NULL;
+        _cleanup_(erase_and_freep) char *key = NULL;
+        _cleanup_free_ char *cert = NULL, *trust = NULL;
         int r;
 
         log_show_color(true);
index dc047b2d49955a56266f1e142a76fb99a717d456..7bc349c304299e852fc3a0814c5a0709753dab28 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "fd-util.h"
index d6c77360a605adc5663c10e225aee6238a669d9c..a5b51ad4d14563e686b33963404cd0ba7a3288fe 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-event.h"
index ab5e03ab5aece4981ece02867f354c4be9e947fe..764a3ec70bf6506a3ec417173380b2249ee0755d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "journal-remote.h"
index d42256e673fd46876a3ffb0a3bfe2608493e80c4..46b55219d7b521f8ca1ffd5545598fb7c5ab3cfa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "journal-file.h"
index b241d3355d6048118ac71556e13fc0beccf3f75c..0cee84445270112ca8763ed101093916283917e6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 4c25d43abf955a6d352fda60aca0d3836dcb6f01..247ffa9765cb0b5ae80b14f7138c187b4414742a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-event.h"
index da37b3416ff4ce1b4bee2daf122cfc8b9e5f3819..3296c2268eac2bc163e34d8ca52b433adf2f6318 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <curl/curl.h>
 #include <stdbool.h>
index 13ca90f957f6c4eb3812a423aaf1866a6a5a27e9..bf362d0919d10b87c61f08e15a5faa74a47b9551 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <curl/curl.h>
 #include <fcntl.h>
index 4994cd8391dd5d147b842d93d4b1cd056aba56f3..9ff5a7ba5805dd2c29ab133d17743b473667fa80 100644 (file)
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
 #pragma once
 
 #include <inttypes.h>
index 87b8ba6495f826ddcb730a50cb3b3f1f3fb8a025..4572f4bd1c504cee76737954124559c3bd4e4dae 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 systemd_journal_upload_sources = files('''
         journal-upload.h
@@ -48,8 +48,10 @@ if conf.get('ENABLE_REMOTE') ==1 and conf.get('HAVE_LIBCURL') == 1
                 input : 'journal-upload.conf.in',
                 output : 'journal-upload.conf',
                 configuration : substs)
-        install_data(journal_upload_conf,
-                     install_dir : pkgsysconfdir)
+        if install_sysconfdir
+                install_data(journal_upload_conf,
+                             install_dir : pkgsysconfdir)
+        endif
 endif
 
 if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
@@ -57,8 +59,10 @@ if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
                 input : 'journal-remote.conf.in',
                 output : 'journal-remote.conf',
                 configuration : substs)
-        install_data(journal_remote_conf,
-                     install_dir : pkgsysconfdir)
+        if install_sysconfdir
+                install_data(journal_remote_conf,
+                             install_dir : pkgsysconfdir)
+        endif
 
         install_data('browse.html',
                      install_dir : join_paths(pkgdatadir, 'gatewayd'))
index 027f2c8ff5802c41655d94a3aaa397c66aead8c3..d3fb0b8b191361a6b40316862b0de3de63f63403 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stddef.h>
 #include <stdio.h>
index 4ca9a5c4f16976775cdc0dccc804c8fd7b5d91a3..7f90a09c7770253070b343d768c0d40ffe1ff939 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <microhttpd.h>
index 7b3dc1e9ab0eed9ddf0512c6132a096497f8b01a..122cdf5d3f6bf9523811bfeba15e7b754522cd49 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "audit-type.h"
 #include "missing_audit.h"
index 39d917894e0f396be695d352f24f651929a5eecd..f2c489856c386f6fa142ea043c190bfd817cba89 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdio.h>
index 2faaa2e28488d77149b78942125ee0f8a6f3a4ad..bccf615189c1f9ba22eed2d02fe941c00755d73c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index b0416da0c65d8f30709c926fcf48688c85bec508..0f6ad8a29e83113fec27dc3c52c159ff627052f7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 092a014651a5c64e1a5c817edf899b4bf67c4e85..df27869fb3281031a560253339b38cdc141a785c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index a1bd4a379ede1661d79082fd3aa934279d20c7f8..aaf186ba69f4a64baf37db144b2eb1f773e0859b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <inttypes.h>
 #include <stdlib.h>
index ab44ff06ede87fee8a568d27610813e17d94d44f..db7f3999ed7b06a5faf50eecf175cdc3a9fd8a71 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <unistd.h>
index 0ef3df89df264a1040d770c293ac951c94df1c8d..7ea72495ef2ed325e4eb20ed90d039508a248544 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  *
  * fsprg v0.1  -  (seekable) forward-secure pseudorandom generator
  * Copyright © 2012 B. Poettering
index 33412675b8c4928a61c8d79c42fb5a562128b9c1..dfe2d7922205b494268ff61bac30bbbba6afe5d2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /*
index da275c2512f6abc415caed1147b22969d16755b2..a5ff987d6ed604244cac240324885a17fff3bb44 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/mman.h>
index 2ef0133040d7ec778abff27a717ef6502dfb85fd..e895722865d6e4734cf0398f1876525b2ffa8dd1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index e9ddbb9dabbe8f364c14b31d8ce21076f393ce14..bd924bda8a1c5a92b7c5ca4aef6afe44380d38d5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-id128.h"
index feff3bd9f03669033185088766b1a9ad2f3ef0d6..1dbe81849c2dd662f77e76e62878cd0eeb0d0784 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index f80bf5d26b1371c5fbf989f70cfa9769ed0a3914..3bdf551287ba91eb360c7a5886ef19bf67a45ff8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index d87b0a11e5899dc55d49500554ba001ab06ea555..c2d29aae78ad7458a07de3e85bda9ed5d5c21417 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
diff --git a/src/journal/journal-qrcode.c b/src/journal/journal-qrcode.c
deleted file mode 100644 (file)
index e8a7655..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
-
-#include <errno.h>
-#include <qrencode.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "alloc-util.h"
-#include "dlfcn-util.h"
-#include "fd-util.h"
-#include "fileio.h"
-#include "journal-qrcode.h"
-#include "locale-util.h"
-#include "macro.h"
-#include "qrcode-util.h"
-#include "terminal-util.h"
-
-int print_qr_code(
-                FILE *output,
-                const char *prefix_text,
-                const void *seed,
-                size_t seed_size,
-                uint64_t start,
-                uint64_t interval,
-                const char *hn,
-                sd_id128_t machine) {
-
-        QRcode* (*sym_QRcode_encodeString)(const char *string, int version, QRecLevel level, QRencodeMode hint, int casesensitive);
-        void (*sym_QRcode_free)(QRcode *qrcode);
-        _cleanup_(dlclosep) void *dl = NULL;
-        _cleanup_free_ char *url = NULL;
-        _cleanup_fclose_ FILE *f = NULL;
-        size_t url_size = 0;
-        QRcode* qr;
-        int r;
-
-        assert(seed);
-        assert(seed_size > 0);
-
-        /* If this is not an UTF-8 system or ANSI colors aren't supported/disabled don't print any QR
-         * codes */
-        if (!is_locale_utf8() || !colors_enabled())
-                return -EOPNOTSUPP;
-
-        dl = dlopen("libqrencode.so.4", RTLD_LAZY);
-        if (!dl)
-                return log_debug_errno(SYNTHETIC_ERRNO(EOPNOTSUPP),
-                                       "QRCODE support is not installed: %s", dlerror());
-
-        r = dlsym_many_and_warn(
-                        dl,
-                        LOG_DEBUG,
-                        &sym_QRcode_encodeString, "QRcode_encodeString",
-                        &sym_QRcode_free, "QRcode_free",
-                        NULL);
-        if (r < 0)
-                return r;
-
-        f = open_memstream_unlocked(&url, &url_size);
-        if (!f)
-                return -ENOMEM;
-
-        fputs("fss://", f);
-
-        for (size_t i = 0; i < seed_size; i++) {
-                if (i > 0 && i % 3 == 0)
-                        fputc('-', f);
-                fprintf(f, "%02x", ((uint8_t*) seed)[i]);
-        }
-
-        fprintf(f, "/%"PRIx64"-%"PRIx64"?machine=" SD_ID128_FORMAT_STR,
-                start,
-                interval,
-                SD_ID128_FORMAT_VAL(machine));
-
-        if (hn)
-                fprintf(f, ";hostname=%s", hn);
-
-        r = fflush_and_check(f);
-        if (r < 0)
-                return r;
-
-        f = safe_fclose(f);
-
-        qr = sym_QRcode_encodeString(url, 0, QR_ECLEVEL_L, QR_MODE_8, 1);
-        if (!qr)
-                return -ENOMEM;
-
-        if (prefix_text)
-                fputs(prefix_text, output);
-
-        write_qrcode(output, qr);
-
-        sym_QRcode_free(qr);
-        return 0;
-}
diff --git a/src/journal/journal-qrcode.h b/src/journal/journal-qrcode.h
deleted file mode 100644 (file)
index 24ae9d3..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
-#pragma once
-
-#include <inttypes.h>
-#include <stdio.h>
-
-#include "sd-id128.h"
-
-int print_qr_code(FILE *f, const char *prefix_text, const void *seed, size_t seed_size, uint64_t start, uint64_t interval, const char *hn, sd_id128_t machine);
index 64882eb4ee4fc67fa8c2c1969223726bd7e1c6ab..fd3fd7ef9c944060cb565f7454e832181ccd4282 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 87d65896c61e7001f6af1fb177b47645c14fa882..c1736641462d6bcf451db992878ad346a73a82fc 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/stat.h>
index 0b336ac0136e009c29e46feed5e8344e1e8dec15..d87c847da602040b1390d27d6e20560f27e1834b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index eddb8054bf7dbc84d6b679c22b1cb13bd80b2422..6ea2f4c898a9b67ee3c6cdf57913a3ddee666516 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <stddef.h>
index f0ea31abc145e3e2c118c0a7f6c96acb39264c8a..579033069b56c6cf17814a2598d953109e1e547f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "journal-file.h"
index e43e9d1afac95000f1d7f590bb0f4b2edf2c120b..bcf2e01d5c9e7c29f81865ca17be949aff4a62c6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -43,7 +43,6 @@
 #include "io-util.h"
 #include "journal-def.h"
 #include "journal-internal.h"
-#include "journal-qrcode.h"
 #include "journal-util.h"
 #include "journal-vacuum.h"
 #include "journal-verify.h"
@@ -60,6 +59,7 @@
 #include "path-util.h"
 #include "pcre2-dlopen.h"
 #include "pretty-print.h"
+#include "qrcode-util.h"
 #include "random-util.h"
 #include "rlimit-util.h"
 #include "set.h"
@@ -1779,6 +1779,55 @@ static int add_syslog_identifier(sd_journal *j) {
         return 0;
 }
 
+#if HAVE_GCRYPT
+static int format_journal_url(
+                const void *seed,
+                size_t seed_size,
+                uint64_t start,
+                uint64_t interval,
+                const char *hn,
+                sd_id128_t machine,
+                bool full,
+                char **ret_url) {
+        _cleanup_free_ char *url = NULL;
+        _cleanup_fclose_ FILE *f = NULL;
+        size_t url_size = 0;
+        int r;
+
+        assert(seed);
+        assert(seed_size > 0);
+
+        f = open_memstream_unlocked(&url, &url_size);
+        if (!f)
+                return -ENOMEM;
+
+        if (full)
+                fputs("fss://", f);
+
+        for (size_t i = 0; i < seed_size; i++) {
+                if (i > 0 && i % 3 == 0)
+                        fputc('-', f);
+                fprintf(f, "%02x", ((uint8_t*) seed)[i]);
+        }
+
+        fprintf(f, "/%"PRIx64"-%"PRIx64, start, interval);
+
+        if (full) {
+                fprintf(f, "?machine=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(machine));
+                if (hn)
+                        fprintf(f, ";hostname=%s", hn);
+        }
+
+        r = fflush_and_check(f);
+        if (r < 0)
+                return r;
+
+        f = safe_fclose(f);
+        *ret_url = TAKE_PTR(url);
+        return 0;
+}
+#endif
+
 static int setup_keys(void) {
 #if HAVE_GCRYPT
         size_t mpk_size, seed_size, state_size;
@@ -1893,7 +1942,11 @@ static int setup_keys(void) {
 
         k = mfree(k);
 
-        _cleanup_free_ char *hn = NULL;
+        _cleanup_free_ char *hn = NULL, *key = NULL;
+
+        r = format_journal_url(seed, seed_size, n, arg_interval, hn, machine, false, &key);
+        if (r < 0)
+                return r;
 
         if (on_tty()) {
                 hn = gethostname_malloc();
@@ -1925,21 +1978,19 @@ static int setup_keys(void) {
                 fflush(stderr);
         }
 
-        for (size_t i = 0; i < seed_size; i++) {
-                if (i > 0 && i % 3 == 0)
-                        putchar('-');
-                printf("%02x", ((uint8_t*) seed)[i]);
-        }
-        printf("/%llx-%llx\n", (unsigned long long) n, (unsigned long long) arg_interval);
+        puts(key);
 
         if (on_tty()) {
                 fprintf(stderr, "%s", ansi_normal());
 #if HAVE_QRENCODE
-                (void) print_qr_code(stderr,
-                                     "\nTo transfer the verification key to your phone scan the QR code below:\n",
-                                     seed, seed_size,
-                                     n, arg_interval,
-                                     hn, machine);
+                _cleanup_free_ char *url = NULL;
+                r = format_journal_url(seed, seed_size, n, arg_interval, hn, machine, true, &url);
+                if (r < 0)
+                        return r;
+
+                (void) print_qrcode(stderr,
+                                    "To transfer the verification key to your phone scan the QR code below",
+                                    url);
 #endif
         }
 
@@ -1968,13 +2019,12 @@ static int verify(sd_journal *j) {
 #endif
 
                 k = journal_file_verify(f, arg_verify_key, &first, &validated, &last, true);
-                if (k == -EINVAL) {
+                if (k == -EINVAL)
                         /* If the key was invalid give up right-away. */
                         return k;
-                } else if (k < 0) {
-                        log_warning_errno(k, "FAIL: %s (%m)", f->path);
-                        r = k;
-                } else {
+                else if (k < 0)
+                        r = log_warning_errno(k, "FAIL: %s (%m)", f->path);
+                else {
                         char a[FORMAT_TIMESTAMP_MAX], b[FORMAT_TIMESTAMP_MAX], c[FORMAT_TIMESPAN_MAX];
                         log_info("PASS: %s", f->path);
 
@@ -2323,10 +2373,8 @@ int main(int argc, char *argv[]) {
                         int q;
 
                         q = journal_directory_vacuum(d->path, arg_vacuum_size, arg_vacuum_n_files, arg_vacuum_time, NULL, !arg_quiet);
-                        if (q < 0) {
-                                log_error_errno(q, "Failed to vacuum %s: %m", d->path);
-                                r = q;
-                        }
+                        if (q < 0)
+                                r = log_error_errno(q, "Failed to vacuum %s: %m", d->path);
                 }
 
                 goto finish;
@@ -2621,8 +2669,8 @@ int main(int argc, char *argv[]) {
                                 if (r >= 0) {
                                         if (previous_boot_id_valid &&
                                             !sd_id128_equal(boot_id, previous_boot_id))
-                                                printf("%s-- Reboot --%s\n",
-                                                       ansi_highlight(), ansi_normal());
+                                                printf("%s-- Boot "SD_ID128_FORMAT_STR" --%s\n",
+                                                       ansi_highlight(), SD_ID128_FORMAT_VAL(boot_id), ansi_normal());
 
                                         previous_boot_id = boot_id;
                                         previous_boot_id_valid = true;
index a5a78b7746948cdc23c108ea6f63e40371c4d34a..744f750ca34ed9bf70fb83afc2e11185f93688c3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "audit-type.h"
index df41f8143553dac28451daa509df393a0bbf9603..79f3da90c1e93e76f24c67e9b4d2ffba5b25bf34 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "journald-server.h"
index 80e29585978f527cb91b1061e712bffbcf1b1d59..2035e2d9b6962cd9a3fb8d71347b7928cb31bf97 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/socket.h>
@@ -66,7 +66,7 @@ void server_forward_console(
         /* Second: identifier and PID */
         if (ucred) {
                 if (!identifier) {
-                        get_process_comm(ucred->pid, &ident_buf);
+                        (void) get_process_comm(ucred->pid, &ident_buf);
                         identifier = ident_buf;
                 }
 
index 3def00ad5d5adad7bb747190b149b23869fb323d..0a26f9c876c38b5c03b5c027578ba064eeb05b47 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "journald-server.h"
index bac67036b0c94b7177f29e89f41df9dbc8d3c210..8736495a4bdfb1eee441826413643e9a35756960 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if HAVE_SELINUX
 #include <selinux/selinux.h>
index 91f0302be4837e87b47ac70060048d38d322a0e6..9bf74b23471b9d83fa21da7d761659105d8e8afd 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index 6e7c806fd8218bde2f51a36f395dd607579504c4..e7255b0355b702821f7608038a379effb5217dd4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/epoll.h>
@@ -58,7 +58,7 @@ void server_forward_kmsg(
         /* Second: identifier and PID */
         if (ucred) {
                 if (!identifier) {
-                        get_process_comm(ucred->pid, &ident_buf);
+                        (void) get_process_comm(ucred->pid, &ident_buf);
                         identifier = ident_buf;
                 }
 
index 2326bc8c933de27537999852ee68474388f8c91e..bd288c57a2de725a031ef4fb27924644444a4230 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "journald-server.h"
index f2b867da3d3cd5e1993157fe1217df3f8a2f4db9..1c5849ed5535e6d636634f1387048e3a5edb2f6d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stddef.h>
 #include <sys/epoll.h>
@@ -483,13 +483,11 @@ int server_open_native_socket(Server *s, const char *native_socket) {
         if (r < 0)
                 return log_error_errno(r, "SO_PASSCRED failed: %m");
 
-#if HAVE_SELINUX
         if (mac_selinux_use()) {
                 r = setsockopt_int(s->native_fd, SOL_SOCKET, SO_PASSSEC, true);
                 if (r < 0)
                         log_warning_errno(r, "SO_PASSSEC failed: %m");
         }
-#endif
 
         r = setsockopt_int(s->native_fd, SOL_SOCKET, SO_TIMESTAMP, true);
         if (r < 0)
index 8d06636262ef933210b9f1e8298fd908565e74be..7bbaaed181886debbc69643dceed6b8b10d9b5c7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "journald-server.h"
index fa21e7da29c8c226fef3beea79d9fdac107e63fc..f464b6e0d828f4c630a0796df1d13f839cddfc59 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index 0fff8767acc62be3c9c8c9634c0b19fb4d5cd7a3..8def60f052bc353d10518125fd1aa32f6e6919a3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "time-util.h"
index ab6aadcb7813fe39d39f415abd2ba2d7b8b75fa8..10ebc3e22e8d26f52055c76e6832547b619db4a8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if HAVE_SELINUX
 #include <selinux/selinux.h>
index b01ade5aeee4b93cb4f8289436f7620aa5542e19..5fb145e254b5593524f483160954c6a527eb0da2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index b1c35a1af292b92cdd08ed81192f73027109e464..3241ef2bf7765e833be88cdd4a1dd0090436416b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stddef.h>
 #include <unistd.h>
index 7ab0016618489cb53f19bad94dc9014d39b9414e..0a033b4dceb41a3d1d87c2b2128d09cdf74ceda3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct StdoutStream StdoutStream;
index 46013c38784d2f1c88b7278bac8f70839f702114..925bd502d3a3d7a414abb5cddb451849593b3f0f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stddef.h>
 #include <sys/epoll.h>
@@ -70,9 +70,8 @@ static void forward_syslog_iovec(
                 msghdr.msg_controllen = cmsg->cmsg_len;
         }
 
-        /* Forward the syslog message we received via /dev/log to
-         * /run/systemd/syslog. Unfortunately we currently can't set
-         * the SO_TIMESTAMP auxiliary data, and hence we don't. */
+        /* Forward the syslog message we received via /dev/log to /run/systemd/syslog. Unfortunately we
+         * currently can't set the SO_TIMESTAMP auxiliary data, and hence we don't. */
 
         if (sendmsg(s->syslog_fd, &msghdr, MSG_NOSIGNAL) >= 0)
                 return;
@@ -153,7 +152,7 @@ void server_forward_syslog(Server *s, int priority, const char *identifier, cons
         /* Third: identifier and PID */
         if (ucred) {
                 if (!identifier) {
-                        get_process_comm(ucred->pid, &ident_buf);
+                        (void) get_process_comm(ucred->pid, &ident_buf);
                         identifier = ident_buf;
                 }
 
@@ -484,13 +483,11 @@ int server_open_syslog_socket(Server *s, const char *syslog_socket) {
         if (r < 0)
                 return log_error_errno(r, "SO_PASSCRED failed: %m");
 
-#if HAVE_SELINUX
         if (mac_selinux_use()) {
                 r = setsockopt_int(s->syslog_fd, SOL_SOCKET, SO_PASSSEC, true);
                 if (r < 0)
                         log_warning_errno(r, "SO_PASSSEC failed: %m");
         }
-#endif
 
         r = setsockopt_int(s->syslog_fd, SOL_SOCKET, SO_TIMESTAMP, true);
         if (r < 0)
index 5ad601001ca3e8f27ea7dd3946932708b2c26de3..3bc3ffddb88af482d679ddfab3f0cc2b952ae76e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "journald-server.h"
index 370c9b32e2da88ffb3cc6314b63ced0757991e9d..21ec5a785bf4b5f937eec613871ec054899f08d3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "format-util.h"
@@ -27,7 +27,7 @@ void server_forward_wall(
 
         if (ucred) {
                 if (!identifier) {
-                        get_process_comm(ucred->pid, &ident_buf);
+                        (void) get_process_comm(ucred->pid, &ident_buf);
                         identifier = ident_buf;
                 }
 
index 026649eb7c9202a30402507dbc561b25f1ccea07..3f98c35bde1583671acd8c505294683f2f8c6925 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/socket.h>
index 9a7cb3e1fc457aa89da9e41ac8466b54fe51b484..ef7cebce34c6de38b527f439a9cd2a042e4160ee 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
index 74c80b724df30494b6c694515e7ca8f715de6d25..39967f21cdcecf3e2645921c7ad802a976143fc9 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LicenseRef-lookup3-public-domain */
 /* Slightly modified by Lennart Poettering, to avoid name clashes, and
  * unexport a few functions. */
 
index 0a01269e433980b1c89f933e5f06521d70e2728f..04e493e95eacb6d26e0e256f1aef214052d9065b 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LicenseRef-lookup3-public-domain */
 #pragma once
 
 #include <inttypes.h>
index 3a590bdc6c50777a4033359d2a05f3a793b543c0..7aea28d129c37172a401b2bf10ed999562a110ec 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 journal_client_sources = files('''
         audit-type.c
@@ -107,14 +107,11 @@ journalctl_sources = files('''
         pcre2-dlopen.h
 '''.split())
 
-if conf.get('HAVE_QRENCODE') == 1
-        journalctl_sources += files('journal-qrcode.c',
-                                    'journal-qrcode.h')
+if install_sysconfdir
+        install_data('journald.conf',
+                     install_dir : pkgsysconfdir)
 endif
 
-install_data('journald.conf',
-             install_dir : pkgsysconfdir)
-
 if get_option('create-log-dirs')
         meson.add_install_script(
                 'sh', '-c',
index f627630c9c59cddea6573fcb6f2eee9311dc11c5..9882016436e803e67d1a4925ece39f0ab66ed046 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdlib.h>
index bf70d32027cadf8a38caecaab6eac0f40b5dded2..28d5ab1a5677e265cbb70f070d3d05eb405c5621 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 1e1108c657ca1467e6afa922bab1389920649c08..fbe81f99eb44a098464e8f6831d5b943305f2f66 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "dlfcn-util.h"
index e7cb0a5907b784a4fabd4bae59a9970a2f54882a..130633414474024bac686edb37f61532cddf97c5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #if HAVE_PCRE2
index 731fc51212da55f068af41f009300172ec8e6b91..cb1ab88ca57d1ba38cb3731756dd843a50a54074 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -883,6 +883,7 @@ static int real_journal_next_skip(sd_journal *j, direction_t direction, uint64_t
 
         assert_return(j, -EINVAL);
         assert_return(!journal_pid_changed(j), -ECHILD);
+        assert_return(skip <= INT_MAX, -ERANGE);
 
         if (skip == 0) {
                 /* If this is not a discrete skip, then at least
index a8315d0633e87af830b764a8d3ac04393318ab91..5adbf0d5b6256a859f3ed40d3717f21544a0d436 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 #include <linux/audit.h>
index 0f1447af280dac3be5cd0657528a6073eb1de9ae..982fec0d8db41ecb6bdd61be98c83b127ec443c0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 35823a8da5e43e715e9956cba9dc5a3a82a271d0..001976076eddad9e552b93f56d6599e1ab817bb4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "compress.h"
index 96a441a5a6021599d025159bec127ca7f87bb9e0..ccd46050166c2e9085dc1d44220a633ede0c12e2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/stat.h>
 
index 1482490411eed1ad0fe1405f4e4a474d46e6b51e..4f29e1b310fbf073967b8ab43ed159924adab276 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdbool.h>
 
index 8e839920b9b2245f8e3611ca3808300693ea0d3f..03fe8e2b300a686d245ebae747e4f997c0e00e61 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 
index 5fedd3ed20464ad70e23261f85c7123c12346dc8..dad277dd662118607e612a3eb0d2a9e446f13304 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <unistd.h>
index d10e61080d23051b1a7c8409ab089bfb513d234a..80aff75bb969e4bffef0b0a97ae787c167ff6684 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-journal.h"
 
index c0bda68811c2fe4bf885ab12af99e5b82158d604..8c78c3bbf03030c48ceb6fb55f9a8a1b22edee63 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <unistd.h>
index b17527916cff62f623cd6580135ae5dbddcc010d..ded67563d7af4c386c7e8ee55bc5d452ffc70a58 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 
index 4265735f0f167b7c616e4037ed1141bd61721854..75bd8e7b856bd373e5007a9cbba0acd50b222c46 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdlib.h>
index 924d727d97ce92b90bf5e2642b3d204f4658d451..a121859e08feb3d56db359e5e279675aa8fa31b4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <unistd.h>
index 45be7e5bc4457c17f498502e5e820897c980d9b9..33f412956b23f7b43b2193893765ed828ba4d713 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "journald-syslog.h"
index 2893a7c00fe9c63c8b66b79fcaceff3cb87bcd0d..d208e4650c209a8ec70ca29566f357f30a52e0b3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <stdio.h>
index 5850bb8eaa347b4a459df798f6214c5b4fe9294b..f8f08b5afc8b09c8915e2c451fdeefd746840564 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <unistd.h>
index 8f755efdde27f5f98e48f6ffd7af86ec1d3c4561..d1d28768f5b6e454d5c3aab517a7bb5bad693b03 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <stdlib.h>
index 567d2b9f4bb8ba2696f543a4bdd6ff3d9f3ec416..d096745382354666e15cf58aee4d55c45eb28254 100644 (file)
@@ -20,7 +20,7 @@ MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID
 
 BOOT_ROOT=${ENTRY_DIR_ABS%/$MACHINE_ID/$KERNEL_VERSION}
 BOOT_MNT=$(stat -c %m $BOOT_ROOT)
-ENTRY_DIR=/${ENTRY_DIR_ABS#$BOOT_MNT}
+ENTRY_DIR=${ENTRY_DIR_ABS#$BOOT_MNT}
 
 if [[ $COMMAND == remove ]]; then
     rm -f "$BOOT_ROOT/loader/entries/$MACHINE_ID-$KERNEL_VERSION.conf"
index 0ae07fcf325be7aff64f28948c11b89b418f3729..e7457e9d06cbde5f3ec48a440ebb88d59a5287fc 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
 # ex: ts=8 sw=4 sts=4 et filetype=sh
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
index 9ae342dfba87b3d5c1798e5d7edc29ed82693499..4117188f147463913050a1a465e815b9316d076a 100644 (file)
@@ -1,18 +1,21 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 want_kernel_install = get_option('kernel-install')
 
 if want_kernel_install
-       install_data('kernel-install',
-               install_mode : 'rwxr-xr-x',
-               install_dir : bindir)
+        install_data('kernel-install',
+                     install_mode : 'rwxr-xr-x',
+                     install_dir : bindir)
 
-       install_data('00-entry-directory.install',
-               '50-depmod.install',
-               '90-loaderentry.install',
-               install_mode : 'rwxr-xr-x',
-               install_dir : kernelinstalldir)
+        install_data('00-entry-directory.install',
+                     '50-depmod.install',
+                     '90-loaderentry.install',
+                     install_mode : 'rwxr-xr-x',
+                     install_dir : kernelinstalldir)
+
+        if install_sysconfdir
+                meson.add_install_script('sh', '-c',
+                                         mkdir_p.format(join_paths(sysconfdir, 'kernel/install.d')))
+        endif
 
-       meson.add_install_script('sh', '-c',
-                               mkdir_p.format(join_paths(sysconfdir, 'kernel/install.d')))
 endif
index 4fbf2bbc961ceb46c468023115d1adf2cb37b76f..327fb2ff3e9ea6106bb35b316263c63d07aeb428 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2014 Axis Communications AB. All rights reserved.
 ***/
index 9a4427e831ac7430c9d309a1978a259666150511..2dac8cfbaa459e622de0fc59af625dd3cb345637 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index 2c48d095f4236453735a602a2d79fdf5e0729630..a6f37522d1ee96f01f2282ecb25c4af0a05f4c70 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 extern const struct hash_ops dhcp_option_hash_ops;
index e7dbec1511cd5f831f65e393218141e2325be398..953fef19fa407582c3b8ab037a06561aed3fe14b 100644 (file)
@@ -1,6 +1,7 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/if_infiniband.h>
+#include <net/ethernet.h>
 #include <net/if_arp.h>
 
 #include "sd-device.h"
@@ -8,7 +9,7 @@
 
 #include "dhcp-identifier.h"
 #include "dhcp6-protocol.h"
-#include "network-internal.h"
+#include "network-util.h"
 #include "siphash24.h"
 #include "sparse-endian.h"
 #include "stdio-util.h"
index 76abd6583e3a3905ed2cd3349a6040f56e96d5b2..e9f2ea7e95ebe2e00b1cce2a66fea5ad0ba90c60 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-id128.h"
index 7e8149487a8d03cd71ae7072a669655711f752f9..40e6b1f26f7a3c7e4d38f352f23dc9f23647e804 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
@@ -29,10 +29,10 @@ typedef struct DHCPServerData {
 
 extern const struct hash_ops dhcp_option_hash_ops;
 
-int dhcp_network_bind_raw_socket(int ifindex, union sockaddr_union *link,
-                                 uint32_t xid, const uint8_t *mac_addr,
-                                 size_t mac_addr_len, uint16_t arp_type,
-                                 uint16_t port);
+int dhcp_network_bind_raw_socket(int ifindex, union sockaddr_union *link, uint32_t xid,
+                                 const uint8_t *mac_addr, size_t mac_addr_len,
+                                 const uint8_t *bcast_addr, size_t bcast_addr_len,
+                                 uint16_t arp_type, uint16_t port);
 int dhcp_network_bind_udp_socket(int ifindex, be32_t address, uint16_t port, int ip_service_type);
 int dhcp_network_send_raw_socket(int s, const union sockaddr_union *link,
                                  const void *packet, size_t len);
index 66222eaddbbe1c0564029a6ac36194b5644df788..49392d1beac483de7a9c7efffdb1a6160680dddf 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index f48e7c34909291117744fbb79a8c6966a531b960..656482bf83810a82f8d34f01639f7e5f39d45714 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2013 Intel Corporation. All rights reserved.
 ***/
@@ -19,9 +19,9 @@
 #include "unaligned.h"
 
 static int _bind_raw_socket(int ifindex, union sockaddr_union *link,
-                            uint32_t xid, const uint8_t *mac_addr,
-                            size_t mac_addr_len,
+                            uint32_t xid,
                             const uint8_t *bcast_addr,
+                            size_t bcast_addr_len,
                             const struct ether_addr *eth_mac,
                             uint16_t arp_type, uint8_t dhcp_hlen,
                             uint16_t port) {
@@ -104,9 +104,9 @@ static int _bind_raw_socket(int ifindex, union sockaddr_union *link,
                 .sll_protocol = htobe16(ETH_P_IP),
                 .sll_ifindex = ifindex,
                 .sll_hatype = htobe16(arp_type),
-                .sll_halen = mac_addr_len,
+                .sll_halen = bcast_addr_len,
         };
-        memcpy(link->ll.sll_addr, bcast_addr, mac_addr_len);
+        memcpy(link->ll.sll_addr, bcast_addr, bcast_addr_len); /* We may overflow link->ll. link->ll_buffer ensures we have enough space. */
 
         r = bind(s, &link->sa, SOCKADDR_LL_LEN(link->ll));
         if (r < 0)
@@ -115,34 +115,44 @@ static int _bind_raw_socket(int ifindex, union sockaddr_union *link,
         return TAKE_FD(s);
 }
 
-int dhcp_network_bind_raw_socket(int ifindex, union sockaddr_union *link,
-                                 uint32_t xid, const uint8_t *mac_addr,
-                                 size_t mac_addr_len, uint16_t arp_type,
-                                 uint16_t port) {
+int dhcp_network_bind_raw_socket(int ifindex, union sockaddr_union *link, uint32_t xid,
+                                 const uint8_t *mac_addr, size_t mac_addr_len,
+                                 const uint8_t *bcast_addr, size_t bcast_addr_len,
+                                 uint16_t arp_type, uint16_t port) {
         static const uint8_t eth_bcast[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
         /* Default broadcast address for IPoIB */
         static const uint8_t ib_bcast[] = {
                 0x00, 0xff, 0xff, 0xff, 0xff, 0x12, 0x40, 0x1b,
                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                 0xff, 0xff, 0xff, 0xff
-          };
+        };
         struct ether_addr eth_mac = { { 0, 0, 0, 0, 0, 0 } };
-        const uint8_t *bcast_addr = NULL;
+        const uint8_t *default_bcast_addr;
+        size_t expected_bcast_addr_len;
         uint8_t dhcp_hlen = 0;
 
         if (arp_type == ARPHRD_ETHER) {
                 assert_return(mac_addr_len == ETH_ALEN, -EINVAL);
                 memcpy(&eth_mac, mac_addr, ETH_ALEN);
-                bcast_addr = eth_bcast;
                 dhcp_hlen = ETH_ALEN;
+
+                default_bcast_addr = eth_bcast;
+                expected_bcast_addr_len = ETH_ALEN;
         } else if (arp_type == ARPHRD_INFINIBAND) {
-                assert_return(mac_addr_len == INFINIBAND_ALEN, -EINVAL);
-                bcast_addr = ib_bcast;
+                default_bcast_addr = ib_bcast;
+                expected_bcast_addr_len = INFINIBAND_ALEN;
         } else
                 return -EINVAL;
 
-        return _bind_raw_socket(ifindex, link, xid, mac_addr, mac_addr_len,
-                                bcast_addr, &eth_mac, arp_type, dhcp_hlen, port);
+        if (bcast_addr && bcast_addr_len > 0)
+                assert_return(bcast_addr_len == expected_bcast_addr_len, -EINVAL);
+        else {
+                bcast_addr = default_bcast_addr;
+                bcast_addr_len = expected_bcast_addr_len;
+        }
+
+        return _bind_raw_socket(ifindex, link, xid, bcast_addr, bcast_addr_len,
+                                &eth_mac, arp_type, dhcp_hlen, port);
 }
 
 int dhcp_network_bind_udp_socket(int ifindex, be32_t address, uint16_t port, int ip_service_type) {
index 6fe8a3779d8078037f8bae0b9c69cd7598903f52..70753c68d847a160ef334eb9a0b6f2a427a8c3eb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2013 Intel Corporation. All rights reserved.
 ***/
index fe7d51703badb3669c65637a1176dafe7abf442a..cace916f4413b6beca58589ac0b3b1e642d7fa3a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2013 Intel Corporation. All rights reserved.
 ***/
index f03663248a67cc16bc72ad29a2916ad236c7561a..11f4201ab2a56719d2ec3dabfa09bb22621619c8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index 64c18ed570750ac96f5fb55e211296c3b25384fa..b57737ee25c56ea113bac2020644b6411a02d199 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index 9ce6dcd02c3b5611febadfaba091208cd6557f60..24d8a314a48d4ade47f2de95656b5ded99394674 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index df6c95e0b360c0dac6e3ef86ade805c0e4624c76..e9e2362d6f1c5a0c875408cd85b6a81e064a443a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index e2efa8bbe347b12da0400688f1ec64ed284e3244..4f7bd53de4ed86ebe59fba1f850caaf2b216b9da 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2014 Intel Corporation. All rights reserved.
 ***/
index 030173a58a6a3695e3c5fa9023c847180e3ba6de..e2bf4f7e36fec44ca419190e1096ab670efed914 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2014-2015 Intel Corporation. All rights reserved.
 ***/
index f7a27028608b56577d5ff087f4d62d4006ae02fb..c700363803bcd5471dcdc1060d530c698f8d543f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index d9690293f13e16786ea0331d9e0309d15799a154..4af012534ab324c8371261aae67a95b6de48a935 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2014 Intel Corporation. All rights reserved.
 ***/
index ac68ded1fe9653d6b8485a4b990c612a3d86bb95..50d21b5b593355ed213c67e4cf75456f7dcbece4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index 9598438dbaee12e11a87fa08421c241c8fc8b27f..f23695f974df5b5153aa2f82ca2e133eb9a5b09a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-event.h"
index 02645b2bcd79dc291406d8258de2ecab1500ddb8..546ae1c980fa167f4f35d4d4f15b6bb1f31cfff8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "escape.h"
index 74175edf545cc9aa4530c845e1ac795e64cbd0d0..a5718c8c31e48516dc98505b4e27665ad94db860 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index de7e2bf847204f95254be733922bb3fa16ae5e16..9616cb6250bba70d9f51f8d30b974fd6191178e5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/filter.h>
 #include <netinet/if_ether.h>
index e4ed2898a5c684f76c4c30733f1683fce72d9517..bc69b324c2c329c7601846400c871c99a79ccf6c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-event.h"
index 7fa0c67956213bfc9604e98ae4d897818ab15875..8c68d74c8244cdb20dcef7f5322d67ec298bf438 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 sources = files('''
         sd-dhcp-client.c
@@ -17,6 +17,7 @@ sources = files('''
         arp-util.h
         arp-util.c
         network-internal.c
+        network-internal.h
         sd-ndisc.c
         ndisc-internal.h
         ndisc-router.h
@@ -42,10 +43,7 @@ sources = files('''
         sd-lldp.c
 '''.split())
 
-network_internal_h = files('network-internal.h')
-
 libsystemd_network = static_library(
         'systemd-network',
         sources,
-        network_internal_h,
         include_directories : includes)
index c66dc3d44316640950aad0049611ce1e4b6952d5..65f9371b20c1761e1d6eb9982d32a27775c50c63 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index a2a93663386dddade410375fdcc8f06d28e92089..3cb71dbdac9a3c07d0d5a900aba7e04acdf56e47 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2014 Intel Corporation. All rights reserved.
 ***/
index 2e2c1afd122e6bec9b054de8d85940867ac527ee..cb3a56452be69f7ad3a2b45225ed19ad6b3ff377 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index 459d13ad7dfe299d825d0e57e1d81755f12877a1..12b73cd50d8175eeeb6597dca258925becc1f4cc 100644 (file)
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <arpa/inet.h>
 #include <linux/if.h>
 #include <netinet/ether.h>
 
-#include "sd-id128.h"
 #include "sd-ndisc.h"
 
 #include "alloc-util.h"
-#include "arphrd-list.h"
-#include "condition.h"
-#include "conf-parser.h"
-#include "device-util.h"
 #include "dhcp-lease-internal.h"
-#include "env-util.h"
-#include "ether-addr-util.h"
+#include "extract-word.h"
 #include "hexdecoct.h"
 #include "log.h"
 #include "network-internal.h"
 #include "parse-util.h"
-#include "siphash24.h"
-#include "socket-util.h"
-#include "string-table.h"
-#include "string-util.h"
-#include "strv.h"
-#include "utf8.h"
-#include "util.h"
-
-const char *net_get_name_persistent(sd_device *device) {
-        const char *name, *field;
-
-        assert(device);
-
-        /* fetch some persistent data unique (on this machine) to this device */
-        FOREACH_STRING(field, "ID_NET_NAME_ONBOARD", "ID_NET_NAME_SLOT", "ID_NET_NAME_PATH", "ID_NET_NAME_MAC")
-                if (sd_device_get_property_value(device, field, &name) >= 0)
-                        return name;
-
-        return NULL;
-}
-
-#define HASH_KEY SD_ID128_MAKE(d3,1e,48,fa,90,fe,4b,4c,9d,af,d5,d7,a1,b1,2e,8a)
-
-int net_get_unique_predictable_data(sd_device *device, bool use_sysname, uint64_t *result) {
-        size_t l, sz = 0;
-        const char *name;
-        int r;
-        uint8_t *v;
-
-        assert(device);
-
-        /* net_get_name_persistent() will return one of the device names based on stable information about
-         * the device. If this is not available, we fall back to using the actual device name. */
-        name = net_get_name_persistent(device);
-        if (!name && use_sysname)
-                (void) sd_device_get_sysname(device, &name);
-        if (!name)
-                return log_device_debug_errno(device, SYNTHETIC_ERRNO(ENODATA),
-                                              "No stable identifying information found");
-
-        log_device_debug(device, "Using \"%s\" as stable identifying information", name);
-        l = strlen(name);
-        sz = sizeof(sd_id128_t) + l;
-        v = newa(uint8_t, sz);
-
-        /* Fetch some persistent data unique to this machine */
-        r = sd_id128_get_machine((sd_id128_t*) v);
-        if (r < 0)
-                 return r;
-        memcpy(v + sizeof(sd_id128_t), name, l);
-
-        /* Let's hash the machine ID plus the device name. We use
-         * a fixed, but originally randomly created hash key here. */
-        *result = htole64(siphash24(v, sz, HASH_KEY.bytes));
-        return 0;
-}
-
-static bool net_condition_test_strv(char * const *patterns, const char *string) {
-        char * const *p;
-        bool match = false, has_positive_rule = false;
-
-        if (strv_isempty(patterns))
-                return true;
-
-        STRV_FOREACH(p, patterns) {
-                const char *q = *p;
-                bool invert;
-
-                invert = *q == '!';
-                q += invert;
-
-                if (!invert)
-                        has_positive_rule = true;
-
-                if (string && fnmatch(q, string, 0) == 0) {
-                        if (invert)
-                                return false;
-                        else
-                                match = true;
-                }
-        }
-
-        return has_positive_rule ? match : true;
-}
-
-static bool net_condition_test_ifname(char * const *patterns, const char *ifname, char * const *alternative_names) {
-        if (net_condition_test_strv(patterns, ifname))
-                return true;
-
-        char * const *p;
-        STRV_FOREACH(p, alternative_names)
-                if (net_condition_test_strv(patterns, *p))
-                        return true;
-
-        return false;
-}
-
-static int net_condition_test_property(char * const *match_property, sd_device *device) {
-        char * const *p;
-
-        if (strv_isempty(match_property))
-                return true;
-
-        STRV_FOREACH(p, match_property) {
-                _cleanup_free_ char *key = NULL;
-                const char *val, *dev_val;
-                bool invert, v;
-
-                invert = **p == '!';
-
-                val = strchr(*p + invert, '=');
-                if (!val)
-                        return -EINVAL;
-
-                key = strndup(*p + invert, val - *p - invert);
-                if (!key)
-                        return -ENOMEM;
-
-                val++;
-
-                v = device &&
-                        sd_device_get_property_value(device, key, &dev_val) >= 0 &&
-                        fnmatch(val, dev_val, 0) == 0;
-
-                if (invert ? v : !v)
-                        return false;
-        }
-
-        return true;
-}
-
-static const char *const wifi_iftype_table[NL80211_IFTYPE_MAX+1] = {
-        [NL80211_IFTYPE_ADHOC] = "ad-hoc",
-        [NL80211_IFTYPE_STATION] = "station",
-        [NL80211_IFTYPE_AP] = "ap",
-        [NL80211_IFTYPE_AP_VLAN] = "ap-vlan",
-        [NL80211_IFTYPE_WDS] = "wds",
-        [NL80211_IFTYPE_MONITOR] = "monitor",
-        [NL80211_IFTYPE_MESH_POINT] = "mesh-point",
-        [NL80211_IFTYPE_P2P_CLIENT] = "p2p-client",
-        [NL80211_IFTYPE_P2P_GO] = "p2p-go",
-        [NL80211_IFTYPE_P2P_DEVICE] = "p2p-device",
-        [NL80211_IFTYPE_OCB] = "ocb",
-        [NL80211_IFTYPE_NAN] = "nan",
-};
-
-DEFINE_PRIVATE_STRING_TABLE_LOOKUP_TO_STRING(wifi_iftype, enum nl80211_iftype);
-
-char *link_get_type_string(unsigned short iftype, sd_device *device) {
-        const char *t, *devtype;
-        char *p;
-
-        if (device &&
-            sd_device_get_devtype(device, &devtype) >= 0 &&
-            !isempty(devtype))
-                return strdup(devtype);
-
-        t = arphrd_to_name(iftype);
-        if (!t)
-                return NULL;
-
-        p = strdup(t);
-        if (!p)
-                return NULL;
-
-        ascii_strlower(p);
-        return p;
-}
-
-bool net_match_config(Set *match_mac,
-                      Set *match_permanent_mac,
-                      char * const *match_paths,
-                      char * const *match_drivers,
-                      char * const *match_iftypes,
-                      char * const *match_names,
-                      char * const *match_property,
-                      char * const *match_wifi_iftype,
-                      char * const *match_ssid,
-                      Set *match_bssid,
-                      sd_device *device,
-                      const struct ether_addr *dev_mac,
-                      const struct ether_addr *dev_permanent_mac,
-                      const char *dev_driver,
-                      unsigned short dev_iftype,
-                      const char *dev_name,
-                      char * const *alternative_names,
-                      enum nl80211_iftype dev_wifi_iftype,
-                      const char *dev_ssid,
-                      const struct ether_addr *dev_bssid) {
-
-        _cleanup_free_ char *dev_iftype_str;
-        const char *dev_path = NULL;
-
-        dev_iftype_str = link_get_type_string(dev_iftype, device);
-
-        if (device) {
-                const char *mac_str;
-
-                (void) sd_device_get_property_value(device, "ID_PATH", &dev_path);
-                if (!dev_driver)
-                        (void) sd_device_get_property_value(device, "ID_NET_DRIVER", &dev_driver);
-                if (!dev_name)
-                        (void) sd_device_get_sysname(device, &dev_name);
-                if (!dev_mac &&
-                    sd_device_get_sysattr_value(device, "address", &mac_str) >= 0)
-                        dev_mac = ether_aton(mac_str);
-        }
-
-        if (match_mac && (!dev_mac || !set_contains(match_mac, dev_mac)))
-                return false;
-
-        if (match_permanent_mac &&
-            (!dev_permanent_mac ||
-             ether_addr_is_null(dev_permanent_mac) ||
-             !set_contains(match_permanent_mac, dev_permanent_mac)))
-                return false;
-
-        if (!net_condition_test_strv(match_paths, dev_path))
-                return false;
-
-        if (!net_condition_test_strv(match_drivers, dev_driver))
-                return false;
-
-        if (!net_condition_test_strv(match_iftypes, dev_iftype_str))
-                return false;
-
-        if (!net_condition_test_ifname(match_names, dev_name, alternative_names))
-                return false;
-
-        if (!net_condition_test_property(match_property, device))
-                return false;
-
-        if (!net_condition_test_strv(match_wifi_iftype, wifi_iftype_to_string(dev_wifi_iftype)))
-                return false;
-
-        if (!net_condition_test_strv(match_ssid, dev_ssid))
-                return false;
-
-        if (match_bssid && (!dev_bssid || !set_contains(match_bssid, dev_bssid)))
-                return false;
-
-        return true;
-}
-
-int config_parse_net_condition(const char *unit,
-                               const char *filename,
-                               unsigned line,
-                               const char *section,
-                               unsigned section_line,
-                               const char *lvalue,
-                               int ltype,
-                               const char *rvalue,
-                               void *data,
-                               void *userdata) {
-
-        ConditionType cond = ltype;
-        Condition **list = data, *c;
-        bool negate;
-
-        assert(filename);
-        assert(lvalue);
-        assert(rvalue);
-        assert(data);
-
-        if (isempty(rvalue)) {
-                *list = condition_free_list_type(*list, cond);
-                return 0;
-        }
-
-        negate = rvalue[0] == '!';
-        if (negate)
-                rvalue++;
-
-        c = condition_new(cond, rvalue, false, negate);
-        if (!c)
-                return log_oom();
-
-        /* Drop previous assignment. */
-        *list = condition_free_list_type(*list, cond);
-
-        LIST_PREPEND(conditions, *list, c);
-        return 0;
-}
-
-int config_parse_match_strv(
-                const char *unit,
-                const char *filename,
-                unsigned line,
-                const char *section,
-                unsigned section_line,
-                const char *lvalue,
-                int ltype,
-                const char *rvalue,
-                void *data,
-                void *userdata) {
-
-        const char *p = rvalue;
-        char ***sv = data;
-        bool invert;
-        int r;
-
-        assert(filename);
-        assert(lvalue);
-        assert(rvalue);
-        assert(data);
-
-        if (isempty(rvalue)) {
-                *sv = strv_free(*sv);
-                return 0;
-        }
-
-        invert = *p == '!';
-        p += invert;
-
-        for (;;) {
-                _cleanup_free_ char *word = NULL, *k = NULL;
-
-                r = extract_first_word(&p, &word, NULL, EXTRACT_UNQUOTE|EXTRACT_RETAIN_ESCAPE);
-                if (r == 0)
-                        return 0;
-                if (r == -ENOMEM)
-                        return log_oom();
-                if (r < 0) {
-                        log_syntax(unit, LOG_ERR, filename, line, r, "Invalid syntax, ignoring: %s", rvalue);
-                        return 0;
-                }
-
-                if (invert) {
-                        k = strjoin("!", word);
-                        if (!k)
-                                return log_oom();
-                } else
-                        k = TAKE_PTR(word);
-
-                r = strv_consume(sv, TAKE_PTR(k));
-                if (r < 0)
-                        return log_oom();
-        }
-}
-
-int config_parse_match_ifnames(
-                const char *unit,
-                const char *filename,
-                unsigned line,
-                const char *section,
-                unsigned section_line,
-                const char *lvalue,
-                int ltype,
-                const char *rvalue,
-                void *data,
-                void *userdata) {
-
-        const char *p = rvalue;
-        char ***sv = data;
-        bool invert;
-        int r;
-
-        assert(filename);
-        assert(lvalue);
-        assert(rvalue);
-        assert(data);
-
-        invert = *p == '!';
-        p += invert;
-
-        for (;;) {
-                _cleanup_free_ char *word = NULL, *k = NULL;
-
-                r = extract_first_word(&p, &word, NULL, 0);
-                if (r == 0)
-                        return 0;
-                if (r == -ENOMEM)
-                        return log_oom();
-                if (r < 0) {
-                        log_syntax(unit, LOG_ERR, filename, line, 0,
-                                   "Failed to parse interface name list: %s", rvalue);
-                        return 0;
-                }
-
-                if (!ifname_valid_full(word, ltype)) {
-                        log_syntax(unit, LOG_ERR, filename, line, 0,
-                                   "Interface name is not valid or too long, ignoring assignment: %s", word);
-                        continue;
-                }
-
-                if (invert) {
-                        k = strjoin("!", word);
-                        if (!k)
-                                return log_oom();
-                } else
-                        k = TAKE_PTR(word);
-
-                r = strv_consume(sv, TAKE_PTR(k));
-                if (r < 0)
-                        return log_oom();
-        }
-}
-
-int config_parse_match_property(
-                const char *unit,
-                const char *filename,
-                unsigned line,
-                const char *section,
-                unsigned section_line,
-                const char *lvalue,
-                int ltype,
-                const char *rvalue,
-                void *data,
-                void *userdata) {
-
-        const char *p = rvalue;
-        char ***sv = data;
-        bool invert;
-        int r;
-
-        assert(filename);
-        assert(lvalue);
-        assert(rvalue);
-        assert(data);
-
-        invert = *p == '!';
-        p += invert;
-
-        for (;;) {
-                _cleanup_free_ char *word = NULL, *k = NULL;
-
-                r = extract_first_word(&p, &word, NULL, EXTRACT_CUNESCAPE|EXTRACT_UNQUOTE);
-                if (r == 0)
-                        return 0;
-                if (r == -ENOMEM)
-                        return log_oom();
-                if (r < 0) {
-                        log_syntax(unit, LOG_ERR, filename, line, 0,
-                                   "Invalid syntax, ignoring: %s", rvalue);
-                        return 0;
-                }
-
-                if (!env_assignment_is_valid(word)) {
-                        log_syntax(unit, LOG_ERR, filename, line, 0,
-                                   "Invalid property or value, ignoring assignment: %s", word);
-                        continue;
-                }
-
-                if (invert) {
-                        k = strjoin("!", word);
-                        if (!k)
-                                return log_oom();
-                } else
-                        k = TAKE_PTR(word);
-
-                r = strv_consume(sv, TAKE_PTR(k));
-                if (r < 0)
-                        return log_oom();
-        }
-}
-
-int config_parse_ifalias(const char *unit,
-                         const char *filename,
-                         unsigned line,
-                         const char *section,
-                         unsigned section_line,
-                         const char *lvalue,
-                         int ltype,
-                         const char *rvalue,
-                         void *data,
-                         void *userdata) {
-
-        char **s = data;
-        _cleanup_free_ char *n = NULL;
-
-        assert(filename);
-        assert(lvalue);
-        assert(rvalue);
-        assert(data);
-
-        n = strdup(rvalue);
-        if (!n)
-                return log_oom();
-
-        if (!ascii_is_valid(n) || strlen(n) >= IFALIASZ) {
-                log_syntax(unit, LOG_ERR, filename, line, 0, "Interface alias is not ASCII clean or is too long, ignoring assignment: %s", rvalue);
-                return 0;
-        }
-
-        if (isempty(n))
-                *s = mfree(*s);
-        else
-                free_and_replace(*s, n);
-
-        return 0;
-}
-
-int config_parse_hwaddr(const char *unit,
-                        const char *filename,
-                        unsigned line,
-                        const char *section,
-                        unsigned section_line,
-                        const char *lvalue,
-                        int ltype,
-                        const char *rvalue,
-                        void *data,
-                        void *userdata) {
-
-        _cleanup_free_ struct ether_addr *n = NULL;
-        struct ether_addr **hwaddr = data;
-        int r;
-
-        assert(filename);
-        assert(lvalue);
-        assert(rvalue);
-        assert(data);
-
-        n = new0(struct ether_addr, 1);
-        if (!n)
-                return log_oom();
-
-        r = ether_addr_from_string(rvalue, n);
-        if (r < 0) {
-                log_syntax(unit, LOG_ERR, filename, line, r, "Not a valid MAC address, ignoring assignment: %s", rvalue);
-                return 0;
-        }
-
-        free_and_replace(*hwaddr, n);
-
-        return 0;
-}
-
-int config_parse_hwaddrs(const char *unit,
-                         const char *filename,
-                         unsigned line,
-                         const char *section,
-                         unsigned section_line,
-                         const char *lvalue,
-                         int ltype,
-                         const char *rvalue,
-                         void *data,
-                         void *userdata) {
-
-        _cleanup_set_free_free_ Set *s = NULL;
-        const char *p = rvalue;
-        Set **hwaddrs = data;
-        int r;
-
-        assert(filename);
-        assert(lvalue);
-        assert(rvalue);
-        assert(data);
-
-        if (isempty(rvalue)) {
-                /* Empty assignment resets the list */
-                *hwaddrs = set_free_free(*hwaddrs);
-                return 0;
-        }
-
-        s = set_new(&ether_addr_hash_ops);
-        if (!s)
-                return log_oom();
-
-        for (;;) {
-                _cleanup_free_ char *word = NULL;
-                _cleanup_free_ struct ether_addr *n = NULL;
-
-                r = extract_first_word(&p, &word, NULL, 0);
-                if (r == 0)
-                        break;
-                if (r == -ENOMEM)
-                        return log_oom();
-                if (r < 0) {
-                        log_syntax(unit, LOG_WARNING, filename, line, r, "Invalid syntax, ignoring: %s", rvalue);
-                        return 0;
-                }
-
-                n = new(struct ether_addr, 1);
-                if (!n)
-                        return log_oom();
-
-                r = ether_addr_from_string(word, n);
-                if (r < 0) {
-                        log_syntax(unit, LOG_ERR, filename, line, 0, "Not a valid MAC address, ignoring: %s", word);
-                        continue;
-                }
-
-                r = set_put(s, n);
-                if (r < 0)
-                        return log_oom();
-                if (r > 0)
-                        n = NULL; /* avoid cleanup */
-        }
-
-        r = set_ensure_allocated(hwaddrs, &ether_addr_hash_ops);
-        if (r < 0)
-                return log_oom();
-
-        r = set_move(*hwaddrs, s);
-        if (r < 0)
-                return log_oom();
-
-        return 0;
-}
-
-int config_parse_bridge_port_priority(
-                const char *unit,
-                const char *filename,
-                unsigned line,
-                const char *section,
-                unsigned section_line,
-                const char *lvalue,
-                int ltype,
-                const char *rvalue,
-                void *data,
-                void *userdata) {
-
-        uint16_t i;
-        int r;
-
-        assert(filename);
-        assert(lvalue);
-        assert(rvalue);
-        assert(data);
-
-        r = safe_atou16(rvalue, &i);
-        if (r < 0) {
-                log_syntax(unit, LOG_ERR, filename, line, r,
-                           "Failed to parse bridge port priority, ignoring: %s", rvalue);
-                return 0;
-        }
-
-        if (i > LINK_BRIDGE_PORT_PRIORITY_MAX) {
-                log_syntax(unit, LOG_ERR, filename, line, r,
-                           "Bridge port priority is larger than maximum %u, ignoring: %s", LINK_BRIDGE_PORT_PRIORITY_MAX, rvalue);
-                return 0;
-        }
-
-        *((uint16_t *)data) = i;
-
-        return 0;
-}
 
 size_t serialize_in_addrs(FILE *f,
                           const struct in_addr *addresses,
index e4c11235b62f2f4f85ae189cb20f52f988fc80bb..e5b853c0cd7acec6a8924e79dedc9353b75ed34b 100644 (file)
@@ -1,53 +1,11 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
-#include <linux/nl80211.h>
 #include <stdbool.h>
+#include <stdio.h>
 
-#include "sd-device.h"
 #include "sd-dhcp-lease.h"
 
-#include "conf-parser.h"
-#include "set.h"
-#include "strv.h"
-
-#define LINK_BRIDGE_PORT_PRIORITY_INVALID 128
-#define LINK_BRIDGE_PORT_PRIORITY_MAX 63
-
-char *link_get_type_string(unsigned short iftype, sd_device *device);
-bool net_match_config(Set *match_mac,
-                      Set *match_permanent_mac,
-                      char * const *match_paths,
-                      char * const *match_drivers,
-                      char * const *match_iftypes,
-                      char * const *match_names,
-                      char * const *match_property,
-                      char * const *match_wifi_iftype,
-                      char * const *match_ssid,
-                      Set *match_bssid,
-                      sd_device *device,
-                      const struct ether_addr *dev_mac,
-                      const struct ether_addr *dev_permanent_mac,
-                      const char *dev_driver,
-                      unsigned short dev_iftype,
-                      const char *dev_name,
-                      char * const *alternative_names,
-                      enum nl80211_iftype dev_wifi_iftype,
-                      const char *dev_ssid,
-                      const struct ether_addr *dev_bssid);
-
-CONFIG_PARSER_PROTOTYPE(config_parse_net_condition);
-CONFIG_PARSER_PROTOTYPE(config_parse_hwaddr);
-CONFIG_PARSER_PROTOTYPE(config_parse_hwaddrs);
-CONFIG_PARSER_PROTOTYPE(config_parse_match_strv);
-CONFIG_PARSER_PROTOTYPE(config_parse_match_ifnames);
-CONFIG_PARSER_PROTOTYPE(config_parse_match_property);
-CONFIG_PARSER_PROTOTYPE(config_parse_ifalias);
-CONFIG_PARSER_PROTOTYPE(config_parse_bridge_port_priority);
-
-int net_get_unique_predictable_data(sd_device *device, bool use_sysname, uint64_t *result);
-const char *net_get_name_persistent(sd_device *device);
-
 size_t serialize_in_addrs(FILE *f,
                           const struct in_addr *addresses,
                           size_t size,
index fb6617bedd3dc6f453770477970816df83f06999..3dbeffe0c65a5a3e147f7bcee04a0786b49af33b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index 6eb3c1b7a0cedca44b031449bb38f56f65dfd54a..f47a542483444f6be3f653a6d949858dddb46561 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2013 Intel Corporation. All rights reserved.
 ***/
 #include "sd-dhcp-client.h"
 
 #include "alloc-util.h"
-#include "async.h"
 #include "dhcp-identifier.h"
 #include "dhcp-internal.h"
 #include "dhcp-lease-internal.h"
 #include "dhcp-protocol.h"
 #include "dns-domain.h"
 #include "event-util.h"
+#include "fd-util.h"
 #include "hostname-util.h"
 #include "io-util.h"
 #include "memory-util.h"
@@ -38,6 +38,9 @@
 #define RESTART_AFTER_NAK_MIN_USEC (1 * USEC_PER_SEC)
 #define RESTART_AFTER_NAK_MAX_USEC (30 * USEC_PER_MINUTE)
 
+#define TRANSIENT_FAILURE_ATTEMPTS 3 /* Arbitrary limit: how many attempts are considered enough to report
+                                      * transient failure. */
+
 typedef struct sd_dhcp_client_id {
         uint8_t type;
         union {
@@ -82,6 +85,8 @@ struct sd_dhcp_client {
         be32_t last_addr;
         uint8_t mac_addr[MAX_MAC_ADDR_LEN];
         size_t mac_addr_len;
+        uint8_t bcast_addr[MAX_MAC_ADDR_LEN];
+        size_t bcast_addr_len;
         uint16_t arp_type;
         sd_dhcp_client_id client_id;
         size_t client_id_len;
@@ -277,6 +282,7 @@ int sd_dhcp_client_set_ifindex(sd_dhcp_client *client, int ifindex) {
 int sd_dhcp_client_set_mac(
                 sd_dhcp_client *client,
                 const uint8_t *addr,
+                const uint8_t *bcast_addr,
                 size_t addr_len,
                 uint16_t arp_type) {
 
@@ -297,7 +303,9 @@ int sd_dhcp_client_set_mac(
                 return -EINVAL;
 
         if (client->mac_addr_len == addr_len &&
-            memcmp(&client->mac_addr, addr, addr_len) == 0)
+            memcmp(&client->mac_addr, addr, addr_len) == 0 &&
+            (client->bcast_addr_len > 0) == !!bcast_addr &&
+            (!bcast_addr || memcmp(&client->bcast_addr, bcast_addr, addr_len) == 0))
                 return 0;
 
         if (!IN_SET(client->state, DHCP_STATE_INIT, DHCP_STATE_STOPPED)) {
@@ -309,6 +317,12 @@ int sd_dhcp_client_set_mac(
         memcpy(&client->mac_addr, addr, addr_len);
         client->mac_addr_len = addr_len;
         client->arp_type = arp_type;
+        client->bcast_addr_len = 0;
+
+        if (bcast_addr) {
+                memcpy(&client->bcast_addr, bcast_addr, addr_len);
+                client->bcast_addr_len = addr_len;
+        }
 
         if (need_restart && client->state != DHCP_STATE_STOPPED) {
                 r = sd_dhcp_client_start(client);
@@ -681,7 +695,7 @@ static int client_initialize(sd_dhcp_client *client) {
 
         client->receive_message = sd_event_source_unref(client->receive_message);
 
-        client->fd = asynchronous_close(client->fd);
+        client->fd = safe_close(client->fd);
 
         (void) event_source_disable(client->timeout_resend);
         (void) event_source_disable(client->timeout_t1);
@@ -1176,7 +1190,7 @@ static int client_timeout_resend(
 
         sd_dhcp_client *client = userdata;
         DHCP_CLIENT_DONT_DESTROY(client);
-        usec_t next_timeout = 0;
+        usec_t next_timeout;
         uint64_t time_now;
         uint32_t time_left;
         int r;
@@ -1192,17 +1206,14 @@ static int client_timeout_resend(
         switch (client->state) {
 
         case DHCP_STATE_RENEWING:
-
                 time_left = (client->lease->t2 - client->lease->t1) / 2;
                 if (time_left < 60)
                         time_left = 60;
 
                 next_timeout = time_now + time_left * USEC_PER_SEC;
-
                 break;
 
         case DHCP_STATE_REBINDING:
-
                 time_left = (client->lease->lifetime - client->lease->t2) / 2;
                 if (time_left < 60)
                         time_left = 60;
@@ -1219,24 +1230,20 @@ static int client_timeout_resend(
                 r = client_start(client);
                 if (r < 0)
                         goto error;
-                else {
-                        log_dhcp_client(client, "REBOOTED");
-                        return 0;
-                }
+
+                log_dhcp_client(client, "REBOOTED");
+                return 0;
 
         case DHCP_STATE_INIT:
         case DHCP_STATE_INIT_REBOOT:
         case DHCP_STATE_SELECTING:
         case DHCP_STATE_REQUESTING:
         case DHCP_STATE_BOUND:
-
-                if (client->attempt < client->max_attempts)
-                        client->attempt++;
-                else
+                if (client->attempt >= client->max_attempts)
                         goto error;
 
+                client->attempt++;
                 next_timeout = time_now + ((UINT64_C(1) << MIN(client->attempt, (uint64_t) 6)) - 1) * USEC_PER_SEC;
-
                 break;
 
         case DHCP_STATE_STOPPED:
@@ -1284,12 +1291,10 @@ static int client_timeout_resend(
                         client->state = DHCP_STATE_REBOOTING;
 
                 client->request_sent = time_now;
-
                 break;
 
         case DHCP_STATE_REBOOTING:
         case DHCP_STATE_BOUND:
-
                 break;
 
         case DHCP_STATE_STOPPED:
@@ -1297,6 +1302,9 @@ static int client_timeout_resend(
                 goto error;
         }
 
+        if (client->attempt >= TRANSIENT_FAILURE_ATTEMPTS)
+                client_notify(client, SD_DHCP_CLIENT_EVENT_TRANSIENT_FAILURE);
+
         return 0;
 
 error:
@@ -1381,9 +1389,10 @@ static int client_start_delayed(sd_dhcp_client *client) {
 
         client->xid = random_u32();
 
-        r = dhcp_network_bind_raw_socket(client->ifindex, &client->link,
-                                         client->xid, client->mac_addr,
-                                         client->mac_addr_len, client->arp_type, client->port);
+        r = dhcp_network_bind_raw_socket(client->ifindex, &client->link, client->xid,
+                                         client->mac_addr, client->mac_addr_len,
+                                         client->bcast_addr, client->bcast_addr_len,
+                                         client->arp_type, client->port);
         if (r < 0) {
                 client_stop(client, r);
                 return r;
@@ -1426,15 +1435,15 @@ static int client_timeout_t2(sd_event_source *s, uint64_t usec, void *userdata)
         assert(client);
 
         client->receive_message = sd_event_source_unref(client->receive_message);
-        client->fd = asynchronous_close(client->fd);
+        client->fd = safe_close(client->fd);
 
         client->state = DHCP_STATE_REBINDING;
         client->attempt = 0;
 
-        r = dhcp_network_bind_raw_socket(client->ifindex, &client->link,
-                                         client->xid, client->mac_addr,
-                                         client->mac_addr_len, client->arp_type,
-                                         client->port);
+        r = dhcp_network_bind_raw_socket(client->ifindex, &client->link, client->xid,
+                                         client->mac_addr, client->mac_addr_len,
+                                         client->bcast_addr, client->bcast_addr_len,
+                                         client->arp_type, client->port);
         if (r < 0) {
                 client_stop(client, r);
                 return 0;
@@ -1783,7 +1792,7 @@ static int client_handle_message(sd_dhcp_client *client, DHCPMessage *message, i
                         (void) event_source_disable(client->timeout_resend);
                         client->receive_message =
                                 sd_event_source_unref(client->receive_message);
-                        client->fd = asynchronous_close(client->fd);
+                        client->fd = safe_close(client->fd);
 
                         if (IN_SET(client->state, DHCP_STATE_REQUESTING,
                                    DHCP_STATE_REBOOTING))
@@ -2135,9 +2144,10 @@ int sd_dhcp_client_send_decline(sd_dhcp_client *client) {
 }
 
 int sd_dhcp_client_stop(sd_dhcp_client *client) {
-        DHCP_CLIENT_DONT_DESTROY(client);
+        if (!client)
+                return 0;
 
-        assert_return(client, -EINVAL);
+        DHCP_CLIENT_DONT_DESTROY(client);
 
         client_stop(client, SD_DHCP_CLIENT_EVENT_STOP);
         client->state = DHCP_STATE_STOPPED;
index 5f89d00452e640a8625e80c0be13af420fb9d41a..8a138ff4b624fa69bcfd688f29f4d568d3209d5a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2013 Intel Corporation. All rights reserved.
 ***/
index a34a55919e2dd90f4eac7c3c1122b8d739e12009..dfced720c23cf9a712fe7a4cd52a6dfd4cdfd685 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2013 Intel Corporation. All rights reserved.
 ***/
@@ -225,7 +225,8 @@ sd_event *sd_dhcp_server_get_event(sd_dhcp_server *server) {
 }
 
 int sd_dhcp_server_stop(sd_dhcp_server *server) {
-        assert_return(server, -EINVAL);
+        if (!server)
+                return 0;
 
         server->receive_message =
                 sd_event_source_unref(server->receive_message);
@@ -566,7 +567,7 @@ static int server_send_nak(sd_dhcp_server *server, DHCPRequest *req) {
 }
 
 static int server_send_forcerenew(sd_dhcp_server *server, be32_t address,
-                                  be32_t gateway, uint8_t chaddr[]) {
+                                  be32_t gateway, const uint8_t chaddr[]) {
         _cleanup_free_ DHCPPacket *packet = NULL;
         size_t optoffset = 0;
         int r;
index e1dbdaff4e78695315b23e80087f21c5f7b78844..97fd5fd4fb32591cc9107fdad6d529d9990daddb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2014-2015 Intel Corporation. All rights reserved.
 ***/
 #include "hexdecoct.h"
 #include "hostname-util.h"
 #include "in-addr-util.h"
-#include "network-internal.h"
 #include "random-util.h"
 #include "socket-util.h"
 #include "string-table.h"
+#include "strv.h"
 #include "util.h"
 #include "web-util.h"
 
@@ -188,8 +188,7 @@ int sd_dhcp6_client_set_mac(
 
         assert_return(client, -EINVAL);
         assert_return(addr, -EINVAL);
-        assert_return(addr_len > 0 && addr_len <= MAX_MAC_ADDR_LEN, -EINVAL);
-        assert_return(arp_type > 0, -EINVAL);
+        assert_return(addr_len <= MAX_MAC_ADDR_LEN, -EINVAL);
 
         assert_return(IN_SET(client->state, DHCP6_STATE_STOPPED), -EBUSY);
 
@@ -197,8 +196,11 @@ int sd_dhcp6_client_set_mac(
                 assert_return(addr_len == ETH_ALEN, -EINVAL);
         else if (arp_type == ARPHRD_INFINIBAND)
                 assert_return(addr_len == INFINIBAND_ALEN, -EINVAL);
-        else
-                return -EINVAL;
+        else {
+                client->arp_type = ARPHRD_NONE;
+                client->mac_addr_len = 0;
+                return 0;
+        }
 
         if (client->mac_addr_len == addr_len &&
             memcmp(&client->mac_addr, addr, addr_len) == 0)
@@ -1676,7 +1678,8 @@ static int client_start(sd_dhcp6_client *client, enum DHCP6State state) {
 }
 
 int sd_dhcp6_client_stop(sd_dhcp6_client *client) {
-        assert_return(client, -EINVAL);
+        if (!client)
+                return 0;
 
         client_stop(client, SD_DHCP6_CLIENT_EVENT_STOP);
 
@@ -1742,8 +1745,7 @@ int sd_dhcp6_client_start(sd_dhcp6_client *client) {
         }
 
         log_dhcp6_client(client, "Started in %s mode",
-                         client->information_request? "Information request":
-                         "Managed");
+                         client->information_request ? "Information request" : "Managed");
 
         return client_start(client, state);
 }
index 9aad22124dce6cc9ddb51e36fe040d07e5ed73d3..d6f0708c942a81220485288113bd692195d06091 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2014-2015 Intel Corporation. All rights reserved.
 ***/
index ecd91cd927cd1f412ccd68c7f888492eaf5d5e59..9426b653240f5251238a7c4c56a081f373da634a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2014 Axis Communications AB. All rights reserved.
 ***/
 #include "ether-addr-util.h"
 #include "event-util.h"
 #include "fd-util.h"
+#include "format-util.h"
 #include "in-addr-util.h"
-#include "list.h"
+#include "log-link.h"
 #include "random-util.h"
 #include "siphash24.h"
+#include "string-table.h"
 #include "string-util.h"
 #include "time-util.h"
 
@@ -54,6 +56,7 @@ struct sd_ipv4acd {
         int ifindex;
         int fd;
 
+        char ifname[IF_NAMESIZE + 1];
         unsigned n_iteration;
         unsigned n_conflict;
 
@@ -72,13 +75,30 @@ struct sd_ipv4acd {
         void* userdata;
 };
 
-#define log_ipv4acd_errno(acd, error, fmt, ...) log_internal(LOG_DEBUG, error, PROJECT_FILE, __LINE__, __func__, "IPV4ACD: " fmt, ##__VA_ARGS__)
-#define log_ipv4acd(acd, fmt, ...) log_ipv4acd_errno(acd, 0, fmt, ##__VA_ARGS__)
+#define log_ipv4acd_errno(acd, error, fmt, ...)                         \
+        log_interface_full_errno(sd_ipv4acd_get_ifname(acd), LOG_DEBUG, error, "IPV4ACD: " fmt, ##__VA_ARGS__)
+#define log_ipv4acd(acd, fmt, ...)                      \
+        log_ipv4acd_errno(acd, 0, fmt, ##__VA_ARGS__)
+
+static const char * const ipv4acd_state_table[_IPV4ACD_STATE_MAX] = {
+        [IPV4ACD_STATE_INIT]             = "init",
+        [IPV4ACD_STATE_STARTED]          = "started",
+        [IPV4ACD_STATE_WAITING_PROBE]    = "waiting-probe",
+        [IPV4ACD_STATE_PROBING]          = "probing",
+        [IPV4ACD_STATE_WAITING_ANNOUNCE] = "waiting-announce",
+        [IPV4ACD_STATE_ANNOUNCING]       = "announcing",
+        [IPV4ACD_STATE_RUNNING]          = "running",
+};
+
+DEFINE_PRIVATE_STRING_TABLE_LOOKUP_TO_STRING(ipv4acd_state, IPv4ACDState);
 
 static void ipv4acd_set_state(sd_ipv4acd *acd, IPv4ACDState st, bool reset_counter) {
         assert(acd);
         assert(st < _IPV4ACD_STATE_MAX);
 
+        if (st != acd->state)
+                log_ipv4acd(acd, "%s -> %s", ipv4acd_state_to_string(acd->state), ipv4acd_state_to_string(st));
+
         if (st == acd->state && !reset_counter)
                 acd->n_iteration++;
         else {
@@ -144,7 +164,8 @@ static void ipv4acd_client_notify(sd_ipv4acd *acd, int event) {
 int sd_ipv4acd_stop(sd_ipv4acd *acd) {
         IPv4ACDState old_state;
 
-        assert_return(acd, -EINVAL);
+        if (!acd)
+                return 0;
 
         old_state = acd->state;
 
@@ -377,15 +398,35 @@ fail:
 }
 
 int sd_ipv4acd_set_ifindex(sd_ipv4acd *acd, int ifindex) {
+        char ifname[IF_NAMESIZE + 1];
+
         assert_return(acd, -EINVAL);
         assert_return(ifindex > 0, -EINVAL);
         assert_return(acd->state == IPV4ACD_STATE_INIT, -EBUSY);
 
+        if (!format_ifname(ifindex, ifname))
+                return -ENODEV;
+
+        strcpy(acd->ifname, ifname);
         acd->ifindex = ifindex;
 
         return 0;
 }
 
+int sd_ipv4acd_get_ifindex(sd_ipv4acd *acd) {
+        if (!acd)
+                return -EINVAL;
+
+        return acd->ifindex;
+}
+
+const char *sd_ipv4acd_get_ifname(sd_ipv4acd *acd) {
+        if (!acd)
+                return NULL;
+
+        return empty_to_null(acd->ifname);
+}
+
 int sd_ipv4acd_set_mac(sd_ipv4acd *acd, const struct ether_addr *addr) {
         assert_return(acd, -EINVAL);
         assert_return(addr, -EINVAL);
index 4f4d9ebe87719add28630b590dcc4057f4d61349..3af7d89bf076f3627f8aca04217f1056948c8d68 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2014 Axis Communications AB. All rights reserved.
 ***/
@@ -15,7 +15,7 @@
 #include "alloc-util.h"
 #include "ether-addr-util.h"
 #include "in-addr-util.h"
-#include "list.h"
+#include "log-link.h"
 #include "random-util.h"
 #include "siphash24.h"
 #include "sparse-endian.h"
@@ -49,8 +49,10 @@ struct sd_ipv4ll {
         void* userdata;
 };
 
-#define log_ipv4ll_errno(ll, error, fmt, ...) log_internal(LOG_DEBUG, error, PROJECT_FILE, __LINE__, __func__, "IPV4LL: " fmt, ##__VA_ARGS__)
-#define log_ipv4ll(ll, fmt, ...) log_ipv4ll_errno(ll, 0, fmt, ##__VA_ARGS__)
+#define log_ipv4ll_errno(ll, error, fmt, ...)                           \
+        log_interface_full_errno(sd_ipv4ll_get_ifname(ll), LOG_DEBUG, error, "IPV4LL: " fmt, ##__VA_ARGS__)
+#define log_ipv4ll(ll, fmt, ...)                        \
+        log_ipv4ll_errno(ll, 0, fmt, ##__VA_ARGS__)
 
 static void ipv4ll_on_acd(sd_ipv4acd *ll, int event, void *userdata);
 
@@ -89,7 +91,8 @@ int sd_ipv4ll_new(sd_ipv4ll **ret) {
 }
 
 int sd_ipv4ll_stop(sd_ipv4ll *ll) {
-        assert_return(ll, -EINVAL);
+        if (!ll)
+                return 0;
 
         return sd_ipv4acd_stop(ll->acd);
 }
@@ -102,6 +105,20 @@ int sd_ipv4ll_set_ifindex(sd_ipv4ll *ll, int ifindex) {
         return sd_ipv4acd_set_ifindex(ll->acd, ifindex);
 }
 
+int sd_ipv4ll_get_ifindex(sd_ipv4ll *ll) {
+        if (!ll)
+                return -EINVAL;
+
+        return sd_ipv4acd_get_ifindex(ll->acd);
+}
+
+const char *sd_ipv4ll_get_ifname(sd_ipv4ll *ll) {
+        if (!ll)
+                return NULL;
+
+        return sd_ipv4acd_get_ifname(ll->acd);
+}
+
 int sd_ipv4ll_set_mac(sd_ipv4ll *ll, const struct ether_addr *addr) {
         int r;
 
index b0a11fe20b618822a573b7b690fe5e711eef6f83..8b666522cb08e6d5786e9a97fb442c0ea800a63f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <arpa/inet.h>
 #include <linux/sockios.h>
@@ -276,7 +276,8 @@ fail:
 }
 
 _public_ int sd_lldp_stop(sd_lldp *lldp) {
-        assert_return(lldp, -EINVAL);
+        if (!lldp)
+                return 0;
 
         if (lldp->fd < 0)
                 return 0;
index 9922203ac4be88002c91d7e2ca06eb344b925634..db7ada60a899e57ba1a957daca4cbcc6c48f78fe 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2014 Intel Corporation. All rights reserved.
 ***/
@@ -321,7 +321,8 @@ static int ndisc_timeout_no_ra(sd_event_source *s, uint64_t usec, void *userdata
 }
 
 _public_ int sd_ndisc_stop(sd_ndisc *nd) {
-        assert_return(nd, -EINVAL);
+        if (!nd)
+                return 0;
 
         if (nd->fd < 0)
                 return 0;
index 016808667cf3ab0fcfb5518ab3ca07fce1b0a466..8beb845d79ee1e1a42cd049474e9389204cf5cd5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2017 Intel Corporation. All rights reserved.
 ***/
@@ -353,7 +353,8 @@ fail:
 _public_ int sd_radv_stop(sd_radv *ra) {
         int r;
 
-        assert_return(ra, -EINVAL);
+        if (!ra)
+                return 0;
 
         if (ra->state == SD_RADV_STATE_IDLE)
                 return 0;
@@ -465,14 +466,14 @@ _public_ int sd_radv_set_hop_limit(sd_radv *ra, uint8_t hop_limit) {
         return 0;
 }
 
-_public_ int sd_radv_set_router_lifetime(sd_radv *ra, uint32_t router_lifetime) {
+_public_ int sd_radv_set_router_lifetime(sd_radv *ra, uint16_t router_lifetime) {
         assert_return(ra, -EINVAL);
 
         if (ra->state != SD_RADV_STATE_IDLE)
                 return -EBUSY;
 
-        /* RFC 4191, Section 2.2, "...If the Router Lifetime is zero, the
-           preference value MUST be set to (00) by the sender..." */
+        /* RFC 4191, Section 2.2, "...If the Router Lifetime is zero, the preference value MUST be set
+         * to (00) by the sender..." */
         if (router_lifetime == 0 &&
             (ra->flags & (0x3 << 3)) != (SD_NDISC_PREFERENCE_MEDIUM << 3))
                 return -ETIME;
@@ -505,17 +506,20 @@ _public_ int sd_radv_set_other_information(sd_radv *ra, int other) {
 }
 
 _public_ int sd_radv_set_preference(sd_radv *ra, unsigned preference) {
-        int r = 0;
-
         assert_return(ra, -EINVAL);
         assert_return(IN_SET(preference,
                              SD_NDISC_PREFERENCE_LOW,
                              SD_NDISC_PREFERENCE_MEDIUM,
                              SD_NDISC_PREFERENCE_HIGH), -EINVAL);
 
+        /* RFC 4191, Section 2.2, "...If the Router Lifetime is zero, the preference value MUST be set
+         * to (00) by the sender..." */
+        if (ra->lifetime == 0 && preference != SD_NDISC_PREFERENCE_MEDIUM)
+                return -EINVAL;
+
         ra->flags = (ra->flags & ~(0x3 << 3)) | (preference << 3);
 
-        return r;
+        return 0;
 }
 
 _public_ int sd_radv_add_prefix(sd_radv *ra, sd_radv_prefix *p, int dynamic) {
index 27a1a2140024c6acf5c0c7ec65ae7d93ca96ce24..f4aab85ed40b47d87044a92801a5ed7be1b90bd0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdlib.h>
index 4d748ea66d0750eddd655b603c59a1b816b0bbda..d39d1f57a07ef1d53195b7fa00a01cba64e44f31 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2013 Intel Corporation. All rights reserved.
 ***/
@@ -23,6 +23,7 @@
 #include "util.h"
 
 static uint8_t mac_addr[] = {'A', 'B', 'C', '1', '2', '3'};
+static uint8_t bcast_addr[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
 
 typedef int (*test_callback_recv_t)(size_t size, DHCPMessage *dhcp);
 
@@ -247,6 +248,7 @@ int dhcp_network_bind_raw_socket(
                 union sockaddr_union *link,
                 uint32_t id,
                 const uint8_t *addr, size_t addr_len,
+                const uint8_t *bcaddr, size_t bcaddr_len,
                 uint16_t arp_type, uint16_t port) {
 
         if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0, test_fd) < 0)
@@ -296,7 +298,7 @@ static void test_discover_message(sd_event *e) {
         assert_se(r >= 0);
 
         assert_se(sd_dhcp_client_set_ifindex(client, 42) >= 0);
-        assert_se(sd_dhcp_client_set_mac(client, mac_addr, ETH_ALEN, ARPHRD_ETHER) >= 0);
+        assert_se(sd_dhcp_client_set_mac(client, mac_addr, bcast_addr, ETH_ALEN, ARPHRD_ETHER) >= 0);
 
         assert_se(sd_dhcp_client_set_request_option(client, 248) >= 0);
 
@@ -513,7 +515,7 @@ static void test_addr_acq(sd_event *e) {
         assert_se(r >= 0);
 
         assert_se(sd_dhcp_client_set_ifindex(client, 42) >= 0);
-        assert_se(sd_dhcp_client_set_mac(client, mac_addr, ETH_ALEN, ARPHRD_ETHER) >= 0);
+        assert_se(sd_dhcp_client_set_mac(client, mac_addr, bcast_addr, ETH_ALEN, ARPHRD_ETHER) >= 0);
 
         assert_se(sd_dhcp_client_set_callback(client, test_addr_acq_acquired, e) >= 0);
 
index 086f8b5fd96c946817f1c99ec6d5f56d1b4ef9ce..1eebe3a10f95cf9249be62dd8e1b77913463bb70 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <net/if_arp.h>
index 16a4f16bfa4a6b961824d40c81a6b289c2551698..e91b440fe90952d9cbd301d0405cf0a60a8ba8f5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2013 Intel Corporation. All rights reserved.
 ***/
index e198814ba0732a931ca7f054aa8959e9ac284ce3..e6a43dcd5eec44d62bade6ccff2515e78cf521c5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2014 Intel Corporation. All rights reserved.
 ***/
index fd827ff40144e37cadef649df6fd22cddc03eeb4..a253acbd8355409b762e62404de2371669a9bb43 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <net/if.h>
index 310b658e188a0eb203041ac7f8c6d97e017feed5..49e1d590be3e0bdd97b23f1f15958c2f62665347 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2014 Axis Communications AB. All rights reserved.
 ***/
@@ -126,7 +126,6 @@ static void test_public_api_setters(sd_event *e) {
         assert_se(sd_ipv4ll_set_ifindex(ll, -1) == -EINVAL);
         assert_se(sd_ipv4ll_set_ifindex(ll, -99) == -EINVAL);
         assert_se(sd_ipv4ll_set_ifindex(ll, 1) == 0);
-        assert_se(sd_ipv4ll_set_ifindex(ll, 99) == 0);
 
         assert_se(sd_ipv4ll_ref(ll) == ll);
         assert_se(sd_ipv4ll_unref(ll) == NULL);
index a2ac65095f2c6d7b065c75015a4b4c78eeb65c77..c52d422fce2c2c6810a420d9932a65150e1addf5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <arpa/inet.h>
 #include <errno.h>
index 942a128cae2d6f0aabc3206c0acf6b14689697b3..927e21b3cdf69d923aa0eed58167b0a556f3b070 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2017 Intel Corporation. All rights reserved.
 ***/
index 2c4ffb94dd8f278093aa8a0c0392a72a3ce58e12..1b2bba889d849f243a3aa0c0e238dd9120ca2190 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2014 Intel Corporation. All rights reserved.
 ***/
index 534cc7856401db6fb750ff3b332511c90fc70747..9f13226889961a96659498ac9c460ff11a2628b9 100644 (file)
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
 #include <errno.h>
 
 #include "dhcp-lease-internal.h"
index 034bd24dc4b0f56c9093cf71f507b82d16bbf333..1baf91f05bb67e749efeb7acfabd7da4ff7d88b0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "mempool.h"
 
index a010dea2e92f7d7e7961ceb91eb9b1b0302ed37a..74f33b70e668a7b97eef8bcc52e5f23ea7aa5051 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 6e7f2eee53b209e5c1b58fd9d0695337cfa64deb..b03bcd952f4e4e4d5b761883bddbdd3aad2ab611 100644 (file)
@@ -1,5 +1,5 @@
 /***
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   systemd is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
@@ -736,3 +736,10 @@ global:
         sd_device_has_current_tag;
         sd_device_set_sysattr_valuef;
 } LIBSYSTEMD_246;
+
+LIBSYSTEMD_248 {
+global:
+        sd_event_source_set_ratelimit;
+        sd_event_source_get_ratelimit;
+        sd_event_source_is_ratelimited;
+} LIBSYSTEMD_246;
index aa1ed9b7dd96dc45fe78440844f6a3d8ed4649a6..50716f7b944afec66bc3c730c3219a6370a00365 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 id128_sources = files('''
         sd-id128/id128-util.c
index dc9a2fdc3a56f3f6c37682a31f47f817d24bc98c..ef1fa3711b9025463016a029506cf75cb1428e30 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index 965f6dd134502218c58583008667ffc037420286..7e5be17d534ba9920b50f415430335ce9f43288f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "bus-error.h"
index 40b0e8a94713e2dcb8427b914cb614be733c605e..f09d5e7fd132a27f76549d1b659cf17a223b1fd2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <unistd.h>
@@ -9,6 +9,7 @@
 #include "fd-util.h"
 #include "namespace-util.h"
 #include "process-util.h"
+#include "string-util.h"
 #include "util.h"
 
 int bus_container_connect_socket(sd_bus *b) {
@@ -24,10 +25,15 @@ int bus_container_connect_socket(sd_bus *b) {
         assert(b->nspid > 0 || b->machine);
 
         if (b->nspid <= 0) {
+                log_debug("sd-bus: connecting bus%s%s to machine %s...",
+                          b->description ? " " : "", strempty(b->description), b->machine);
+
                 r = container_get_leader(b->machine, &b->nspid);
                 if (r < 0)
                         return r;
-        }
+        } else
+                log_debug("sd-bus: connecting bus%s%s to namespace of PID "PID_FMT"...",
+                          b->description ? " " : "", strempty(b->description), b->nspid);
 
         r = namespace_open(b->nspid, &pidnsfd, &mntnsfd, NULL, &usernsfd, &rootfd);
         if (r < 0)
index f6ef68803218d556d8cac25ce8519a68ef1d5761..cb503a597055d7270f620466784a17bc439bad52 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index b7ca79bb583f5b999c2fba00a45936574ca6ea93..a63937e1ce418634ba7e39aab6a0f5b1aeec7ba9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if HAVE_VALGRIND_MEMCHECK_H
 #include <valgrind/memcheck.h>
index eb1ae75c147e784bf5d74879ed54d01c63c9491b..8182b9cd632dd04bcf11091ef51b83968ff90c8e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index a5672a831ff8401bc75d3b73282e1fb66d655a0e..4bf228b43617abc9a4ed41a4110d20f8ff18f676 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 #include <sys/types.h>
index 88d679f64cb0145dbc907d4d1df5ae2b10ab96a2..3896d94111c73863719abfce814c98788d55c9e6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/capability.h>
 #include <stdlib.h>
index 508ef9d35214a136dd010d95382fbcfc445f2fe0..7806d9e3628f916dc3494b991d8c15b7e53df6fe 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 94107c297f4c042d93c0faf3371452e552041d70..3ff87be67cf777d43572b5a354298e3f1151c844 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/time.h>
 
index f138791c04b3ef7f71c41f5b31dbc6fc8373f4bc..aeb4616e9a776d897c19f3e16f822a8790c35633 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 83de996b252a7a4d5167c299ba2d0789b8c8aaf8..8da2024a5028ffcfa8776cfb5f66799ad545c1fa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdarg.h>
@@ -581,7 +581,7 @@ const char *bus_error_message(const sd_bus_error *e, int error) {
                         return e->message;
         }
 
-        return strerror_safe(abs(error));
+        return strerror_safe(error);
 }
 
 static bool map_ok(const sd_bus_error_map *map) {
index a6523e57a2767a6e6b6770cab3bbd683422382d0..557284faf8258ca9d21cdb9a93bae878c0922f5d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index ba503b321317c730d98b05040ae626957de283eb..850540a7852923f598a5d77e02859ae89971187b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <string.h>
index 644b5f4b20d6f13d58f0c9c49401b848f0d93e2c..213fa97083eb0f69b5b6de5aaaba6219abc20356 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "macro.h"
index 5c3e955c20c83abce597b0582575792f15b832e0..3f03ad7c4115d8ffa8511bd55b905b543f2ae6c0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "bus-internal.h"
index ef2c3dbc4fde6f034fc841bb0f308fb4843df5ee..233a2283150f5589d399d9bffcae63d040c0ac36 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <pthread.h>
index 734abcf3fdedac8b15304f62102fd828adee7ad0..866fca7acb822855e2a2d166b09289bc92961ad9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-internal.h"
 #include "bus-introspect.h"
index 19d39923e5d7922c8a1cd0bfaf75e641df192ece..34f32a4cf9f0da1efa928f0f78a0d545f0f4dea9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdio.h>
index b74cfa6ab85ea769738a06f68ad79b4e961113ed..6bba446932c7b298621189c048796024164969d3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if HAVE_VALGRIND_MEMCHECK_H
 #include <valgrind/memcheck.h>
index fbbc43f6fae5858a01b40a4d865da1f29c617b14..be8e0ceb9b692035e78bdcb07a64198293d1da6b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 20a4b46773b47d7f75860f001cda39d28fd86395..d7da4bf009fcc387c2b9767d3c9de4f81631946a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "bus-internal.h"
index a6f67ce089740fdae8615c0b4a2b1c11e8bcb642..e44e40644eb96713df32e39b267d2a1f1f46ba95 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 55e35cd902ee960e20bb13271aa69ce0e0df89c5..86ff5bdfa27b441b86828b81cc59d0f5eb1e8ee2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -3189,6 +3189,8 @@ static int container_next_item(sd_bus_message *m, struct bus_container *c, size_
                 int sz;
 
                 sz = bus_gvariant_get_size(c->signature);
+                if (sz == 0)
+                        return -EBADMSG;
                 if (sz < 0) {
                         int alignment;
 
@@ -4795,8 +4797,13 @@ _public_ int sd_bus_message_read_array(
         assert_return(!BUS_MESSAGE_NEED_BSWAP(m), -EOPNOTSUPP);
 
         r = sd_bus_message_enter_container(m, SD_BUS_TYPE_ARRAY, CHAR_TO_STR(type));
-        if (r <= 0)
+        if (r < 0)
                 return r;
+        if (r == 0) {
+                *ptr = NULL;
+                *size = 0;
+                return 0;
+        }
 
         c = message_get_last_container(m);
 
index 5d869213ab80f0a0d70c9f73ae83b0901628cd57..3561737e2f73c2b1cf379ea0ff4a922a4eaac72a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <byteswap.h>
index 33284d7301e8ba62f2b5bd44491651f7733a9128..275c4318a1e61a372b79181da01abf6de27c028c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "bus-internal.h"
index f650196a5439949f2bdc3a6dfdfa038ea91f8c4e..20fccfa1d865b5a1166cc8200a9165dd56161db6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "bus-internal.h"
index 7e1cd3c31e33d288d268596529e62af81f41ee7d..c41ab58faa800114c7df47f9fd195814992aa903 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <endian.h>
index b420ba3688d096ac60e1f5e4f8d3a2513cc0bfcf..bd0842fdbc5fcb9830884e3197e20b1c33ccec4e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <util.h>
 
index b87bec83295506f74f7813382f7b83118dcbef54..314fcc27c57f881c3eb77b9df3dc7319c6feea8c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index f90a7f05ccf7fb0d9a94af914b3e62d0ba23c977..a0009a7a87d7ccdbabfded3f96da9054549007a1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-bus.h"
 
index 48eb0453dcb1611854acd61be75671e120772ee7..8116195d4dd83be94527b91e035fa6205b3fa83a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index de36a1f278af70654956e9b9467b98c529984939..4881fd0d321a9b21c8f6d2d53d42162936f03bfa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <endian.h>
 #include <poll.h>
@@ -885,6 +885,13 @@ int bus_socket_connect(sd_bus *b) {
                 assert(b->output_fd < 0);
                 assert(b->sockaddr.sa.sa_family != AF_UNSPEC);
 
+                if (DEBUG_LOGGING) {
+                        _cleanup_free_ char *pretty = NULL;
+                        (void) sockaddr_pretty(&b->sockaddr.sa, b->sockaddr_size, false, true, &pretty);
+                        log_debug("sd-bus: starting bus%s%s by connecting to %s...",
+                                  b->description ? " " : "", strempty(b->description), strnull(pretty));
+                }
+
                 b->input_fd = socket(b->sockaddr.sa.sa_family, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
                 if (b->input_fd < 0)
                         return -errno;
@@ -956,6 +963,9 @@ int bus_socket_exec(sd_bus *b) {
         assert(b->exec_path);
         assert(b->busexec_pid == 0);
 
+        log_debug("sd-bus: starting bus%s%s with %s...",
+                  b->description ? " " : "", strempty(b->description), b->exec_path);
+
         r = socketpair(AF_UNIX, SOCK_STREAM|SOCK_NONBLOCK|SOCK_CLOEXEC, 0, s);
         if (r < 0)
                 return -errno;
index f8d24556c9703f33e82a01bd81ee418a69ff43d2..52bc404625477367d969b9095e703be3136d38d2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 13fd52ffd5ed0ad714126166cce5985307ede492..5f8716e2aa6381e92424896f2aa7e83dad22091a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-bus.h"
 
index 209b989d27846c636bd90db03d7ea9dea1f306a9..8dae1f3902446c5659c967183910938ddc17fbaa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 void bus_track_dispatch(sd_bus_track *track);
index 585f8424b3f85c9ae4cfcdb785284b7bf25b6029..6a0f53d1d1bfa7ea13b414490049b3ded4b61e19 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index 0ecd8513fd252c12d182e73f1cbede75bf672d3f..490108a2c645fd9de59b174c72eeba29731836ef 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 015a215c420ae3f6b790cc11e52330ad7b0a952a..b8d4dc8d959f631aedee917e3d13c2ddcd29512f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <endian.h>
 #include <netdb.h>
@@ -1155,6 +1155,16 @@ static int bus_start_fd(sd_bus *b) {
         assert(b->input_fd >= 0);
         assert(b->output_fd >= 0);
 
+        if (DEBUG_LOGGING) {
+                _cleanup_free_ char *pi = NULL, *po = NULL;
+                (void) fd_get_path(b->input_fd, &pi);
+                (void) fd_get_path(b->output_fd, &po);
+                log_debug("sd-bus: starting bus%s%s on fds %d/%d (%s, %s)...",
+                          b->description ? " " : "", strempty(b->description),
+                          b->input_fd, b->output_fd,
+                          pi ?: "???", po ?: "???");
+        }
+
         r = fd_nonblock(b->input_fd, true);
         if (r < 0)
                 return r;
@@ -1330,7 +1340,8 @@ int bus_set_address_user(sd_bus *b) {
 
                 e = secure_getenv("XDG_RUNTIME_DIR");
                 if (!e)
-                        return -ENOENT;
+                        return log_debug_errno(SYNTHETIC_ERRNO(ENOMEDIUM),
+                                               "sd-bus: $XDG_RUNTIME_DIR not set, cannot connect to user bus.");
 
                 ee = bus_address_escape(e);
                 if (!ee)
@@ -2120,12 +2131,13 @@ int bus_ensure_running(sd_bus *bus) {
 
         assert(bus);
 
-        if (IN_SET(bus->state, BUS_UNSET, BUS_CLOSED, BUS_CLOSING))
-                return -ENOTCONN;
         if (bus->state == BUS_RUNNING)
                 return 1;
 
         for (;;) {
+                if (IN_SET(bus->state, BUS_UNSET, BUS_CLOSED, BUS_CLOSING))
+                        return -ENOTCONN;
+
                 r = sd_bus_process(bus, NULL);
                 if (r < 0)
                         return r;
index 70a6df10f96e2f34fd0050defbe39c0f2e56e7a7..b92558fea9d43ad5dbfac4e5fe85f3e007ea6642 100644 (file)
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
 #include "sd-bus.h"
 
 #include "bus-internal.h"
index 8de0a859ee9400c26594bd0686c81ce5f3a2137f..8c6711797a44b0eedca6cf2dc0c8f8681849d5ed 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/wait.h>
 #include <unistd.h>
index 1497dc696f2f82a40b9809dad39aff48e5dbc644..c3c31c65e6367b312d1a023bd2abeba0fcddba41 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <pthread.h>
index 99d335e3fceb852a8556f5a68e7046da84a14a82..ece0a12babc0ff816f3f5e648b7c07e3336949ea 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 
@@ -23,7 +23,7 @@ static int test_bus_open(void) {
         int r;
 
         r = sd_bus_open_user(&bus);
-        if (IN_SET(r, -ECONNREFUSED, -ENOENT)) {
+        if (IN_SET(r, -ECONNREFUSED, -ENOENT, -ENOMEDIUM)) {
                 r = sd_bus_open_system(&bus);
                 if (IN_SET(r, -ECONNREFUSED, -ENOENT))
                         return r;
index 7f7bc491d2586faf050141d7f386d284060a38e3..6551e692f85969a0c162105f6ccdb886f4d298e7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-bus.h"
 
index 14e3c9c40d8f6ccfbcbb7f8b7a58899de10870d6..2e3803c9b23dcfa0dc3f95b5156a562a6aa1446f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-bus.h"
 
index d248bd4da133ab599b8edda02d3abe8cb1bbb9ed..b0033f1d133ff0fc8af10c58386cc0fa4303efea 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if HAVE_GLIB
 #include <glib.h>
index cbc31589241c14b1517c6ae0b9017987e65d0025..fb247c4d14ba7651d6aa5f5d67a7f2253ebb59d2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-introspect.h"
 #include "log.h"
index 107eea390e0bcccab0fd61bd454d6d988c24f920..9feeaf48fd3cbf641ae75d0a745621cac30628d2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <math.h>
 #include <stdlib.h>
index 47014c403b51dc88c61df185b52eea0d2ae5f7ae..aa6ddd336a9e6e132292af9c640fdf0ab3c4619f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-match.h"
 #include "bus-message.h"
index 41cf8c167006793b462ba93ace85fad500ff1e44..9116211886f039de54eb32f963e45fa0b947124b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <pthread.h>
 #include <stdlib.h>
index 17598f3d63358f6be3e5d19ecd87ff10138c4f71..7c2fa72e84e97ccbf70f450c62b6984610bcc96a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #include "sd-bus.h"
 
 #include "main-func.h"
index 1302fdbb5a077dc4e4d912836db476e2325b8239..5cb100b2f0b84d2bec774daf39e243d9464e4a86 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <pthread.h>
 #include <stdlib.h>
index 84648dbc2aef92d774055c780b86fe50574af9e5..ea7efe68e49a03cab33dd2f131f1dc653a748614 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-internal.h"
 #include "bus-signature.h"
index 68a0010368833fc55180ee6795cc5ba807616872..64aa88bb4f7663b58c8cda2383cc821ec03b7c91 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sys/socket.h>
@@ -55,7 +55,7 @@ int main(int argc, char *argv[]) {
         assert_se(r >= 0);
 
         r = sd_bus_open_user(&a);
-        if (IN_SET(r, -ECONNREFUSED, -ENOENT)) {
+        if (IN_SET(r, -ECONNREFUSED, -ENOENT, -ENOMEDIUM)) {
                 r = sd_bus_open_system(&a);
                 if (IN_SET(r, -ECONNREFUSED, -ENOENT))
                         return log_tests_skipped("Failed to connect to bus");
index b6350027dd3ede31d867e049b627353d717ac385..fe122381e767fde6819ca9e9cd59f93abf3ea02a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdbool.h>
 #include <stddef.h>
index 7ded9386b75023f80e77277c35e0f0b8e5cb5ad9..fdc8772f84180ba179a48ac8712a071852fb222b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <pthread.h>
 
index bc89893814b050209ede42845b8b4164429c2ace..7269a499459f8cfc6f8e0a9b26ebacc5995334a4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 /* This is meant to be included in other files, hence no headers */
 
index bdcbb106ce4f3c3ab97a15d79ae22ea49c38bb6e..6f0b975627e7632938b2d099cc1d23d75726ccf9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <limits.h>
 #define SNDBUF_SIZE (8*1024*1024)
 
 static void unsetenv_all(bool unset_environment) {
-
         if (!unset_environment)
                 return;
 
-        unsetenv("LISTEN_PID");
-        unsetenv("LISTEN_FDS");
-        unsetenv("LISTEN_FDNAMES");
+        assert_se(unsetenv("LISTEN_PID") == 0);
+        assert_se(unsetenv("LISTEN_FDS") == 0);
+        assert_se(unsetenv("LISTEN_FDNAMES") == 0);
 }
 
 _public_ int sd_listen_fds(int unset_environment) {
@@ -548,7 +547,7 @@ _public_ int sd_pid_notify_with_fds(
 
 finish:
         if (unset_environment)
-                unsetenv("NOTIFY_SOCKET");
+                assert_se(unsetenv("NOTIFY_SOCKET") == 0);
 
         return r;
 }
@@ -672,9 +671,9 @@ _public_ int sd_watchdog_enabled(int unset_environment, uint64_t *usec) {
 
 finish:
         if (unset_environment && s)
-                unsetenv("WATCHDOG_USEC");
+                assert_se(unsetenv("WATCHDOG_USEC") == 0);
         if (unset_environment && p)
-                unsetenv("WATCHDOG_PID");
+                assert_se(unsetenv("WATCHDOG_PID") == 0);
 
         return r;
 }
index cf2b261482469201a894370d1c5e200488b799af..9c6437dbed3b90963171fe577b6cf2ecf60207c4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-device.h"
index 2d1ce7988873366d697dac7bf834b18ed25131bc..3641348881c02fe4fcf58569e1542c8f0af42dc1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <unistd.h>
@@ -420,7 +420,8 @@ static int enumerator_scan_dir_and_add_devices(sd_device_enumerator *enumerator,
 
         dir = opendir(path);
         if (!dir)
-                return -errno;
+                /* this is necessarily racey, so ignore missing directories */
+                return (errno == ENOENT && (subdir1 || subdir2)) ? 0 : -errno;
 
         FOREACH_DIRENT_ALL(dent, dir, return -errno) {
                 _cleanup_(sd_device_unrefp) sd_device *device = NULL;
@@ -743,16 +744,12 @@ static int enumerator_scan_devices_all(sd_device_enumerator *enumerator) {
                 int k;
 
                 k = enumerator_scan_dir(enumerator, "bus", "devices", NULL);
-                if (k < 0) {
-                        log_debug_errno(k, "sd-device-enumerator: Failed to scan /sys/bus: %m");
-                        r = k;
-                }
+                if (k < 0)
+                        r = log_debug_errno(k, "sd-device-enumerator: Failed to scan /sys/bus: %m");
 
                 k = enumerator_scan_dir(enumerator, "class", NULL, NULL);
-                if (k < 0) {
-                        log_debug_errno(k, "sd-device-enumerator: Failed to scan /sys/class: %m");
-                        r = k;
-                }
+                if (k < 0)
+                        r = log_debug_errno(k, "sd-device-enumerator: Failed to scan /sys/class: %m");
         }
 
         return r;
@@ -870,10 +867,8 @@ int device_enumerator_scan_subsystems(sd_device_enumerator *enumerator) {
         /* modules */
         if (match_subsystem(enumerator, "module")) {
                 k = enumerator_scan_dir_and_add_devices(enumerator, "module", NULL, NULL);
-                if (k < 0) {
-                        log_debug_errno(k, "sd-device-enumerator: Failed to scan modules: %m");
-                        r = k;
-                }
+                if (k < 0)
+                        r = log_debug_errno(k, "sd-device-enumerator: Failed to scan modules: %m");
         }
 
         if (access("/sys/subsystem", F_OK) >= 0)
@@ -884,19 +879,15 @@ int device_enumerator_scan_subsystems(sd_device_enumerator *enumerator) {
         /* subsystems (only buses support coldplug) */
         if (match_subsystem(enumerator, "subsystem")) {
                 k = enumerator_scan_dir_and_add_devices(enumerator, subsysdir, NULL, NULL);
-                if (k < 0) {
-                        log_debug_errno(k, "sd-device-enumerator: Failed to scan subsystems: %m");
-                        r = k;
-                }
+                if (k < 0)
+                        r = log_debug_errno(k, "sd-device-enumerator: Failed to scan subsystems: %m");
         }
 
         /* subsystem drivers */
         if (match_subsystem(enumerator, "drivers")) {
                 k = enumerator_scan_dir(enumerator, subsysdir, "drivers", "drivers");
-                if (k < 0) {
-                        log_debug_errno(k, "sd-device-enumerator: Failed to scan drivers: %m");
-                        r = k;
-                }
+                if (k < 0)
+                        r = log_debug_errno(k, "sd-device-enumerator: Failed to scan drivers: %m");
         }
 
         typesafe_qsort(enumerator->devices, enumerator->n_devices, device_compare);
index 9c6b8a345f60ff401237bbea8fb42d8e8739d1e6..3321c8e2dc6542b93f5709a0aee2e89fd5f70c4c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-device.h"
@@ -8,9 +8,19 @@
 #include "set.h"
 #include "time-util.h"
 
+#define LATEST_UDEV_DATABASE_VERSION 1
+
 struct sd_device {
         unsigned n_ref;
 
+        /* The database version indicates the supported features by the udev database.
+         * This is saved and parsed in V field.
+         *
+         * 0: None of the following features are supported (systemd version <= 246).
+         * 1: The current tags (Q) and the database version (V) features are implemented (>= 247).
+         */
+        unsigned database_version;
+
         int watch_handle;
 
         sd_device *parent;
@@ -88,7 +98,9 @@ struct sd_device {
 
 int device_new_aux(sd_device **ret);
 int device_add_property_aux(sd_device *device, const char *key, const char *value, bool db);
-int device_add_property_internal(sd_device *device, const char *key, const char *value);
+static inline int device_add_property_internal(sd_device *device, const char *key, const char *value) {
+        return device_add_property_aux(device, key, value, false);
+}
 int device_read_uevent_file(sd_device *device);
 
 int device_set_syspath(sd_device *device, const char *_syspath, bool verify);
index 2659cc3c46e3e06292a6bf6af4e1d9cc48522398..2ca3a313b6e875cef1c0731a6d6aaf65166f8a0c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-device.h"
index 43646e1880902a6ddd2a9cda52cd6a5656057a03..fd5900704dfce37e3cd9690d618c3e5926275b4b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <linux/filter.h>
index dc16d555a1c44d6d70ee53321de29804b87735ff..2801ebdcbe32080a929d574d562ac3b9d2777527 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <ctype.h>
 #include <net/if.h>
@@ -468,6 +468,10 @@ int device_new_from_nulstr(sd_device **ret, uint8_t *nulstr, size_t len) {
 
                 i += end - key + 1;
 
+                /* netlink messages for some devices contain an unwanted newline at the end of value.
+                 * Let's drop the newline and remaining characters after the newline. */
+                truncate_nl(key);
+
                 r = device_append(device, key, &major, &minor);
                 if (r < 0)
                         return r;
@@ -944,6 +948,10 @@ int device_update_db(sd_device *device) {
 
                 SET_FOREACH(tag, device->current_tags)
                         fprintf(f, "Q:%s\n", tag); /* Current tag */
+
+                /* Always write the latest database version here, instead of the value stored in
+                 * device->database_version, as which may be 0. */
+                fputs("V:" STRINGIFY(LATEST_UDEV_DATABASE_VERSION) "\n", f);
         }
 
         r = fflush_and_check(f);
index 1f1c4ca1071719d5c7553e0516cad82184c6ed0d..db81934f32070e106791e986b75dbe6bc25ed36b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index 032d1dc8b837cd58b75d5fb85dea67f0c2527a03..122620953a3aee9ddeb4fbb081807989ba902d36 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #define FOREACH_DEVICE_PROPERTY(device, key, value)                \
index 634c9a24f864928dc404043e51d08d6ffeab939e..d06f90ce1d881348499b28cf7bb0cf17a584d753 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <ctype.h>
 #include <net/if.h>
@@ -128,10 +128,6 @@ int device_add_property_aux(sd_device *device, const char *_key, const char *_va
         return 0;
 }
 
-int device_add_property_internal(sd_device *device, const char *key, const char *value) {
-        return device_add_property_aux(device, key, value, false);
-}
-
 int device_set_syspath(sd_device *device, const char *_syspath, bool verify) {
         _cleanup_free_ char *syspath = NULL;
         const char *devpath;
@@ -1208,6 +1204,12 @@ static int handle_db_line(sd_device *device, char key, const char *value) {
                 if (r < 0)
                         return r;
 
+                break;
+        case 'V':
+                r = safe_atou(value, &device->database_version);
+                if (r < 0)
+                        return r;
+
                 break;
         default:
                 log_device_debug(device, "sd-device: Unknown key '%c' in device db, ignoring", key);
@@ -1442,11 +1444,26 @@ _public_ const char *sd_device_get_tag_next(sd_device *device) {
         return v;
 }
 
+static bool device_database_supports_current_tags(sd_device *device) {
+        assert(device);
+
+        (void) device_read_db(device);
+
+        /* The current tags (saved in Q field) feature is implemented in database version 1.
+         * If the database version is 0, then the tags (NOT current tags, saved in G field) are not
+         * sticky. Thus, we can safely bypass the operations for the current tags (Q) to tags (G). */
+
+        return device->database_version >= 1;
+}
+
 _public_ const char *sd_device_get_current_tag_first(sd_device *device) {
         void *v;
 
         assert_return(device, NULL);
 
+        if (!device_database_supports_current_tags(device))
+                return sd_device_get_tag_first(device);
+
         (void) device_read_db(device);
 
         device->current_tags_iterator_generation = device->tags_generation;
@@ -1461,6 +1478,9 @@ _public_ const char *sd_device_get_current_tag_next(sd_device *device) {
 
         assert_return(device, NULL);
 
+        if (!device_database_supports_current_tags(device))
+                return sd_device_get_tag_next(device);
+
         (void) device_read_db(device);
 
         if (device->current_tags_iterator_generation != device->tags_generation)
@@ -1763,6 +1783,9 @@ _public_ int sd_device_has_current_tag(sd_device *device, const char *tag) {
         assert_return(device, -EINVAL);
         assert_return(tag, -EINVAL);
 
+        if (!device_database_supports_current_tags(device))
+                return sd_device_has_tag(device, tag);
+
         (void) device_read_db(device);
 
         return set_contains(device->current_tags, tag);
index aa1edaaf3c1eaa4a96b71cde89fd76e2eb2fa931..fddd1c152c91b2229f578340d95fefa8ffcee8d3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdbool.h>
 #include <unistd.h>
index 9f1c02373f46bcd5468a51eb85a0e1d84168e541..6f3015515b5fffb3d45c07ef570fdbc34f6432aa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <pthread.h>
 #include <stdbool.h>
index ca9662b851e4d5696f6cb5bf9752d35869a0f4c0..9f48d2bf1e8512aaa1cf6e41bd8d8d850ef98ccc 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "device-enumerator-private.h"
 #include "device-private.h"
index 2fc0f591850520743079a11c1f78e9dc8963185c..a493152d4a6ddb8e56f61db77e1f3bba4003b674 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <pthread.h>
 #include <stdbool.h>
index a8a30d825ebee317f6dcefa42948cd81003bcac5..f0d2a1b9e6daf89241b78f02973d515b91255b0a 100644 (file)
@@ -1,5 +1,5 @@
 #pragma once
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/epoll.h>
 #include <sys/timerfd.h>
@@ -11,6 +11,7 @@
 #include "hashmap.h"
 #include "list.h"
 #include "prioq.h"
+#include "ratelimit.h"
 
 typedef enum EventSourceType {
         SOURCE_IO,
@@ -61,6 +62,7 @@ struct sd_event_source {
         bool dispatching:1;
         bool floating:1;
         bool exit_on_failure:1;
+        bool ratelimited:1;
 
         int64_t priority;
         unsigned pending_index;
@@ -72,6 +74,13 @@ struct sd_event_source {
 
         LIST_FIELDS(sd_event_source, sources);
 
+        RateLimit rate_limit;
+
+        /* These are primarily fields relevant for time event sources, but since any event source can
+         * effectively become one when rate-limited, this is part of the common fields. */
+        unsigned earliest_index;
+        unsigned latest_index;
+
         union {
                 struct {
                         sd_event_io_handler_t callback;
@@ -84,8 +93,6 @@ struct sd_event_source {
                 struct {
                         sd_event_time_handler_t callback;
                         usec_t next, accuracy;
-                        unsigned earliest_index;
-                        unsigned latest_index;
                 } time;
                 struct {
                         sd_event_signal_handler_t callback;
index 43e73d55e12e196dbe02b26021f09d5890ec67a5..132796fc6c2b885859472bb14ae6bdba49bbebdf 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index 00180955f92549250c0531e5aedb2b0f4db77a65..c8f97bc8d61ff2b19c2fac81f19638057d80d368 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index c9ea8c61d71bee627ed88edac96525bd22fd0703..3f1a6776fe41ce9ad7eb603e23b7934dba22a26b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/epoll.h>
 #include <sys/timerfd.h>
@@ -37,6 +37,16 @@ static bool EVENT_SOURCE_WATCH_PIDFD(sd_event_source *s) {
                 s->child.options == WEXITED;
 }
 
+static bool event_source_is_online(sd_event_source *s) {
+        assert(s);
+        return s->enabled != SD_EVENT_OFF && !s->ratelimited;
+}
+
+static bool event_source_is_offline(sd_event_source *s) {
+        assert(s);
+        return s->enabled == SD_EVENT_OFF || s->ratelimited;
+}
+
 static const char* const event_source_type_table[_SOURCE_EVENT_SOURCE_TYPE_MAX] = {
         [SOURCE_IO] = "io",
         [SOURCE_TIME_REALTIME] = "realtime",
@@ -55,7 +65,25 @@ static const char* const event_source_type_table[_SOURCE_EVENT_SOURCE_TYPE_MAX]
 
 DEFINE_PRIVATE_STRING_TABLE_LOOKUP_TO_STRING(event_source_type, int);
 
-#define EVENT_SOURCE_IS_TIME(t) IN_SET((t), SOURCE_TIME_REALTIME, SOURCE_TIME_BOOTTIME, SOURCE_TIME_MONOTONIC, SOURCE_TIME_REALTIME_ALARM, SOURCE_TIME_BOOTTIME_ALARM)
+#define EVENT_SOURCE_IS_TIME(t)                 \
+        IN_SET((t),                             \
+               SOURCE_TIME_REALTIME,            \
+               SOURCE_TIME_BOOTTIME,            \
+               SOURCE_TIME_MONOTONIC,           \
+               SOURCE_TIME_REALTIME_ALARM,      \
+               SOURCE_TIME_BOOTTIME_ALARM)
+
+#define EVENT_SOURCE_CAN_RATE_LIMIT(t)          \
+        IN_SET((t),                             \
+               SOURCE_IO,                       \
+               SOURCE_TIME_REALTIME,            \
+               SOURCE_TIME_BOOTTIME,            \
+               SOURCE_TIME_MONOTONIC,           \
+               SOURCE_TIME_REALTIME_ALARM,      \
+               SOURCE_TIME_BOOTTIME_ALARM,      \
+               SOURCE_SIGNAL,                   \
+               SOURCE_DEFER,                    \
+               SOURCE_INOTIFY)
 
 struct sd_event {
         unsigned n_ref;
@@ -81,7 +109,7 @@ struct sd_event {
         Hashmap *signal_data; /* indexed by priority */
 
         Hashmap *child_sources;
-        unsigned n_enabled_child_sources;
+        unsigned n_online_child_sources;
 
         Set *post_sources;
 
@@ -120,7 +148,7 @@ struct sd_event {
 
         LIST_HEAD(sd_event_source, sources);
 
-        usec_t last_run, last_log;
+        usec_t last_run_usec, last_log_usec;
         unsigned delays[sizeof(usec_t) * 8];
 };
 
@@ -146,6 +174,11 @@ static int pending_prioq_compare(const void *a, const void *b) {
         if (x->enabled == SD_EVENT_OFF && y->enabled != SD_EVENT_OFF)
                 return 1;
 
+        /* Non rate-limited ones first. */
+        r = CMP(!!x->ratelimited, !!y->ratelimited);
+        if (r != 0)
+                return r;
+
         /* Lower priority values first */
         r = CMP(x->priority, y->priority);
         if (r != 0)
@@ -168,6 +201,11 @@ static int prepare_prioq_compare(const void *a, const void *b) {
         if (x->enabled == SD_EVENT_OFF && y->enabled != SD_EVENT_OFF)
                 return 1;
 
+        /* Non rate-limited ones first. */
+        r = CMP(!!x->ratelimited, !!y->ratelimited);
+        if (r != 0)
+                return r;
+
         /* Move most recently prepared ones last, so that we can stop
          * preparing as soon as we hit one that has already been
          * prepared in the current iteration */
@@ -179,12 +217,30 @@ static int prepare_prioq_compare(const void *a, const void *b) {
         return CMP(x->priority, y->priority);
 }
 
+static usec_t time_event_source_next(const sd_event_source *s) {
+        assert(s);
+
+        /* We have two kinds of event sources that have elapsation times associated with them: the actual
+         * time based ones and the ones for which a ratelimit can be in effect (where we want to be notified
+         * once the ratelimit time window ends). Let's return the next elapsing time depending on what we are
+         * looking at here. */
+
+        if (s->ratelimited) { /* If rate-limited the next elapsation is when the ratelimit time window ends */
+                assert(s->rate_limit.begin != 0);
+                assert(s->rate_limit.interval != 0);
+                return usec_add(s->rate_limit.begin, s->rate_limit.interval);
+        }
+
+        /* Otherwise this must be a time event source, if not ratelimited */
+        if (EVENT_SOURCE_IS_TIME(s->type))
+                return s->time.next;
+
+        return USEC_INFINITY;
+}
+
 static int earliest_time_prioq_compare(const void *a, const void *b) {
         const sd_event_source *x = a, *y = b;
 
-        assert(EVENT_SOURCE_IS_TIME(x->type));
-        assert(x->type == y->type);
-
         /* Enabled ones first */
         if (x->enabled != SD_EVENT_OFF && y->enabled == SD_EVENT_OFF)
                 return -1;
@@ -198,19 +254,30 @@ static int earliest_time_prioq_compare(const void *a, const void *b) {
                 return 1;
 
         /* Order by time */
-        return CMP(x->time.next, y->time.next);
+        return CMP(time_event_source_next(x), time_event_source_next(y));
 }
 
 static usec_t time_event_source_latest(const sd_event_source *s) {
-        return usec_add(s->time.next, s->time.accuracy);
+        assert(s);
+
+        if (s->ratelimited) { /* For ratelimited stuff the earliest and the latest time shall actually be the
+                               * same, as we should avoid adding additional inaccuracy on an inaccuracy time
+                               * window */
+                assert(s->rate_limit.begin != 0);
+                assert(s->rate_limit.interval != 0);
+                return usec_add(s->rate_limit.begin, s->rate_limit.interval);
+        }
+
+        /* Must be a time event source, if not ratelimited */
+        if (EVENT_SOURCE_IS_TIME(s->type))
+                return usec_add(s->time.next, s->time.accuracy);
+
+        return USEC_INFINITY;
 }
 
 static int latest_time_prioq_compare(const void *a, const void *b) {
         const sd_event_source *x = a, *y = b;
 
-        assert(EVENT_SOURCE_IS_TIME(x->type));
-        assert(x->type == y->type);
-
         /* Enabled ones first */
         if (x->enabled != SD_EVENT_OFF && y->enabled == SD_EVENT_OFF)
                 return -1;
@@ -380,7 +447,7 @@ static void source_io_unregister(sd_event_source *s) {
                 return;
 
         if (epoll_ctl(s->event->epoll_fd, EPOLL_CTL_DEL, s->io.fd, NULL) < 0)
-                log_debug_errno(errno, "Failed to remove source %s (type %s) from epoll: %m",
+                log_debug_errno(errno, "Failed to remove source %s (type %s) from epoll, ignoring: %m",
                                 strna(s->description), event_source_type_to_string(s->type));
 
         s->io.registered = false;
@@ -402,8 +469,7 @@ static int source_io_register(
 
         if (epoll_ctl(s->event->epoll_fd,
                       s->io.registered ? EPOLL_CTL_MOD : EPOLL_CTL_ADD,
-                      s->io.fd,
-                      &ev) < 0)
+                      s->io.fd, &ev) < 0)
                 return -errno;
 
         s->io.registered = true;
@@ -423,15 +489,13 @@ static void source_child_pidfd_unregister(sd_event_source *s) {
 
         if (EVENT_SOURCE_WATCH_PIDFD(s))
                 if (epoll_ctl(s->event->epoll_fd, EPOLL_CTL_DEL, s->child.pidfd, NULL) < 0)
-                        log_debug_errno(errno, "Failed to remove source %s (type %s) from epoll: %m",
+                        log_debug_errno(errno, "Failed to remove source %s (type %s) from epoll, ignoring: %m",
                                         strna(s->description), event_source_type_to_string(s->type));
 
         s->child.registered = false;
 }
 
 static int source_child_pidfd_register(sd_event_source *s, int enabled) {
-        int r;
-
         assert(s);
         assert(s->type == SOURCE_CHILD);
         assert(enabled != SD_EVENT_OFF);
@@ -442,11 +506,9 @@ static int source_child_pidfd_register(sd_event_source *s, int enabled) {
                         .data.ptr = s,
                 };
 
-                if (s->child.registered)
-                        r = epoll_ctl(s->event->epoll_fd, EPOLL_CTL_MOD, s->child.pidfd, &ev);
-                else
-                        r = epoll_ctl(s->event->epoll_fd, EPOLL_CTL_ADD, s->child.pidfd, &ev);
-                if (r < 0)
+                if (epoll_ctl(s->event->epoll_fd,
+                              s->child.registered ? EPOLL_CTL_MOD : EPOLL_CTL_ADD,
+                              s->child.pidfd, &ev) < 0)
                         return -errno;
         }
 
@@ -666,12 +728,12 @@ static void event_gc_signal_data(sd_event *e, const int64_t *priority, int sig)
          * and possibly drop the signalfd for it. */
 
         if (sig == SIGCHLD &&
-            e->n_enabled_child_sources > 0)
+            e->n_online_child_sources > 0)
                 return;
 
         if (e->signal_sources &&
             e->signal_sources[sig] &&
-            e->signal_sources[sig]->enabled != SD_EVENT_OFF)
+            event_source_is_online(e->signal_sources[sig]))
                 return;
 
         /*
@@ -701,6 +763,52 @@ static void event_gc_signal_data(sd_event *e, const int64_t *priority, int sig)
                 event_unmask_signal_data(e, d, sig);
 }
 
+static void event_source_pp_prioq_reshuffle(sd_event_source *s) {
+        assert(s);
+
+        /* Reshuffles the pending + prepare prioqs. Called whenever the dispatch order changes, i.e. when
+         * they are enabled/disabled or marked pending and such. */
+
+        if (s->pending)
+                prioq_reshuffle(s->event->pending, s, &s->pending_index);
+
+        if (s->prepare)
+                prioq_reshuffle(s->event->prepare, s, &s->prepare_index);
+}
+
+static void event_source_time_prioq_reshuffle(sd_event_source *s) {
+        struct clock_data *d;
+
+        assert(s);
+
+        /* Called whenever the event source's timer ordering properties changed, i.e. time, accuracy,
+         * pending, enable state. Makes sure the two prioq's are ordered properly again. */
+
+        if (s->ratelimited)
+                d = &s->event->monotonic;
+        else {
+                assert(EVENT_SOURCE_IS_TIME(s->type));
+                assert_se(d = event_get_clock_data(s->event, s->type));
+        }
+
+        prioq_reshuffle(d->earliest, s, &s->earliest_index);
+        prioq_reshuffle(d->latest, s, &s->latest_index);
+        d->needs_rearm = true;
+}
+
+static void event_source_time_prioq_remove(
+                sd_event_source *s,
+                struct clock_data *d) {
+
+        assert(s);
+        assert(d);
+
+        prioq_remove(d->earliest, s, &s->earliest_index);
+        prioq_remove(d->latest, s, &s->latest_index);
+        s->earliest_index = s->latest_index = PRIOQ_IDX_NULL;
+        d->needs_rearm = true;
+}
+
 static void source_disconnect(sd_event_source *s) {
         sd_event *event;
 
@@ -723,17 +831,18 @@ static void source_disconnect(sd_event_source *s) {
         case SOURCE_TIME_BOOTTIME:
         case SOURCE_TIME_MONOTONIC:
         case SOURCE_TIME_REALTIME_ALARM:
-        case SOURCE_TIME_BOOTTIME_ALARM: {
-                struct clock_data *d;
+        case SOURCE_TIME_BOOTTIME_ALARM:
+                /* Only remove this event source from the time event source here if it is not ratelimited. If
+                 * it is ratelimited, we'll remove it below, separately. Why? Because the clock used might
+                 * differ: ratelimiting always uses CLOCK_MONOTONIC, but timer events might use any clock */
 
-                d = event_get_clock_data(s->event, s->type);
-                assert(d);
+                if (!s->ratelimited) {
+                        struct clock_data *d;
+                        assert_se(d = event_get_clock_data(s->event, s->type));
+                        event_source_time_prioq_remove(s, d);
+                }
 
-                prioq_remove(d->earliest, s, &s->time.earliest_index);
-                prioq_remove(d->latest, s, &s->time.latest_index);
-                d->needs_rearm = true;
                 break;
-        }
 
         case SOURCE_SIGNAL:
                 if (s->signal.sig > 0) {
@@ -748,9 +857,9 @@ static void source_disconnect(sd_event_source *s) {
 
         case SOURCE_CHILD:
                 if (s->child.pid > 0) {
-                        if (s->enabled != SD_EVENT_OFF) {
-                                assert(s->event->n_enabled_child_sources > 0);
-                                s->event->n_enabled_child_sources--;
+                        if (event_source_is_online(s)) {
+                                assert(s->event->n_online_child_sources > 0);
+                                s->event->n_online_child_sources--;
                         }
 
                         (void) hashmap_remove(s->event->child_sources, PID_TO_PTR(s->child.pid));
@@ -820,6 +929,9 @@ static void source_disconnect(sd_event_source *s) {
         if (s->prepare)
                 prioq_remove(s->event->prepare, s, &s->prepare_index);
 
+        if (s->ratelimited)
+                event_source_time_prioq_remove(s, &s->event->monotonic);
+
         event = TAKE_PTR(s->event);
         LIST_REMOVE(sources, event->sources, s);
         event->n_sources--;
@@ -907,16 +1019,8 @@ static int source_set_pending(sd_event_source *s, bool b) {
         } else
                 assert_se(prioq_remove(s->event->pending, s, &s->pending_index));
 
-        if (EVENT_SOURCE_IS_TIME(s->type)) {
-                struct clock_data *d;
-
-                d = event_get_clock_data(s->event, s->type);
-                assert(d);
-
-                prioq_reshuffle(d->earliest, s, &s->time.earliest_index);
-                prioq_reshuffle(d->latest, s, &s->time.latest_index);
-                d->needs_rearm = true;
-        }
+        if (EVENT_SOURCE_IS_TIME(s->type))
+                event_source_time_prioq_reshuffle(s);
 
         if (s->type == SOURCE_SIGNAL && !b) {
                 struct signal_data *d;
@@ -1074,6 +1178,52 @@ static int time_exit_callback(sd_event_source *s, uint64_t usec, void *userdata)
         return sd_event_exit(sd_event_source_get_event(s), PTR_TO_INT(userdata));
 }
 
+static int setup_clock_data(sd_event *e, struct clock_data *d, clockid_t clock) {
+        int r;
+
+        assert(d);
+
+        if (d->fd < 0) {
+                r = event_setup_timer_fd(e, d, clock);
+                if (r < 0)
+                        return r;
+        }
+
+        r = prioq_ensure_allocated(&d->earliest, earliest_time_prioq_compare);
+        if (r < 0)
+                return r;
+
+        r = prioq_ensure_allocated(&d->latest, latest_time_prioq_compare);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+static int event_source_time_prioq_put(
+                sd_event_source *s,
+                struct clock_data *d) {
+
+        int r;
+
+        assert(s);
+        assert(d);
+
+        r = prioq_put(d->earliest, s, &s->earliest_index);
+        if (r < 0)
+                return r;
+
+        r = prioq_put(d->latest, s, &s->latest_index);
+        if (r < 0) {
+                assert_se(prioq_remove(d->earliest, s, &s->earliest_index) > 0);
+                s->earliest_index = PRIOQ_IDX_NULL;
+                return r;
+        }
+
+        d->needs_rearm = true;
+        return 0;
+}
+
 _public_ int sd_event_add_time(
                 sd_event *e,
                 sd_event_source **ret,
@@ -1104,23 +1254,12 @@ _public_ int sd_event_add_time(
         if (!callback)
                 callback = time_exit_callback;
 
-        d = event_get_clock_data(e, type);
-        assert(d);
-
-        r = prioq_ensure_allocated(&d->earliest, earliest_time_prioq_compare);
-        if (r < 0)
-                return r;
+        assert_se(d = event_get_clock_data(e, type));
 
-        r = prioq_ensure_allocated(&d->latest, latest_time_prioq_compare);
+        r = setup_clock_data(e, d, clock);
         if (r < 0)
                 return r;
 
-        if (d->fd < 0) {
-                r = event_setup_timer_fd(e, d, clock);
-                if (r < 0)
-                        return r;
-        }
-
         s = source_new(e, !ret, type);
         if (!s)
                 return -ENOMEM;
@@ -1128,17 +1267,11 @@ _public_ int sd_event_add_time(
         s->time.next = usec;
         s->time.accuracy = accuracy == 0 ? DEFAULT_ACCURACY_USEC : accuracy;
         s->time.callback = callback;
-        s->time.earliest_index = s->time.latest_index = PRIOQ_IDX_NULL;
+        s->earliest_index = s->latest_index = PRIOQ_IDX_NULL;
         s->userdata = userdata;
         s->enabled = SD_EVENT_ONESHOT;
 
-        d->needs_rearm = true;
-
-        r = prioq_put(d->earliest, s, &s->time.earliest_index);
-        if (r < 0)
-                return r;
-
-        r = prioq_put(d->latest, s, &s->time.latest_index);
+        r = event_source_time_prioq_put(s, d);
         if (r < 0)
                 return r;
 
@@ -1271,7 +1404,7 @@ _public_ int sd_event_add_child(
         if (!callback)
                 callback = child_exit_callback;
 
-        if (e->n_enabled_child_sources == 0) {
+        if (e->n_online_child_sources == 0) {
                 /* Caller must block SIGCHLD before using us to watch children, even if pidfd is available,
                  * for compatibility with pre-pidfd and because we don't want the reap the child processes
                  * ourselves, i.e. call waitid(), and don't want Linux' default internal logic for that to
@@ -1321,31 +1454,25 @@ _public_ int sd_event_add_child(
         if (r < 0)
                 return r;
 
-        e->n_enabled_child_sources++;
-
         if (EVENT_SOURCE_WATCH_PIDFD(s)) {
                 /* We have a pidfd and we only want to watch for exit */
-
                 r = source_child_pidfd_register(s, s->enabled);
-                if (r < 0) {
-                        e->n_enabled_child_sources--;
+                if (r < 0)
                         return r;
-                }
+
         } else {
                 /* We have no pidfd or we shall wait for some other event than WEXITED */
-
                 r = event_make_signal_data(e, SIGCHLD, NULL);
-                if (r < 0) {
-                        e->n_enabled_child_sources--;
+                if (r < 0)
                         return r;
-                }
 
                 e->need_process_child = true;
         }
 
+        e->n_online_child_sources++;
+
         if (ret)
                 *ret = s;
-
         TAKE_PTR(s);
         return 0;
 }
@@ -1374,7 +1501,7 @@ _public_ int sd_event_add_child_pidfd(
         if (!callback)
                 callback = child_exit_callback;
 
-        if (e->n_enabled_child_sources == 0) {
+        if (e->n_online_child_sources == 0) {
                 r = signal_is_blocked(SIGCHLD);
                 if (r < 0)
                         return r;
@@ -1410,31 +1537,24 @@ _public_ int sd_event_add_child_pidfd(
         if (r < 0)
                 return r;
 
-        e->n_enabled_child_sources++;
-
         if (EVENT_SOURCE_WATCH_PIDFD(s)) {
                 /* We only want to watch for WEXITED */
-
                 r = source_child_pidfd_register(s, s->enabled);
-                if (r < 0) {
-                        e->n_enabled_child_sources--;
+                if (r < 0)
                         return r;
-                }
         } else {
                 /* We shall wait for some other event than WEXITED */
-
                 r = event_make_signal_data(e, SIGCHLD, NULL);
-                if (r < 0) {
-                        e->n_enabled_child_sources--;
+                if (r < 0)
                         return r;
-                }
 
                 e->need_process_child = true;
         }
 
+        e->n_online_child_sources++;
+
         if (ret)
                 *ret = s;
-
         TAKE_PTR(s);
         return 0;
 }
@@ -2017,7 +2137,7 @@ _public_ int sd_event_source_set_io_fd(sd_event_source *s, int fd) {
         if (s->io.fd == fd)
                 return 0;
 
-        if (s->enabled == SD_EVENT_OFF) {
+        if (event_source_is_offline(s)) {
                 s->io.fd = fd;
                 s->io.registered = false;
         } else {
@@ -2084,7 +2204,7 @@ _public_ int sd_event_source_set_io_events(sd_event_source *s, uint32_t events)
         if (r < 0)
                 return r;
 
-        if (s->enabled != SD_EVENT_OFF) {
+        if (event_source_is_online(s)) {
                 r = source_io_register(s, s->enabled, events);
                 if (r < 0)
                         return r;
@@ -2187,7 +2307,7 @@ _public_ int sd_event_source_set_priority(sd_event_source *s, int64_t priority)
 
                 event_gc_inode_data(s->event, old_inode_data);
 
-        } else if (s->type == SOURCE_SIGNAL && s->enabled != SD_EVENT_OFF) {
+        } else if (s->type == SOURCE_SIGNAL && event_source_is_online(s)) {
                 struct signal_data *old, *d;
 
                 /* Move us from the signalfd belonging to the old
@@ -2207,11 +2327,7 @@ _public_ int sd_event_source_set_priority(sd_event_source *s, int64_t priority)
         } else
                 s->priority = priority;
 
-        if (s->pending)
-                prioq_reshuffle(s->event->pending, s, &s->pending_index);
-
-        if (s->prepare)
-                prioq_reshuffle(s->event->prepare, s, &s->prepare_index);
+        event_source_pp_prioq_reshuffle(s);
 
         if (s->type == SOURCE_EXIT)
                 prioq_reshuffle(s->event->exit, s, &s->exit.prioq_index);
@@ -2228,198 +2344,222 @@ fail:
         return r;
 }
 
-_public_ int sd_event_source_get_enabled(sd_event_source *s, int *m) {
+_public_ int sd_event_source_get_enabled(sd_event_source *s, int *ret) {
         assert_return(s, -EINVAL);
         assert_return(!event_pid_changed(s->event), -ECHILD);
 
-        if (m)
-                *m = s->enabled;
+        if (ret)
+                *ret = s->enabled;
+
         return s->enabled != SD_EVENT_OFF;
 }
 
-_public_ int sd_event_source_set_enabled(sd_event_source *s, int m) {
+static int event_source_offline(
+                sd_event_source *s,
+                int enabled,
+                bool ratelimited) {
+
+        bool was_offline;
         int r;
 
-        assert_return(s, -EINVAL);
-        assert_return(IN_SET(m, SD_EVENT_OFF, SD_EVENT_ON, SD_EVENT_ONESHOT), -EINVAL);
-        assert_return(!event_pid_changed(s->event), -ECHILD);
+        assert(s);
+        assert(enabled == SD_EVENT_OFF || ratelimited);
 
-        /* If we are dead anyway, we are fine with turning off
-         * sources, but everything else needs to fail. */
-        if (s->event->state == SD_EVENT_FINISHED)
-                return m == SD_EVENT_OFF ? 0 : -ESTALE;
+        /* Unset the pending flag when this event source is disabled */
+        if (s->enabled != SD_EVENT_OFF &&
+            enabled == SD_EVENT_OFF &&
+            !IN_SET(s->type, SOURCE_DEFER, SOURCE_EXIT)) {
+                r = source_set_pending(s, false);
+                if (r < 0)
+                        return r;
+        }
 
-        if (s->enabled == m)
-                return 0;
+        was_offline = event_source_is_offline(s);
+        s->enabled = enabled;
+        s->ratelimited = ratelimited;
 
-        if (m == SD_EVENT_OFF) {
+        switch (s->type) {
 
-                /* Unset the pending flag when this event source is disabled */
-                if (!IN_SET(s->type, SOURCE_DEFER, SOURCE_EXIT)) {
-                        r = source_set_pending(s, false);
-                        if (r < 0)
-                                return r;
-                }
+        case SOURCE_IO:
+                source_io_unregister(s);
+                break;
 
-                switch (s->type) {
+        case SOURCE_TIME_REALTIME:
+        case SOURCE_TIME_BOOTTIME:
+        case SOURCE_TIME_MONOTONIC:
+        case SOURCE_TIME_REALTIME_ALARM:
+        case SOURCE_TIME_BOOTTIME_ALARM:
+                event_source_time_prioq_reshuffle(s);
+                break;
 
-                case SOURCE_IO:
-                        source_io_unregister(s);
-                        s->enabled = m;
-                        break;
+        case SOURCE_SIGNAL:
+                event_gc_signal_data(s->event, &s->priority, s->signal.sig);
+                break;
 
-                case SOURCE_TIME_REALTIME:
-                case SOURCE_TIME_BOOTTIME:
-                case SOURCE_TIME_MONOTONIC:
-                case SOURCE_TIME_REALTIME_ALARM:
-                case SOURCE_TIME_BOOTTIME_ALARM: {
-                        struct clock_data *d;
+        case SOURCE_CHILD:
+                if (!was_offline) {
+                        assert(s->event->n_online_child_sources > 0);
+                        s->event->n_online_child_sources--;
+                }
 
-                        s->enabled = m;
-                        d = event_get_clock_data(s->event, s->type);
-                        assert(d);
+                if (EVENT_SOURCE_WATCH_PIDFD(s))
+                        source_child_pidfd_unregister(s);
+                else
+                        event_gc_signal_data(s->event, &s->priority, SIGCHLD);
+                break;
 
-                        prioq_reshuffle(d->earliest, s, &s->time.earliest_index);
-                        prioq_reshuffle(d->latest, s, &s->time.latest_index);
-                        d->needs_rearm = true;
-                        break;
-                }
+        case SOURCE_EXIT:
+                prioq_reshuffle(s->event->exit, s, &s->exit.prioq_index);
+                break;
 
-                case SOURCE_SIGNAL:
-                        s->enabled = m;
+        case SOURCE_DEFER:
+        case SOURCE_POST:
+        case SOURCE_INOTIFY:
+                break;
 
-                        event_gc_signal_data(s->event, &s->priority, s->signal.sig);
-                        break;
+        default:
+                assert_not_reached("Wut? I shouldn't exist.");
+        }
 
-                case SOURCE_CHILD:
-                        s->enabled = m;
+        return 1;
+}
 
-                        assert(s->event->n_enabled_child_sources > 0);
-                        s->event->n_enabled_child_sources--;
+static int event_source_online(
+                sd_event_source *s,
+                int enabled,
+                bool ratelimited) {
 
-                        if (EVENT_SOURCE_WATCH_PIDFD(s))
-                                source_child_pidfd_unregister(s);
-                        else
-                                event_gc_signal_data(s->event, &s->priority, SIGCHLD);
+        bool was_online;
+        int r;
 
-                        break;
+        assert(s);
+        assert(enabled != SD_EVENT_OFF || !ratelimited);
 
-                case SOURCE_EXIT:
-                        s->enabled = m;
-                        prioq_reshuffle(s->event->exit, s, &s->exit.prioq_index);
-                        break;
+        /* Unset the pending flag when this event source is enabled */
+        if (s->enabled == SD_EVENT_OFF &&
+            enabled != SD_EVENT_OFF &&
+            !IN_SET(s->type, SOURCE_DEFER, SOURCE_EXIT)) {
+                r = source_set_pending(s, false);
+                if (r < 0)
+                        return r;
+        }
 
-                case SOURCE_DEFER:
-                case SOURCE_POST:
-                case SOURCE_INOTIFY:
-                        s->enabled = m;
-                        break;
+        /* Are we really ready for onlining? */
+        if (enabled == SD_EVENT_OFF || ratelimited) {
+                /* Nope, we are not ready for onlining, then just update the precise state and exit */
+                s->enabled = enabled;
+                s->ratelimited = ratelimited;
+                return 0;
+        }
 
-                default:
-                        assert_not_reached("Wut? I shouldn't exist.");
-                }
+        was_online = event_source_is_online(s);
 
-        } else {
+        switch (s->type) {
+        case SOURCE_IO:
+                r = source_io_register(s, enabled, s->io.events);
+                if (r < 0)
+                        return r;
+                break;
 
-                /* Unset the pending flag when this event source is enabled */
-                if (s->enabled == SD_EVENT_OFF && !IN_SET(s->type, SOURCE_DEFER, SOURCE_EXIT)) {
-                        r = source_set_pending(s, false);
-                        if (r < 0)
-                                return r;
+        case SOURCE_SIGNAL:
+                r = event_make_signal_data(s->event, s->signal.sig, NULL);
+                if (r < 0) {
+                        event_gc_signal_data(s->event, &s->priority, s->signal.sig);
+                        return r;
                 }
 
-                switch (s->type) {
+                break;
 
-                case SOURCE_IO:
-                        r = source_io_register(s, m, s->io.events);
+        case SOURCE_CHILD:
+                if (EVENT_SOURCE_WATCH_PIDFD(s)) {
+                        /* yes, we have pidfd */
+
+                        r = source_child_pidfd_register(s, enabled);
                         if (r < 0)
                                 return r;
+                } else {
+                        /* no pidfd, or something other to watch for than WEXITED */
 
-                        s->enabled = m;
-                        break;
-
-                case SOURCE_TIME_REALTIME:
-                case SOURCE_TIME_BOOTTIME:
-                case SOURCE_TIME_MONOTONIC:
-                case SOURCE_TIME_REALTIME_ALARM:
-                case SOURCE_TIME_BOOTTIME_ALARM: {
-                        struct clock_data *d;
-
-                        s->enabled = m;
-                        d = event_get_clock_data(s->event, s->type);
-                        assert(d);
-
-                        prioq_reshuffle(d->earliest, s, &s->time.earliest_index);
-                        prioq_reshuffle(d->latest, s, &s->time.latest_index);
-                        d->needs_rearm = true;
-                        break;
+                        r = event_make_signal_data(s->event, SIGCHLD, NULL);
+                        if (r < 0) {
+                                event_gc_signal_data(s->event, &s->priority, SIGCHLD);
+                                return r;
+                        }
                 }
 
-                case SOURCE_SIGNAL:
+                if (!was_online)
+                        s->event->n_online_child_sources++;
+                break;
 
-                        s->enabled = m;
+        case SOURCE_TIME_REALTIME:
+        case SOURCE_TIME_BOOTTIME:
+        case SOURCE_TIME_MONOTONIC:
+        case SOURCE_TIME_REALTIME_ALARM:
+        case SOURCE_TIME_BOOTTIME_ALARM:
+        case SOURCE_EXIT:
+        case SOURCE_DEFER:
+        case SOURCE_POST:
+        case SOURCE_INOTIFY:
+                break;
 
-                        r = event_make_signal_data(s->event, s->signal.sig, NULL);
-                        if (r < 0) {
-                                s->enabled = SD_EVENT_OFF;
-                                event_gc_signal_data(s->event, &s->priority, s->signal.sig);
-                                return r;
-                        }
+        default:
+                assert_not_reached("Wut? I shouldn't exist.");
+        }
 
-                        break;
+        s->enabled = enabled;
+        s->ratelimited = ratelimited;
 
-                case SOURCE_CHILD:
+        /* Non-failing operations below */
+        switch (s->type) {
+        case SOURCE_TIME_REALTIME:
+        case SOURCE_TIME_BOOTTIME:
+        case SOURCE_TIME_MONOTONIC:
+        case SOURCE_TIME_REALTIME_ALARM:
+        case SOURCE_TIME_BOOTTIME_ALARM:
+                event_source_time_prioq_reshuffle(s);
+                break;
 
-                        if (s->enabled == SD_EVENT_OFF)
-                                s->event->n_enabled_child_sources++;
+        case SOURCE_EXIT:
+                prioq_reshuffle(s->event->exit, s, &s->exit.prioq_index);
+                break;
 
-                        s->enabled = m;
+        default:
+                break;
+        }
 
-                        if (EVENT_SOURCE_WATCH_PIDFD(s)) {
-                                /* yes, we have pidfd */
+        return 1;
+}
 
-                                r = source_child_pidfd_register(s, s->enabled);
-                                if (r < 0) {
-                                        s->enabled = SD_EVENT_OFF;
-                                        s->event->n_enabled_child_sources--;
-                                        return r;
-                                }
-                        } else {
-                                /* no pidfd, or something other to watch for than WEXITED */
+_public_ int sd_event_source_set_enabled(sd_event_source *s, int m) {
+        int r;
 
-                                r = event_make_signal_data(s->event, SIGCHLD, NULL);
-                                if (r < 0) {
-                                        s->enabled = SD_EVENT_OFF;
-                                        s->event->n_enabled_child_sources--;
-                                        event_gc_signal_data(s->event, &s->priority, SIGCHLD);
-                                        return r;
-                                }
-                        }
+        assert_return(s, -EINVAL);
+        assert_return(IN_SET(m, SD_EVENT_OFF, SD_EVENT_ON, SD_EVENT_ONESHOT), -EINVAL);
+        assert_return(!event_pid_changed(s->event), -ECHILD);
 
-                        break;
+        /* If we are dead anyway, we are fine with turning off sources, but everything else needs to fail. */
+        if (s->event->state == SD_EVENT_FINISHED)
+                return m == SD_EVENT_OFF ? 0 : -ESTALE;
 
-                case SOURCE_EXIT:
-                        s->enabled = m;
-                        prioq_reshuffle(s->event->exit, s, &s->exit.prioq_index);
-                        break;
+        if (s->enabled == m) /* No change? */
+                return 0;
 
-                case SOURCE_DEFER:
-                case SOURCE_POST:
-                case SOURCE_INOTIFY:
+        if (m == SD_EVENT_OFF)
+                r = event_source_offline(s, m, s->ratelimited);
+        else {
+                if (s->enabled != SD_EVENT_OFF) {
+                        /* Switching from "on" to "oneshot" or back? If that's the case, we can take a shortcut, the
+                         * event source is already enabled after all. */
                         s->enabled = m;
-                        break;
-
-                default:
-                        assert_not_reached("Wut? I shouldn't exist.");
+                        return 0;
                 }
-        }
-
-        if (s->pending)
-                prioq_reshuffle(s->event->pending, s, &s->pending_index);
 
-        if (s->prepare)
-                prioq_reshuffle(s->event->prepare, s, &s->prepare_index);
+                r = event_source_online(s, m, s->ratelimited);
+        }
+        if (r < 0)
+                return r;
 
+        event_source_pp_prioq_reshuffle(s);
         return 0;
 }
 
@@ -2434,7 +2574,6 @@ _public_ int sd_event_source_get_time(sd_event_source *s, uint64_t *usec) {
 }
 
 _public_ int sd_event_source_set_time(sd_event_source *s, uint64_t usec) {
-        struct clock_data *d;
         int r;
 
         assert_return(s, -EINVAL);
@@ -2448,13 +2587,7 @@ _public_ int sd_event_source_set_time(sd_event_source *s, uint64_t usec) {
 
         s->time.next = usec;
 
-        d = event_get_clock_data(s->event, s->type);
-        assert(d);
-
-        prioq_reshuffle(d->earliest, s, &s->time.earliest_index);
-        prioq_reshuffle(d->latest, s, &s->time.latest_index);
-        d->needs_rearm = true;
-
+        event_source_time_prioq_reshuffle(s);
         return 0;
 }
 
@@ -2486,7 +2619,6 @@ _public_ int sd_event_source_get_time_accuracy(sd_event_source *s, uint64_t *use
 }
 
 _public_ int sd_event_source_set_time_accuracy(sd_event_source *s, uint64_t usec) {
-        struct clock_data *d;
         int r;
 
         assert_return(s, -EINVAL);
@@ -2504,12 +2636,7 @@ _public_ int sd_event_source_set_time_accuracy(sd_event_source *s, uint64_t usec
 
         s->time.accuracy = usec;
 
-        d = event_get_clock_data(s->event, s->type);
-        assert(d);
-
-        prioq_reshuffle(d->latest, s, &s->time.latest_index);
-        d->needs_rearm = true;
-
+        event_source_time_prioq_reshuffle(s);
         return 0;
 }
 
@@ -2684,6 +2811,96 @@ _public_ void *sd_event_source_set_userdata(sd_event_source *s, void *userdata)
         return ret;
 }
 
+static int event_source_enter_ratelimited(sd_event_source *s) {
+        int r;
+
+        assert(s);
+
+        /* When an event source becomes ratelimited, we place it in the CLOCK_MONOTONIC priority queue, with
+         * the end of the rate limit time window, much as if it was a timer event source. */
+
+        if (s->ratelimited)
+                return 0; /* Already ratelimited, this is a NOP hence */
+
+        /* Make sure we can install a CLOCK_MONOTONIC event further down. */
+        r = setup_clock_data(s->event, &s->event->monotonic, CLOCK_MONOTONIC);
+        if (r < 0)
+                return r;
+
+        /* Timer event sources are already using the earliest/latest queues for the timer scheduling. Let's
+         * first remove them from the prioq appropriate for their own clock, so that we can use the prioq
+         * fields of the event source then for adding it to the CLOCK_MONOTONIC prioq instead. */
+        if (EVENT_SOURCE_IS_TIME(s->type))
+                event_source_time_prioq_remove(s, event_get_clock_data(s->event, s->type));
+
+        /* Now, let's add the event source to the monotonic clock instead */
+        r = event_source_time_prioq_put(s, &s->event->monotonic);
+        if (r < 0)
+                goto fail;
+
+        /* And let's take the event source officially offline */
+        r = event_source_offline(s, s->enabled, /* ratelimited= */ true);
+        if (r < 0) {
+                event_source_time_prioq_remove(s, &s->event->monotonic);
+                goto fail;
+        }
+
+        event_source_pp_prioq_reshuffle(s);
+
+        log_debug("Event source %p (%s) entered rate limit state.", s, strna(s->description));
+        return 0;
+
+fail:
+        /* Reinstall time event sources in the priority queue as before. This shouldn't fail, since the queue
+         * space for it should already be allocated. */
+        if (EVENT_SOURCE_IS_TIME(s->type))
+                assert_se(event_source_time_prioq_put(s, event_get_clock_data(s->event, s->type)) >= 0);
+
+        return r;
+}
+
+static int event_source_leave_ratelimit(sd_event_source *s) {
+        int r;
+
+        assert(s);
+
+        if (!s->ratelimited)
+                return 0;
+
+        /* Let's take the event source out of the monotonic prioq first. */
+        event_source_time_prioq_remove(s, &s->event->monotonic);
+
+        /* Let's then add the event source to its native clock prioq again — if this is a timer event source */
+        if (EVENT_SOURCE_IS_TIME(s->type)) {
+                r = event_source_time_prioq_put(s, event_get_clock_data(s->event, s->type));
+                if (r < 0)
+                        goto fail;
+        }
+
+        /* Let's try to take it online again.  */
+        r = event_source_online(s, s->enabled, /* ratelimited= */ false);
+        if (r < 0) {
+                /* Do something roughly sensible when this failed: undo the two prioq ops above */
+                if (EVENT_SOURCE_IS_TIME(s->type))
+                        event_source_time_prioq_remove(s, event_get_clock_data(s->event, s->type));
+
+                goto fail;
+        }
+
+        event_source_pp_prioq_reshuffle(s);
+        ratelimit_reset(&s->rate_limit);
+
+        log_debug("Event source %p (%s) left rate limit state.", s, strna(s->description));
+        return 0;
+
+fail:
+        /* Do something somewhat reasonable when we cannot move an event sources out of ratelimited mode:
+         * simply put it back in it, maybe we can then process it more successfully next iteration. */
+        assert_se(event_source_time_prioq_put(s, &s->event->monotonic) >= 0);
+
+        return r;
+}
+
 static usec_t sleep_between(sd_event *e, usec_t a, usec_t b) {
         usec_t c;
         assert(e);
@@ -2781,7 +2998,7 @@ static int event_arm_timer(
                 d->needs_rearm = false;
 
         a = prioq_peek(d->earliest);
-        if (!a || a->enabled == SD_EVENT_OFF || a->time.next == USEC_INFINITY) {
+        if (!a || a->enabled == SD_EVENT_OFF || time_event_source_next(a) == USEC_INFINITY) {
 
                 if (d->fd < 0)
                         return 0;
@@ -2800,7 +3017,7 @@ static int event_arm_timer(
         b = prioq_peek(d->latest);
         assert_se(b && b->enabled != SD_EVENT_OFF);
 
-        t = sleep_between(e, a->time.next, time_event_source_latest(b));
+        t = sleep_between(e, time_event_source_next(a), time_event_source_latest(b));
         if (d->next == t)
                 return 0;
 
@@ -2878,19 +3095,29 @@ static int process_timer(
 
         for (;;) {
                 s = prioq_peek(d->earliest);
-                if (!s ||
-                    s->time.next > n ||
-                    s->enabled == SD_EVENT_OFF ||
-                    s->pending)
+                if (!s || time_event_source_next(s) > n)
+                        break;
+
+                if (s->ratelimited) {
+                        /* This is an event sources whose ratelimit window has ended. Let's turn it on
+                         * again. */
+                        assert(s->ratelimited);
+
+                        r = event_source_leave_ratelimit(s);
+                        if (r < 0)
+                                return r;
+
+                        continue;
+                }
+
+                if (s->enabled == SD_EVENT_OFF || s->pending)
                         break;
 
                 r = source_set_pending(s, true);
                 if (r < 0)
                         return r;
 
-                prioq_reshuffle(d->earliest, s, &s->time.earliest_index);
-                prioq_reshuffle(d->latest, s, &s->time.latest_index);
-                d->needs_rearm = true;
+                event_source_time_prioq_reshuffle(s);
         }
 
         return 0;
@@ -2928,7 +3155,7 @@ static int process_child(sd_event *e) {
                 if (s->pending)
                         continue;
 
-                if (s->enabled == SD_EVENT_OFF)
+                if (event_source_is_offline(s))
                         continue;
 
                 if (s->child.exited)
@@ -2975,7 +3202,7 @@ static int process_pidfd(sd_event *e, sd_event_source *s, uint32_t revents) {
         if (s->pending)
                 return 0;
 
-        if (s->enabled == SD_EVENT_OFF)
+        if (event_source_is_offline(s))
                 return 0;
 
         if (!EVENT_SOURCE_WATCH_PIDFD(s))
@@ -3135,7 +3362,7 @@ static int event_inotify_data_process(sd_event *e, struct inotify_data *d) {
 
                                 LIST_FOREACH(inotify.by_inode_data, s, inode_data->event_sources) {
 
-                                        if (s->enabled == SD_EVENT_OFF)
+                                        if (event_source_is_offline(s))
                                                 continue;
 
                                         r = source_set_pending(s, true);
@@ -3171,7 +3398,7 @@ static int event_inotify_data_process(sd_event *e, struct inotify_data *d) {
                          * sources if IN_IGNORED or IN_UNMOUNT is set. */
                         LIST_FOREACH(inotify.by_inode_data, s, inode_data->event_sources) {
 
-                                if (s->enabled == SD_EVENT_OFF)
+                                if (event_source_is_offline(s))
                                         continue;
 
                                 if ((d->buffer.ev.mask & (IN_IGNORED|IN_UNMOUNT)) == 0 &&
@@ -3225,6 +3452,16 @@ static int source_dispatch(sd_event_source *s) {
          * callback might have invalidated/disconnected the event source. */
         saved_event = sd_event_ref(s->event);
 
+        /* Check if we hit the ratelimit for this event source, if so, let's disable it. */
+        assert(!s->ratelimited);
+        if (!ratelimit_below(&s->rate_limit)) {
+                r = event_source_enter_ratelimited(s);
+                if (r < 0)
+                        return r;
+
+                return 1;
+        }
+
         if (!IN_SET(s->type, SOURCE_DEFER, SOURCE_EXIT)) {
                 r = source_set_pending(s, false);
                 if (r < 0)
@@ -3238,7 +3475,7 @@ static int source_dispatch(sd_event_source *s) {
                  * post sources as pending */
 
                 SET_FOREACH(z, s->event->post_sources) {
-                        if (z->enabled == SD_EVENT_OFF)
+                        if (event_source_is_offline(z))
                                 continue;
 
                         r = source_set_pending(z, true);
@@ -3358,7 +3595,7 @@ static int event_prepare(sd_event *e) {
                 sd_event_source *s;
 
                 s = prioq_peek(e->prepare);
-                if (!s || s->prepare_iteration == e->iteration || s->enabled == SD_EVENT_OFF)
+                if (!s || s->prepare_iteration == e->iteration || event_source_is_offline(s))
                         break;
 
                 s->prepare_iteration = e->iteration;
@@ -3393,18 +3630,17 @@ static int event_prepare(sd_event *e) {
 
 static int dispatch_exit(sd_event *e) {
         sd_event_source *p;
-        _cleanup_(sd_event_unrefp) sd_event *ref = NULL;
         int r;
 
         assert(e);
 
         p = prioq_peek(e->exit);
-        if (!p || p->enabled == SD_EVENT_OFF) {
+        if (!p || event_source_is_offline(p)) {
                 e->state = SD_EVENT_FINISHED;
                 return 0;
         }
 
-        ref = sd_event_ref(e);
+        _unused_ _cleanup_(sd_event_unrefp) sd_event *ref = sd_event_ref(e);
         e->iteration++;
         e->state = SD_EVENT_EXITING;
         r = source_dispatch(p);
@@ -3421,7 +3657,7 @@ static sd_event_source* event_next_pending(sd_event *e) {
         if (!p)
                 return NULL;
 
-        if (p->enabled == SD_EVENT_OFF)
+        if (event_source_is_offline(p))
                 return NULL;
 
         return p;
@@ -3500,6 +3736,9 @@ _public_ int sd_event_prepare(sd_event *e) {
          * syscalls */
         assert_return(!e->default_event_ptr || e->tid == gettid(), -EREMOTEIO);
 
+        /* Make sure that none of the preparation callbacks ends up freeing the event source under our feet */
+        _unused_ _cleanup_(sd_event_unrefp) sd_event *ref = sd_event_ref(e);
+
         if (e->exit_requested)
                 goto pending;
 
@@ -3705,9 +3944,8 @@ _public_ int sd_event_dispatch(sd_event *e) {
 
         p = event_next_pending(e);
         if (p) {
-                _cleanup_(sd_event_unrefp) sd_event *ref = NULL;
+                _unused_ _cleanup_(sd_event_unrefp) sd_event *ref = sd_event_ref(e);
 
-                ref = sd_event_ref(e);
                 e->state = SD_EVENT_RUNNING;
                 r = source_dispatch(p);
                 e->state = SD_EVENT_INITIAL;
@@ -3741,29 +3979,32 @@ _public_ int sd_event_run(sd_event *e, uint64_t timeout) {
         assert_return(e->state != SD_EVENT_FINISHED, -ESTALE);
         assert_return(e->state == SD_EVENT_INITIAL, -EBUSY);
 
-        if (e->profile_delays && e->last_run) {
+        if (e->profile_delays && e->last_run_usec != 0) {
                 usec_t this_run;
                 unsigned l;
 
                 this_run = now(CLOCK_MONOTONIC);
 
-                l = u64log2(this_run - e->last_run);
-                assert(l < sizeof(e->delays));
+                l = u64log2(this_run - e->last_run_usec);
+                assert(l < ELEMENTSOF(e->delays));
                 e->delays[l]++;
 
-                if (this_run - e->last_log >= 5*USEC_PER_SEC) {
+                if (this_run - e->last_log_usec >= 5*USEC_PER_SEC) {
                         event_log_delays(e);
-                        e->last_log = this_run;
+                        e->last_log_usec = this_run;
                 }
         }
 
+        /* Make sure that none of the preparation callbacks ends up freeing the event source under our feet */
+        _unused_ _cleanup_(sd_event_unrefp) sd_event *ref = sd_event_ref(e);
+
         r = sd_event_prepare(e);
         if (r == 0)
                 /* There was nothing? Then wait... */
                 r = sd_event_wait(e, timeout);
 
         if (e->profile_delays)
-                e->last_run = now(CLOCK_MONOTONIC);
+                e->last_run_usec = now(CLOCK_MONOTONIC);
 
         if (r > 0) {
                 /* There's something now, then let's dispatch it */
@@ -3778,7 +4019,6 @@ _public_ int sd_event_run(sd_event *e, uint64_t timeout) {
 }
 
 _public_ int sd_event_loop(sd_event *e) {
-        _cleanup_(sd_event_unrefp) sd_event *ref = NULL;
         int r;
 
         assert_return(e, -EINVAL);
@@ -3786,7 +4026,7 @@ _public_ int sd_event_loop(sd_event *e) {
         assert_return(!event_pid_changed(e), -ECHILD);
         assert_return(e->state == SD_EVENT_INITIAL, -EBUSY);
 
-        ref = sd_event_ref(e);
+        _unused_ _cleanup_(sd_event_unrefp) sd_event *ref = NULL;
 
         while (e->state != SD_EVENT_FINISHED) {
                 r = sd_event_run(e, (uint64_t) -1);
@@ -3798,7 +4038,6 @@ _public_ int sd_event_loop(sd_event *e) {
 }
 
 _public_ int sd_event_get_fd(sd_event *e) {
-
         assert_return(e, -EINVAL);
         assert_return(e = event_resolve(e), -ENOPKG);
         assert_return(!event_pid_changed(e), -ECHILD);
@@ -4032,3 +4271,53 @@ _public_ int sd_event_source_set_exit_on_failure(sd_event_source *s, int b) {
         s->exit_on_failure = b;
         return 1;
 }
+
+_public_ int sd_event_source_set_ratelimit(sd_event_source *s, uint64_t interval, unsigned burst) {
+        int r;
+
+        assert_return(s, -EINVAL);
+
+        /* Turning on ratelimiting on event source types that don't support it, is a loggable offense. Doing
+         * so is a programming error. */
+        assert_return(EVENT_SOURCE_CAN_RATE_LIMIT(s->type), -EDOM);
+
+        /* When ratelimiting is configured we'll always reset the rate limit state first and start fresh,
+         * non-ratelimited. */
+        r = event_source_leave_ratelimit(s);
+        if (r < 0)
+                return r;
+
+        s->rate_limit = (RateLimit) { interval, burst };
+        return 0;
+}
+
+_public_ int sd_event_source_get_ratelimit(sd_event_source *s, uint64_t *ret_interval, unsigned *ret_burst) {
+        assert_return(s, -EINVAL);
+
+        /* Querying whether an event source has ratelimiting configured is not a loggable offsense, hence
+         * don't use assert_return(). Unlike turning on ratelimiting it's not really a programming error */
+        if (!EVENT_SOURCE_CAN_RATE_LIMIT(s->type))
+                return -EDOM;
+
+        if (!ratelimit_configured(&s->rate_limit))
+                return -ENOEXEC;
+
+        if (ret_interval)
+                *ret_interval = s->rate_limit.interval;
+        if (ret_burst)
+                *ret_burst = s->rate_limit.burst;
+
+        return 0;
+}
+
+_public_ int sd_event_source_is_ratelimited(sd_event_source *s) {
+        assert_return(s, -EINVAL);
+
+        if (!EVENT_SOURCE_CAN_RATE_LIMIT(s->type))
+                return false;
+
+        if (!ratelimit_configured(&s->rate_limit))
+                return false;
+
+        return s->ratelimited;
+}
index b623972365677fca509bf6c42a46fcc7d7f1530c..851418c96042ac2ef041383538267ecc2933ca5f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/wait.h>
 
@@ -589,8 +589,100 @@ static void test_pidfd(void) {
         sd_event_unref(e);
 }
 
+static int ratelimit_io_handler(sd_event_source *s, int fd, uint32_t revents, void *userdata) {
+        unsigned *c = (unsigned*) userdata;
+        *c += 1;
+        return 0;
+}
+
+static int ratelimit_time_handler(sd_event_source *s, uint64_t usec, void *userdata) {
+        int r;
+
+        r = sd_event_source_set_enabled(s, SD_EVENT_ON);
+        if (r < 0)
+                log_warning_errno(r, "Failed to turn on notify event source: %m");
+
+        r = sd_event_source_set_time(s, usec + 1000);
+        if (r < 0)
+                log_error_errno(r, "Failed to restart watchdog event source: %m");
+
+        unsigned *c = (unsigned*) userdata;
+        *c += 1;
+
+        return 0;
+}
+
+static void test_ratelimit(void) {
+        _cleanup_close_pair_ int p[2] = {-1, -1};
+        _cleanup_(sd_event_unrefp) sd_event *e = NULL;
+        _cleanup_(sd_event_source_unrefp) sd_event_source *s = NULL;
+        uint64_t interval;
+        unsigned count, burst;
+
+        assert_se(sd_event_default(&e) >= 0);
+        assert_se(pipe2(p, O_CLOEXEC|O_NONBLOCK) >= 0);
+
+        assert_se(sd_event_add_io(e, &s, p[0], EPOLLIN, ratelimit_io_handler, &count) >= 0);
+        assert_se(sd_event_source_set_description(s, "test-ratelimit-io") >= 0);
+        assert_se(sd_event_source_set_ratelimit(s, 1 * USEC_PER_SEC, 5) >= 0);
+        assert_se(sd_event_source_get_ratelimit(s, &interval, &burst) >= 0);
+        assert_se(interval == 1 * USEC_PER_SEC && burst == 5);
+
+        assert_se(write(p[1], "1", 1) == 1);
+
+        count = 0;
+        for (unsigned i = 0; i < 10; i++) {
+                log_debug("slow loop iteration %u", i);
+                assert_se(sd_event_run(e, UINT64_MAX) >= 0);
+                assert_se(usleep(250 * USEC_PER_MSEC) >= 0);
+        }
+
+        assert_se(sd_event_source_is_ratelimited(s) == 0);
+        assert_se(count == 10);
+        log_info("ratelimit_io_handler: called %d times, event source not ratelimited", count);
+
+        assert_se(sd_event_source_set_ratelimit(s, 0, 0) >= 0);
+        assert_se(sd_event_source_set_ratelimit(s, 1 * USEC_PER_SEC, 5) >= 0);
+
+        count = 0;
+        for (unsigned i = 0; i < 10; i++) {
+                log_debug("fast event loop iteration %u", i);
+                assert_se(sd_event_run(e, UINT64_MAX) >= 0);
+                assert_se(usleep(10) >= 0);
+        }
+        log_info("ratelimit_io_handler: called %d times, event source got ratelimited", count);
+        assert_se(count < 10);
+
+        s = sd_event_source_unref(s);
+        safe_close_pair(p);
+
+        count = 0;
+        assert_se(sd_event_add_time_relative(e, &s, CLOCK_MONOTONIC, 1000, 1, ratelimit_time_handler, &count) >= 0);
+        assert_se(sd_event_source_set_ratelimit(s, 1 * USEC_PER_SEC, 10) == 0);
+
+        do {
+                assert_se(sd_event_run(e, UINT64_MAX) >= 0);
+        } while (!sd_event_source_is_ratelimited(s));
+
+        log_info("ratelimit_time_handler: called %d times, event source got ratelimited", count);
+        assert_se(count == 10);
+
+        /* In order to get rid of active rate limit client needs to disable it explicitly */
+        assert_se(sd_event_source_set_ratelimit(s, 0, 0) >= 0);
+        assert_se(!sd_event_source_is_ratelimited(s));
+
+        assert_se(sd_event_source_set_ratelimit(s, 1 * USEC_PER_SEC, 10) >= 0);
+
+        do {
+                assert_se(sd_event_run(e, UINT64_MAX) >= 0);
+        } while (!sd_event_source_is_ratelimited(s));
+
+        log_info("ratelimit_time_handler: called 10 more times, event source got ratelimited");
+        assert_se(count == 20);
+}
+
 int main(int argc, char *argv[]) {
-        test_setup_logging(LOG_INFO);
+        test_setup_logging(LOG_DEBUG);
 
         test_basic(true);   /* test with pidfd */
         test_basic(false);  /* test without pidfd */
@@ -603,5 +695,7 @@ int main(int argc, char *argv[]) {
 
         test_pidfd();
 
+        test_ratelimit();
+
         return 0;
 }
index d82b8c1279c2698d8d97a78c91513b0b3f7ed1af..5c20688cd4b016c4ee7346717563a5c66d3219f6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdint.h>
index 1b642b6851491e84fa1b30d469b02425d97654b2..4c94ba9c88da8293fa2aba1333c5d916dd12afd5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <ctype.h>
 #include <stdio.h>
@@ -105,12 +105,10 @@ static struct trie_node *node_lookup(const struct trie_node *node, uint8_t c) {
 }
 
 static void trie_node_cleanup(struct trie_node *node) {
-        size_t i;
-
         if (!node)
                 return;
 
-        for (i = 0; i < node->children_count; i++)
+        for (size_t i = 0; i < node->children_count; i++)
                 trie_node_cleanup(node->children[i].child);
         free(node->children);
         free(node->values);
@@ -191,10 +189,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node,
 static int trie_insert(struct trie *trie, struct trie_node *node, const char *search,
                        const char *key, const char *value,
                        const char *filename, uint16_t file_priority, uint32_t line_number, bool compat) {
-        size_t i = 0;
         int r = 0;
 
-        for (;;) {
+        for (size_t i = 0;; i++) {
                 size_t p;
                 uint8_t c;
                 struct trie_node *child;
@@ -273,7 +270,6 @@ static int trie_insert(struct trie *trie, struct trie_node *node, const char *se
                 }
 
                 node = child;
-                i++;
         }
 }
 
@@ -289,20 +285,17 @@ struct trie_f {
 
 /* calculate the storage space for the nodes, children arrays, value arrays */
 static void trie_store_nodes_size(struct trie_f *trie, struct trie_node *node, bool compat) {
-        uint64_t i;
-
-        for (i = 0; i < node->children_count; i++)
+        for (uint64_t i = 0; i < node->children_count; i++)
                 trie_store_nodes_size(trie, node->children[i].child, compat);
 
         trie->strings_off += sizeof(struct trie_node_f);
-        for (i = 0; i < node->children_count; i++)
+        for (uint64_t i = 0; i < node->children_count; i++)
                 trie->strings_off += sizeof(struct trie_child_entry_f);
-        for (i = 0; i < node->values_count; i++)
+        for (uint64_t i = 0; i < node->values_count; i++)
                 trie->strings_off += compat ? sizeof(struct trie_value_entry_f) : sizeof(struct trie_value_entry2_f);
 }
 
 static int64_t trie_store_nodes(struct trie_f *trie, struct trie_node *node, bool compat) {
-        uint64_t i;
         struct trie_node_f n = {
                 .prefix_off = htole64(trie->strings_off + node->prefix_off),
                 .children_count = node->children_count,
@@ -318,7 +311,7 @@ static int64_t trie_store_nodes(struct trie_f *trie, struct trie_node *node, boo
         }
 
         /* post-order recursion */
-        for (i = 0; i < node->children_count; i++) {
+        for (uint64_t i = 0; i < node->children_count; i++) {
                 int64_t child_off;
 
                 child_off = trie_store_nodes(trie, node->children[i].child, compat);
@@ -343,7 +336,7 @@ static int64_t trie_store_nodes(struct trie_f *trie, struct trie_node *node, boo
         }
 
         /* append values array */
-        for (i = 0; i < node->values_count; i++) {
+        for (uint64_t i = 0; i < node->values_count; i++) {
                 struct trie_value_entry2_f v = {
                         .key_off = htole64(trie->strings_off + node->values[i].key_off),
                         .value_off = htole64(trie->strings_off + node->values[i].value_off),
@@ -447,7 +440,7 @@ static int insert_data(struct trie *trie, char **match_list, char *line, const c
         value = strchr(line, '=');
         if (!value)
                 return log_syntax(NULL, LOG_WARNING, filename, line_number, SYNTHETIC_ERRNO(EINVAL),
-                                  "Key-value pair expected but got \"%s\", ignoring", line);
+                                  "Key-value pair expected but got \"%s\", ignoring.", line);
 
         value[0] = '\0';
         value++;
@@ -456,10 +449,9 @@ static int insert_data(struct trie *trie, char **match_list, char *line, const c
         while (isblank(line[0]) && isblank(line[1]))
                 line++;
 
-        if (isempty(line + 1) || isempty(value))
+        if (isempty(line + 1))
                 return log_syntax(NULL, LOG_WARNING, filename, line_number, SYNTHETIC_ERRNO(EINVAL),
-                                  "Empty %s in \"%s=%s\", ignoring",
-                                  isempty(line + 1) ? "key" : "value",
+                                  "Empty key in \"%s=%s\", ignoring.",
                                   line, value);
 
         STRV_FOREACH(entry, match_list)
@@ -494,7 +486,7 @@ static int import_file(struct trie *trie, const char *filename, uint16_t file_pr
                 if (r == 0)
                         break;
 
-                ++line_number;
+                line_number ++;
 
                 /* comment line */
                 if (line[0] == '#')
@@ -518,7 +510,7 @@ static int import_file(struct trie *trie, const char *filename, uint16_t file_pr
 
                         if (line[0] == ' ') {
                                 r = log_syntax(NULL, LOG_WARNING, filename, line_number, SYNTHETIC_ERRNO(EINVAL),
-                                               "Match expected but got indented property \"%s\", ignoring line", line);
+                                               "Match expected but got indented property \"%s\", ignoring line.", line);
                                 break;
                         }
 
@@ -534,7 +526,7 @@ static int import_file(struct trie *trie, const char *filename, uint16_t file_pr
                 case HW_MATCH:
                         if (len == 0) {
                                 r = log_syntax(NULL, LOG_WARNING, filename, line_number, SYNTHETIC_ERRNO(EINVAL),
-                                               "Property expected, ignoring record with no properties");
+                                               "Property expected, ignoring record with no properties.");
                                 state = HW_NONE;
                                 match_list = strv_free(match_list);
                                 break;
@@ -566,7 +558,7 @@ static int import_file(struct trie *trie, const char *filename, uint16_t file_pr
 
                         if (line[0] != ' ') {
                                 r = log_syntax(NULL, LOG_WARNING, filename, line_number, SYNTHETIC_ERRNO(EINVAL),
-                                               "Property or empty line expected, got \"%s\", ignoring record", line);
+                                               "Property or empty line expected, got \"%s\", ignoring record.", line);
                                 state = HW_NONE;
                                 match_list = strv_free(match_list);
                                 break;
@@ -581,7 +573,7 @@ static int import_file(struct trie *trie, const char *filename, uint16_t file_pr
 
         if (state == HW_MATCH)
                 log_syntax(NULL, LOG_WARNING, filename, line_number, 0,
-                           "Property expected, ignoring record with no properties");
+                           "Property expected, ignoring record with no properties.");
 
         return r;
 }
index 425b4b3e1332775fca915dde69e8b0215fd80d3b..5afde7472342e947083c8fc7955f5669aabcdcd1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 0e326f3d223842465788c8d5d6f1fdf96f78b01b..cb3c77ce961ed70788a2c34359f4eae4f274c5cf 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2008 Alan Jenkins <alan.christopher.jenkins@googlemail.com>
 ***/
index 335f22b9208da3b797b8c9e2b99435f872184b3c..a3f6da6381ca980606d84017a41bd165463a638e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -10,6 +10,7 @@
 #include "id128-util.h"
 #include "io-util.h"
 #include "stdio-util.h"
+#include "string-util.h"
 
 char *id128_to_uuid_string(sd_id128_t id, char s[static ID128_UUID_STRING_MAX]) {
         unsigned n, k = 0;
@@ -97,6 +98,11 @@ int id128_read_fd(int fd, Id128Format f, sd_id128_t *ret) {
 
         switch (l) {
 
+        case 13:
+        case 14:
+                /* Treat an "uninitialized" id file like an empty one */
+                return f == ID128_PLAIN_OR_UNINIT && strneq(buffer, "uninitialized\n", l) ? -ENOMEDIUM : -EINVAL;
+
         case 33: /* plain UUID with trailing newline */
                 if (buffer[32] != '\n')
                         return -EINVAL;
@@ -115,7 +121,7 @@ int id128_read_fd(int fd, Id128Format f, sd_id128_t *ret) {
 
                 _fallthrough_;
         case 36: /* RFC UUID without trailing newline */
-                if (f == ID128_PLAIN)
+                if (IN_SET(f, ID128_PLAIN, ID128_PLAIN_OR_UNINIT))
                         return -EINVAL;
 
                 buffer[36] = 0;
index 1901bf119fffb565b8606fc84cd15aa73102bd6d..6b09bcd96a44ebccfea1b39d73feed169343b96c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
@@ -17,6 +17,10 @@ bool id128_is_valid(const char *s) _pure_;
 typedef enum Id128Format {
         ID128_ANY,
         ID128_PLAIN,  /* formatted as 32 hex chars as-is */
+        ID128_PLAIN_OR_UNINIT,  /* formatted as 32 hex chars as-is; allow special "uninitialized"
+                                 * value when reading from file (id128_read() and id128_read_fd()).
+                                 *
+                                 * This format should be used when reading a machine-id file. */
         ID128_UUID,   /* formatted as 36 character uuid string */
         _ID128_FORMAT_MAX,
 } Id128Format;
index 9b38ef0c563206f79b00dc397e9c1c55926d8adb..d5de935c77f066b3ec3c8480bb958d869048bfac 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 939b2a5df42ce70161290f70b3b725b4637390a5..1fc379512f0194a0ce88fda6adb923d4c0a8f9ca 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <poll.h>
@@ -355,7 +355,7 @@ _public_ int sd_uid_is_on_seat(uid_t uid, int require_active, const char *seat)
         char t[DECIMAL_STR_MAX(uid_t)];
         xsprintf(t, UID_FMT, uid);
 
-        return string_contains_word(content, ",", t);
+        return string_contains_word(content, NULL, t);
 }
 
 static int uid_get_array(uid_t uid, const char *variable, char ***array) {
index c0c77e04714bc1c54d8a29f8e27445554845ad59..5b2ff93e1c1716b08bf42b34598d2743c9742938 100644 (file)
@@ -1,25 +1,26 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <poll.h>
 
 #include "sd-login.h"
 
 #include "alloc-util.h"
+#include "errno-list.h"
 #include "fd-util.h"
 #include "format-util.h"
 #include "log.h"
 #include "string-util.h"
 #include "strv.h"
 #include "time-util.h"
-#include "util.h"
+#include "user-util.h"
 
 static char* format_uids(char **buf, uid_t* uids, int count) {
-        int pos = 0, k, inc;
+        int pos = 0, inc;
         size_t size = (DECIMAL_STR_MAX(uid_t) + 1) * count + 1;
 
         assert_se(*buf = malloc(size));
 
-        for (k = 0; k < count; k++) {
+        for (int k = 0; k < count; k++) {
                 sprintf(*buf + pos, "%s"UID_FMT"%n", k > 0 ? " " : "", uids[k], &inc);
                 pos += inc;
         }
@@ -30,6 +31,10 @@ static char* format_uids(char **buf, uid_t* uids, int count) {
         return *buf;
 }
 
+static const char *e(int r) {
+        return r == 0 ? "OK" : errno_to_name(r);
+}
+
 static void test_login(void) {
         _cleanup_close_pair_ int pair[2] = { -1, -1 };
         _cleanup_free_ char *pp = NULL, *qq = NULL,
@@ -39,65 +44,71 @@ static void test_login(void) {
                 *seat = NULL, *session = NULL,
                 *unit = NULL, *user_unit = NULL, *slice = NULL;
         int r;
-        uid_t u, u2;
-        char *t, **seats, **sessions;
+        uid_t u, u2 = UID_INVALID;
+        char *t, **seats = NULL, **sessions = NULL;
 
         r = sd_pid_get_unit(0, &unit);
-        assert_se(r >= 0 || r == -ENODATA);
-        log_info("sd_pid_get_unit(0, …) → \"%s\"", strna(unit));
+        log_info("sd_pid_get_unit(0, …) → %s / \"%s\"", e(r), strnull(unit));
+        assert_se(IN_SET(r, 0, -ENODATA));
 
         r = sd_pid_get_user_unit(0, &user_unit);
-        assert_se(r >= 0 || r == -ENODATA);
-        log_info("sd_pid_get_user_unit(0, …) → \"%s\"", strna(user_unit));
+        log_info("sd_pid_get_user_unit(0, …) → %s / \"%s\"", e(r), strnull(user_unit));
+        assert_se(IN_SET(r, 0, -ENODATA));
 
         r = sd_pid_get_slice(0, &slice);
-        assert_se(r >= 0 || r == -ENODATA);
-        log_info("sd_pid_get_slice(0, …) → \"%s\"", strna(slice));
+        log_info("sd_pid_get_slice(0, …) → %s / \"%s\"", e(r), strnull(slice));
+        assert_se(IN_SET(r, 0, -ENODATA));
+
+        r = sd_pid_get_owner_uid(0, &u2);
+        log_info("sd_pid_get_owner_uid(0, …) → %s / "UID_FMT, e(r), u2);
+        assert_se(IN_SET(r, 0, -ENODATA));
 
         r = sd_pid_get_session(0, &session);
-        if (r < 0) {
-                log_warning_errno(r, "sd_pid_get_session(0, …): %m");
-                if (r == -ENODATA)
-                        log_info("Seems we are not running in a session, skipping some tests.");
-        } else {
-                log_info("sd_pid_get_session(0, …) → \"%s\"", session);
-
-                assert_se(sd_pid_get_owner_uid(0, &u2) == 0);
-                log_info("sd_pid_get_owner_uid(0, …) → "UID_FMT, u2);
-
-                assert_se(sd_pid_get_cgroup(0, &cgroup) == 0);
-                log_info("sd_pid_get_cgroup(0, …) → \"%s\"", cgroup);
-
-                r = sd_uid_get_display(u2, &display_session);
-                assert_se(r >= 0 || r == -ENODATA);
-                log_info("sd_uid_get_display("UID_FMT", …) → \"%s\"",
-                         u2, strnull(display_session));
-
-                assert_se(socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == 0);
-                sd_peer_get_session(pair[0], &pp);
-                sd_peer_get_session(pair[1], &qq);
-                assert_se(streq_ptr(pp, qq));
-
-                r = sd_uid_get_sessions(u2, false, &sessions);
+        log_info("sd_pid_get_session(0, …) → %s / \"%s\"", e(r), strnull(session));
+
+        r = sd_pid_get_cgroup(0, &cgroup);
+        log_info("sd_pid_get_cgroup(0, …) → %s / \"%s\"", e(r), strnull(cgroup));
+        assert_se(IN_SET(r, 0, -ENOMEDIUM));
+
+        r = sd_uid_get_display(u2, &display_session);
+        log_info("sd_uid_get_display("UID_FMT", …) → %s / \"%s\"", u2, e(r), strnull(display_session));
+        if (u2 == UID_INVALID)
+                assert_se(r == -EINVAL);
+        else
+                assert_se(IN_SET(r, 0, -ENODATA));
+
+        assert_se(socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == 0);
+        sd_peer_get_session(pair[0], &pp);
+        sd_peer_get_session(pair[1], &qq);
+        assert_se(streq_ptr(pp, qq));
+
+        r = sd_uid_get_sessions(u2, false, &sessions);
+        assert_se(t = strv_join(sessions, " "));
+        log_info("sd_uid_get_sessions("UID_FMT", …) → %s \"%s\"", u2, e(r), t);
+        if (u2 == UID_INVALID)
+                assert_se(r == -EINVAL);
+        else {
                 assert_se(r >= 0);
                 assert_se(r == (int) strv_length(sessions));
-                assert_se(t = strv_join(sessions, " "));
-                strv_free(sessions);
-                log_info("sd_uid_get_sessions("UID_FMT", …) → [%i] \"%s\"", u2, r, t);
-                free(t);
+        }
+        sessions = strv_free(sessions);
+        free(t);
 
-                assert_se(r == sd_uid_get_sessions(u2, false, NULL));
+        assert_se(r == sd_uid_get_sessions(u2, false, NULL));
 
-                r = sd_uid_get_seats(u2, false, &seats);
+        r = sd_uid_get_seats(u2, false, &seats);
+        assert_se(t = strv_join(seats, " "));
+        log_info("sd_uid_get_seats("UID_FMT", …) → %s \"%s\"", u2, e(r), t);
+        if (u2 == UID_INVALID)
+                assert_se(r == -EINVAL);
+        else {
                 assert_se(r >= 0);
                 assert_se(r == (int) strv_length(seats));
-                assert_se(t = strv_join(seats, " "));
-                strv_free(seats);
-                log_info("sd_uid_get_seats("UID_FMT", …) → [%i] \"%s\"", u2, r, t);
-                free(t);
-
-                assert_se(r == sd_uid_get_seats(u2, false, NULL));
         }
+        seats = strv_free(seats);
+        free(t);
+
+        assert_se(r == sd_uid_get_seats(u2, false, NULL));
 
         if (session) {
                 r = sd_session_is_active(session);
@@ -109,7 +120,7 @@ static void test_login(void) {
                 log_info("sd_session_is_remote(\"%s\") → %s", session, yes_no(r));
 
                 r = sd_session_get_state(session, &state);
-                assert_se(r >= 0);
+                assert_se(r == 0);
                 log_info("sd_session_get_state(\"%s\") → \"%s\"", session, state);
 
                 assert_se(sd_session_get_uid(session, &u) >= 0);
@@ -123,16 +134,16 @@ static void test_login(void) {
                 log_info("sd_session_get_class(\"%s\") → \"%s\"", session, class);
 
                 r = sd_session_get_display(session, &display);
-                assert_se(r >= 0 || r == -ENODATA);
+                assert_se(IN_SET(r, 0, -ENODATA));
                 log_info("sd_session_get_display(\"%s\") → \"%s\"", session, strna(display));
 
                 r = sd_session_get_remote_user(session, &remote_user);
-                assert_se(r >= 0 || r == -ENODATA);
+                assert_se(IN_SET(r, 0, -ENODATA));
                 log_info("sd_session_get_remote_user(\"%s\") → \"%s\"",
                          session, strna(remote_user));
 
                 r = sd_session_get_remote_host(session, &remote_host);
-                assert_se(r >= 0 || r == -ENODATA);
+                assert_se(IN_SET(r, 0, -ENODATA));
                 log_info("sd_session_get_remote_host(\"%s\") → \"%s\"",
                          session, strna(remote_host));
 
@@ -161,7 +172,7 @@ static void test_login(void) {
                         assert_se(r == -ENODATA);
                 }
 
-                assert_se(sd_uid_get_state(u, &state2) >= 0);
+                assert_se(sd_uid_get_state(u, &state2) == 0);
                 log_info("sd_uid_get_state("UID_FMT", …) → %s", u, state2);
         }
 
@@ -173,11 +184,11 @@ static void test_login(void) {
                 assert_se(sd_uid_is_on_seat(u, 0, seat) > 0);
 
                 r = sd_seat_get_active(seat, &session2, &u2);
-                assert_se(r >= 0);
+                assert_se(r == 0);
                 log_info("sd_seat_get_active(\"%s\", …) → \"%s\", "UID_FMT, seat, session2, u2);
 
                 r = sd_uid_is_on_seat(u, 1, seat);
-                assert_se(r >= 0);
+                assert_se(IN_SET(r, 0, 1));
                 assert_se(!!r == streq(session, session2));
 
                 r = sd_seat_get_sessions(seat, &sessions, &uids, &n);
@@ -185,8 +196,8 @@ static void test_login(void) {
                 assert_se(r == (int) strv_length(sessions));
                 assert_se(t = strv_join(sessions, " "));
                 strv_free(sessions);
-                log_info("sd_seat_get_sessions(\"%s\", …) → %i, \"%s\", [%i] {%s}",
-                         seat, r, t, n, format_uids(&buf, uids, n));
+                log_info("sd_seat_get_sessions(\"%s\", …) → %s, \"%s\", [%u] {%s}",
+                         seat, e(r), t, n, format_uids(&buf, uids, n));
                 free(t);
 
                 assert_se(sd_seat_get_sessions(seat, NULL, NULL, NULL) == r);
@@ -204,7 +215,7 @@ static void test_login(void) {
 
         r = sd_seat_get_active(NULL, &t, NULL);
         assert_se(IN_SET(r, 0, -ENODATA));
-        log_info("sd_seat_get_active(NULL, …) (active session on current seat) → %s", strnull(t));
+        log_info("sd_seat_get_active(NULL, …) (active session on current seat) → %s / \"%s\"", e(r), strnull(t));
         free(t);
 
         r = sd_get_sessions(&sessions);
@@ -244,13 +255,11 @@ static void test_login(void) {
 
 static void test_monitor(void) {
         sd_login_monitor *m = NULL;
-        unsigned n;
         int r;
 
-        r = sd_login_monitor_new("session", &m);
-        assert_se(r >= 0);
+        assert_se(sd_login_monitor_new("session", &m) == 0);
 
-        for (n = 0; n < 5; n++) {
+        for (unsigned n = 0; n < 5; n++) {
                 struct pollfd pollfd = {};
                 usec_t timeout, nw;
 
index b4971da323db89ca61c6183650a78daaa1d65bbd..f295fa9e83f2d93bacd8ee72528c52ce66444654 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/genetlink.h>
 
index e9ae5591f21e0e519f38e2671a23112568ada452..72001e88d21102b5fc6171a03dd7af312a24ae85 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-netlink.h"
index b14ce435eefb10e74ce2c19073e8c6a2b5b9c282..1240f0d66d94b10d3e1259703f2452fab5247660 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <linux/netlink.h>
index da4f5ba6888f79595f3bddd81064026d25ec6ba2..bd56536062eddf9d5bdc51352d7ad480dd4e314c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
 #include <stdbool.h>
@@ -495,6 +495,25 @@ int sd_netlink_message_append_ether_addr(sd_netlink_message *m, unsigned short t
         return 0;
 }
 
+int netlink_message_append_hw_addr(sd_netlink_message *m, unsigned short type, const hw_addr_data *data) {
+        int r;
+
+        assert_return(m, -EINVAL);
+        assert_return(!m->sealed, -EPERM);
+        assert_return(data, -EINVAL);
+        assert_return(data->length > 0, -EINVAL);
+
+        r = message_attribute_has_type(m, NULL, type, NETLINK_TYPE_ETHER_ADDR);
+        if (r < 0)
+                return r;
+
+        r = add_rtattr(m, type, data->addr.bytes, data->length);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
 int sd_netlink_message_append_cache_info(sd_netlink_message *m, unsigned short type, const struct ifa_cacheinfo *info) {
         int r;
 
@@ -864,6 +883,30 @@ int sd_netlink_message_read_ether_addr(sd_netlink_message *m, unsigned short typ
         return 0;
 }
 
+int netlink_message_read_hw_addr(sd_netlink_message *m, unsigned short type, hw_addr_data *data) {
+        int r;
+        void *attr_data;
+
+        assert_return(m, -EINVAL);
+
+        r = message_attribute_has_type(m, NULL, type, NETLINK_TYPE_ETHER_ADDR);
+        if (r < 0)
+                return r;
+
+        r = netlink_message_read_internal(m, type, &attr_data, NULL);
+        if (r < 0)
+                return r;
+        else if ((size_t) r > sizeof(union hw_addr_union))
+                return -EIO;
+
+        if (data) {
+                memcpy(data->addr.bytes, attr_data, r);
+                data->length = r;
+        }
+
+        return 0;
+}
+
 int sd_netlink_message_read_cache_info(sd_netlink_message *m, unsigned short type, struct ifa_cacheinfo *info) {
         int r;
         void *attr_data;
index 94a80a80670e5d2444bd48a9bb960aac7a5cd04a..fa951bf941846e036d49b9e9bc293b6baeb21b8b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index 2641ec6b4ac70c9ea9cf91f8148d0096f44bf318..79de817262260c00510d6f8cd2e3db824be451a2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-netlink.h"
index bcd82fe164699868d2cf62253999b7bed9996820..228e38df909267b8d3919d3f86609db39aff5f47 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
 #include <stdbool.h>
index 5f5a1558a101d4d0041dfbdd2e796bb42fbec9be..6fb6c147d95fbdd57a1dc7a6233694df77d13e9e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
 #include <stdint.h>
index 959845ccaccc749e1c7a119c2c9ae805c45cc7ce..b14e66fbb11e34f638da2d379dfc6130d422a337 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "macro.h"
index f89340058078d270152ce40135b2f212cc3290ab..09e2158c9e880f8860d5e80a3fa61567aa2346ae 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-netlink.h"
 
index 2768d5fdc4db6302a7e34ebeb9f37aa60bcec588..d28d07a9f5edc331394482d318a09c98457d2879 100644 (file)
@@ -1,10 +1,11 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <linux/rtnetlink.h>
 
 #include "sd-netlink.h"
 
+#include "ether-addr-util.h"
 #include "in-addr-util.h"
 #include "ordered-set.h"
 #include "socket-util.h"
@@ -100,9 +101,11 @@ int rtnl_log_create_error(int r);
                                      userdata, description);            \
         })
 
+int netlink_message_append_hw_addr(sd_netlink_message *m, unsigned short type, const hw_addr_data *data);
 int netlink_message_append_in_addr_union(sd_netlink_message *m, unsigned short type, int family, const union in_addr_union *data);
 int netlink_message_append_sockaddr_union(sd_netlink_message *m, unsigned short type, const union sockaddr_union *data);
 
+int netlink_message_read_hw_addr(sd_netlink_message *m, unsigned short type, hw_addr_data *data);
 int netlink_message_read_in_addr_union(sd_netlink_message *m, unsigned short type, int family, union in_addr_union *data);
 
 void rtattr_append_attribute_internal(struct rtattr *rta, unsigned short type, const void *data, size_t data_length);
index 268150044c0bae03c4986f8315e7ce632dc0930d..4cabbabba6760cf9901d3edc6cf226a6a78c4cd9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
 #include <linux/if_addrlabel.h>
index 6f283e31ff74828134578396141cae4ffb3fffab..7801101807b210e0f8d3ae0f04174fd049ff433f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <poll.h>
 
index be7a4f7835deca4df58c7d3068f3c066f33ea79f..41787c5a3ecd2d1791d580b42d310a9ee6235fc9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 #include <netinet/ether.h>
index 0addabe10a2496338e2f9a4182604cb96b0b8a3a..acf7500970e382e619a9f4772ee19231920581c8 100644 (file)
@@ -1,8 +1,14 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#include "sd-id128.h"
 
 #include "alloc-util.h"
+#include "arphrd-list.h"
+#include "device-util.h"
 #include "fd-util.h"
 #include "network-util.h"
+#include "siphash24.h"
+#include "sparse-endian.h"
 #include "string-table.h"
 #include "strv.h"
 
@@ -103,3 +109,72 @@ int parse_operational_state_range(const char *str, LinkOperationalStateRange *ou
 
         return 0;
 }
+
+char *link_get_type_string(sd_device *device, unsigned short iftype) {
+        const char *t;
+        char *p;
+
+        if (device &&
+            sd_device_get_devtype(device, &t) >= 0 &&
+            !isempty(t))
+                return strdup(t);
+
+        t = arphrd_to_name(iftype);
+        if (!t)
+                return NULL;
+
+        p = strdup(t);
+        if (!p)
+                return NULL;
+
+        return ascii_strlower(p);
+}
+
+const char *net_get_name_persistent(sd_device *device) {
+        const char *name, *field;
+
+        assert(device);
+
+        /* fetch some persistent data unique (on this machine) to this device */
+        FOREACH_STRING(field, "ID_NET_NAME_ONBOARD", "ID_NET_NAME_SLOT", "ID_NET_NAME_PATH", "ID_NET_NAME_MAC")
+                if (sd_device_get_property_value(device, field, &name) >= 0)
+                        return name;
+
+        return NULL;
+}
+
+#define HASH_KEY SD_ID128_MAKE(d3,1e,48,fa,90,fe,4b,4c,9d,af,d5,d7,a1,b1,2e,8a)
+
+int net_get_unique_predictable_data(sd_device *device, bool use_sysname, uint64_t *result) {
+        size_t l, sz = 0;
+        const char *name;
+        int r;
+        uint8_t *v;
+
+        assert(device);
+
+        /* net_get_name_persistent() will return one of the device names based on stable information about
+         * the device. If this is not available, we fall back to using the actual device name. */
+        name = net_get_name_persistent(device);
+        if (!name && use_sysname)
+                (void) sd_device_get_sysname(device, &name);
+        if (!name)
+                return log_device_debug_errno(device, SYNTHETIC_ERRNO(ENODATA),
+                                              "No stable identifying information found");
+
+        log_device_debug(device, "Using \"%s\" as stable identifying information", name);
+        l = strlen(name);
+        sz = sizeof(sd_id128_t) + l;
+        v = newa(uint8_t, sz);
+
+        /* Fetch some persistent data unique to this machine */
+        r = sd_id128_get_machine((sd_id128_t*) v);
+        if (r < 0)
+                 return r;
+        memcpy(v + sizeof(sd_id128_t), name, l);
+
+        /* Let's hash the machine ID plus the device name. We use
+         * a fixed, but originally randomly created hash key here. */
+        *result = htole64(siphash24(v, sz, HASH_KEY.bytes));
+        return 0;
+}
index 425d192f6402a6dc6bdea3d1f98be73427718a71..762b15746ff4556f0f7b169a3a23cf686ab719a2 100644 (file)
@@ -1,6 +1,10 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
+#include <inttypes.h>
+#include <stdbool.h>
+
+#include "sd-device.h"
 #include "sd-network.h"
 
 #include "macro.h"
@@ -58,3 +62,7 @@ typedef struct LinkOperationalStateRange {
                                                                    LINK_OPERSTATE_ROUTABLE }
 
 int parse_operational_state_range(const char *str, LinkOperationalStateRange *out);
+
+char *link_get_type_string(sd_device *device, unsigned short iftype);
+int net_get_unique_predictable_data(sd_device *device, bool use_sysname, uint64_t *result);
+const char *net_get_name_persistent(sd_device *device);
index 832ec1703e9be0a5821dcbaeb88c4837cc25052b..b9b1099399ff99a9930549e1a1de04b14518a840 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <poll.h>
index 26d2341c2bb64abc09068345a29be2d7ba10b75e..61ed7cb2da8256caf20b5909ebf53cca4a214577 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-path.h"
 
index a0feb36f7c66c6166fa96b9bf37765ab75c9d286..7a339f7a35ad5a0663af1d09948610df58288777 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-resolve.h"
index 1dc32038131bf2fc88ca75f52ca3d7b48d32b7ba..2cfa22d280b98693977ef29632608141046ab70c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <poll.h>
index 627b86b3cb00c2200f2b631038f9180f134b8fce..b973dfd90d24b9e2d9b0d45a2e56ac1cb31a9b45 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <arpa/inet.h>
 #include <errno.h>
index 78323cf7cbafa04a8e1f02b8edd89f8a221f1cc9..82fa125aded2158310cda6ae51cc1ef078380584 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-utf8.h"
 
index cd6c2a5bc57157fd14ecd93f740e1da5f22733c2..437d431c90fc3fab792fdf9376564dae3cdb3f14 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "libudev.h"
index 704a09d01cd59b7f67e122926c4b9e871b3c063d..34543a8b2ed658f848b9721d332ef6b5afa9113f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <ctype.h>
 #include <dirent.h>
index a8b3f53572413e967e230076c0ce22233adb27d8..33bd360188f7d0b14a35aa6f91da5b75d38065f4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <dirent.h>
 #include <errno.h>
index 5299e0a16f57a61382c96bcdb8231f909f6d51e8..8e9ea97a2d13d5a5bec283d6e89be534e57f5e41 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index a15b385343916bc700bcaf35c900fa26259dada5..c23735e3591d4d28183f42413fc3606beee49c19 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "libudev.h"
index 3b22976c9ff4344976e5de8bae6111b9fda28a2b..3b2a2cdee4b3337db0ec543f14fa09d90b073388 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "hashmap.h"
index 5bec7418b89df50143207a0246e594017cc8a44d..a93adbd7a2e977cf49484c8981363ff70ba2cac5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <poll.h>
index 4e055bbc37a0e9e47c17ab3e20ceee332f97f579..01b237fde42d1b7e7c46aa9c923536a151fb3f8c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2009 Alan Jenkins <alan-jenkins@tuffmail.co.uk>
 ***/
index 4a471fb90d139bedb02f382e7196c980ee542ec7..bbb287976433adbb47ae2005168a87ff8f14add9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <ctype.h>
 #include <errno.h>
index 32b626ebc93a8e9c0a55f1209540bd88ce579f69..15e6214b0d6d515c19404cff7e20879847ec8f0c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "libudev.h"
index aa187b2b4cdfdcd86489d9b5641b81160031cc72..73574874ca7af835e0322193e3adf9ab7ce7f7cb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <ctype.h>
 #include <stdarg.h>
index c9d0bf233e506a27919754183ed678b4215011c5..55036de867db9d91528c92021521fa96f86f89f7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #ifndef _LIBUDEV_H_
 #define _LIBUDEV_H_
index 40b340362e4bf52e4fd1a5da677223d9b2a38489..b657b7d0683965c8cad419834d9d0cc793bc5b47 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index bad8313904398f09b8a537250cf534737f6847fc..6aa6768f2d204921850ebdbe875673703e7bf14a 100644 (file)
@@ -1,5 +1,5 @@
 /***
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   systemd is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
index 88189748d3992594f073610c3f14bf0628d01077..3bd00ff4ccc30d18282f4aa92cb99b2b52901436 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 libudev_sources = files('''
         libudev.c
index 8e0cb747754de7c1f30dca8f2c221e933795233e..cb8153f4fe2388c0cbe5c73a6adf695284b47fb9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sys/stat.h>
index 6eced8424077a56a010039a7c698a2166dd3f56b..49976472ef6ffa7ded2083099ef3d8272cc84574 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 4895c292e4ab1a8e7288cfdeb84620f9cba4f910..7d2e88766083e71783771be50dea05bf349ac77d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <ftw.h>
 #include <getopt.h>
index 715ce5cac7e07c5bbcedc5552ab1eee3269561b7..736dacdee988b8d95f580736fc02c04944b1dade 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sys/stat.h>
index 314b0a3d3799de5c2bdf97790962a0999f5e9f5b..6e3500d099b7ead41cb50246cd1786253a021c62 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 systemd_localed_sources = files('''
         localed.c
index d74cbc11ab87fdd3c608b302a542652dc02646fd..a0905573e1f87748935900c10e45484f0b4e6883 100644 (file)
@@ -3,7 +3,7 @@
         "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   This file is part of systemd.
 
index f9241749e61ddcb1051ea9a99567d25d255a0bf4..f12ca0970a469a95e9bc3f9b9948ddeca9020e16 100644 (file)
@@ -3,7 +3,7 @@
         "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   This file is part of systemd.
 
index b15d39540c65ae98fb303f05106616ff8d50b862..2d812cbe39797b8ae9ddea853665466f7c963496 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index f96f5b07ec7faf8414793006e688e4c5acfa6bc4..bded12239949fc7fa1ece113cf365a0272b8a529 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "keymap-util.h"
index d69e65b3d52154d4b2280c9e436c295f94066698..3fb954a4f070d8441c1545d8727be10063b5709b 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 4bb144a93c4bb17479e6bc8d376a9cdad0da73a8..45e4adfa0f5b24a015f93362fe300d592c066213 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 60dd6add60da1cb0bbb863d430d9333db7ca5f3a..3ccd52415f6597f1f89468579b8b274cbab5836f 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 4db8d4dd4cad8b8c998166893097be6ff694bc08..e56cd6160380697548dbeaa31730c71ae48b24bf 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index e3866eee55a711010362c229c8ed80b50e669aac..e18dbc51326cb9c913c74bda6354eec6a97f80fe 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <getopt.h>
@@ -282,7 +282,7 @@ static int run(int argc, char *argv[]) {
 
         r = sd_bus_default_system(&bus);
         if (r < 0)
-                return log_error_errno(r, "Failed to connect to bus: %m");
+                return bus_log_connect_error(r);
 
         if (arg_action == ACTION_LIST)
                 return print_inhibitors(bus);
index b7f400dc5e2c225f5cd30cf42e2f0b26d1126d79..695d18bba5bc460e20b7ef71d7b7cea9faab1b2b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <getopt.h>
@@ -485,7 +485,7 @@ static int print_session_status_info(sd_bus *bus, const char *path, bool *new_li
 
                 printf("\t  Leader: %"PRIu32, i.leader);
 
-                get_process_comm(i.leader, &t);
+                (void) get_process_comm(i.leader, &t);
                 if (t)
                         printf(" (%s)", t);
 
index 0cb3b0bec3b5e42029dcde505acf5c18850af9d4..ed615e23f8175bc3ca08966a5bff458a09769f76 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index 00e286d76de8d9f509fe0fdf306c88cdf5aab6c3..c88f3c0cf3725cc0e9037a634daa1c037850dee8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 1aeacfaf2bc5d82f35d9fd533ab9510dffea923e..1a017c84145d3a5d615d5828aebf97621e5d8d11 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
index a45aab7854722435279befd0f9208f5adb9c2cc2..73aa20bbb489f9b8d2fa1ec818901173948d2847 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "conf-parser.h"
index 450ec320443a4cf63bc3b28a01e6b7ec3713a4df..a6a16033965855cabffe5c362c8b447d6f75be96 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-util.h"
 #include "device-util.h"
index b22ee37ba774d7504e7c7960cddb50381ff3e3be..f1c77757a88f59e18baa7c0834522433b4f7643f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 096cf70c9aee87a454f4d6153caf64074fbfd7e7..60de2dccad505e87f5b0467dd23c2ebfea1de7e1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -13,6 +13,7 @@
 #include "missing_input.h"
 #include "string-util.h"
 #include "util.h"
+#include "async.h"
 
 #define CONST_MAX5(a, b, c, d, e) CONST_MAX(CONST_MAX(a, b), CONST_MAX(CONST_MAX(c, d), e))
 
@@ -63,7 +64,7 @@ void button_free(Button *b) {
                 /* If the device has been unplugged close() returns
                  * ENODEV, let's ignore this, hence we don't use
                  * safe_close() */
-                (void) close(b->fd);
+                (void) asynchronous_close(b->fd);
 
         free(b->name);
         free(b->seat);
@@ -344,10 +345,12 @@ int button_open(Button *b) {
         r = button_suitable(fd);
         if (r < 0)
                 return log_warning_errno(r, "Failed to determine whether input device %s is relevant to us: %m", p);
-        if (r == 0)
+        if (r == 0) {
+                b->fd = TAKE_FD(fd);
                 return log_debug_errno(SYNTHETIC_ERRNO(EADDRNOTAVAIL),
                                        "Device %s does not expose keys or switches relevant to us, ignoring.", p);
-
+        }
+        
         if (ioctl(fd, EVIOCGNAME(sizeof name), name) < 0)
                 return log_error_errno(errno, "Failed to get input name for %s: %m", p);
 
index d009851cf44b6eb6cd18e8c9c4eafa6c59f01038..041d66521ce51c813992d4e6be069a5de8b9ee3e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct Button Button;
index 370604f936d80cdaa7a208e2dac58525617355b4..3595d7a77322a3df5d1ea8984ec2bd3098a4cad9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/ioctl.h>
index 0f83ed99bc5016a74a2a5b6d0e5d379ec129e08a..b95af1a9fd6508df32bc135aa2fe8d3ecc4b1b68 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sys/stat.h>
index 3e0f3805efea64ef2b2b9cd3f28650d2c72d2a1e..6b5d3abcd6d1fa43fec633086556902b5af4a52a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 9a62217290534aba883da27ae13b1e8ff2d8c75b..982a7721945749eb7ed0a070c846c8cf8951a050 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <string.h>
 
index cc6e52367537895c31e45577a8098cbe154c0fe8..0d89613d77070c47cbefd99a0ce9a6986e5cb34d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct Device Device;
index f52d5babd7493a97d1bc23014f9422c663e7a63c..57198ce65293f0cc0852172e15af52810207ed67 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index e5d4426191087a4798902982ceab8d3b9c188e9f..124bdb662f30d625e4ff50fffbe6ee1464a03755 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct Inhibitor Inhibitor;
index a9451322847ae3e683a2536d28b41f5f97d00da7..a60ed2d3c2d3e586f8ac3bc3b7164d9757820110 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index 6169cfe1edf734bf3e73f96902677741f4dabcda..258db91d40d4064584c374d8b262a12bd70920b3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 157fc9423cbd804b13a798d4a8d155439c7ee577..10cc7d960bde2b9c93ca2631652b95ca0e5ae2f7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index f4b57ce8d2272180b978607d9ccf41cf8ef0a151..ddc45f48703df1fb9d56b2e65dd87e2ab05c7845 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct Seat Seat;
index ccc5ac8df248a4033d6b4a28c93e26a35349627a..b5d240be6a5585e27bd023b794554f498c2f954e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index 97f7c413cbff8c2c00e4ab5928768e268762d71c..751ca86c0dbcfe74e93bef6e68e604b1714e7079 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 1a266605be6350c6b35fcd568928f5b9dc2bc720..f2adb969d4e4119fd9a9e9d12c948f81b4b26932 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <string.h>
index 6c20403d12b5d4373d9af4a4d702ff582e8a456d..4da3fe6533838cec8b648f4cac4f66623cee5e87 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef enum DeviceType DeviceType;
index cbb5549bd819766d9cccdf5687fadbc86c80c36e..34fcde92aae10b1fdb66e5d1c17376ce5cf1882a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -1089,8 +1089,8 @@ int session_create_fifo(Session *s) {
                 if (r < 0)
                         return r;
 
-                /* Let's make sure we noticed dead sessions before we process new bus requests (which might create new
-                 * sessions). */
+                /* Let's make sure we noticed dead sessions before we process new bus requests (which might
+                 * create new sessions). */
                 r = sd_event_source_set_priority(s->fifo_event_source, SD_EVENT_PRIORITY_NORMAL-10);
                 if (r < 0)
                         return r;
@@ -1331,9 +1331,8 @@ static void session_release_controller(Session *s, bool notify) {
 
         name = s->controller;
 
-        /* By resetting the controller before releasing the devices, we won't
-         * send notification signals. This avoids sending useless notifications
-         * if the controller is released on disconnects. */
+        /* By resetting the controller before releasing the devices, we won't send notification signals.
+         * This avoids sending useless notifications if the controller is released on disconnects. */
         if (!notify)
                 s->controller = NULL;
 
@@ -1419,43 +1418,43 @@ void session_drop_controller(Session *s) {
 
 static const char* const session_state_table[_SESSION_STATE_MAX] = {
         [SESSION_OPENING] = "opening",
-        [SESSION_ONLINE] = "online",
-        [SESSION_ACTIVE] = "active",
-        [SESSION_CLOSING] = "closing"
+        [SESSION_ONLINE]  = "online",
+        [SESSION_ACTIVE]  = "active",
+        [SESSION_CLOSING] = "closing",
 };
 
 DEFINE_STRING_TABLE_LOOKUP(session_state, SessionState);
 
 static const char* const session_type_table[_SESSION_TYPE_MAX] = {
         [SESSION_UNSPECIFIED] = "unspecified",
-        [SESSION_TTY] = "tty",
-        [SESSION_X11] = "x11",
-        [SESSION_WAYLAND] = "wayland",
-        [SESSION_MIR] = "mir",
-        [SESSION_WEB] = "web",
+        [SESSION_TTY]         = "tty",
+        [SESSION_X11]         = "x11",
+        [SESSION_WAYLAND]     = "wayland",
+        [SESSION_MIR]         = "mir",
+        [SESSION_WEB]         = "web",
 };
 
 DEFINE_STRING_TABLE_LOOKUP(session_type, SessionType);
 
 static const char* const session_class_table[_SESSION_CLASS_MAX] = {
-        [SESSION_USER] = "user",
-        [SESSION_GREETER] = "greeter",
+        [SESSION_USER]        = "user",
+        [SESSION_GREETER]     = "greeter",
         [SESSION_LOCK_SCREEN] = "lock-screen",
-        [SESSION_BACKGROUND] = "background"
+        [SESSION_BACKGROUND]  = "background",
 };
 
 DEFINE_STRING_TABLE_LOOKUP(session_class, SessionClass);
 
 static const char* const kill_who_table[_KILL_WHO_MAX] = {
         [KILL_LEADER] = "leader",
-        [KILL_ALL] = "all"
+        [KILL_ALL]    = "all",
 };
 
 DEFINE_STRING_TABLE_LOOKUP(kill_who, KillWho);
 
 static const char* const tty_validity_table[_TTY_VALIDITY_MAX] = {
-        [TTY_FROM_PAM] = "from-pam",
-        [TTY_FROM_UTMP] = "from-utmp",
+        [TTY_FROM_PAM]          = "from-pam",
+        [TTY_FROM_UTMP]         = "from-utmp",
         [TTY_UTMP_INCONSISTENT] = "utmp-inconsistent",
 };
 
index b87c7316721353360db6a7df0c3b4198e8726d8f..1b59bdbe74ef8264de4fd7438a3808c44f1ec780 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct Session Session;
index 307462f749b27355f2d431d4428525263f86efea..414d431217dff9c42e9423ef12f30cfe418f8320 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index b3f990c5af720e608f689f28834a4387b6ae7ae3..d2f24ced636779941d7353ddd37991b2fee1ccb1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 9cb4dce641fbb6ea52f78e080fbac55e19b30cc1..9b3ec07906ed94d60a2494e92c18918040d26720 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <unistd.h>
index f8f172cb0f6d5ab4421a614b59a8dd3743890501..2c5f993faaab07b2d487ee1844ae769b5142c89e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct User User;
index d2a5890277dff631e5357d3232456eec835df38d..dfbbb641f3ba61d310173b153f66a4e93d0a6850 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <unistd.h>
index 677a501e9821fa3d879dd51d18d7584a1afa551a..3ddc7a074af521a6b71f6f9ed564fb9f827b6fe1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -14,6 +14,7 @@
 #include "bus-log-control-api.h"
 #include "bus-polkit.h"
 #include "cgroup-util.h"
+#include "daemon-util.h"
 #include "def.h"
 #include "device-util.h"
 #include "dirent-util.h"
@@ -921,14 +922,13 @@ static void manager_gc(Manager *m, bool drop_not_started) {
                 LIST_REMOVE(gc_queue, m->session_gc_queue, session);
                 session->in_gc_queue = false;
 
-                /* First, if we are not closing yet, initiate stopping */
+                /* First, if we are not closing yet, initiate stopping. */
                 if (session_may_gc(session, drop_not_started) &&
                     session_get_state(session) != SESSION_CLOSING)
                         (void) session_stop(session, /* force = */ false);
 
-                /* Normally, this should make the session referenced
-                 * again, if it doesn't then let's get rid of it
-                 * immediately */
+                /* Normally, this should make the session referenced again, if it doesn't then let's get rid
+                 * of it immediately. */
                 if (session_may_gc(session, drop_not_started)) {
                         (void) session_finalize(session);
                         session_free(session);
@@ -1156,6 +1156,7 @@ static int manager_run(Manager *m) {
 
 static int run(int argc, char *argv[]) {
         _cleanup_(manager_unrefp) Manager *m = NULL;
+        _cleanup_(notify_on_cleanup) const char *notify_message = NULL;
         int r;
 
         log_set_facility(LOG_AUTH);
@@ -1175,9 +1176,9 @@ static int run(int argc, char *argv[]) {
         if (r < 0)
                 return r;
 
-        /* Always create the directories people can create inotify watches in. Note that some applications might check
-         * for the existence of /run/systemd/seats/ to determine whether logind is available, so please always make
-         * sure these directories are created early on and unconditionally. */
+        /* Always create the directories people can create inotify watches in. Note that some applications
+         * might check for the existence of /run/systemd/seats/ to determine whether logind is available, so
+         * please always make sure these directories are created early on and unconditionally. */
         (void) mkdir_label("/run/systemd/seats", 0755);
         (void) mkdir_label("/run/systemd/users", 0755);
         (void) mkdir_label("/run/systemd/sessions", 0755);
@@ -1194,19 +1195,8 @@ static int run(int argc, char *argv[]) {
         if (r < 0)
                 return log_error_errno(r, "Failed to fully start up daemon: %m");
 
-        log_debug("systemd-logind running as pid "PID_FMT, getpid_cached());
-        (void) sd_notify(false,
-                         "READY=1\n"
-                         "STATUS=Processing requests...");
-
-        r = manager_run(m);
-
-        log_debug("systemd-logind stopped as pid "PID_FMT, getpid_cached());
-        (void) sd_notify(false,
-                         "STOPPING=1\n"
-                         "STATUS=Shutting down...");
-
-        return r;
+        notify_message = notify_start(NOTIFY_READY, NOTIFY_STOPPING);
+        return manager_run(m);
 }
 
 DEFINE_MAIN_FUNCTION(run);
index 82d319a9a26203d2e20712cf9a1d622ba5ca6917..49d1f5f957cf476fde4c74f1c2ee4ef02f6b9487 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 0a7d3d5440589e6e8f19931febacf88c857a1c80..e09610960bfd228aac03ede7ca7c0ca6ae31d727 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 systemd_logind_sources = files('''
         logind.c
@@ -74,8 +74,10 @@ if conf.get('ENABLE_LOGIND') == 1
                 input : 'logind.conf.in',
                 output : 'logind.conf',
                 configuration : substs)
-        install_data(logind_conf,
-                     install_dir : pkgsysconfdir)
+        if install_sysconfdir
+                install_data(logind_conf,
+                             install_dir : pkgsysconfdir)
+        endif
 
         install_data('org.freedesktop.login1.conf',
                      install_dir : dbuspolicydir)
index df46e417c8fc7baa59a02b878de4bacb4c1a5fd3..ac14942ba9722cfa50b31cdb906b6abfded62ab5 100644 (file)
@@ -3,7 +3,7 @@
         "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   This file is part of systemd.
 
index 1d269c1070d78a4684aa95cbf76d643d205990dc..80ebb39f3028c06e01df7c5f3a9422457b7b203c 100644 (file)
@@ -3,7 +3,7 @@
         "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   This file is part of systemd.
 
index 68f1ed0f4879bc15f21bc9dc9399b895c6a8685a..6d443cf69f6c5c7ee362998d6777c5713f000ee4 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 16f42895854df7fa5ec58c3bf5eb4728e1e680e0..8e7a94db55ea87a981b56fe9c62ed5c8a624f319 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <endian.h>
 #include <errno.h>
index 030a00ecb7ce85bb6b8028d6976475da3c03c26a..130cf6a97109d0571b52bfa5173d83f14accf6a4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 {
 global:
index 9b7fc203967c297c5cb88f9fea0ffe03e50233e7..5a19dbfeff951d4ee5992da9208f730a0b037491 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index c05b977532a0d946943d0aebed08bff0cb10c292..32ccbf3de4b3ff5168f0bea278c0a97b38c3d7cd 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/types.h>
index 7f9013bf9324943b387b78d3b10423c964833e6d..dbe79c7074d16eaaa52e10ed90e7d807208e8277 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 #include <fcntl.h>
index 02ff57ab10f29dc6d4683430966b3aa2def0e5bd..d3de9c495815db01bbd33ad60d0adc4a60eb10a0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "login-util.h"
 #include "macro.h"
index 02b871968e82390cb7c3e678738c34c983b02568..9d16685082c3a4c352e4263de52d20fb4fa25fda 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "logind-action.h"
 #include "logind-session.h"
index 84d8f1e8fde486a1930c93c81e1548ed0c1d372f..9b5bdcc3ffd34902a3ce49be55216f727bc50622 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdint.h>
 #include <sys/mount.h>
index 872b00c158e4df42a0a37b8fc3652bbc34503d7e..c35da05ffc430b022ec5267e21146b07014ce158 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <getopt.h>
@@ -128,7 +128,7 @@ static int run(int argc, char *argv[]) {
                 if (r < 0)
                         return log_error_errno(r, "Failed to read machine ID back: %m");
         } else {
-                r = machine_id_setup(arg_root, SD_ID128_NULL, &id);
+                r = machine_id_setup(arg_root, false, SD_ID128_NULL, &id);
                 if (r < 0)
                         return r;
         }
index 740684ce339361219e22b8fbc97140c88dec28eb..c157aaf33cbc183f29480ec003bf9a3a7f326844 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/file.h>
 #include <sys/mount.h>
index d785c10817dfaf590fd0fd444625062655b8fe8b..4b00203bff2f526e8c98752c2d6ebd28a6a7440a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "bus-object.h"
index 931e6d7232591cec40bd04e2c5e651724b848429..bb67beb665b10bc166dd181d7c275ea87f4f6602 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sys/mount.h>
index 7080092bcf78cdfc731a079e5487b87bc942037f..1c114f47c31aca4350d2aeef229669ed66e528d4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index ace84edbb4ecd6a5c3996b18e5c21137b1895702..537b0cd77939ad466cb079370e6f12bcfc75e50f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <unistd.h>
index 634c5fc648854aeddeeace7bb8ca987f486fb2e7..2f627157a3ad48cbe1273a14c31716b9d076eb6e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct Machine Machine;
index 4869797b1e22c71a69c457cc6f316f66bd05f112..4a3279d2640810f3ab3b1c48b109da0b907b3300 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <arpa/inet.h>
 #include <errno.h>
index 2ff155d47c42f845459efb683eac7e28a2dbfc8b..1416fbf82335b62c386fd623b09645d0137c0e81 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "machined.h"
 #include "nscd-flush.h"
index 6d4a705c47efd23bb17daa9138e45d220de764e0..494813e334813da904392174bd51419e5ebdbc89 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <unistd.h>
index de8cdeb87da2ced379cd055f164132b1669ce8de..2d6c1991a4ece5e654736d82dbd1ba2cc69867ee 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "format-util.h"
 #include "machined-varlink.h"
index 42e1c3f4a535d0613500cf051807dcee7d313576..f26bbe588c319882070a909595caa7576517be14 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "machined.h"
index 2828ed61b0353e393c5bc6c8a617f3f6b8960c25..c3c08d181d600bb6e30a58ce4ec7e436ffd66b96 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <string.h>
index c83017acb897034f51595534c44acda30c4f8d93..6e4182bbd65d667b89e0e66c99078bbae50f9be5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 291630ece988b445daa600cb8e728a63985a744f..ebbd46d4f25e1b7a2135f18e2bf243edeab3752f 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 systemd_machined_sources = files('''
         machined.c
index 42c51f36548e910685354dd7d473794bd31d94ac..34565e3e69532f93be43a89a9e9d5bb9641b2ffb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/wait.h>
 
index 0e3302856fae0ff75dd5950e6c5eb8e5755024fc..fd4828878d74a81e0b2615cb300b2dc1c6bda5f8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/types.h>
index 039c3d4513271ebc9628ea779399e35fa485fce0..ddf5ec05c6d92dcc862f78223141bc2a40c55b0f 100644 (file)
@@ -3,7 +3,7 @@
         "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   This file is part of systemd.
 
index d07bcae6eb216ab0622b2f4b171afd8549c8c6a4..64b73c1f2465923994510d6e617ec2de09ad9cea 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 04db7d82591468c97ea5de9af2ac889b065808bb..0e51755087b7752a4b70525d1a6ca9cdbbdd4dba 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "machine.h"
 #include "test-tables.h"
index 337a460318d0cb8a706d0e7bb6889e8d30f1634f..2f0cef5ff93c6207467e77ca1393e5833b928135 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <getopt.h>
index 9e570339992fe834496eb45a114026e9c23b7cf1..673f85519816dbec555e33090e693767f4c856d3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 
index 78c8d0c2b53db34361e18d97d879a177307c5253..ddabe1c27b1adfd77c3292d38c4ba47557097997 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "fd-util.h"
 #include "fs-util.h"
index 732b5b21f4527b39683077027127f979b7f8434a..1292ebacd1776506c59b21a5a74ffb9b33ba6912 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "fd-util.h"
 #include "fs-util.h"
index 61a741e5d25fce8f209604f2ed31b9fef6068ca4..f9cace70f75a9174f62876432f337b72f83705ea 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 
index 465b3eddc2f6b644413c2bfc2ad0b491e37707f1..2fa21a067a4d3d7a142676a7c0e6e1025eca4943 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "ether-addr-util.h"
 #include "fd-util.h"
index 3d75b132def6cf44656154b1ab682f7fb3c4d058..86bcaec1193451c8d6d6ca2a50807daa41caff39 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <net/ethernet.h>
index efcbdefda0f170375be95693390c3675aaefc2dc..e658d893335b700a450b2e46fda2898fe1fe0cd5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "macro.h"
 #include "network-generator.h"
index c2a197162f2c9931debb3267a9e7310f650ea466..4123873c60133cb2764c863120f1c09c5f7420bf 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 sources = files('''
         netdev/bareudp.c
@@ -171,7 +171,7 @@ systemd_networkd_wait_online_sources = files('''
         wait-online/manager.c
         wait-online/manager.h
         wait-online/wait-online.c
-'''.split()) + network_internal_h
+'''.split())
 
 networkctl_sources = files('networkctl.c')
 
@@ -214,7 +214,6 @@ if conf.get('ENABLE_NETWORKD') == 1
         libnetworkd_core = static_library(
                 'networkd-core',
                 sources,
-                network_internal_h,
                 networkd_gperf_c,
                 networkd_network_gperf_c,
                 netdev_gperf_c,
@@ -236,8 +235,10 @@ if conf.get('ENABLE_NETWORKD') == 1
                              install_dir : polkitpkladir)
         endif
 
-        install_data('networkd.conf',
-                     install_dir : pkgsysconfdir)
+        if install_sysconfdir
+                install_data('networkd.conf',
+                             install_dir : pkgsysconfdir)
+        endif
 
         fuzzers += [
     [['src/network/fuzz-netdev-parser.c',
index 03c3ce53119b3a2adc29d5c717cf443e49d25239..22c0e49d94ced74cd57a88d6f38ed28c1d1dfc87 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 
 #include "bareudp.h"
index 105475038d24ebd665a19bba4d69c881f924d6c9..ea80bbf800ff4724a72f7abcae78f6d8417b5588 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 #pragma once
 
index 3007d6913afc9a32ce3a2aa82bd60af66f7215e8..e27f36067bd616dc47ade2b34d5a0c26f9d588b3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "bond.h"
@@ -469,7 +469,7 @@ int config_parse_ad_actor_system(
         }
         if (ether_addr_is_null(&n) || (n.ether_addr_octet[0] & 0x01)) {
                 log_syntax(unit, LOG_WARNING, filename, line, 0,
-                           "Not a valid MAC address %s, can not be null or multicast. Ignoring assignment.",
+                           "Not an appropriate MAC address %s, cannot be null or multicast. Ignoring assignment.",
                            rvalue);
                 return 0;
         }
index 64b2dd04a2bc56e27e381e29022a08c0564ef673..11d3e9ba26debf9a7b2bae3394ba5557cb579d1f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <netinet/in.h>
index 45d97ac15eeb55b53b48e5f097b3a915ad758a03..38432f157846b00f1fe9057c325c02178d3d1636 100644 (file)
@@ -1,10 +1,9 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 
 #include "bridge.h"
 #include "netlink-util.h"
-#include "network-internal.h"
 #include "networkd-manager.h"
 #include "string-table.h"
 #include "vlan-util.h"
@@ -342,6 +341,47 @@ int config_parse_bridge_igmp_version(
         return 0;
 }
 
+int config_parse_bridge_port_priority(
+                const char *unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
+
+        uint16_t i;
+        int r;
+
+        assert(filename);
+        assert(lvalue);
+        assert(rvalue);
+        assert(data);
+
+        /* This is used in networkd-network-gperf.gperf. */
+
+        r = safe_atou16(rvalue, &i);
+        if (r < 0) {
+                log_syntax(unit, LOG_WARNING, filename, line, r,
+                           "Failed to parse bridge port priority, ignoring: %s", rvalue);
+                return 0;
+        }
+
+        if (i > LINK_BRIDGE_PORT_PRIORITY_MAX) {
+                log_syntax(unit, LOG_WARNING, filename, line, 0,
+                           "Bridge port priority is larger than maximum %u, ignoring: %s",
+                           LINK_BRIDGE_PORT_PRIORITY_MAX, rvalue);
+                return 0;
+        }
+
+        *((uint16_t *)data) = i;
+
+        return 0;
+}
+
 static void bridge_init(NetDev *n) {
         Bridge *b;
 
index ed4f484c946457966dc010fc862e1543bfb18e84..f3276c5c41353d11e4b1e2479aba825fee11622b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <netinet/in.h>
@@ -7,6 +7,9 @@
 #include "conf-parser.h"
 #include "netdev.h"
 
+#define LINK_BRIDGE_PORT_PRIORITY_INVALID 128
+#define LINK_BRIDGE_PORT_PRIORITY_MAX 63
+
 typedef struct Bridge {
         NetDev meta;
 
@@ -45,3 +48,4 @@ MulticastRouter multicast_router_from_string(const char *s) _pure_;
 
 CONFIG_PARSER_PROTOTYPE(config_parse_multicast_router);
 CONFIG_PARSER_PROTOTYPE(config_parse_bridge_igmp_version);
+CONFIG_PARSER_PROTOTYPE(config_parse_bridge_port_priority);
index e06dc02f3aa37bc9b1b913dd87221f41cf4905d5..754ee989520224978ba8f92a377945852d116d61 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "dummy.h"
 
index f935414772becd16497544c21b66f102f82bd7ed..eafdf4b5bf1d70afe85e10ef35b83355a555cc87 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "netdev.h"
index 832cf57deabb741f9a0725379085691409816562..6863257a58948099a218f778b50c9df73bceab34 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/fou.h>
 #include <net/if.h>
index caa3b7600e270629bc2c77e3cd9a79bced78e260..a6f10dfca469990625cdd22c06ca189a014c5ee9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <netinet/in.h>
index b4f865a538a22a2e3b83e92e35bb2c44512e8dec..edf92ec93c4862bfe82d15ecd237cb69f5048ec4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 
index 2ac3c1e8352f0076d36b6fd037dfcbfc627a7f54..b62eb7b76d8619818733fc45e5a54522c145f68c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct Geneve Geneve;
index 7736a162f997f7cd89ecd302fc74f8a7f8190272..16ff49d7f0e7080f104471e08717203ed42d7b0f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 
 #include "ifb.h"
index 761d215894bf593e5449881be1ba7eb3931cd374..badfb4ad1076ad29922d48cdb75b8a99b4d1fa9f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 
 #pragma once
index bd14f625deaa0a95842f75abd203c2a32dcd1d81..92a8f583e3b11381fd623f06615990d33b6a0391 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 
index 8e658184ffce2c7fc3e7a06fadac38de32032687..633b0bd94fca3a8dee0678a2cd832c73a1ed3722 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <netinet/in.h>
index 949f124ccd66fdeb46a0a73677fb57f97d44605b..eeea19764e188d17e3059ce079fd75790e5e3643 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
 #include <linux/l2tp.h>
index d314b9870344d278e1510841885d7ef5a1b3c919..048318d6dff14b0f3c4283820d629dfb5518ff53 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <netinet/in.h>
index 9f0e6f25c1e51739fc889fd33394b102d48a33b7..27fc2fd5e59de8e08298b95083d0445bf9725075 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
 #include <linux/if_ether.h>
@@ -12,7 +12,6 @@
 #include "macsec.h"
 #include "memory-util.h"
 #include "netlink-util.h"
-#include "network-internal.h"
 #include "networkd-manager.h"
 #include "path-util.h"
 #include "socket-util.h"
@@ -987,9 +986,9 @@ static int macsec_read_key_file(NetDev *netdev, SecurityAssociation *sa) {
         (void) warn_file_is_world_accessible(sa->key_file, NULL, NULL, 0);
 
         r = read_full_file_full(
-                        AT_FDCWD, sa->key_file,
+                        AT_FDCWD, sa->key_file, UINT64_MAX, SIZE_MAX,
                         READ_FULL_FILE_SECURE | READ_FULL_FILE_UNHEX | READ_FULL_FILE_WARN_WORLD_READABLE | READ_FULL_FILE_CONNECT_SOCKET,
-                        (char **) &key, &key_len);
+                        NULL, (char **) &key, &key_len);
         if (r < 0)
                 return log_netdev_error_errno(netdev, r,
                                               "Failed to read key from '%s', ignoring: %m",
index 26ad2b7cca9771c848de07267e0c9ca936660c8f..4d88e49514657f9573e37158552d7a533031802e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <netinet/in.h>
index 8f38217789e982f94e170a94bda61f449b3e3d0d..9bdcf627b40fa5ed38809e496e9e7a13f04b2436 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 
index 7bc6eef12df2b3a4e14bdf0a15eb1bf5ab33b61e..cb7eece67f5bd74a2fe60a44789f19904a26e7fa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct MacVlan MacVlan;
index 4e89761f2c9cba85773c053136a0d9ff797fff04..fc577f493c6eef10c189ef6e752ca7ddfaa330fc 100644 (file)
@@ -7,23 +7,23 @@ _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
 #include "bond.h"
 #include "bridge.h"
 #include "conf-parser.h"
+#include "fou-tunnel.h"
 #include "geneve.h"
 #include "ipvlan.h"
+#include "l2tp-tunnel.h"
 #include "macsec.h"
 #include "macvlan.h"
+#include "net-condition.h"
+#include "netdev.h"
 #include "tunnel.h"
 #include "tuntap.h"
 #include "veth.h"
 #include "vlan-util.h"
 #include "vlan.h"
-#include "vxlan.h"
 #include "vrf.h"
-#include "netdev.h"
-#include "network-internal.h"
 #include "vxcan.h"
+#include "vxlan.h"
 #include "wireguard.h"
-#include "fou-tunnel.h"
-#include "l2tp-tunnel.h"
 #include "xfrm.h"
 %}
 struct ConfigPerfItem;
@@ -48,6 +48,7 @@ NetDev.Kind,                              config_parse_netdev_kind,
 NetDev.MTUBytes,                          config_parse_mtu,                          AF_UNSPEC,                     offsetof(NetDev, mtu)
 NetDev.MACAddress,                        config_parse_hwaddr,                       0,                             offsetof(NetDev, mac)
 VLAN.Id,                                  config_parse_vlanid,                       0,                             offsetof(VLan, id)
+VLAN.Protocol,                            config_parse_vlanprotocol,                 0,                             offsetof(VLan, protocol)
 VLAN.GVRP,                                config_parse_tristate,                     0,                             offsetof(VLan, gvrp)
 VLAN.MVRP,                                config_parse_tristate,                     0,                             offsetof(VLan, mvrp)
 VLAN.LooseBinding,                        config_parse_tristate,                     0,                             offsetof(VLan, loose_binding)
index 7bbc5ad3c2adb6009823ad84d4ce2fd397d1d0e7..9223f43b9930a4cd13375088ecca894512072bd0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 #include <netinet/in.h>
@@ -23,7 +23,6 @@
 #include "netdev.h"
 #include "netdevsim.h"
 #include "netlink-util.h"
-#include "network-internal.h"
 #include "networkd-manager.h"
 #include "nlmon.h"
 #include "path-lookup.h"
@@ -401,10 +400,8 @@ int netdev_set_ifindex(NetDev *netdev, sd_netlink_message *message) {
         if (r < 0)
                 return log_netdev_error_errno(netdev, r, "Could not get rtnl message type: %m");
 
-        if (type != RTM_NEWLINK) {
-                log_netdev_error(netdev, "Cannot set ifindex from unexpected rtnl message type.");
-                return -EINVAL;
-        }
+        if (type != RTM_NEWLINK)
+                return log_netdev_error_errno(netdev, SYNTHETIC_ERRNO(EINVAL), "Cannot set ifindex from unexpected rtnl message type.");
 
         r = sd_rtnl_message_link_get_ifindex(message, &ifindex);
         if (r < 0) {
@@ -435,7 +432,7 @@ int netdev_set_ifindex(NetDev *netdev, sd_netlink_message *message) {
         if (!streq(netdev->ifname, received_name)) {
                 log_netdev_error(netdev, "Received newlink with wrong IFNAME %s", received_name);
                 netdev_enter_failed(netdev);
-                return r;
+                return -EINVAL;
         }
 
         r = sd_netlink_message_enter_container(message, IFLA_LINKINFO);
@@ -463,11 +460,10 @@ int netdev_set_ifindex(NetDev *netdev, sd_netlink_message *message) {
         }
 
         if (!streq(kind, received_kind)) {
-                log_netdev_error(netdev,
-                                 "Received newlink with wrong KIND %s, "
-                                 "expected %s", received_kind, kind);
+                log_netdev_error(netdev, "Received newlink with wrong KIND %s, expected %s",
+                                 received_kind, kind);
                 netdev_enter_failed(netdev);
-                return r;
+                return -EINVAL;
         }
 
         netdev->ifindex = ifindex;
@@ -649,7 +645,7 @@ int netdev_join(NetDev *netdev, Link *link, link_netlink_message_handler_t callb
                         return r;
                 break;
         default:
-                assert_not_reached("Can not join independent netdev");
+                assert_not_reached("Cannot join independent netdev");
         }
 
         return 0;
index 0ab9a8e3f3fc9d25fe7726aba1ce99fa806075c9..468fae591c805640a6b6165ef4afb6f6898ad6cc 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-netlink.h"
index bfd2a16035c33539a1b2cd1de3f2ff86285a5a6b..b2814284a4a9d20f49b52776a636f5f6ad6bdc6b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "netdevsim.h"
 
index 4622f4a0c56f3311ffd9355370ac704da7ccdaf0..27adc594ad07fd62e5bda3788b3ea15c0f237ee8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct NetDevSim NetDevSim;
index 30e49a55abce9e6458ac1be52a23af0074c726dc..a8faed5b24580cffbc6421e7dc99b729e3114cce 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "nlmon.h"
 
index b5f65f6140d88215857f76efd4e4efe81a4b12b7..edfc504bca64022533697759e86e306bbd0a1735 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct NLMon NLMon;
index 852aa423b61fbe4283a2b2617b436b538aae11ad..66e8868284829fcdb6ae0f39ac814c173d5bb477 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
 #include <linux/fou.h>
index 6480d93e65d017dc304249abd56ad075085a06b6..d58ded757d76010e9fb56426d2017fb4e112d29e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "in-addr-util.h"
index aef72e7bbb47824f62875db96bece909198fbad4..d9d654495e0de99d361fd21b3a00345e68b9ee96 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 8a80b633da72421a7cfe8abf8efc475acaaeae7e..4d1e643f4313f6ee4def870943b831bde02ca9fc 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct TunTap TunTap;
index 9a0f87b1e187033de68ae5af2342a67b7f4f5627..3621d4c5d86257874f480e13ea21417fedfeeae6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "vcan.h"
 
index d8af07e3cec6d6a0872912cfe17caa09986897da..843984fbee324269a5e7be662361906eb29a2422 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct VCan VCan;
index 8c7c1d053fe94dbf727c39b4ade6ac43a538419a..840a3277b13f1a5d8ec1e978c14707b15e84a993 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <net/if.h>
index 6a0728b1c47fbb402ab15360e84a309ef60fac2f..643f737a885373cb5b6b24ba7f835e9d3ecb8623 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct Veth Veth;
index a4c7192c7d2e3fb0184c1644ee120cf7d4932815..751a037c91a5b07450ef44e93ccf0f7594951fcd 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <net/if.h>
@@ -24,6 +24,12 @@ static int netdev_vlan_fill_message_create(NetDev *netdev, Link *link, sd_netlin
         if (r < 0)
                 return log_netdev_error_errno(netdev, r, "Could not append IFLA_VLAN_ID attribute: %m");
 
+        if (v->protocol >= 0) {
+                r = sd_netlink_message_append_u16(req, IFLA_VLAN_PROTOCOL, htobe16(v->protocol));
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_VLAN_PROTOCOL attribute: %m");
+        }
+
         if (v->gvrp != -1) {
                 flags.mask |= VLAN_FLAG_GVRP;
                 SET_FLAG(flags.flags, VLAN_FLAG_GVRP, v->gvrp);
@@ -76,6 +82,7 @@ static void vlan_init(NetDev *netdev) {
         assert(v);
 
         v->id = VLANID_INVALID;
+        v->protocol = -1;
         v->gvrp = -1;
         v->mvrp = -1;
         v->loose_binding = -1;
index 7f6cb14787d75dc756114700189f327fa3c71ad0..fbaad5a538c640cc7e708bcd2e1bdca4b9b801f3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct VLan VLan;
@@ -9,6 +9,7 @@ struct VLan {
         NetDev meta;
 
         uint16_t id;
+        int protocol;
 
         int gvrp;
         int mvrp;
index a8ed3fadcbebece67f8f73f102205d22dbf785df..ae71ae916cfa3c197deac2b75db00817f7939a37 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 
index a0bff913bd513f41eb983dd0d0cdc4ccc7b3b6dc..87977e230ca1707c981dc02c048d1252d1906c6b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct Vrf Vrf;
index 9614af1068c0947a0f90a2453584eec7ff900585..e4e32ff3909a0bf0359c8f08b917b19f86dc1f82 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/can/vxcan.h>
 
index 4531a673707d810255ef8a1d1765601af9e6de0a..47be3f017dea83ea794c5ac891fa08d3e8d13526 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct VxCan VxCan;
index d941b7d63342672b1da19c961d3fedd51b59fe40..6748f67f8f5aea2e90b02f766774ffe79195a7f8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 
index d836215c466c06bca9589fce8f03038779d71a89..371653cade2c33b1732a66d5fa6970f97f7bac23 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct VxLan VxLan;
index f1de5d41de827d9cc66ce525fa20015f10699ae5..76444bdd7cecab7903c2aed35fb0d171c4b3f65d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2015-2017 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
 ***/
@@ -869,9 +869,9 @@ static int wireguard_read_key_file(const char *filename, uint8_t dest[static WG_
         (void) warn_file_is_world_accessible(filename, NULL, NULL, 0);
 
         r = read_full_file_full(
-                        AT_FDCWD, filename,
+                        AT_FDCWD, filename, UINT64_MAX, SIZE_MAX,
                         READ_FULL_FILE_SECURE | READ_FULL_FILE_UNBASE64 | READ_FULL_FILE_WARN_WORLD_READABLE | READ_FULL_FILE_CONNECT_SOCKET,
-                        &key, &key_len);
+                        NULL, &key, &key_len);
         if (r < 0)
                 return r;
 
index 61113113e4bc98a682ec6bd3e013f271410eb574..b9b5ae9871d6a9cf1c4681a073c7a2913fd3a21f 100644 (file)
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
 #pragma once
 
 typedef struct Wireguard Wireguard;
index ff8ff35689706f641fe3a9a41b3e4b8d236d2d8c..a407c54da4b9fdd3f434246ff1407eaee0aed8d9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "missing_network.h"
 #include "xfrm.h"
index 889d3619b162f4c5c55ffdbbc321dcb865933b23..f56c4f272ac1db5a03beca0050692f2780636388 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "netdev.h"
index 86e53e6da426647b94f4dea6e226a376f20face5..c415fb1a744591dc677e05af362e9262516a78fb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <arpa/inet.h>
 #include <getopt.h>
@@ -44,6 +44,7 @@
 #include "main-func.h"
 #include "netlink-util.h"
 #include "network-internal.h"
+#include "network-util.h"
 #include "pager.h"
 #include "parse-util.h"
 #include "pretty-print.h"
@@ -135,7 +136,7 @@ typedef struct LinkInfo {
         sd_device *sd_device;
         int ifindex;
         unsigned short iftype;
-        struct ether_addr mac_address;
+        hw_addr_data hw_address;
         struct ether_addr permanent_mac_address;
         uint32_t master;
         uint32_t mtu;
@@ -416,13 +417,14 @@ static int decode_link(sd_netlink_message *m, LinkInfo *info, char **patterns, b
         info->alternative_names = TAKE_PTR(altnames);
 
         info->has_mac_address =
-                sd_netlink_message_read_ether_addr(m, IFLA_ADDRESS, &info->mac_address) >= 0 &&
-                memcmp(&info->mac_address, &ETHER_ADDR_NULL, sizeof(struct ether_addr)) != 0;
+                netlink_message_read_hw_addr(m, IFLA_ADDRESS, &info->hw_address) >= 0 &&
+                memcmp(&info->hw_address, &HW_ADDR_NULL, sizeof(hw_addr_data)) != 0;
 
         info->has_permanent_mac_address =
                 ethtool_get_permanent_macaddr(NULL, info->name, &info->permanent_mac_address) >= 0 &&
                 memcmp(&info->permanent_mac_address, &ETHER_ADDR_NULL, sizeof(struct ether_addr)) != 0 &&
-                memcmp(&info->permanent_mac_address, &info->mac_address, sizeof(struct ether_addr)) != 0;
+                (info->hw_address.length != sizeof(struct ether_addr) ||
+                 memcmp(&info->permanent_mac_address, info->hw_address.addr.bytes, sizeof(struct ether_addr)) != 0);
 
         (void) sd_netlink_message_read_u32(m, IFLA_MTU, &info->mtu);
         (void) sd_netlink_message_read_u32(m, IFLA_MIN_MTU, &info->min_mtu);
@@ -703,7 +705,7 @@ static int list_links(int argc, char *argv[], void *userdata) {
                         setup_state = strdup("unmanaged");
                 setup_state_to_color(setup_state, &on_color_setup, &off_color_setup);
 
-                t = link_get_type_string(links[i].iftype, links[i].sd_device);
+                t = link_get_type_string(links[i].sd_device, links[i].iftype);
 
                 r = table_add_many(table,
                                    TABLE_INT, links[i].ifindex,
@@ -1427,7 +1429,7 @@ static int link_status_one(
                         (void) sd_device_get_property_value(info->sd_device, "ID_MODEL", &model);
         }
 
-        t = link_get_type_string(info->iftype, info->sd_device);
+        t = link_get_type_string(info->sd_device, info->iftype);
 
         (void) sd_network_link_get_network_file(info->ifindex, &network);
 
@@ -1526,9 +1528,9 @@ static int link_status_one(
 
         if (info->has_mac_address) {
                 _cleanup_free_ char *description = NULL;
-                char ea[ETHER_ADDR_TO_STRING_MAX];
 
-                (void) ieee_oui(hwdb, &info->mac_address, &description);
+                if (info->hw_address.length == ETH_ALEN)
+                        (void) ieee_oui(hwdb, &info->hw_address.addr.ether, &description);
 
                 r = table_add_many(table,
                                    TABLE_EMPTY,
@@ -1536,7 +1538,7 @@ static int link_status_one(
                 if (r < 0)
                         return table_log_add_error(r);
                 r = table_add_cell_stringf(table, NULL, "%s%s%s%s",
-                                           ether_addr_to_string(&info->mac_address, ea),
+                                           HW_ADDR_TO_STR(&info->hw_address),
                                            description ? " (" : "",
                                            strempty(description),
                                            description ? ")" : "");
index 66b192256e98373735b99150786c995a8fe3b53c..f933a1da945176353f0204c7661f7f7ac8d5b0c4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 #include <linux/if_addrlabel.h>
index b92828c72e25084d14cf95cb7e2da98cdcdda7c7..11fdd9abfe2ffab4aee57555ff4cd74d3acd0cbf 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index c732b6c56e44d4817e3a3914cb666b73ad2a9e21..7e27db66115dfb09affbf874df55a4a3863421b8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "networkd-address-pool.h"
index c53fe7407febbd3438444b985f2d840a1fc57aae..93bdec82e3fced798a33ee085b1b673dcbd2ea3d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "in-addr-util.h"
index a6f8bcac145bbabe5f410e78d3cffeb2aed6ae5c..c38443763ab432b180c1cb84588c5653941b1ca2 100644 (file)
@@ -1,6 +1,7 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
+#include <net/if_arp.h>
 
 #include "alloc-util.h"
 #include "firewall-util.h"
@@ -21,16 +22,24 @@ int generate_ipv6_eui_64_address(const Link *link, struct in6_addr *ret) {
         assert(link);
         assert(ret);
 
+        if (link->iftype == ARPHRD_INFINIBAND) {
+                /* see RFC4391 section 8 */
+                memcpy(&ret->s6_addr[8], &link->hw_addr.addr.infiniband[12], 8);
+                ret->s6_addr[8] ^= 1 << 1;
+
+                return 0;
+        }
+
         /* see RFC4291 section 2.5.1 */
-        ret->s6_addr[8]  = link->mac.ether_addr_octet[0];
+        ret->s6_addr[8]  = link->hw_addr.addr.ether.ether_addr_octet[0];
         ret->s6_addr[8] ^= 1 << 1;
-        ret->s6_addr[9]  = link->mac.ether_addr_octet[1];
-        ret->s6_addr[10] = link->mac.ether_addr_octet[2];
+        ret->s6_addr[9]  = link->hw_addr.addr.ether.ether_addr_octet[1];
+        ret->s6_addr[10] = link->hw_addr.addr.ether.ether_addr_octet[2];
         ret->s6_addr[11] = 0xff;
         ret->s6_addr[12] = 0xfe;
-        ret->s6_addr[13] = link->mac.ether_addr_octet[3];
-        ret->s6_addr[14] = link->mac.ether_addr_octet[4];
-        ret->s6_addr[15] = link->mac.ether_addr_octet[5];
+        ret->s6_addr[13] = link->hw_addr.addr.ether.ether_addr_octet[3];
+        ret->s6_addr[14] = link->hw_addr.addr.ether.ether_addr_octet[4];
+        ret->s6_addr[15] = link->hw_addr.addr.ether.ether_addr_octet[5];
 
         return 0;
 }
@@ -257,7 +266,7 @@ static int address_set_masquerade(Address *address, bool add) {
         if (r < 0)
                 return r;
 
-        r = fw_add_masquerade(add, AF_INET, 0, &masked, address->prefixlen, NULL, NULL, 0);
+        r = fw_add_masquerade(add, AF_INET, &masked, address->prefixlen);
         if (r < 0)
                 return r;
 
@@ -528,7 +537,7 @@ static bool link_is_static_address_configured(const Link *link, const Address *a
         return false;
 }
 
-static bool link_address_is_dynamic(const Link *link, const Address *address) {
+bool link_address_is_dynamic(const Link *link, const Address *address) {
         Route *route;
 
         assert(link);
@@ -980,6 +989,7 @@ static int static_address_configure(const Address *address, Link *link, bool upd
 
 int link_set_addresses(Link *link) {
         Address *ad;
+        Prefix *p;
         int r;
 
         assert(link);
@@ -1000,32 +1010,28 @@ int link_set_addresses(Link *link) {
                         return r;
         }
 
-        if (link->network->router_prefix_delegation & RADV_PREFIX_DELEGATION_STATIC) {
-                Prefix *p;
-
-                HASHMAP_FOREACH(p, link->network->prefixes_by_section) {
-                        _cleanup_(address_freep) Address *address = NULL;
+        HASHMAP_FOREACH(p, link->network->prefixes_by_section) {
+                _cleanup_(address_freep) Address *address = NULL;
 
-                        if (!p->assign)
-                                continue;
+                if (!p->assign)
+                        continue;
 
-                        r = address_new(&address);
-                        if (r < 0)
-                                return log_oom();
+                r = address_new(&address);
+                if (r < 0)
+                        return log_oom();
 
-                        r = sd_radv_prefix_get_prefix(p->radv_prefix, &address->in_addr.in6, &address->prefixlen);
-                        if (r < 0)
-                                return log_link_warning_errno(link, r, "Could not get RA prefix: %m");
+                r = sd_radv_prefix_get_prefix(p->radv_prefix, &address->in_addr.in6, &address->prefixlen);
+                if (r < 0)
+                        return log_link_warning_errno(link, r, "Could not get RA prefix: %m");
 
-                        r = generate_ipv6_eui_64_address(link, &address->in_addr.in6);
-                        if (r < 0)
-                                return log_link_warning_errno(link, r, "Could not generate EUI64 address: %m");
+                r = generate_ipv6_eui_64_address(link, &address->in_addr.in6);
+                if (r < 0)
+                        return log_link_warning_errno(link, r, "Could not generate EUI64 address: %m");
 
-                        address->family = AF_INET6;
-                        r = static_address_configure(address, link, true);
-                        if (r < 0)
-                                return r;
-                }
+                address->family = AF_INET6;
+                r = static_address_configure(address, link, true);
+                if (r < 0)
+                        return r;
         }
 
         if (link->address_messages == 0) {
@@ -1251,60 +1257,6 @@ int manager_rtnl_process_address(sd_netlink *rtnl, sd_netlink_message *message,
         return 1;
 }
 
-int link_serialize_addresses(Link *link, FILE *f) {
-        bool space = false;
-        Address *a;
-
-        assert(link);
-
-        fputs("ADDRESSES=", f);
-        SET_FOREACH(a, link->addresses) {
-                _cleanup_free_ char *address_str = NULL;
-
-                if (in_addr_to_string(a->family, &a->in_addr, &address_str) < 0)
-                        continue;
-
-                fprintf(f, "%s%s/%u", space ? " " : "", address_str, a->prefixlen);
-                space = true;
-        }
-        fputc('\n', f);
-
-        return 0;
-}
-
-int link_deserialize_addresses(Link *link, const char *addresses) {
-        int r;
-
-        assert(link);
-
-        for (const char *p = addresses;; ) {
-                _cleanup_(address_freep) Address *tmp = NULL;
-                _cleanup_free_ char *address_str = NULL;
-
-                r = extract_first_word(&p, &address_str, NULL, 0);
-                if (r < 0)
-                        return log_link_debug_errno(link, r, "Failed to parse ADDRESSES=: %m");
-                if (r == 0)
-                        return 0;
-
-                r = address_new(&tmp);
-                if (r < 0)
-                        return log_oom();
-
-                r = in_addr_prefix_from_string_auto(address_str, &tmp->family, &tmp->in_addr, &tmp->prefixlen);
-                if (r < 0) {
-                        log_link_debug_errno(link, r, "Failed to parse address, ignoring: %s", address_str);
-                        continue;
-                }
-
-                r = address_add(link, tmp, NULL);
-                if (r < 0)
-                        log_link_debug_errno(link, r, "Failed to add address %s, ignoring: %m", address_str);
-        }
-
-        return 0;
-}
-
 static void static_address_on_acd(sd_ipv4acd *acd, int event, void *userdata) {
         _cleanup_free_ char *pretty = NULL;
         Address *address;
@@ -1341,7 +1293,7 @@ static void static_address_on_acd(sd_ipv4acd *acd, int event, void *userdata) {
                 assert_not_reached("Invalid IPv4ACD event.");
         }
 
-        sd_ipv4acd_stop(acd);
+        (void) sd_ipv4acd_stop(acd);
 
         return;
 }
@@ -1376,7 +1328,7 @@ static int ipv4_dad_configure(Address *address) {
         if (r < 0)
                 return r;
 
-        r = sd_ipv4acd_set_mac(address->acd, &address->link->mac);
+        r = sd_ipv4acd_set_mac(address->acd, &address->link->hw_addr.addr.ether);
         if (r < 0)
                 return r;
 
@@ -1402,13 +1354,11 @@ static int ipv4_dad_update_mac_one(Address *address) {
 
         running = sd_ipv4acd_is_running(address->acd);
 
-        if (running) {
-                r = sd_ipv4acd_stop(address->acd);
-                if (r < 0)
-                        return r;
-        }
+        r = sd_ipv4acd_stop(address->acd);
+        if (r < 0)
+                return r;
 
-        r = sd_ipv4acd_set_mac(address->acd, &address->link->mac);
+        r = sd_ipv4acd_set_mac(address->acd, &address->link->hw_addr.addr.ether);
         if (r < 0)
                 return r;
 
@@ -1443,9 +1393,6 @@ int ipv4_dad_stop(Link *link) {
         assert(link);
 
         SET_FOREACH(address, link->addresses) {
-                if (!address->acd)
-                        continue;
-
                 k = sd_ipv4acd_stop(address->acd);
                 if (k < 0 && r >= 0)
                         r = k;
@@ -1454,6 +1401,15 @@ int ipv4_dad_stop(Link *link) {
         return r;
 }
 
+void ipv4_dad_unref(Link *link) {
+        Address *address;
+
+        assert(link);
+
+        SET_FOREACH(address, link->addresses)
+                address->acd = sd_ipv4acd_unref(address->acd);
+}
+
 int config_parse_broadcast(
                 const char *unit,
                 const char *filename,
index c0552979c5f3b2cf1e63adc0a9077d6cb3e0f330..036ac7a5646a84adfcc62c4acc82a1b0bf589406 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
@@ -62,9 +62,9 @@ DEFINE_NETWORK_SECTION_FUNCTIONS(Address, address_free);
 int link_set_addresses(Link *link);
 int link_drop_addresses(Link *link);
 int link_drop_foreign_addresses(Link *link);
-int link_serialize_addresses(Link *link, FILE *f);
-int link_deserialize_addresses(Link *link, const char *addresses);
+bool link_address_is_dynamic(const Link *link, const Address *address);
 
+void ipv4_dad_unref(Link *link);
 int ipv4_dad_stop(Link *link);
 int ipv4_dad_update_mac(Link *link);
 
index 23ca4f9fac84af2dd8f15182fb51f4d9f616f5ee..e53c73c30c0a7870c903820f0e65fe19173b0587 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2016 BISDN GmbH. All rights reserved.
 ***/
index d13ea30151eae6ec72f6ba352f86f8eeae722d43..938b7901f19a73603bb157dbcb2f1e421cd1712f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index e5504f77381c9d4405466bbd8217ae29e9eea27e..86103206981864f4a96e1c437b6166b7ebbd40b3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 #include <linux/can/netlink.h>
@@ -195,10 +195,8 @@ static int link_set_can(Link *link) {
 
                 format_timespan(time_string, FORMAT_TIMESPAN_MAX, restart_ms * 1000, MSEC_PER_SEC);
 
-                if (restart_ms > UINT32_MAX) {
-                        log_link_error(link, "restart timeout (%s) too big.", time_string);
-                        return -ERANGE;
-                }
+                if (restart_ms > UINT32_MAX)
+                        return log_link_error_errno(link, SYNTHETIC_ERRNO(ERANGE), "restart timeout (%s) too big.", time_string);
 
                 log_link_debug(link, "Setting restart = %s", time_string);
 
index 30e99b189d3def7491bf873991c6b0ce1d076de9..7a2705bf9a09fc0374c133b3b8fcde20b819c388 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "conf-parser.h"
index 233ef9f4f640c8cac3b96c78238e72f18f4f59fd..bf51624ec489984b3dd8a8428a2fd328d9c7a46a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2014 Vinay Kulkarni <kulkarniv@vmware.com>
  ***/
index 88a2c64031c22fcc5a497c3e380d2699695a4074..b485e9e5418c695a8ba70bbad14b0f7cac388fbf 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index 46d27f8f544c13dea8b612b28b3d59f43c745959..4dd98a2c61ed1ce2d40be125c0fa8b95df31a8c0 100644 (file)
@@ -1,8 +1,9 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
 #include <linux/if_arp.h>
 
+#include "bus-error.h"
 #include "dhcp-internal.h"
 #include "dhcp6-internal.h"
 #include "escape.h"
@@ -26,21 +27,46 @@ bool link_dhcp_enabled(Link *link, int family) {
         if (link->flags & IFF_LOOPBACK)
                 return false;
 
-        if (!link->network)
-                return false;
-
-        if (link->network->bond)
+        if (link->iftype == ARPHRD_CAN)
                 return false;
 
-        if (link->iftype == ARPHRD_CAN)
+        if (!link->network)
                 return false;
 
         return link->network->dhcp & (family == AF_INET ? ADDRESS_FAMILY_IPV4 : ADDRESS_FAMILY_IPV6);
 }
 
+void network_adjust_dhcp(Network *network) {
+        assert(network);
+        assert(network->dhcp >= 0);
+
+        if (network->dhcp == ADDRESS_FAMILY_NO)
+                return;
+
+        /* Bonding slave does not support addressing. */
+        if (network->bond) {
+                log_warning("%s: Cannot enable DHCP= when Bond= is specified, disabling DHCP=.",
+                            network->filename);
+                network->dhcp = ADDRESS_FAMILY_NO;
+                return;
+        }
+
+        if (!FLAGS_SET(network->link_local, ADDRESS_FAMILY_IPV6) &&
+            FLAGS_SET(network->dhcp, ADDRESS_FAMILY_IPV6)) {
+                log_warning("%s: DHCPv6 client is enabled but IPv6 link local addressing is disabled. "
+                            "Disabling DHCPv6 client.", network->filename);
+                SET_FLAG(network->dhcp, ADDRESS_FAMILY_IPV6, false);
+        }
+}
+
+static struct DUID fallback_duid = { .type = DUID_TYPE_EN };
 DUID* link_get_duid(Link *link) {
         if (link->network->duid.type != _DUID_TYPE_INVALID)
                 return &link->network->duid;
+        else if (link->hw_addr.length == 0 && IN_SET(link->manager->duid.type, DUID_TYPE_LLT, DUID_TYPE_LL))
+                /* Fallback to DUID that works without MAC address.
+                 * This is useful for tunnel devices without MAC address. */
+                return &fallback_duid;
         else
                 return &link->manager->duid;
 }
@@ -74,18 +100,20 @@ static int get_product_uuid_handler(sd_bus_message *m, void *userdata, sd_bus_er
 
         e = sd_bus_message_get_error(m);
         if (e) {
-                log_error_errno(sd_bus_error_get_errno(e),
-                                "Could not get product UUID. Falling back to use machine-app-specific ID as DUID-UUID: %s",
-                                e->message);
+                r = sd_bus_error_get_errno(e);
+                log_warning_errno(r, "Could not get product UUID. Falling back to use machine-app-specific ID as DUID-UUID: %s",
+                                  bus_error_message(e, r));
                 goto configure;
         }
 
         r = sd_bus_message_read_array(m, 'y', &a, &sz);
-        if (r < 0)
+        if (r < 0) {
+                log_warning_errno(r, "Failed to get product UUID. Falling back to use machine-app-specific ID as DUID-UUID: %m");
                 goto configure;
+        }
 
         if (sz != sizeof(sd_id128_t)) {
-                log_error("Invalid product UUID. Falling back to use machine-app-specific ID as DUID-UUID.");
+                log_warning("Invalid product UUID. Falling back to use machine-app-specific ID as DUID-UUID.");
                 goto configure;
         }
 
index e3982a7ef1617bea4f352922c15718f523138754..78c149ebccb5209ca41ffb37f984150b8d2aea7e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "conf-parser.h"
@@ -9,6 +9,7 @@
 
 typedef struct Link Link;
 typedef struct Manager Manager;
+typedef struct Network Network;
 
 typedef enum DHCPUseDomains {
         DHCP_USE_DOMAINS_NO,
@@ -46,6 +47,8 @@ static inline bool link_dhcp6_enabled(Link *link) {
         return link_dhcp_enabled(link, AF_INET6);
 }
 
+void network_adjust_dhcp(Network *network);
+
 DUID* link_get_duid(Link *link);
 int link_configure_duid(Link *link);
 int manager_request_product_uuid(Manager *m, Link *link);
index 3de8c16d897221fe8d4e2f2ab70c50a2c15c4a92..32f4baed78c6ff2c97750802fe51ff22ac8e4bf0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-dhcp-server.h"
 
index 49164ff0bb596c03c67141e32d3b9be603855353..7191478200229560baca13fa75f9a5ebd80cde4c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 0155ab2de2a5128cef79276b6e5d0c26ab51e7e6..cf279c640dc75cef0f045149de749236d39ffd18 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
 #include <linux/if_arp.h>
index 2250a30af415794464a1e68fc924d7a0baa624ad..4bd5120ea0b2c0d8ac1ef9ce3825b2941cf3d7d5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "conf-parser.h"
index 2920e615f3c4a024554c86eeac882dbfd98c179b..8f661c646fd678be2d95966c7be44d37791c5877 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
 #include <netinet/ip.h>
@@ -17,7 +17,7 @@
 #include "networkd-manager.h"
 #include "networkd-network.h"
 #include "string-table.h"
-#include "string-util.h"
+#include "strv.h"
 #include "sysctl-util.h"
 #include "web-util.h"
 
@@ -70,6 +70,10 @@ static void dhcp4_check_ready(Link *link) {
                 return;
         }
 
+        r = sd_ipv4ll_stop(link->ipv4ll);
+        if (r < 0)
+                log_link_warning_errno(link, r, "Failed to drop IPv4 link-local address, ignoring: %m");
+
         link_check_ready(link);
 }
 
@@ -388,14 +392,21 @@ static int link_set_dhcp_routes(Link *link) {
                                 return log_link_error_errno(link, r, "Could not set router: %m");
 
                         HASHMAP_FOREACH(rt, link->network->routes_by_section) {
-                                if (!rt->gateway_from_dhcp)
+                                if (!rt->gateway_from_dhcp_or_ra)
                                         continue;
 
-                                if (rt->family != AF_INET)
+                                if (rt->gw_family != AF_INET)
                                         continue;
 
-                                rt->gw_family = AF_INET;
                                 rt->gw.in = router[0];
+                                if (!rt->protocol_set)
+                                        rt->protocol = RTPROT_DHCP;
+                                if (!rt->priority_set)
+                                        rt->priority = link->network->dhcp_route_metric;
+                                if (!rt->table_set)
+                                        rt->table = table;
+                                if (rt->mtu == 0)
+                                        rt->mtu = link->network->dhcp_route_mtu;
 
                                 r = dhcp_route_configure(rt, link);
                                 if (r < 0)
@@ -563,8 +574,7 @@ static int dhcp_lease_lost(Link *link) {
         link->dhcp_lease = sd_dhcp_lease_unref(link->dhcp_lease);
         link_dirty(link);
 
-        if (link->dhcp_acd)
-                (void) sd_ipv4acd_stop(link->dhcp_acd);
+        (void) sd_ipv4acd_stop(link->dhcp_acd);
 
         return r;
 }
@@ -644,7 +654,7 @@ static int dhcp4_configure_dad(Link *link) {
         if (r < 0)
                 return r;
 
-        r = sd_ipv4acd_set_mac(link->dhcp_acd, &link->mac);
+        r = sd_ipv4acd_set_mac(link->dhcp_acd, &link->hw_addr.addr.ether);
         if (r < 0)
                 return r;
 
@@ -666,7 +676,7 @@ static int dhcp4_dad_update_mac(Link *link) {
         if (r < 0)
                 return r;
 
-        r = sd_ipv4acd_set_mac(link->dhcp_acd, &link->mac);
+        r = sd_ipv4acd_set_mac(link->dhcp_acd, &link->hw_addr.addr.ether);
         if (r < 0)
                 return r;
 
@@ -1042,10 +1052,7 @@ static int dhcp4_handler(sd_dhcp_client *client, int event, void *userdata) {
 
         switch (event) {
                 case SD_DHCP_CLIENT_EVENT_STOP:
-
-                        if (link_ipv4ll_enabled(link, ADDRESS_FAMILY_FALLBACK_IPV4)) {
-                                assert(link->ipv4ll);
-
+                        if (link->ipv4ll) {
                                 log_link_debug(link, "DHCP client is stopped. Acquiring IPv4 link-local address");
 
                                 r = sd_ipv4ll_start(link->ipv4ll);
@@ -1130,6 +1137,17 @@ static int dhcp4_handler(sd_dhcp_client *client, int event, void *userdata) {
                                         return -ENOMSG;
                         }
                         break;
+
+                case SD_DHCP_CLIENT_EVENT_TRANSIENT_FAILURE:
+                        if (link->ipv4ll && !sd_ipv4ll_is_running(link->ipv4ll)) {
+                                log_link_debug(link, "Problems acquiring DHCP lease, acquiring IPv4 link-local address");
+
+                                r = sd_ipv4ll_start(link->ipv4ll);
+                                if (r < 0)
+                                        return log_link_warning_errno(link, r, "Could not acquire IPv4 link-local address: %m");
+                        }
+                        break;
+
                 default:
                         if (event < 0)
                                 log_link_warning_errno(link, event, "DHCP error: Client failed: %m");
@@ -1155,7 +1173,7 @@ static int dhcp4_set_hostname(Link *link) {
         else {
                 r = gethostname_strict(&hostname);
                 if (r < 0 && r != -ENXIO) /* ENXIO: no hostname set or hostname is "localhost" */
-                        return r;
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to get hostname: %m");
 
                 hn = hostname;
         }
@@ -1163,60 +1181,9 @@ static int dhcp4_set_hostname(Link *link) {
         r = sd_dhcp_client_set_hostname(link->dhcp_client, hn);
         if (r == -EINVAL && hostname)
                 /* Ignore error when the machine's hostname is not suitable to send in DHCP packet. */
-                log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set hostname from kernel hostname, ignoring: %m");
+                log_link_debug_errno(link, r, "DHCP4 CLIENT: Failed to set hostname from kernel hostname, ignoring: %m");
         else if (r < 0)
-                return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set hostname: %m");
-
-        return 0;
-}
-
-static bool promote_secondaries_enabled(const char *ifname) {
-        _cleanup_free_ char *promote_secondaries_sysctl = NULL;
-        char *promote_secondaries_path;
-        int r;
-
-        promote_secondaries_path = strjoina("net/ipv4/conf/", ifname, "/promote_secondaries");
-        r = sysctl_read(promote_secondaries_path, &promote_secondaries_sysctl);
-        if (r < 0) {
-                log_debug_errno(r, "Cannot read sysctl %s", promote_secondaries_path);
-                return false;
-        }
-
-        truncate_nl(promote_secondaries_sysctl);
-        r = parse_boolean(promote_secondaries_sysctl);
-        if (r < 0)
-                log_warning_errno(r, "Cannot parse sysctl %s with content %s as boolean", promote_secondaries_path, promote_secondaries_sysctl);
-        return r > 0;
-}
-
-/* dhcp4_set_promote_secondaries will ensure this interface has
- * the "promote_secondaries" option in the kernel set. If this sysctl
- * is not set DHCP will work only as long as the IP address does not
- * changes between leases. The kernel will remove all secondary IP
- * addresses of an interface otherwise. The way systemd-network works
- * is that the new IP of a lease is added as a secondary IP and when
- * the primary one expires it relies on the kernel to promote the
- * secondary IP. See also https://github.com/systemd/systemd/issues/7163
- */
-static int dhcp4_set_promote_secondaries(Link *link) {
-        int r;
-
-        assert(link);
-
-        /* check if the kernel has promote_secondaries enabled for our
-         * interface. If it is not globally enabled or enabled for the
-         * specific interface we must either enable it.
-         */
-        if (!(promote_secondaries_enabled("all") || promote_secondaries_enabled(link->ifname))) {
-                char *promote_secondaries_path = NULL;
-
-                log_link_debug(link, "promote_secondaries is unset, setting it");
-                promote_secondaries_path = strjoina("net/ipv4/conf/", link->ifname, "/promote_secondaries");
-                r = sysctl_write(promote_secondaries_path, "1");
-                if (r < 0)
-                        log_link_warning_errno(link, r, "cannot set sysctl %s to 1", promote_secondaries_path);
-                return r > 0;
-        }
+                return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set hostname: %m");
 
         return 0;
 }
@@ -1246,7 +1213,7 @@ static int dhcp4_set_client_identifier(Link *link) {
                                                          duid->raw_data_len > 0 ? duid->raw_data : NULL,
                                                          duid->raw_data_len);
                 if (r < 0)
-                        return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set IAID+DUID: %m");
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set IAID+DUID: %m");
                 break;
         }
         case DHCP_CLIENT_ID_DUID_ONLY: {
@@ -1262,17 +1229,27 @@ static int dhcp4_set_client_identifier(Link *link) {
                                                     duid->raw_data_len > 0 ? duid->raw_data : NULL,
                                                     duid->raw_data_len);
                 if (r < 0)
-                        return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set DUID: %m");
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set DUID: %m");
                 break;
         }
-        case DHCP_CLIENT_ID_MAC:
+        case DHCP_CLIENT_ID_MAC: {
+                const uint8_t *hw_addr = link->hw_addr.addr.bytes;
+                size_t hw_addr_len = link->hw_addr.length;
+
+                if (link->iftype == ARPHRD_INFINIBAND && hw_addr_len == INFINIBAND_ALEN) {
+                        /* set_client_id expects only last 8 bytes of an IB address */
+                        hw_addr += INFINIBAND_ALEN - 8;
+                        hw_addr_len -= INFINIBAND_ALEN - 8;
+                }
+
                 r = sd_dhcp_client_set_client_id(link->dhcp_client,
-                                                 ARPHRD_ETHER,
-                                                 (const uint8_t *) &link->mac,
-                                                 sizeof(link->mac));
+                                                 link->iftype,
+                                                 hw_addr,
+                                                 hw_addr_len);
                 if (r < 0)
-                        return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set client ID: %m");
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set client ID: %m");
                 break;
+        }
         default:
                 assert_not_reached("Unknown client identifier type.");
         }
@@ -1280,23 +1257,29 @@ static int dhcp4_set_client_identifier(Link *link) {
         return 0;
 }
 
-static int dhcp4_init(Link *link) {
-        int r;
+static int dhcp4_set_request_address(Link *link) {
+        Address *a;
 
         assert(link);
+        assert(link->network);
+        assert(link->dhcp_client);
 
-        if (link->dhcp_client)
+        if (!FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP))
                 return 0;
 
-        r = sd_dhcp_client_new(&link->dhcp_client, link->network->dhcp_anonymize);
-        if (r < 0)
-                return r;
+        SET_FOREACH(a, link->addresses_foreign) {
+                if (a->family != AF_INET)
+                        continue;
+                if (link_address_is_dynamic(link, a))
+                        break;
+        }
 
-        r = sd_dhcp_client_attach_event(link->dhcp_client, link->manager->event, 0);
-        if (r < 0)
-                return r;
+        if (!a)
+                return 0;
 
-        return 0;
+        log_link_debug(link, "DHCP4 CLIENT: requesting " IPV4_ADDRESS_FMT_STR, IPV4_ADDRESS_FMT_VAL(a->in_addr.in));
+
+        return sd_dhcp_client_set_request_address(link->dhcp_client, &a->in_addr.in);
 }
 
 int dhcp4_configure(Link *link) {
@@ -1310,44 +1293,45 @@ int dhcp4_configure(Link *link) {
         if (!link_dhcp4_enabled(link))
                 return 0;
 
-        r = dhcp4_set_promote_secondaries(link);
-        if (r < 0)
-                return r;
+        if (!link->dhcp_client) {
+                r = sd_dhcp_client_new(&link->dhcp_client, link->network->dhcp_anonymize);
+                if (r < 0)
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to allocate DHCP4 client: %m");
 
-        r = dhcp4_init(link);
-        if (r < 0)
-                return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to initialize DHCP4 client: %m");
+                r = sd_dhcp_client_attach_event(link->dhcp_client, link->manager->event, 0);
+                if (r < 0)
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to attach event to DHCP4 client: %m");
+        }
 
         r = sd_dhcp_client_set_mac(link->dhcp_client,
-                                   (const uint8_t *) &link->mac,
-                                   sizeof (link->mac), ARPHRD_ETHER);
+                                   link->hw_addr.addr.bytes,
+                                   link->bcast_addr.length > 0 ? link->bcast_addr.addr.bytes : NULL,
+                                   link->hw_addr.length, link->iftype);
         if (r < 0)
-                return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set MAC address: %m");
+                return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set MAC address: %m");
 
         r = sd_dhcp_client_set_ifindex(link->dhcp_client, link->ifindex);
         if (r < 0)
-                return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set ifindex: %m");
+                return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set ifindex: %m");
 
         r = sd_dhcp_client_set_callback(link->dhcp_client, dhcp4_handler, link);
         if (r < 0)
-                return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set callback: %m");
+                return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set callback: %m");
 
-        r = sd_dhcp_client_set_request_broadcast(link->dhcp_client,
-                                                 link->network->dhcp_broadcast);
+        r = sd_dhcp_client_set_request_broadcast(link->dhcp_client, link->network->dhcp_broadcast);
         if (r < 0)
-                return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for broadcast: %m");
+                return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for broadcast: %m");
 
-        if (link->mtu) {
+        if (link->mtu > 0) {
                 r = sd_dhcp_client_set_mtu(link->dhcp_client, link->mtu);
                 if (r < 0)
-                        return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set MTU: %m");
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set MTU: %m");
         }
 
         if (link->network->dhcp_use_mtu) {
-                r = sd_dhcp_client_set_request_option(link->dhcp_client,
-                                                      SD_DHCP_OPTION_INTERFACE_MTU);
+                r = sd_dhcp_client_set_request_option(link->dhcp_client, SD_DHCP_OPTION_INTERFACE_MTU);
                 if (r < 0)
-                        return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for MTU: %m");
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for MTU: %m");
         }
 
         /* NOTE: even if this variable is called "use", it also "sends" PRL
@@ -1356,39 +1340,37 @@ int dhcp4_configure(Link *link) {
         /* NOTE: when using Anonymize=yes, routes PRL options are sent
          * by default, so they don't need to be added here. */
         if (link->network->dhcp_use_routes && !link->network->dhcp_anonymize) {
-                r = sd_dhcp_client_set_request_option(link->dhcp_client,
-                                                      SD_DHCP_OPTION_STATIC_ROUTE);
+                r = sd_dhcp_client_set_request_option(link->dhcp_client, SD_DHCP_OPTION_STATIC_ROUTE);
                 if (r < 0)
-                        return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for static route: %m");
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for static route: %m");
 
-                r = sd_dhcp_client_set_request_option(link->dhcp_client,
-                                                      SD_DHCP_OPTION_CLASSLESS_STATIC_ROUTE);
+                r = sd_dhcp_client_set_request_option(link->dhcp_client, SD_DHCP_OPTION_CLASSLESS_STATIC_ROUTE);
                 if (r < 0)
-                        return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for classless static route: %m");
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for classless static route: %m");
         }
 
         if (link->network->dhcp_use_domains != DHCP_USE_DOMAINS_NO && !link->network->dhcp_anonymize) {
                 r = sd_dhcp_client_set_request_option(link->dhcp_client, SD_DHCP_OPTION_DOMAIN_SEARCH_LIST);
                 if (r < 0)
-                        return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for domain search list: %m");
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for domain search list: %m");
         }
 
         if (link->network->dhcp_use_ntp) {
                 r = sd_dhcp_client_set_request_option(link->dhcp_client, SD_DHCP_OPTION_NTP_SERVER);
                 if (r < 0)
-                        return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for NTP server: %m");
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for NTP server: %m");
         }
 
         if (link->network->dhcp_use_sip) {
                 r = sd_dhcp_client_set_request_option(link->dhcp_client, SD_DHCP_OPTION_SIP_SERVER);
                 if (r < 0)
-                        return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for SIP server: %m");
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for SIP server: %m");
         }
 
         if (link->network->dhcp_use_timezone) {
                 r = sd_dhcp_client_set_request_option(link->dhcp_client, SD_DHCP_OPTION_NEW_TZDB_TIMEZONE);
                 if (r < 0)
-                        return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for timezone: %m");
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for timezone: %m");
         }
 
         SET_FOREACH(request_options, link->network->dhcp_request_options) {
@@ -1396,7 +1378,7 @@ int dhcp4_configure(Link *link) {
 
                 r = sd_dhcp_client_set_request_option(link->dhcp_client, option);
                 if (r < 0)
-                        return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for '%u': %m", option);
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set request flag for '%u': %m", option);
         }
 
         ORDERED_HASHMAP_FOREACH(send_option, link->network->dhcp_client_send_options) {
@@ -1404,7 +1386,7 @@ int dhcp4_configure(Link *link) {
                 if (r == -EEXIST)
                         continue;
                 if (r < 0)
-                        return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set send option: %m");
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set send option: %m");
         }
 
         ORDERED_HASHMAP_FOREACH(send_option, link->network->dhcp_client_send_vendor_options) {
@@ -1412,7 +1394,7 @@ int dhcp4_configure(Link *link) {
                 if (r == -EEXIST)
                         continue;
                 if (r < 0)
-                        return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set send option: %m");
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set send option: %m");
         }
 
         r = dhcp4_set_hostname(link);
@@ -1423,49 +1405,52 @@ int dhcp4_configure(Link *link) {
                 r = sd_dhcp_client_set_vendor_class_identifier(link->dhcp_client,
                                                                link->network->dhcp_vendor_class_identifier);
                 if (r < 0)
-                        return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set vendor class identifier: %m");
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set vendor class identifier: %m");
         }
 
        if (link->network->dhcp_mudurl) {
-                r = sd_dhcp_client_set_mud_url(link->dhcp_client,
-                                               link->network->dhcp_mudurl);
+                r = sd_dhcp_client_set_mud_url(link->dhcp_client, link->network->dhcp_mudurl);
                 if (r < 0)
-                        return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set MUD URL: %m");
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set MUD URL: %m");
         }
 
         if (link->network->dhcp_user_class) {
                 r = sd_dhcp_client_set_user_class(link->dhcp_client, (const char **) link->network->dhcp_user_class);
                 if (r < 0)
-                        return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set user class: %m");
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set user class: %m");
         }
 
-        if (link->network->dhcp_client_port) {
+        if (link->network->dhcp_client_port > 0) {
                 r = sd_dhcp_client_set_client_port(link->dhcp_client, link->network->dhcp_client_port);
                 if (r < 0)
-                        return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set listen port: %m");
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set listen port: %m");
         }
 
         if (link->network->dhcp_max_attempts > 0) {
                 r = sd_dhcp_client_set_max_attempts(link->dhcp_client, link->network->dhcp_max_attempts);
                 if (r < 0)
-                        return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set max attempts: %m");
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set max attempts: %m");
         }
 
-        if (link->network->ip_service_type > 0) {
-                r = sd_dhcp_client_set_service_type(link->dhcp_client, link->network->ip_service_type);
+        if (link->network->dhcp_ip_service_type > 0) {
+                r = sd_dhcp_client_set_service_type(link->dhcp_client, link->network->dhcp_ip_service_type);
                 if (r < 0)
-                        return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to set IP service type: %m");
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set IP service type: %m");
         }
 
         if (link->network->dhcp_fallback_lease_lifetime > 0) {
                 r = sd_dhcp_client_set_fallback_lease_lifetime(link->dhcp_client, link->network->dhcp_fallback_lease_lifetime);
                 if (r < 0)
-                        return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed set to lease lifetime: %m");
+                        return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed set to lease lifetime: %m");
         }
 
+        r = dhcp4_set_request_address(link);
+        if (r < 0)
+                return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to set initial DHCPv4 address: %m");
+
         r = dhcp4_configure_dad(link);
         if (r < 0)
-                return log_link_error_errno(link, r, "DHCP4 CLIENT: Failed to configure service type: %m");
+                return log_link_warning_errno(link, r, "DHCP4 CLIENT: Failed to configure service type: %m");
 
         return dhcp4_set_client_identifier(link);
 }
@@ -1478,7 +1463,9 @@ int dhcp4_update_mac(Link *link) {
         if (!link->dhcp_client)
                 return 0;
 
-        r = sd_dhcp_client_set_mac(link->dhcp_client, (const uint8_t *) &link->mac, sizeof (link->mac), ARPHRD_ETHER);
+        r = sd_dhcp_client_set_mac(link->dhcp_client, link->hw_addr.addr.bytes,
+                                   link->bcast_addr.length > 0 ? link->bcast_addr.addr.bytes : NULL,
+                                   link->hw_addr.length, link->iftype);
         if (r < 0)
                 return r;
 
@@ -1493,30 +1480,6 @@ int dhcp4_update_mac(Link *link) {
         return 0;
 }
 
-int link_deserialize_dhcp4(Link *link, const char *dhcp4_address) {
-        union in_addr_union address;
-        int r;
-
-        assert(link);
-
-        if (isempty(dhcp4_address))
-                return 0;
-
-        r = in_addr_from_string(AF_INET, dhcp4_address, &address);
-        if (r < 0)
-                return log_link_debug_errno(link, r, "Failed to parse DHCPv4 address: %s", dhcp4_address);
-
-        r = dhcp4_init(link);
-        if (r < 0)
-                return log_link_debug_errno(link, r, "Failed to initialize DHCPv4 client: %m");
-
-        r = sd_dhcp_client_set_request_address(link->dhcp_client, &address.in);
-        if (r < 0)
-                return log_link_debug_errno(link, r, "Failed to set initial DHCPv4 address %s: %m", dhcp4_address);
-
-        return 0;
-}
-
 int config_parse_dhcp_max_attempts(
                 const char *unit,
                 const char *filename,
index 8aa6ac9453eacd271e9cf6ed836651c2208ad88d..7500a23c3bef44eb742ac6f751eeb57713bbcf58 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "conf-parser.h"
@@ -20,8 +20,6 @@ typedef enum DHCPClientIdentifier {
 int dhcp4_configure(Link *link);
 int dhcp4_update_mac(Link *link);
 
-int link_deserialize_dhcp4(Link *link, const char *dhcp4_address);
-
 CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_client_identifier);
 CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_acl_ip_address);
 CONFIG_PARSER_PROTOTYPE(config_parse_dhcp_max_attempts);
index 5217497f9821878af5e055be3629918faace4dde..95025acbfd1c41ea11e00341aa424ca378d40437 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2014 Intel Corporation. All rights reserved.
 ***/
@@ -13,7 +13,6 @@
 #include "hashmap.h"
 #include "hostname-util.h"
 #include "missing_network.h"
-#include "network-internal.h"
 #include "networkd-address.h"
 #include "networkd-dhcp6.h"
 #include "networkd-link.h"
@@ -31,7 +30,7 @@ bool link_dhcp6_pd_is_enabled(Link *link) {
         if (!link->network)
                 return false;
 
-        return link->network->router_prefix_delegation & RADV_PREFIX_DELEGATION_DHCP6;
+        return link->network->dhcp6_pd;
 }
 
 static bool dhcp6_lease_has_pd_prefix(sd_dhcp6_lease *lease) {
@@ -421,11 +420,14 @@ static int dhcp6_pd_assign_prefix(Link *link, const union in_addr_union *prefix,
         int r;
 
         assert(link);
+        assert(link->network);
         assert(prefix);
 
-        r = radv_add_prefix(link, &prefix->in6, prefix_len, lifetime_preferred, lifetime_valid);
-        if (r < 0)
-                return r;
+        if (link->network->dhcp6_pd_announce) {
+                r = radv_add_prefix(link, &prefix->in6, prefix_len, lifetime_preferred, lifetime_valid);
+                if (r < 0)
+                        return r;
+        }
 
         r = dhcp6_set_pd_route(link, prefix, pd_prefix);
         if (r < 0)
@@ -1354,7 +1356,7 @@ static int dhcp6_set_identifier(Link *link, sd_dhcp6_client *client) {
         assert(link->network);
         assert(client);
 
-        r = sd_dhcp6_client_set_mac(client, (const uint8_t *) &link->mac, sizeof (link->mac), ARPHRD_ETHER);
+        r = sd_dhcp6_client_set_mac(client, link->hw_addr.addr.bytes, link->hw_addr.length, link->iftype);
         if (r < 0)
                 return r;
 
@@ -1424,7 +1426,7 @@ int dhcp6_configure(Link *link) {
         if (r < 0)
                 return log_link_error_errno(link, r, "DHCP6 CLIENT: Failed to set ifindex: %m");
 
-        if (link->network->rapid_commit) {
+        if (link->network->dhcp6_rapid_commit) {
                 r = sd_dhcp6_client_set_request_option(client, SD_DHCP6_OPTION_RAPID_COMMIT);
                 if (r < 0)
                         return log_link_error_errno(link, r, "DHCP6 CLIENT: Failed to set request flag for rapid commit: %m");
index 4956c90915a14657233450cb68a62199ed173f76..65b35fd1e822dc06e0a4a88965b52024818f4c4d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-dhcp6-client.h"
index 2e35f7d1bf525a097699efaeb025c046f95428b0..283dece04f8128609d548c35b6dac14ed21be6d6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2014 Intel Corporation. All rights reserved.
 ***/
index 935406e022bd1282f71e4ff4ac7bbf4a09e41c69..48f4e40b379b15ccf24b52f1d9a9bd40e037a5ec 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index 03f29e3b667fe86cfb01036b2a29ee88bab56b42..7e1c1ac16eae6c558c81a7f506573688563676d5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
 #include <linux/if.h>
@@ -142,37 +142,24 @@ static void ipv4ll_handler(sd_ipv4ll *ll, int event, void *userdata) {
         }
 }
 
-static int ipv4ll_init(Link *link) {
-        int r;
-
-        assert(link);
-
-        if (link->ipv4ll)
-                return 0;
-
-        r = sd_ipv4ll_new(&link->ipv4ll);
-        if (r < 0)
-                return r;
-
-        r = sd_ipv4ll_attach_event(link->ipv4ll, link->manager->event, 0);
-        if (r < 0)
-                return r;
-
-        return 0;
-}
-
 int ipv4ll_configure(Link *link) {
         uint64_t seed;
         int r;
 
         assert(link);
 
-        if (!link_ipv4ll_enabled(link, ADDRESS_FAMILY_IPV4 | ADDRESS_FAMILY_FALLBACK_IPV4))
+        if (!link_ipv4ll_enabled(link))
                 return 0;
 
-        r = ipv4ll_init(link);
-        if (r < 0)
-                return r;
+        if (!link->ipv4ll) {
+                r = sd_ipv4ll_new(&link->ipv4ll);
+                if (r < 0)
+                        return r;
+
+                r = sd_ipv4ll_attach_event(link->ipv4ll, link->manager->event, 0);
+                if (r < 0)
+                        return r;
+        }
 
         if (link->sd_device &&
             net_get_unique_predictable_data(link->sd_device, true, &seed) >= 0) {
@@ -181,7 +168,7 @@ int ipv4ll_configure(Link *link) {
                         return r;
         }
 
-        r = sd_ipv4ll_set_mac(link->ipv4ll, &link->mac);
+        r = sd_ipv4ll_set_mac(link->ipv4ll, &link->hw_addr.addr.ether);
         if (r < 0)
                 return r;
 
@@ -207,13 +194,11 @@ int ipv4ll_update_mac(Link *link) {
 
         restart = sd_ipv4ll_is_running(link->ipv4ll) > 0;
 
-        if (restart) {
-                r = sd_ipv4ll_stop(link->ipv4ll);
-                if (r < 0)
-                        return r;
-        }
+        r = sd_ipv4ll_stop(link->ipv4ll);
+        if (r < 0)
+                return r;
 
-        r = sd_ipv4ll_set_mac(link->ipv4ll, &link->mac);
+        r = sd_ipv4ll_set_mac(link->ipv4ll, &link->hw_addr.addr.ether);
         if (r < 0)
                 return r;
 
@@ -226,52 +211,6 @@ int ipv4ll_update_mac(Link *link) {
         return 0;
 }
 
-int link_serialize_ipv4ll(Link *link, FILE *f) {
-        struct in_addr address;
-        int r;
-
-        assert(link);
-
-        if (!link->ipv4ll)
-                return 0;
-
-        r = sd_ipv4ll_get_address(link->ipv4ll, &address);
-        if (r == -ENOENT)
-                return 0;
-        if (r < 0)
-                return r;
-
-        fputs("IPV4LL_ADDRESS=", f);
-        serialize_in_addrs(f, &address, 1, false, NULL);
-        fputc('\n', f);
-
-        return 0;
-}
-
-int link_deserialize_ipv4ll(Link *link, const char *ipv4ll_address) {
-        union in_addr_union address;
-        int r;
-
-        assert(link);
-
-        if (isempty(ipv4ll_address))
-                return 0;
-
-        r = in_addr_from_string(AF_INET, ipv4ll_address, &address);
-        if (r < 0)
-                return log_link_debug_errno(link, r, "Failed to parse IPv4LL address: %s", ipv4ll_address);
-
-        r = ipv4ll_init(link);
-        if (r < 0)
-                return log_link_debug_errno(link, r, "Failed to initialize IPv4LL client: %m");
-
-        r = sd_ipv4ll_set_address(link->ipv4ll, &address.in);
-        if (r < 0)
-                return log_link_debug_errno(link, r, "Failed to set initial IPv4LL address %s: %m", ipv4ll_address);
-
-        return 0;
-}
-
 int config_parse_ipv4ll(
                 const char* unit,
                 const char *filename,
index 4833e304b6c480eafcd48492dbe8f248dd729350..82acc2ec70913f8096f7e25cf96ad43c42fceb32 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "conf-parser.h"
@@ -9,7 +9,5 @@ typedef struct Link Link;
 
 int ipv4ll_configure(Link *link);
 int ipv4ll_update_mac(Link *link);
-int link_serialize_ipv4ll(Link *link, FILE *f);
-int link_deserialize_ipv4ll(Link *link, const char *ipv4ll_address);
 
 CONFIG_PARSER_PROTOTYPE(config_parse_ipv4ll);
index fb8464ff2fa7cdeeb3769700f73396fb98d46d10..0b57c6c4db969670ee3c833bb08c32354489aa6b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
 #include <linux/if.h>
@@ -84,7 +84,7 @@ static int ipv6_proxy_ndp_set(Link *link) {
 
         r = sysctl_write_ip_property_boolean(AF_INET6, link->ifname, "proxy_ndp", v);
         if (r < 0)
-                return log_link_warning_errno(link, r, "Cannot configure proxy NDP for the interface: %m");
+                return log_link_warning_errno(link, r, "Cannot configure proxy NDP for the interface, ignoring: %m");
 
         return v;
 }
@@ -100,7 +100,7 @@ int link_set_ipv6_proxy_ndp_addresses(Link *link) {
         /* enable or disable proxy_ndp itself depending on whether ipv6_proxy_ndp_addresses are set or not */
         r = ipv6_proxy_ndp_set(link);
         if (r <= 0)
-                return r;
+                return 0;
 
         SET_FOREACH(address, link->network->ipv6_proxy_ndp_addresses) {
                 r = ipv6_proxy_ndp_address_configure(link, address);
index e58b17ec942585fe0dc96fd3fd0bcad33f39c509..27313efa0c8d48a80c4850f2ab26d75da877d334 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "conf-parser.h"
index 072dfac93d6a8c57efc90657692a42983758c7e5..9f4c719e31d384d93ab20e4716018907eefd7d83 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 #include <netinet/in.h>
index 94474f22fffbf1bd9a9cdac3bd1b942a003507b3..45594dfac99911428496131f78673741a7f32af3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 928e883dcc6c9cec34d3708c7517e3e20f1a3492..547f3bbc0127282b7e80576e71fa311397705faf 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
 #include <linux/if.h>
@@ -55,9 +55,8 @@
 #include "util.h"
 #include "vrf.h"
 
-bool link_ipv4ll_enabled(Link *link, AddressFamily mask) {
+bool link_ipv4ll_enabled(Link *link) {
         assert(link);
-        assert((mask & ~(ADDRESS_FAMILY_IPV4 | ADDRESS_FAMILY_FALLBACK_IPV4)) == 0);
 
         if (link->flags & IFF_LOOPBACK)
                 return false;
@@ -80,7 +79,7 @@ bool link_ipv4ll_enabled(Link *link, AddressFamily mask) {
         if (link->network->bond)
                 return false;
 
-        return link->network->link_local & mask;
+        return link->network->link_local & ADDRESS_FAMILY_IPV4;
 }
 
 bool link_ipv6ll_enabled(Link *link) {
@@ -421,9 +420,13 @@ static int link_new(Manager *manager, sd_netlink_message *message, Link **ret) {
         if (r < 0)
                 log_link_debug_errno(link, r, "New device has no master, continuing without");
 
-        r = sd_netlink_message_read_ether_addr(message, IFLA_ADDRESS, &link->mac);
+        r = netlink_message_read_hw_addr(message, IFLA_ADDRESS, &link->hw_addr);
         if (r < 0)
-                log_link_debug_errno(link, r, "MAC address not found for new device, continuing without");
+                log_link_debug_errno(link, r, "Hardware address not found for new device, continuing without");
+
+        r = netlink_message_read_hw_addr(message, IFLA_BROADCAST, &link->bcast_addr);
+        if (r < 0)
+                log_link_debug_errno(link, r, "Broadcast address not found for new device, continuing without");
 
         r = ethtool_get_permanent_macaddr(&manager->ethtool_fd, link->ifname, &link->permanent_mac);
         if (r < 0)
@@ -493,8 +496,10 @@ static void link_free_engines(Link *link) {
         link->dhcp_server = sd_dhcp_server_unref(link->dhcp_server);
         link->dhcp_client = sd_dhcp_client_unref(link->dhcp_client);
         link->dhcp_lease = sd_dhcp_lease_unref(link->dhcp_lease);
+        link->dhcp_acd = sd_ipv4acd_unref(link->dhcp_acd);
 
         link->lldp = sd_lldp_unref(link->lldp);
+        link_lldp_emit_stop(link);
 
         ndisc_flush(link);
 
@@ -503,7 +508,8 @@ static void link_free_engines(Link *link) {
         link->dhcp6_lease = sd_dhcp6_lease_unref(link->dhcp6_lease);
         link->ndisc = sd_ndisc_unref(link->ndisc);
         link->radv = sd_radv_unref(link->radv);
-        link->dhcp_acd = sd_ipv4acd_unref(link->dhcp_acd);
+
+        ipv4_dad_unref(link);
 }
 
 static Link *link_free(Link *link) {
@@ -538,7 +544,6 @@ static Link *link_free(Link *link) {
         link->dhcp6_pd_addresses_old = set_free(link->dhcp6_pd_addresses_old);
         link->ndisc_addresses = set_free(link->ndisc_addresses);
 
-        link_lldp_emit_stop(link);
         link_free_engines(link);
         free(link->lease_file);
         free(link->lldp_file);
@@ -605,7 +610,7 @@ static void link_enter_unmanaged(Link *link) {
         link_dirty(link);
 }
 
-int link_stop_clients(Link *link, bool may_keep_dhcp) {
+int link_stop_engines(Link *link, bool may_keep_dhcp) {
         int r = 0, k;
 
         assert(link);
@@ -617,49 +622,47 @@ int link_stop_clients(Link *link, bool may_keep_dhcp) {
                          (link->manager->restarting ||
                           FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP_ON_STOP));
 
-        if (link->dhcp_client && !keep_dhcp) {
+        if (!keep_dhcp) {
                 k = sd_dhcp_client_stop(link->dhcp_client);
                 if (k < 0)
                         r = log_link_warning_errno(link, k, "Could not stop DHCPv4 client: %m");
         }
 
-        if (link->dhcp_acd) {
-                k = sd_ipv4acd_stop(link->dhcp_acd);
-                if (k < 0)
-                        r = log_link_warning_errno(link, k, "Could not stop IPv4 ACD client for DHCPv4: %m");
-        }
+        k = sd_ipv4acd_stop(link->dhcp_acd);
+        if (k < 0)
+                r = log_link_warning_errno(link, k, "Could not stop IPv4 ACD client for DHCPv4: %m");
 
-        if (link->ipv4ll) {
-                k = sd_ipv4ll_stop(link->ipv4ll);
-                if (k < 0)
-                        r = log_link_warning_errno(link, k, "Could not stop IPv4 link-local: %m");
-        }
+        k = sd_dhcp_server_stop(link->dhcp_server);
+        if (k < 0)
+                r = log_link_warning_errno(link, k, "Could not stop DHCPv4 server: %m");
+
+        k = sd_lldp_stop(link->lldp);
+        if (k < 0)
+                r = log_link_warning_errno(link, k, "Could not stop LLDP: %m");
+
+        k = sd_ipv4ll_stop(link->ipv4ll);
+        if (k < 0)
+                r = log_link_warning_errno(link, k, "Could not stop IPv4 link-local: %m");
 
         k = ipv4_dad_stop(link);
         if (k < 0)
                 r = log_link_warning_errno(link, k, "Could not stop IPv4 ACD client: %m");
 
-        if (link->dhcp6_client) {
-                k = sd_dhcp6_client_stop(link->dhcp6_client);
-                if (k < 0)
-                        r = log_link_warning_errno(link, k, "Could not stop DHCPv6 client: %m");
-        }
+        k = sd_dhcp6_client_stop(link->dhcp6_client);
+        if (k < 0)
+                r = log_link_warning_errno(link, k, "Could not stop DHCPv6 client: %m");
 
         k = dhcp6_pd_remove(link);
         if (k < 0)
                 r = log_link_warning_errno(link, k, "Could not remove DHCPv6 PD addresses and routes: %m");
 
-        if (link->ndisc) {
-                k = sd_ndisc_stop(link->ndisc);
-                if (k < 0)
-                        r = log_link_warning_errno(link, k, "Could not stop IPv6 Router Discovery: %m");
-        }
+        k = sd_ndisc_stop(link->ndisc);
+        if (k < 0)
+                r = log_link_warning_errno(link, k, "Could not stop IPv6 Router Discovery: %m");
 
-        if (link->radv) {
-                k = sd_radv_stop(link->radv);
-                if (k < 0)
-                        r = log_link_warning_errno(link, k, "Could not stop IPv6 Router Advertisement: %m");
-        }
+        k = sd_radv_stop(link->radv);
+        if (k < 0)
+                r = log_link_warning_errno(link, k, "Could not stop IPv6 Router Advertisement: %m");
 
         link_lldp_emit_stop(link);
         return r;
@@ -675,7 +678,7 @@ void link_enter_failed(Link *link) {
 
         link_set_state(link, LINK_STATE_FAILED);
 
-        (void) link_stop_clients(link, false);
+        (void) link_stop_engines(link, false);
 
         link_dirty(link);
 }
@@ -730,77 +733,51 @@ void link_check_ready(Link *link) {
         if (link->state == LINK_STATE_CONFIGURED)
                 return;
 
-        if (link->state != LINK_STATE_CONFIGURING) {
-                log_link_debug(link, "%s(): link is in %s state.", __func__, link_state_to_string(link->state));
-                return;
-        }
+        if (link->state != LINK_STATE_CONFIGURING)
+                return (void) log_link_debug(link, "%s(): link is in %s state.", __func__, link_state_to_string(link->state));
 
         if (!link->network)
                 return;
 
-        if (!link->addresses_configured) {
-                log_link_debug(link, "%s(): static addresses are not configured.", __func__);
-                return;
-        }
+        if (!link->addresses_configured)
+                return (void) log_link_debug(link, "%s(): static addresses are not configured.", __func__);
 
-        if (!link->neighbors_configured) {
-                log_link_debug(link, "%s(): static neighbors are not configured.", __func__);
-                return;
-        }
+        if (!link->neighbors_configured)
+                return (void) log_link_debug(link, "%s(): static neighbors are not configured.", __func__);
 
         SET_FOREACH(a, link->addresses)
                 if (!address_is_ready(a)) {
                         _cleanup_free_ char *str = NULL;
 
                         (void) in_addr_to_string(a->family, &a->in_addr, &str);
-                        log_link_debug(link, "%s(): an address %s/%d is not ready.", __func__, strnull(str), a->prefixlen);
-                        return;
+                        return (void) log_link_debug(link, "%s(): an address %s/%d is not ready.", __func__, strnull(str), a->prefixlen);
                 }
 
-        if (!link->static_routes_configured) {
-                log_link_debug(link, "%s(): static routes are not configured.", __func__);
-                return;
-        }
+        if (!link->static_routes_configured)
+                return (void) log_link_debug(link, "%s(): static routes are not configured.", __func__);
 
-        if (!link->static_nexthops_configured) {
-                log_link_debug(link, "%s(): static nexthops are not configured.", __func__);
-                return;
-        }
+        if (!link->static_nexthops_configured)
+                return (void) log_link_debug(link, "%s(): static nexthops are not configured.", __func__);
 
-        if (!link->routing_policy_rules_configured) {
-                log_link_debug(link, "%s(): static routing policy rules are not configured.", __func__);
-                return;
-        }
+        if (!link->routing_policy_rules_configured)
+                return (void) log_link_debug(link, "%s(): static routing policy rules are not configured.", __func__);
 
-        if (!link->tc_configured) {
-                log_link_debug(link, "%s(): traffic controls are not configured.", __func__);
-                return;
-        }
+        if (!link->tc_configured)
+                return (void) log_link_debug(link, "%s(): traffic controls are not configured.", __func__);
 
-        if (!link->sr_iov_configured) {
-                log_link_debug(link, "%s(): SR-IOV is not configured.", __func__);
-                return;
-        }
+        if (!link->sr_iov_configured)
+                return (void) log_link_debug(link, "%s(): SR-IOV is not configured.", __func__);
 
-        if (!link->bridge_mdb_configured) {
-                log_link_debug(link, "%s(): Bridge MDB is not configured.", __func__);
-                return;
-        }
+        if (!link->bridge_mdb_configured)
+                return (void) log_link_debug(link, "%s(): Bridge MDB is not configured.", __func__);
 
         if (link_has_carrier(link) || !link->network->configure_without_carrier) {
                 bool has_ndisc_address = false;
                 NDiscAddress *n;
 
-                if (link_ipv4ll_enabled(link, ADDRESS_FAMILY_IPV4) && !link->ipv4ll_address_configured) {
-                        log_link_debug(link, "%s(): IPv4LL is not configured.", __func__);
-                        return;
-                }
-
                 if (link_ipv6ll_enabled(link) &&
-                    in_addr_is_null(AF_INET6, (const union in_addr_union*) &link->ipv6ll_address)) {
-                        log_link_debug(link, "%s(): IPv6LL is not configured.", __func__);
-                        return;
-                }
+                    in_addr_is_null(AF_INET6, (const union in_addr_union*) &link->ipv6ll_address))
+                        return (void) log_link_debug(link, "%s(): IPv6LL is not configured.", __func__);
 
                 SET_FOREACH(n, link->ndisc_addresses)
                         if (!n->marked) {
@@ -808,28 +785,26 @@ void link_check_ready(Link *link) {
                                 break;
                         }
 
-                if ((link_dhcp4_enabled(link) || link_dhcp6_enabled(link)) &&
+                if ((link_dhcp4_enabled(link) || link_dhcp6_enabled(link) || link_ipv4ll_enabled(link)) &&
                     !link->dhcp_address && set_isempty(link->dhcp6_addresses) && !has_ndisc_address &&
-                    !(link_ipv4ll_enabled(link, ADDRESS_FAMILY_FALLBACK_IPV4) && link->ipv4ll_address_configured)) {
-                        log_link_debug(link, "%s(): DHCP4 or DHCP6 is enabled but no dynamic address is assigned yet.", __func__);
-                        return;
-                }
+                    !link->ipv4ll_address_configured)
+                        /* When DHCP[46] or IPv4LL is enabled, at least one address is acquired by them. */
+                        return (void) log_link_debug(link, "%s(): DHCP4, DHCP6 or IPv4LL is enabled but no dynamic address is assigned yet.", __func__);
 
-                if (link_dhcp4_enabled(link) || link_dhcp6_enabled(link) || link_dhcp6_pd_is_enabled(link) || link_ipv6_accept_ra_enabled(link)) {
+                if (link_dhcp4_enabled(link) || link_dhcp6_enabled(link) || link_dhcp6_pd_is_enabled(link) ||
+                    link_ipv6_accept_ra_enabled(link) || link_ipv4ll_enabled(link)) {
                         if (!link->dhcp4_configured &&
                             !(link->dhcp6_address_configured && link->dhcp6_route_configured) &&
                             !(link->dhcp6_pd_address_configured && link->dhcp6_pd_route_configured) &&
                             !(link->ndisc_addresses_configured && link->ndisc_routes_configured) &&
-                            !(link_ipv4ll_enabled(link, ADDRESS_FAMILY_FALLBACK_IPV4) && link->ipv4ll_address_configured)) {
-                                /* When DHCP or RA is enabled, at least one protocol must provide an address, or
-                                 * an IPv4ll fallback address must be configured. */
-                                log_link_debug(link, "%s(): dynamic addresses or routes are not configured.", __func__);
-                                return;
-                        }
+                            !link->ipv4ll_address_configured)
+                                /* When DHCP[46], NDisc, or IPv4LL is enabled, at least one protocol must be finished. */
+                                return (void) log_link_debug(link, "%s(): dynamic addresses or routes are not configured.", __func__);
 
-                        log_link_debug(link, "%s(): dhcp4:%s dhcp6_addresses:%s dhcp_routes:%s dhcp_pd_addresses:%s dhcp_pd_routes:%s ndisc_addresses:%s ndisc_routes:%s",
+                        log_link_debug(link, "%s(): dhcp4:%s ipv4ll:%s dhcp6_addresses:%s dhcp_routes:%s dhcp_pd_addresses:%s dhcp_pd_routes:%s ndisc_addresses:%s ndisc_routes:%s",
                                        __func__,
                                        yes_no(link->dhcp4_configured),
+                                       yes_no(link->ipv4ll_address_configured),
                                        yes_no(link->dhcp6_address_configured),
                                        yes_no(link->dhcp6_route_configured),
                                        yes_no(link->dhcp6_pd_address_configured),
@@ -840,8 +815,6 @@ void link_check_ready(Link *link) {
         }
 
         link_enter_configured(link);
-
-        return;
 }
 
 static int link_set_static_configs(Link *link) {
@@ -890,6 +863,105 @@ static int link_set_static_configs(Link *link) {
 
 static int link_configure_continue(Link *link);
 
+static int link_mac_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link) {
+        int r;
+
+        assert(link);
+
+        if (IN_SET(link->state, LINK_STATE_FAILED, LINK_STATE_LINGER))
+                return 1;
+
+        r = sd_netlink_message_get_errno(m);
+        if (r < 0)
+                log_link_message_warning_errno(link, m, r, "Could not set MAC address, ignoring");
+        else
+                log_link_debug(link, "Setting MAC address done.");
+
+        return 1;
+}
+
+static int link_set_mac(Link *link) {
+        _cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL;
+        int r;
+
+        assert(link);
+        assert(link->network);
+        assert(link->manager);
+        assert(link->manager->rtnl);
+
+        if (!link->network->mac)
+                return 0;
+
+        log_link_debug(link, "Setting MAC address");
+
+        r = sd_rtnl_message_new_link(link->manager->rtnl, &req, RTM_SETLINK, link->ifindex);
+        if (r < 0)
+                return log_link_error_errno(link, r, "Could not allocate RTM_SETLINK message: %m");
+
+        r = sd_netlink_message_append_ether_addr(req, IFLA_ADDRESS, link->network->mac);
+        if (r < 0)
+                return log_link_error_errno(link, r, "Could not set MAC address: %m");
+
+        r = netlink_call_async(link->manager->rtnl, NULL, req, link_mac_handler,
+                               link_netlink_destroy_callback, link);
+        if (r < 0)
+                return log_link_error_errno(link, r, "Could not send rtnetlink message: %m");
+
+        link_ref(link);
+
+        return 0;
+}
+
+static int link_nomaster_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link) {
+        int r;
+
+        assert(link);
+
+        if (IN_SET(link->state, LINK_STATE_FAILED, LINK_STATE_LINGER))
+                return 1;
+
+        r = sd_netlink_message_get_errno(m);
+        if (r < 0)
+                log_link_message_warning_errno(link, m, r, "Could not set nomaster, ignoring");
+        else
+                log_link_debug(link, "Setting nomaster done.");
+
+        return 1;
+}
+
+static int link_set_nomaster(Link *link) {
+        _cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL;
+        int r;
+
+        assert(link);
+        assert(link->network);
+        assert(link->manager);
+        assert(link->manager->rtnl);
+
+        /* set it free if not enslaved with networkd */
+        if (link->network->bridge || link->network->bond || link->network->vrf)
+                return 0;
+
+        log_link_debug(link, "Setting nomaster");
+
+        r = sd_rtnl_message_new_link(link->manager->rtnl, &req, RTM_SETLINK, link->ifindex);
+        if (r < 0)
+                return log_link_error_errno(link, r, "Could not allocate RTM_SETLINK message: %m");
+
+        r = sd_netlink_message_append_u32(req, IFLA_MASTER, 0);
+        if (r < 0)
+                return log_link_error_errno(link, r, "Could not append IFLA_MASTER attribute: %m");
+
+        r = netlink_call_async(link->manager->rtnl, NULL, req, link_nomaster_handler,
+                               link_netlink_destroy_callback, link);
+        if (r < 0)
+                return log_link_error_errno(link, r, "Could not send rtnetlink message: %m");
+
+        link_ref(link);
+
+        return 0;
+}
+
 static int set_mtu_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link) {
         int r;
 
@@ -1127,22 +1199,19 @@ static int link_acquire_ipv4_conf(Link *link) {
         assert(link->manager);
         assert(link->manager->event);
 
-        if (link_ipv4ll_enabled(link, ADDRESS_FAMILY_IPV4)) {
-                assert(link->ipv4ll);
-
-                log_link_debug(link, "Acquiring IPv4 link-local address");
-
-                r = sd_ipv4ll_start(link->ipv4ll);
-                if (r < 0)
-                        return log_link_warning_errno(link, r, "Could not acquire IPv4 link-local address: %m");
-        }
-
         if (link->dhcp_client) {
                 log_link_debug(link, "Acquiring DHCPv4 lease");
 
                 r = sd_dhcp_client_start(link->dhcp_client);
                 if (r < 0)
                         return log_link_warning_errno(link, r, "Could not acquire DHCPv4 lease: %m");
+
+        } else if (link->ipv4ll) {
+                log_link_debug(link, "Acquiring IPv4 link-local address");
+
+                r = sd_ipv4ll_start(link->ipv4ll);
+                if (r < 0)
+                        return log_link_warning_errno(link, r, "Could not acquire IPv4 link-local address: %m");
         }
 
         return 0;
@@ -1306,23 +1375,10 @@ static int link_up(Link *link) {
         if (r < 0)
                 return log_link_error_errno(link, r, "Could not allocate RTM_SETLINK message: %m");
 
-        /* set it free if not enslaved with networkd */
-        if (!link->network->bridge && !link->network->bond && !link->network->vrf) {
-                r = sd_netlink_message_append_u32(req, IFLA_MASTER, 0);
-                if (r < 0)
-                        return log_link_error_errno(link, r, "Could not append IFLA_MASTER attribute: %m");
-        }
-
         r = sd_rtnl_message_link_set_flags(req, IFF_UP, IFF_UP);
         if (r < 0)
                 return log_link_error_errno(link, r, "Could not set link flags: %m");
 
-        if (link->network->mac) {
-                r = sd_netlink_message_append_ether_addr(req, IFLA_ADDRESS, link->network->mac);
-                if (r < 0)
-                        return log_link_error_errno(link, r, "Could not set MAC address: %m");
-        }
-
         r = netlink_call_async(link->manager->rtnl, NULL, req, link_up_handler,
                                link_netlink_destroy_callback, link);
         if (r < 0)
@@ -1970,6 +2026,14 @@ int link_configure(Link *link) {
         if (r < 0)
                 return r;
 
+        r = link_set_mac(link);
+        if (r < 0)
+                return r;
+
+        r = link_set_nomaster(link);
+        if (r < 0)
+                return r;
+
         r = link_set_flags(link);
         if (r < 0)
                 return r;
@@ -2073,7 +2137,7 @@ static int link_reconfigure_internal(Link *link, sd_netlink_message *m, bool for
 
         r = network_get(link->manager, link->iftype, link->sd_device,
                         link->ifname, link->alternative_names, link->driver,
-                        &link->mac, &link->permanent_mac,
+                        &link->hw_addr.addr.ether, &link->permanent_mac,
                         link->wlan_iftype, link->ssid, &link->bssid, &network);
         if (r == -ENOENT) {
                 link_enter_unmanaged(link);
@@ -2090,13 +2154,10 @@ static int link_reconfigure_internal(Link *link, sd_netlink_message *m, bool for
         log_link_info(link, "Re-configuring with %s", network->filename);
 
         /* Dropping old .network file */
-        r = link_stop_clients(link, false);
+        r = link_stop_engines(link, false);
         if (r < 0)
                 return r;
 
-        if (link->dhcp_server)
-                (void) sd_dhcp_server_stop(link->dhcp_server);
-
         r = link_drop_config(link);
         if (r < 0)
                 return r;
@@ -2111,6 +2172,7 @@ static int link_reconfigure_internal(Link *link, sd_netlink_message *m, bool for
         link_free_carrier_maps(link);
         link_free_engines(link);
         link->network = network_unref(link->network);
+        link_unref(set_remove(link->manager->links_requesting_uuid, link));
 
         /* Then, apply new .network file */
         r = network_apply(network, link);
@@ -2211,7 +2273,7 @@ static int link_initialized_and_synced(Link *link) {
 
                 r = network_get(link->manager, link->iftype, link->sd_device,
                                 link->ifname, link->alternative_names, link->driver,
-                                &link->mac, &link->permanent_mac,
+                                &link->hw_addr.addr.ether, &link->permanent_mac,
                                 link->wlan_iftype, link->ssid, &link->bssid, &network);
                 if (r == -ENOENT) {
                         link_enter_unmanaged(link);
@@ -2320,69 +2382,6 @@ int link_initialized(Link *link, sd_device *device) {
         return 0;
 }
 
-static int link_load(Link *link) {
-        _cleanup_free_ char *network_file = NULL,
-                            *addresses = NULL,
-                            *routes = NULL,
-                            *dhcp4_address = NULL,
-                            *ipv4ll_address = NULL;
-        int r;
-
-        assert(link);
-
-        r = parse_env_file(NULL, link->state_file,
-                           "NETWORK_FILE", &network_file,
-                           "ADDRESSES", &addresses,
-                           "ROUTES", &routes,
-                           "DHCP4_ADDRESS", &dhcp4_address,
-                           "IPV4LL_ADDRESS", &ipv4ll_address);
-        if (r < 0 && r != -ENOENT)
-                return log_link_error_errno(link, r, "Failed to read %s: %m", link->state_file);
-
-        if (network_file) {
-                Network *network;
-                char *suffix;
-
-                /* drop suffix */
-                suffix = strrchr(network_file, '.');
-                if (!suffix) {
-                        log_link_debug(link, "Failed to get network name from %s", network_file);
-                        goto network_file_fail;
-                }
-                *suffix = '\0';
-
-                r = network_get_by_name(link->manager, basename(network_file), &network);
-                if (r < 0) {
-                        log_link_debug_errno(link, r, "Failed to get network %s: %m", basename(network_file));
-                        goto network_file_fail;
-                }
-
-                r = network_apply(network, link);
-                if (r < 0)
-                        return log_link_error_errno(link, r, "Failed to apply network %s: %m", basename(network_file));
-        }
-
-network_file_fail:
-
-        r = link_deserialize_addresses(link, addresses);
-        if (r < 0)
-                log_link_warning_errno(link, r, "Failed to load addresses from %s, ignoring: %m", link->state_file);
-
-        r = link_deserialize_routes(link, routes);
-        if (r < 0)
-                log_link_warning_errno(link, r, "Failed to load routes from %s, ignoring: %m", link->state_file);
-
-        r = link_deserialize_dhcp4(link, dhcp4_address);
-        if (r < 0)
-                log_link_warning_errno(link, r, "Failed to load DHCPv4 address from %s, ignoring: %m", link->state_file);
-
-        r = link_deserialize_ipv4ll(link, ipv4ll_address);
-        if (r < 0)
-                log_link_warning_errno(link, r, "Failed to load IPv4LL address from %s, ignoring: %m", link->state_file);
-
-        return 0;
-}
-
 int link_add(Manager *m, sd_netlink_message *message, Link **ret) {
         _cleanup_(sd_device_unrefp) sd_device *device = NULL;
         char ifindex_str[2 + DECIMAL_STR_MAX(int)];
@@ -2402,10 +2401,6 @@ int link_add(Manager *m, sd_netlink_message *message, Link **ret) {
 
         log_link_debug(link, "Link %d added", link->ifindex);
 
-        r = link_load(link);
-        if (r < 0)
-                return r;
-
         if (path_is_read_only_fs("/sys") <= 0) {
                 /* udev should be around */
                 sprintf(ifindex_str, "n%d", link->ifindex);
@@ -2541,15 +2536,12 @@ static int link_carrier_lost(Link *link) {
         if (link->setting_mtu)
                 return 0;
 
-        r = link_stop_clients(link, false);
+        r = link_stop_engines(link, false);
         if (r < 0) {
                 link_enter_failed(link);
                 return r;
         }
 
-        if (link->dhcp_server)
-                (void) sd_dhcp_server_stop(link->dhcp_server);
-
         r = link_drop_config(link);
         if (r < 0)
                 return r;
@@ -2609,7 +2601,7 @@ static int link_admin_state_up(Link *link) {
 
 int link_update(Link *link, sd_netlink_message *m) {
         _cleanup_strv_free_ char **s = NULL;
-        struct ether_addr mac;
+        hw_addr_data hw_addr;
         const char *ifname;
         uint32_t mtu;
         bool had_carrier, carrier_gained, carrier_lost, link_was_admin_up;
@@ -2668,19 +2660,13 @@ int link_update(Link *link, sd_netlink_message *m) {
 
         /* The kernel may broadcast NEWLINK messages without the MAC address
            set, simply ignore them. */
-        r = sd_netlink_message_read_ether_addr(m, IFLA_ADDRESS, &mac);
-        if (r >= 0 && memcmp(link->mac.ether_addr_octet, mac.ether_addr_octet, ETH_ALEN) != 0) {
+        r = netlink_message_read_hw_addr(m, IFLA_ADDRESS, &hw_addr);
+        if (r >= 0 && (link->hw_addr.length != hw_addr.length ||
+                       memcmp(link->hw_addr.addr.bytes, hw_addr.addr.bytes, hw_addr.length) != 0)) {
 
-                memcpy(link->mac.ether_addr_octet, mac.ether_addr_octet, ETH_ALEN);
+                memcpy(link->hw_addr.addr.bytes, hw_addr.addr.bytes, hw_addr.length);
 
-                log_link_debug(link, "Gained new MAC address: "
-                               "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
-                               mac.ether_addr_octet[0],
-                               mac.ether_addr_octet[1],
-                               mac.ether_addr_octet[2],
-                               mac.ether_addr_octet[3],
-                               mac.ether_addr_octet[4],
-                               mac.ether_addr_octet[5]);
+                log_link_debug(link, "Gained new hardware address: %s", HW_ADDR_TO_STR(&hw_addr));
 
                 r = ipv4ll_update_mac(link);
                 if (r < 0)
@@ -2694,12 +2680,12 @@ int link_update(Link *link, sd_netlink_message *m) {
                 if (r < 0)
                         return log_link_warning_errno(link, r, "Could not update MAC address in DHCPv6 client: %m");
 
-                r = dhcp6_update_mac(link);
+                r = radv_update_mac(link);
                 if (r < 0)
                         return log_link_warning_errno(link, r, "Could not update MAC address for Router Advertisement: %m");
 
                 if (link->ndisc) {
-                        r = sd_ndisc_set_mac(link->ndisc, &link->mac);
+                        r = sd_ndisc_set_mac(link->ndisc, &link->hw_addr.addr.ether);
                         if (r < 0)
                                 return log_link_warning_errno(link, r, "Could not update MAC for NDisc: %m");
                 }
@@ -3060,18 +3046,6 @@ int link_save(Link *link) {
                                 fputs_with_space(f, n, NULL, &space);
                         fputc('\n', f);
                 }
-
-                /************************************************************/
-
-                r = link_serialize_addresses(link, f);
-                if (r < 0)
-                        goto fail;
-
-                /************************************************************/
-
-                r = link_serialize_routes(link, f);
-                if (r < 0)
-                        goto fail;
         }
 
         print_link_hashmap(f, "CARRIER_BOUND_TO=", link->bound_to_links);
@@ -3088,10 +3062,6 @@ int link_save(Link *link) {
         } else
                 (void) unlink(link->lease_file);
 
-        r = link_serialize_ipv4ll(link, f);
-        if (r < 0)
-                goto fail;
-
         r = link_serialize_dhcp6_client(link, f);
         if (r < 0)
                 goto fail;
index 6e435796e5f8619e46482e45908a225c9a7afba5..666ba4acf21576b842b6edfd632de9d2b1089b5a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <endian.h>
@@ -16,6 +16,7 @@
 #include "sd-radv.h"
 #include "sd-netlink.h"
 
+#include "ether-addr-util.h"
 #include "log-link.h"
 #include "network-util.h"
 #include "networkd-util.h"
@@ -52,7 +53,8 @@ typedef struct Link {
         char *kind;
         unsigned short iftype;
         char *state_file;
-        struct ether_addr mac;
+        hw_addr_data hw_addr;
+        hw_addr_data bcast_addr;
         struct ether_addr permanent_mac;
         struct in6_addr ipv6ll_address;
         uint32_t mtu;
@@ -229,9 +231,9 @@ int link_ipv6ll_gained(Link *link, const struct in6_addr *address);
 
 int link_set_mtu(Link *link, uint32_t mtu);
 
-bool link_ipv4ll_enabled(Link *link, AddressFamily mask);
+bool link_ipv4ll_enabled(Link *link);
 
-int link_stop_clients(Link *link, bool may_keep_dhcp);
+int link_stop_engines(Link *link, bool may_keep_dhcp);
 
 const char* link_state_to_string(LinkState s) _const_;
 LinkState link_state_from_string(const char *s) _pure_;
index 65a8a314d602adf6412fdf74bc7b5d9492a8f52e..c22852ff5042abd03c79e74a9155df8316e530dd 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 #include <net/if_arp.h>
@@ -93,7 +93,7 @@ int link_lldp_rx_configure(Link *link) {
         if (r < 0)
                 return r;
 
-        r = sd_lldp_set_filter_address(link->lldp, &link->mac);
+        r = sd_lldp_set_filter_address(link->lldp, &link->hw_addr.addr.ether);
         if (r < 0)
                 return r;
 
index 8e1a6a0b62101bff6f4632e8a999f4bdaf6bc685..78c522893b4125663d9ad00716dce3a45d39db79 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "conf-parser.h"
index c8e56a5fece64efcf06a73531711a8f6978c67c3..b03d948bd89565496c77aaac6ba736340754fabd 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <endian.h>
 #include <inttypes.h>
@@ -313,7 +313,7 @@ static int link_send_lldp(Link *link) {
                 SD_LLDP_SYSTEM_CAPABILITIES_STATION;
 
         r = lldp_make_packet(link->network->lldp_emit,
-                             &link->mac,
+                             &link->hw_addr.addr.ether,
                              sd_id128_to_string(machine_id, machine_id_string),
                              link->ifname,
                              (uint16_t) ttl,
index 1409984ac02fda3f0bcf80897694f3089a727ccf..aae30cba0f97e2e38d00127aa30ab4cb32c4a01c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 8dbcdff8268942212a139d24e4c192551733b6af..a0ac8b51fbf50ffa13fe2add0d7b922a3e823d8a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 #include <netinet/in.h>
index e19d7069270605f3af54fd6a84386eb6784145b1..08ddfbdb73b5368b95afd31e8bbb991df72c386b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 2cd68300727dcc4aeb9b34f6c9470e661b7128cc..a10860b63bc0f040dc763044f02235efa1f54d99 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
 #include <sys/socket.h>
@@ -11,6 +11,7 @@
 #include "sd-netlink.h"
 
 #include "alloc-util.h"
+#include "bus-error.h"
 #include "bus-log-control-api.h"
 #include "bus-polkit.h"
 #include "bus-util.h"
@@ -38,6 +39,7 @@
 #include "ordered-set.h"
 #include "path-lookup.h"
 #include "path-util.h"
+#include "selinux-util.h"
 #include "set.h"
 #include "signal-util.h"
 #include "stat-util.h"
@@ -864,7 +866,7 @@ void manager_free(Manager *m) {
         free(m->state_file);
 
         HASHMAP_FOREACH(link, m->links)
-                (void) link_stop_clients(link, true);
+                (void) link_stop_engines(link, true);
 
         m->dhcp6_prefixes = hashmap_free_with_destructor(m->dhcp6_prefixes, dhcp6_pd_free);
         m->dhcp6_pd_prefixes = set_free_with_destructor(m->dhcp6_pd_prefixes, dhcp6_pd_free);
@@ -971,7 +973,7 @@ static int manager_enumerate_internal(
 
         r = sd_netlink_call(m->rtnl, req, 0, &reply);
         if (r < 0) {
-                if (r == -EOPNOTSUPP && name) {
+                if (name && (r == -EOPNOTSUPP || (r == -EINVAL && mac_selinux_enforcing()))) {
                         log_debug_errno(r, "%s are not supported by the kernel. Ignoring.", name);
                         return 0;
                 }
@@ -1156,15 +1158,16 @@ void manager_dirty(Manager *manager) {
 }
 
 static int set_hostname_handler(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) {
-        _unused_ Manager *manager = userdata;
         const sd_bus_error *e;
+        int r;
 
         assert(m);
-        assert(manager);
 
         e = sd_bus_message_get_error(m);
-        if (e)
-                log_warning_errno(sd_bus_error_get_errno(e), "Could not set hostname: %s", e->message);
+        if (e) {
+                r = sd_bus_error_get_errno(e);
+                log_warning_errno(r, "Could not set hostname: %s", bus_error_message(e, r));
+        }
 
         return 1;
 }
@@ -1202,15 +1205,16 @@ int manager_set_hostname(Manager *m, const char *hostname) {
 }
 
 static int set_timezone_handler(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) {
-        _unused_ Manager *manager = userdata;
         const sd_bus_error *e;
+        int r;
 
         assert(m);
-        assert(manager);
 
         e = sd_bus_message_get_error(m);
-        if (e)
-                log_warning_errno(sd_bus_error_get_errno(e), "Could not set timezone: %s", e->message);
+        if (e) {
+                r = sd_bus_error_get_errno(e);
+                log_warning_errno(r, "Could not set timezone: %s", bus_error_message(e, r));
+        }
 
         return 1;
 }
index ac7de58c649a8ee34dc27d932426903aceaa1256..b67116be59ba0e3c2cd0dca861a3fe5afbe416d8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index bca3e620dd4528597cfbc2a770f355ec04a3b99d..0300dced621b84b87f448f987f4523983a1c333d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 
index 563a9e6d994a8cbb94e2f95c946c578501eabeac..ea8841275e3ce2c2c5ee29d52a332744f60e0a41 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index c67dd7d88ed5ad012b9bc108c64c49d65d87801e..d2aa3db175fc79da8cf6407cfbc1c982ce6126bb 100644 (file)
@@ -1,10 +1,11 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2014 Intel Corporation. All rights reserved.
 ***/
 
 #include <arpa/inet.h>
 #include <netinet/icmp6.h>
+#include <net/if_arp.h>
 #include <linux/if.h>
 
 #include "sd-ndisc.h"
@@ -14,7 +15,6 @@
 #include "networkd-dhcp6.h"
 #include "networkd-manager.h"
 #include "networkd-ndisc.h"
-#include "networkd-sysctl.h"
 #include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
@@ -52,19 +52,23 @@ bool link_ipv6_accept_ra_enabled(Link *link) {
         if (!link_ipv6ll_enabled(link))
                 return false;
 
-        /* If unset use system default (enabled if local forwarding is disabled.
-         * disabled if local forwarding is enabled).
-         * If set, ignore or enforce RA independent of local forwarding state.
-         */
-        if (link->network->ipv6_accept_ra < 0)
+        assert(link->network->ipv6_accept_ra >= 0);
+        return link->network->ipv6_accept_ra;
+}
+
+void network_adjust_ipv6_accept_ra(Network *network) {
+        assert(network);
+
+        if (!FLAGS_SET(network->link_local, ADDRESS_FAMILY_IPV6)) {
+                if (network->ipv6_accept_ra > 0)
+                        log_warning("%s: IPv6AcceptRA= is enabled but IPv6 link local addressing is disabled or not supported. "
+                                    "Disabling IPv6AcceptRA=.", network->filename);
+                network->ipv6_accept_ra = false;
+        }
+
+        if (network->ipv6_accept_ra < 0)
                 /* default to accept RA if ip_forward is disabled and ignore RA if ip_forward is enabled */
-                return !link_ip_forward_enabled(link, AF_INET6);
-        else if (link->network->ipv6_accept_ra > 0)
-                /* accept RA even if ip_forward is enabled */
-                return true;
-        else
-                /* ignore RA */
-                return false;
+                network->ipv6_accept_ra = !FLAGS_SET(network->ip_forward, ADDRESS_FAMILY_IPV6);
 }
 
 static int ndisc_remove_old_one(Link *link, const struct in6_addr *router, bool force);
@@ -461,7 +465,7 @@ static int ndisc_router_process_default(Link *link, sd_ndisc_router *rt) {
         union in_addr_union gateway;
         uint16_t lifetime;
         unsigned preference;
-        uint32_t mtu;
+        uint32_t table, mtu;
         usec_t time_now;
         int r;
 
@@ -504,12 +508,14 @@ static int ndisc_router_process_default(Link *link, sd_ndisc_router *rt) {
         else if (r < 0)
                 return log_link_error_errno(link, r, "Failed to get default router MTU from RA: %m");
 
+        table = link_get_ipv6_accept_ra_route_table(link);
+
         r = route_new(&route);
         if (r < 0)
                 return log_oom();
 
         route->family = AF_INET6;
-        route->table = link_get_ipv6_accept_ra_route_table(link);
+        route->table = table;
         route->priority = link->network->dhcp6_route_metric;
         route->protocol = RTPROT_RA;
         route->pref = preference;
@@ -524,14 +530,24 @@ static int ndisc_router_process_default(Link *link, sd_ndisc_router *rt) {
 
         Route *route_gw;
         HASHMAP_FOREACH(route_gw, link->network->routes_by_section) {
-                if (!route_gw->gateway_from_dhcp)
+                if (!route_gw->gateway_from_dhcp_or_ra)
                         continue;
 
-                if (route_gw->family != AF_INET6)
+                if (route_gw->gw_family != AF_INET6)
                         continue;
 
                 route_gw->gw = gateway;
-                route_gw->gw_family = AF_INET6;
+                if (!route_gw->table_set)
+                        route_gw->table = table;
+                if (!route_gw->priority_set)
+                        route_gw->priority = link->network->dhcp6_route_metric;
+                if (!route_gw->protocol_set)
+                        route_gw->protocol = RTPROT_RA;
+                if (!route_gw->pref_set)
+                        route->pref = preference;
+                route_gw->lifetime = time_now + lifetime * USEC_PER_SEC;
+                if (route_gw->mtu == 0)
+                        route_gw->mtu = mtu;
 
                 r = ndisc_route_configure(route_gw, link, rt);
                 if (r < 0)
@@ -578,7 +594,11 @@ static int make_stableprivate_address(Link *link, const struct in6_addr *prefix,
         l = MAX(DIV_ROUND_UP(prefix_len, 8), 8);
         siphash24_compress(prefix, l, &state);
         siphash24_compress_string(link->ifname, &state);
-        siphash24_compress(&link->mac, sizeof(struct ether_addr), &state);
+        /* Only last 8 bytes of IB MAC are stable */
+        if (link->iftype == ARPHRD_INFINIBAND)
+                siphash24_compress(&link->hw_addr.addr.infiniband[12], 8, &state);
+        else
+                siphash24_compress(link->hw_addr.addr.bytes, link->hw_addr.length, &state);
         siphash24_compress(&dad_counter, sizeof(uint8_t), &state);
 
         rid = htole64(siphash24_finalize(&state));
@@ -1143,13 +1163,17 @@ static int ndisc_router_handler(Link *link, sd_ndisc_router *rt) {
         if (r < 0)
                 return log_link_error_errno(link, r, "Failed to get RA flags: %m");
 
-        if ((flags & (ND_RA_FLAG_MANAGED | ND_RA_FLAG_OTHER) && link->network->ipv6_accept_ra_start_dhcp6_client)) {
+        if ((flags & (ND_RA_FLAG_MANAGED | ND_RA_FLAG_OTHER) &&
+             link->network->ipv6_accept_ra_start_dhcp6_client != IPV6_ACCEPT_RA_START_DHCP6_CLIENT_NO) ||
+            link->network->ipv6_accept_ra_start_dhcp6_client == IPV6_ACCEPT_RA_START_DHCP6_CLIENT_ALWAYS) {
 
-                if (link->network->ipv6_accept_ra_start_dhcp6_client == IPV6_ACCEPT_RA_START_DHCP6_CLIENT_ALWAYS)
-                        r = dhcp6_request_address(link, false);
-                else
+                if (flags & (ND_RA_FLAG_MANAGED | ND_RA_FLAG_OTHER))
                         /* (re)start DHCPv6 client in stateful or stateless mode according to RA flags */
                         r = dhcp6_request_address(link, !(flags & ND_RA_FLAG_MANAGED));
+                else
+                        /* When IPv6AcceptRA.DHCPv6Client=always, start dhcp6 client in managed mode
+                         * even if router does not have M or O flag. */
+                        r = dhcp6_request_address(link, false);
                 if (r < 0 && r != -EBUSY)
                         return log_link_error_errno(link, r, "Could not acquire DHCPv6 lease on NDisc request: %m");
                 else
@@ -1242,7 +1266,7 @@ int ndisc_configure(Link *link) {
                         return r;
         }
 
-        r = sd_ndisc_set_mac(link->ndisc, &link->mac);
+        r = sd_ndisc_set_mac(link->ndisc, &link->hw_addr.addr.ether);
         if (r < 0)
                 return r;
 
index fd7bb0e97fcceb80f8b0f86a2e622f1a0dd2bc8f..1562411224895d0b72f82e1a5b8a614745290a2a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "conf-parser.h"
@@ -71,6 +71,8 @@ static inline char* NDISC_DNSSL_DOMAIN(const NDiscDNSSL *n) {
 
 bool link_ipv6_accept_ra_enabled(Link *link);
 
+void network_adjust_ipv6_accept_ra(Network *network);
+
 int ndisc_configure(Link *link);
 void ndisc_vacuum(Link *link);
 void ndisc_flush(Link *link);
index b553f1707ecfb45e8ce05843f4952fc8ea2df54e..c805d52cf3e8256ee0f994a900e843ad33156c8b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "hashmap.h"
index bb403ef2da2e00c6613c92de91e40227daf5c6fc..8ad790be2db5a9cb946a582b6ff2305d5d5057c5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 70fddd56a53155d524137a3b55e8caf73f08ecad..8c52faf1856c726c128a50a262ef0acf74805d58 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "ether-addr-util.h"
@@ -45,11 +45,11 @@ const sd_bus_vtable network_vtable[] = {
 
         SD_BUS_PROPERTY("Description", "s", NULL, offsetof(Network, description), SD_BUS_VTABLE_PROPERTY_CONST),
         SD_BUS_PROPERTY("SourcePath", "s", NULL, offsetof(Network, filename), SD_BUS_VTABLE_PROPERTY_CONST),
-        SD_BUS_PROPERTY("MatchMAC", "as", property_get_ether_addrs, offsetof(Network, match_mac), SD_BUS_VTABLE_PROPERTY_CONST),
-        SD_BUS_PROPERTY("MatchPath", "as", NULL, offsetof(Network, match_path), SD_BUS_VTABLE_PROPERTY_CONST),
-        SD_BUS_PROPERTY("MatchDriver", "as", NULL, offsetof(Network, match_driver), SD_BUS_VTABLE_PROPERTY_CONST),
-        SD_BUS_PROPERTY("MatchType", "as", NULL, offsetof(Network, match_type), SD_BUS_VTABLE_PROPERTY_CONST),
-        SD_BUS_PROPERTY("MatchName", "as", NULL, offsetof(Network, match_name), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("MatchMAC", "as", property_get_ether_addrs, offsetof(Network, match.mac), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("MatchPath", "as", NULL, offsetof(Network, match.path), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("MatchDriver", "as", NULL, offsetof(Network, match.driver), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("MatchType", "as", NULL, offsetof(Network, match.iftype), SD_BUS_VTABLE_PROPERTY_CONST),
+        SD_BUS_PROPERTY("MatchName", "as", NULL, offsetof(Network, match.ifname), SD_BUS_VTABLE_PROPERTY_CONST),
 
         SD_BUS_VTABLE_END
 };
index 650e145d42f2017cc434183a5cb29a3b6a1b2c17..cca1e0af33f8bf3ee67b94735a13a38bd09df5aa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 21d2e820e9cfa53859dc06d8aa5ad04b76149ac6..619c6a8c594c0da9a471e41a3174f02bb2f371f0 100644 (file)
@@ -5,7 +5,7 @@ _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
 #include <stddef.h>
 #include "conf-parser.h"
 #include "netem.h"
-#include "network-internal.h"
+#include "net-condition.h"
 #include "networkd-address-label.h"
 #include "networkd-address.h"
 #include "networkd-can.h"
@@ -41,16 +41,16 @@ struct ConfigPerfItem;
 %struct-type
 %includes
 %%
-Match.MACAddress,                            config_parse_hwaddrs,                                     0,                             offsetof(Network, match_mac)
-Match.PermanentMACAddress,                   config_parse_hwaddrs,                                     0,                             offsetof(Network, match_permanent_mac)
-Match.Path,                                  config_parse_match_strv,                                  0,                             offsetof(Network, match_path)
-Match.Driver,                                config_parse_match_strv,                                  0,                             offsetof(Network, match_driver)
-Match.Type,                                  config_parse_match_strv,                                  0,                             offsetof(Network, match_type)
-Match.WLANInterfaceType,                     config_parse_match_strv,                                  0,                             offsetof(Network, match_wlan_iftype)
-Match.SSID,                                  config_parse_match_strv,                                  0,                             offsetof(Network, match_ssid)
-Match.BSSID,                                 config_parse_hwaddrs,                                     0,                             offsetof(Network, match_bssid)
-Match.Name,                                  config_parse_match_ifnames,                               IFNAME_VALID_ALTERNATIVE,      offsetof(Network, match_name)
-Match.Property,                              config_parse_match_property,                              0,                             offsetof(Network, match_property)
+Match.MACAddress,                            config_parse_hwaddrs,                                     0,                             offsetof(Network, match.mac)
+Match.PermanentMACAddress,                   config_parse_hwaddrs,                                     0,                             offsetof(Network, match.permanent_mac)
+Match.Path,                                  config_parse_match_strv,                                  0,                             offsetof(Network, match.path)
+Match.Driver,                                config_parse_match_strv,                                  0,                             offsetof(Network, match.driver)
+Match.Type,                                  config_parse_match_strv,                                  0,                             offsetof(Network, match.iftype)
+Match.WLANInterfaceType,                     config_parse_match_strv,                                  0,                             offsetof(Network, match.wifi_iftype)
+Match.SSID,                                  config_parse_match_strv,                                  0,                             offsetof(Network, match.ssid)
+Match.BSSID,                                 config_parse_hwaddrs,                                     0,                             offsetof(Network, match.bssid)
+Match.Name,                                  config_parse_match_ifnames,                               IFNAME_VALID_ALTERNATIVE,      offsetof(Network, match.ifname)
+Match.Property,                              config_parse_match_property,                              0,                             offsetof(Network, match.property)
 Match.Host,                                  config_parse_net_condition,                               CONDITION_HOST,                offsetof(Network, conditions)
 Match.Virtualization,                        config_parse_net_condition,                               CONDITION_VIRTUALIZATION,      offsetof(Network, conditions)
 Match.KernelCommandLine,                     config_parse_net_condition,                               CONDITION_KERNEL_COMMAND_LINE, offsetof(Network, conditions)
@@ -126,6 +126,8 @@ Network.BindCarrier,                         config_parse_strv,
 Network.ConfigureWithoutCarrier,             config_parse_bool,                                        0,                             offsetof(Network, configure_without_carrier)
 Network.IgnoreCarrierLoss,                   config_parse_tristate,                                    0,                             offsetof(Network, ignore_carrier_loss)
 Network.KeepConfiguration,                   config_parse_keep_configuration,                          0,                             offsetof(Network, keep_configuration)
+Network.IPv6SendRA,                          config_parse_router_prefix_delegation,                    0,                             offsetof(Network, router_prefix_delegation)
+Network.DHCPv6PrefixDelegation,              config_parse_tristate,                                    0,                             offsetof(Network, dhcp6_pd)
 Address.Address,                             config_parse_address,                                     0,                             0
 Address.Peer,                                config_parse_address,                                     0,                             0
 Address.Broadcast,                           config_parse_broadcast,                                   0,                             0
@@ -209,14 +211,14 @@ DHCPv4.SendRelease,                          config_parse_bool,
 DHCPv4.SendDecline,                          config_parse_bool,                                        0,                             offsetof(Network, dhcp_send_decline)
 DHCPv4.DenyList,                             config_parse_dhcp_acl_ip_address,                         0,                             0
 DHCPv4.AllowList,                            config_parse_dhcp_acl_ip_address,                         0,                             0
-DHCPv4.IPServiceType,                        config_parse_dhcp_ip_service_type,                        0,                             offsetof(Network, ip_service_type)
+DHCPv4.IPServiceType,                        config_parse_dhcp_ip_service_type,                        0,                             offsetof(Network, dhcp_ip_service_type)
 DHCPv4.SendOption,                           config_parse_dhcp_send_option,                            AF_INET,                       offsetof(Network, dhcp_client_send_options)
 DHCPv4.SendVendorOption,                     config_parse_dhcp_send_option,                            0,                             offsetof(Network, dhcp_client_send_vendor_options)
 DHCPv4.RouteMTUBytes,                        config_parse_mtu,                                         AF_INET,                       offsetof(Network, dhcp_route_mtu)
 DHCPv4.FallbackLeaseLifetimeSec,             config_parse_dhcp_fallback_lease_lifetime,                0,                             0
 DHCPv6.UseDNS,                               config_parse_dhcp_use_dns,                                0,                             0
 DHCPv6.UseNTP,                               config_parse_dhcp_use_ntp,                                0,                             0
-DHCPv6.RapidCommit,                          config_parse_bool,                                        0,                             offsetof(Network, rapid_commit)
+DHCPv6.RapidCommit,                          config_parse_bool,                                        0,                             offsetof(Network, dhcp6_rapid_commit)
 DHCPv6.MUDURL,                               config_parse_dhcp6_mud_url,                               0,                             0
 DHCPv6.RequestOptions,                       config_parse_dhcp_request_options,                        AF_INET6,                      0
 DHCPv6.UserClass,                            config_parse_dhcp_user_class,                             AF_INET6,                      offsetof(Network, dhcp6_user_class)
@@ -280,19 +282,19 @@ BridgeMDB.VLANId,                            config_parse_mdb_vlan_id,
 BridgeVLAN.PVID,                             config_parse_brvlan_pvid,                                 0,                             0
 BridgeVLAN.VLAN,                             config_parse_brvlan_vlan,                                 0,                             0
 BridgeVLAN.EgressUntagged,                   config_parse_brvlan_untagged,                             0,                             0
-Network.IPv6PrefixDelegation,                config_parse_router_prefix_delegation,                    0,                             offsetof(Network, router_prefix_delegation)
 DHCPv6PrefixDelegation.SubnetId,             config_parse_dhcp6_pd_subnet_id,                          0,                             offsetof(Network, dhcp6_pd_subnet_id)
+DHCPv6PrefixDelegation.Announce,             config_parse_bool,                                        0,                             offsetof(Network, dhcp6_pd_announce)
 DHCPv6PrefixDelegation.Assign,               config_parse_bool,                                        0,                             offsetof(Network, dhcp6_pd_assign)
 DHCPv6PrefixDelegation.Token,                config_parse_dhcp6_pd_token,                              0,                             offsetof(Network, dhcp6_pd_token)
-IPv6PrefixDelegation.RouterLifetimeSec,      config_parse_sec,                                         0,                             offsetof(Network, router_lifetime_usec)
-IPv6PrefixDelegation.Managed,                config_parse_bool,                                        0,                             offsetof(Network, router_managed)
-IPv6PrefixDelegation.OtherInformation,       config_parse_bool,                                        0,                             offsetof(Network, router_other_information)
-IPv6PrefixDelegation.RouterPreference,       config_parse_router_preference,                           0,                             0
-IPv6PrefixDelegation.EmitDNS,                config_parse_bool,                                        0,                             offsetof(Network, router_emit_dns)
-IPv6PrefixDelegation.DNS,                    config_parse_radv_dns,                                    0,                             0
-IPv6PrefixDelegation.EmitDomains,            config_parse_bool,                                        0,                             offsetof(Network, router_emit_domains)
-IPv6PrefixDelegation.Domains,                config_parse_radv_search_domains,                         0,                             0
-IPv6PrefixDelegation.DNSLifetimeSec,         config_parse_sec,                                         0,                             offsetof(Network, router_dns_lifetime_usec)
+IPv6SendRA.RouterLifetimeSec,                config_parse_sec,                                         0,                             offsetof(Network, router_lifetime_usec)
+IPv6SendRA.Managed,                          config_parse_bool,                                        0,                             offsetof(Network, router_managed)
+IPv6SendRA.OtherInformation,                 config_parse_bool,                                        0,                             offsetof(Network, router_other_information)
+IPv6SendRA.RouterPreference,                 config_parse_router_preference,                           0,                             0
+IPv6SendRA.EmitDNS,                          config_parse_bool,                                        0,                             offsetof(Network, router_emit_dns)
+IPv6SendRA.DNS,                              config_parse_radv_dns,                                    0,                             0
+IPv6SendRA.EmitDomains,                      config_parse_bool,                                        0,                             offsetof(Network, router_emit_domains)
+IPv6SendRA.Domains,                          config_parse_radv_search_domains,                         0,                             0
+IPv6SendRA.DNSLifetimeSec,                   config_parse_sec,                                         0,                             offsetof(Network, router_dns_lifetime_usec)
 IPv6Prefix.Prefix,                           config_parse_prefix,                                      0,                             0
 IPv6Prefix.OnLink,                           config_parse_prefix_flags,                                0,                             0
 IPv6Prefix.AddressAutoconfiguration,         config_parse_prefix_flags,                                0,                             0
@@ -429,6 +431,16 @@ TrivialLinkEqualizer.Handle,                 config_parse_qdisc_handle,
 TrivialLinkEqualizer.Id,                     config_parse_trivial_link_equalizer_id,                   QDISC_KIND_TEQL,               0
 /* backwards compatibility: do not add new entries to this section */
 Network.IPv4LL,                              config_parse_ipv4ll,                                      0,                             offsetof(Network, link_local)
+Network.IPv6PrefixDelegation,                config_parse_router_prefix_delegation,                    0,                             offsetof(Network, router_prefix_delegation)
+IPv6PrefixDelegation.RouterLifetimeSec,      config_parse_sec,                                         0,                             offsetof(Network, router_lifetime_usec)
+IPv6PrefixDelegation.Managed,                config_parse_bool,                                        0,                             offsetof(Network, router_managed)
+IPv6PrefixDelegation.OtherInformation,       config_parse_bool,                                        0,                             offsetof(Network, router_other_information)
+IPv6PrefixDelegation.RouterPreference,       config_parse_router_preference,                           0,                             0
+IPv6PrefixDelegation.EmitDNS,                config_parse_bool,                                        0,                             offsetof(Network, router_emit_dns)
+IPv6PrefixDelegation.DNS,                    config_parse_radv_dns,                                    0,                             0
+IPv6PrefixDelegation.EmitDomains,            config_parse_bool,                                        0,                             offsetof(Network, router_emit_domains)
+IPv6PrefixDelegation.Domains,                config_parse_radv_search_domains,                         0,                             0
+IPv6PrefixDelegation.DNSLifetimeSec,         config_parse_sec,                                         0,                             offsetof(Network, router_dns_lifetime_usec)
 DHCPv4.BlackList,                            config_parse_dhcp_acl_ip_address,                         0,                             0
 DHCP.ClientIdentifier,                       config_parse_dhcp_client_identifier,                      0,                             offsetof(Network, dhcp_client_identifier)
 DHCP.UseDNS,                                 config_parse_dhcp_use_dns,                                0,                             0
@@ -452,7 +464,7 @@ DHCP.RouteTable,                             config_parse_section_route_table,
 DHCP.UseTimezone,                            config_parse_bool,                                        0,                             offsetof(Network, dhcp_use_timezone)
 DHCP.IAID,                                   config_parse_iaid,                                        0,                             0
 DHCP.ListenPort,                             config_parse_uint16,                                      0,                             offsetof(Network, dhcp_client_port)
-DHCP.RapidCommit,                            config_parse_bool,                                        0,                             offsetof(Network, rapid_commit)
+DHCP.RapidCommit,                            config_parse_bool,                                        0,                             offsetof(Network, dhcp6_rapid_commit)
 DHCP.ForceDHCPv6PDOtherInformation,          config_parse_bool,                                        0,                             offsetof(Network, dhcp6_force_pd_other_information)
 DHCPv4.UseDomainName,                        config_parse_dhcp_use_domains,                            0,                             offsetof(Network, dhcp_use_domains)
 DHCPv4.CriticalConnection,                   config_parse_tristate,                                    0,                             offsetof(Network, dhcp_critical)
index 9707c97653bdcbfe3c6e2712486be95911288f95..7ad8d087f41786ee7c77a338e7c37370b8a1f954 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 #include <netinet/in.h>
 #include "fd-util.h"
 #include "hostname-util.h"
 #include "in-addr-util.h"
-#include "networkd-dhcp-server.h"
-#include "network-internal.h"
+#include "net-condition.h"
 #include "networkd-address-label.h"
 #include "networkd-address.h"
+#include "networkd-dhcp-common.h"
+#include "networkd-dhcp-server.h"
 #include "networkd-fdb.h"
 #include "networkd-manager.h"
 #include "networkd-mdb.h"
+#include "networkd-ndisc.h"
 #include "networkd-neighbor.h"
 #include "networkd-network.h"
 #include "networkd-nexthop.h"
@@ -159,11 +161,7 @@ int network_verify(Network *network) {
         assert(network);
         assert(network->filename);
 
-        if (set_isempty(network->match_mac) && set_isempty(network->match_permanent_mac) &&
-            strv_isempty(network->match_path) && strv_isempty(network->match_driver) &&
-            strv_isempty(network->match_type) && strv_isempty(network->match_name) &&
-            strv_isempty(network->match_property) && strv_isempty(network->match_wlan_iftype) &&
-            strv_isempty(network->match_ssid) && !network->conditions)
+        if (net_match_is_empty(&network->match) && !network->conditions)
                 return log_warning_errno(SYNTHETIC_ERRNO(EINVAL),
                                          "%s: No valid settings found in the [Match] section, ignoring file. "
                                          "To match all interfaces, add Name=* in the [Match] section.",
@@ -188,21 +186,11 @@ int network_verify(Network *network) {
 
         if (network->bond) {
                 /* Bonding slave does not support addressing. */
-                if (network->ipv6_accept_ra > 0) {
-                        log_warning("%s: Cannot enable IPv6AcceptRA= when Bond= is specified, disabling IPv6AcceptRA=.",
-                                    network->filename);
-                        network->ipv6_accept_ra = 0;
-                }
                 if (network->link_local >= 0 && network->link_local != ADDRESS_FAMILY_NO) {
                         log_warning("%s: Cannot enable LinkLocalAddressing= when Bond= is specified, disabling LinkLocalAddressing=.",
                                     network->filename);
                         network->link_local = ADDRESS_FAMILY_NO;
                 }
-                if (network->dhcp != ADDRESS_FAMILY_NO) {
-                        log_warning("%s: Cannot enable DHCP= when Bond= is specified, disabling DHCP=.",
-                                    network->filename);
-                        network->dhcp = ADDRESS_FAMILY_NO;
-                }
                 if (network->dhcp_server) {
                         log_warning("%s: Cannot enable DHCPServer= when Bond= is specified, disabling DHCPServer=.",
                                     network->filename);
@@ -222,40 +210,14 @@ int network_verify(Network *network) {
         if (network->link_local < 0)
                 network->link_local = network->bridge ? ADDRESS_FAMILY_NO : ADDRESS_FAMILY_IPV6;
 
-        if (!FLAGS_SET(network->link_local, ADDRESS_FAMILY_IPV6)) {
-                if (network->ipv6_accept_ra > 0) {
-                        log_warning("%s: IPv6AcceptRA= is enabled by the .network file but IPv6 link local addressing is disabled. "
-                                    "Disabling IPv6AcceptRA=.", network->filename);
-                        network->ipv6_accept_ra = false;
-                }
-
-                if (FLAGS_SET(network->dhcp, ADDRESS_FAMILY_IPV6)) {
-                        log_warning("%s: DHCPv6 client is enabled by the .network file but IPv6 link local addressing is disabled. "
-                                    "Disabling DHCPv6 client.", network->filename);
-                        SET_FLAG(network->dhcp, ADDRESS_FAMILY_IPV6, false);
-                }
-
-                if (network->router_prefix_delegation != RADV_PREFIX_DELEGATION_NONE) {
-                        log_warning("%s: IPv6PrefixDelegation= is enabled but IPv6 link local addressing is disabled. "
-                                    "Disabling IPv6PrefixDelegation=.", network->filename);
-                        network->router_prefix_delegation = RADV_PREFIX_DELEGATION_NONE;
-                }
-        }
-
-        if (FLAGS_SET(network->link_local, ADDRESS_FAMILY_FALLBACK_IPV4) &&
-            !FLAGS_SET(network->dhcp, ADDRESS_FAMILY_IPV4)) {
-                log_warning("%s: fallback assignment of IPv4 link local address is enabled but DHCPv4 is disabled. "
-                            "Disabling the fallback assignment.", network->filename);
-                SET_FLAG(network->link_local, ADDRESS_FAMILY_FALLBACK_IPV4, false);
-        }
-
-        if (network->ipv6_accept_ra < 0 && network->bridge)
-                network->ipv6_accept_ra = false;
-
         /* IPMasquerade=yes implies IPForward=yes */
         if (network->ip_masquerade)
                 network->ip_forward |= ADDRESS_FAMILY_IPV4;
 
+        network_adjust_ipv6_accept_ra(network);
+        network_adjust_dhcp(network);
+        network_adjust_radv(network);
+
         if (network->mtu > 0 && network->dhcp_use_mtu) {
                 log_warning("%s: MTUBytes= in [Link] section and UseMTU= in [DHCP] section are set. "
                             "Disabling UseMTU=.", network->filename);
@@ -356,7 +318,16 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi
 
                 .required_for_online = true,
                 .required_operstate_for_online = LINK_OPERSTATE_RANGE_DEFAULT,
+                .arp = -1,
+                .multicast = -1,
+                .allmulticast = -1,
+
+                .configure_without_carrier = false,
+                .ignore_carrier_loss = -1,
+                .keep_configuration = _KEEP_CONFIGURATION_INVALID,
+
                 .dhcp = ADDRESS_FAMILY_NO,
+                .duid.type = _DUID_TYPE_INVALID,
                 .dhcp_critical = -1,
                 .dhcp_use_ntp = true,
                 .dhcp_use_sip = true,
@@ -378,14 +349,17 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi
                 .dhcp_use_mtu = false,
                 /* NOTE: from man: UseTimezone=... Defaults to "no".*/
                 .dhcp_use_timezone = false,
-                .rapid_commit = true,
+                .dhcp_ip_service_type = -1,
 
+                .dhcp6_rapid_commit = true,
                 .dhcp6_route_metric = DHCP_ROUTE_METRIC,
                 .dhcp6_use_ntp = true,
                 .dhcp6_use_dns = true,
 
-                .dhcp6_pd_subnet_id = -1,
+                .dhcp6_pd = -1,
+                .dhcp6_pd_announce = true,
                 .dhcp6_pd_assign = true,
+                .dhcp6_pd_subnet_id = -1,
 
                 .dhcp_server_emit[SD_DHCP_LEASE_DNS].emit = true,
                 .dhcp_server_emit[SD_DHCP_LEASE_NTP].emit = true,
@@ -394,6 +368,7 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi
                 .dhcp_server_emit_router = true,
                 .dhcp_server_emit_timezone = true,
 
+                .router_lifetime_usec = 30 * USEC_PER_MINUTE,
                 .router_emit_dns = true,
                 .router_emit_domains = true,
 
@@ -424,33 +399,25 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi
                 .ipv6ll_address_gen_mode = _IPV6_LINK_LOCAL_ADDRESS_GEN_MODE_INVALID,
 
                 .ipv4_accept_local = -1,
-
                 .ipv6_privacy_extensions = IPV6_PRIVACY_EXTENSIONS_NO,
                 .ipv6_accept_ra = -1,
                 .ipv6_dad_transmits = -1,
                 .ipv6_hop_limit = -1,
                 .ipv6_proxy_ndp = -1,
-                .duid.type = _DUID_TYPE_INVALID,
                 .proxy_arp = -1,
-                .arp = -1,
-                .multicast = -1,
-                .allmulticast = -1,
+
                 .ipv6_accept_ra_use_dns = true,
                 .ipv6_accept_ra_use_autonomous_prefix = true,
                 .ipv6_accept_ra_use_onlink_prefix = true,
                 .ipv6_accept_ra_route_table = RT_TABLE_MAIN,
                 .ipv6_accept_ra_route_table_set = false,
-                .ipv6_accept_ra_start_dhcp6_client = true,
+                .ipv6_accept_ra_start_dhcp6_client = IPV6_ACCEPT_RA_START_DHCP6_CLIENT_YES,
 
-                .configure_without_carrier = false,
-                .ignore_carrier_loss = -1,
-                .keep_configuration = _KEEP_CONFIGURATION_INVALID,
                 .can_triple_sampling = -1,
                 .can_termination = -1,
                 .can_listen_only = -1,
                 .can_fd_mode = -1,
                 .can_non_iso = -1,
-                .ip_service_type = -1,
         };
 
         r = config_parse_many(
@@ -476,6 +443,7 @@ int network_load_one(Manager *manager, OrderedHashmap **networks, const char *fi
                         "BridgeFDB\0"
                         "BridgeMDB\0"
                         "BridgeVLAN\0"
+                        "IPv6SendRA\0"
                         "IPv6PrefixDelegation\0"
                         "IPv6Prefix\0"
                         "IPv6RoutePrefix\0"
@@ -610,16 +578,7 @@ static Network *network_free(Network *network) {
 
         free(network->filename);
 
-        set_free_free(network->match_mac);
-        set_free_free(network->match_permanent_mac);
-        strv_free(network->match_path);
-        strv_free(network->match_driver);
-        strv_free(network->match_type);
-        strv_free(network->match_name);
-        strv_free(network->match_property);
-        strv_free(network->match_wlan_iftype);
-        strv_free(network->match_ssid);
-        set_free_free(network->match_bssid);
+        net_match_clear(&network->match);
         condition_free_list(network->conditions);
 
         free(network->description);
@@ -640,11 +599,11 @@ static Network *network_free(Network *network) {
         for (unsigned i = 0; i < network->n_dns; i++)
                 in_addr_full_free(network->dns[i]);
         free(network->dns);
-        ordered_set_free_free(network->search_domains);
-        ordered_set_free_free(network->route_domains);
+        ordered_set_free(network->search_domains);
+        ordered_set_free(network->route_domains);
         strv_free(network->bind_carrier);
 
-        ordered_set_free_free(network->router_search_domains);
+        ordered_set_free(network->router_search_domains);
         free(network->router_dns);
         set_free_free(network->ndisc_deny_listed_prefix);
 
@@ -726,13 +685,9 @@ int network_get(Manager *manager, unsigned short iftype, sd_device *device,
         assert(ret);
 
         ORDERED_HASHMAP_FOREACH(network, manager->networks)
-                if (net_match_config(network->match_mac, network->match_permanent_mac,
-                                     network->match_path, network->match_driver,
-                                     network->match_type, network->match_name, network->match_property,
-                                     network->match_wlan_iftype, network->match_ssid, network->match_bssid,
-                                     device, mac, permanent_mac, driver, iftype,
+                if (net_match_config(&network->match, device, mac, permanent_mac, driver, iftype,
                                      ifname, alternative_names, wlan_iftype, ssid, bssid)) {
-                        if (network->match_name && device) {
+                        if (network->match.ifname && device) {
                                 const char *attr;
                                 uint8_t name_assign_type = NET_NAME_UNKNOWN;
 
@@ -884,8 +839,8 @@ int config_parse_domains(
         assert(rvalue);
 
         if (isempty(rvalue)) {
-                n->search_domains = ordered_set_free_free(n->search_domains);
-                n->route_domains = ordered_set_free_free(n->route_domains);
+                n->search_domains = ordered_set_free(n->search_domains);
+                n->route_domains = ordered_set_free(n->route_domains);
                 return 0;
         }
 
@@ -933,7 +888,7 @@ int config_parse_domains(
                 }
 
                 OrderedSet **set = is_route ? &n->route_domains : &n->search_domains;
-                r = ordered_set_ensure_allocated(set, &string_hash_ops);
+                r = ordered_set_ensure_allocated(set, &string_hash_ops_free);
                 if (r < 0)
                         return log_oom();
 
index ccf739c8516330186e28b63adc51b90d3c32f764..17e7d432c99076272b893b39c0be8537d743915a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <linux/nl80211.h>
@@ -10,6 +10,7 @@
 #include "condition.h"
 #include "conf-parser.h"
 #include "hashmap.h"
+#include "net-condition.h"
 #include "netdev.h"
 #include "networkd-brvlan.h"
 #include "networkd-dhcp-common.h"
@@ -57,26 +58,18 @@ typedef struct NetworkDHCPServerEmitAddress {
 struct Network {
         Manager *manager;
 
-        char *filename;
+        unsigned n_ref;
+
         char *name;
+        char *filename;
         usec_t timestamp;
+        char *description;
 
-        unsigned n_ref;
-
-        Set *match_mac;
-        Set *match_permanent_mac;
-        char **match_path;
-        char **match_driver;
-        char **match_type;
-        char **match_name;
-        char **match_property;
-        char **match_wlan_iftype;
-        char **match_ssid;
-        Set *match_bssid;
+        /* [Match] section */
+        NetMatch match;
         LIST_HEAD(Condition, conditions);
 
-        char *description;
-
+        /* Master or stacked netdevs */
         NetDev *bridge;
         NetDev *bond;
         NetDev *vrf;
@@ -87,9 +80,31 @@ struct Network {
         char *vrf_name;
         Hashmap *stacked_netdev_names;
 
+        /* [Link] section */
+        struct ether_addr *mac;
+        uint32_t mtu;
+        uint32_t group;
+        int arp;
+        int multicast;
+        int allmulticast;
+        bool unmanaged;
+        bool required_for_online; /* Is this network required to be considered online? */
+        LinkOperationalStateRange required_operstate_for_online;
+
+        /* misc settings */
+        bool configure_without_carrier;
+        int ignore_carrier_loss;
+        KeepConfiguration keep_configuration;
+        char **bind_carrier;
+        bool default_route_on_device;
+        bool ip_masquerade;
+
         /* DHCP Client Support */
         AddressFamily dhcp;
         DHCPClientIdentifier dhcp_client_identifier;
+        DUID duid;
+        uint32_t iaid;
+        bool iaid_set;
         char *dhcp_vendor_class_identifier;
         char *dhcp_mudurl;
         char **dhcp_user_class;
@@ -102,7 +117,7 @@ struct Network {
         uint32_t dhcp_route_mtu;
         uint16_t dhcp_client_port;
         int dhcp_critical;
-        int ip_service_type;
+        int dhcp_ip_service_type;
         bool dhcp_anonymize;
         bool dhcp_send_hostname;
         bool dhcp_broadcast;
@@ -116,7 +131,6 @@ struct Network {
         bool dhcp_use_routes;
         int dhcp_use_gateway;
         bool dhcp_use_timezone;
-        bool rapid_commit;
         bool dhcp_use_hostname;
         bool dhcp_route_table_set;
         bool dhcp_send_release;
@@ -127,14 +141,13 @@ struct Network {
         Set *dhcp_request_options;
         OrderedHashmap *dhcp_client_send_options;
         OrderedHashmap *dhcp_client_send_vendor_options;
-        OrderedHashmap *dhcp_server_send_options;
-        OrderedHashmap *dhcp_server_send_vendor_options;
 
         /* DHCPv6 Client support*/
         bool dhcp6_use_dns;
         bool dhcp6_use_dns_set;
         bool dhcp6_use_ntp;
         bool dhcp6_use_ntp_set;
+        bool dhcp6_rapid_commit;
         uint8_t dhcp6_pd_length;
         uint32_t dhcp6_route_metric;
         bool dhcp6_route_metric_set;
@@ -146,6 +159,8 @@ struct Network {
         OrderedHashmap *dhcp6_client_send_options;
         OrderedHashmap *dhcp6_client_send_vendor_options;
         Set *dhcp6_request_options;
+        /* Start DHCPv6 PD also when 'O' RA flag is set, see RFC 7084, WPD-4 */
+        bool dhcp6_force_pd_other_information;
 
         /* DHCP Server Support */
         bool dhcp_server;
@@ -156,15 +171,15 @@ struct Network {
         usec_t dhcp_server_default_lease_time_usec, dhcp_server_max_lease_time_usec;
         uint32_t dhcp_server_pool_offset;
         uint32_t dhcp_server_pool_size;
+        OrderedHashmap *dhcp_server_send_options;
+        OrderedHashmap *dhcp_server_send_vendor_options;
 
         /* link local addressing support */
         AddressFamily link_local;
         IPv6LinkLocalAddressGenMode ipv6ll_address_gen_mode;
         bool ipv4ll_route;
 
-        bool default_route_on_device;
-
-        /* IPv6 prefix delegation support */
+        /* IPv6 RA support */
         RADVPrefixDelegation router_prefix_delegation;
         usec_t router_lifetime_usec;
         uint8_t router_preference;
@@ -176,13 +191,12 @@ struct Network {
         struct in6_addr *router_dns;
         unsigned n_router_dns;
         OrderedSet *router_search_domains;
-        bool dhcp6_force_pd_other_information; /* Start DHCPv6 PD also when 'O'
-                                                  RA flag is set, see RFC 7084,
-                                                  WPD-4 */
 
         /* DHCPv6 Prefix Delegation support */
-        int64_t dhcp6_pd_subnet_id;
+        int dhcp6_pd;
+        bool dhcp6_pd_announce;
         bool dhcp6_pd_assign;
+        int64_t dhcp6_pd_subnet_id;
         union in_addr_union dhcp6_pd_token;
 
         /* Bridge Support */
@@ -201,6 +215,7 @@ struct Network {
         uint16_t priority;
         MulticastRouter multicast_router;
 
+        /* Bridge VLAN */
         bool use_br_vlan;
         uint16_t pvid;
         uint32_t br_vid_bitmap[BRIDGE_VLAN_BITMAP_LEN];
@@ -218,18 +233,19 @@ struct Network {
         int can_fd_mode;
         int can_non_iso;
 
+        /* sysctl settings */
         AddressFamily ip_forward;
-        bool ip_masquerade;
         int ipv4_accept_local;
-
-        int ipv6_accept_ra;
         int ipv6_dad_transmits;
         int ipv6_hop_limit;
-        int ipv6_proxy_ndp;
-        Set *ipv6_proxy_ndp_addresses;
         int proxy_arp;
         uint32_t ipv6_mtu;
+        IPv6PrivacyExtensions ipv6_privacy_extensions;
+        int ipv6_proxy_ndp;
+        Set *ipv6_proxy_ndp_addresses;
 
+        /* IPv6 accept RA */
+        int ipv6_accept_ra;
         bool ipv6_accept_ra_use_dns;
         bool ipv6_accept_ra_use_autonomous_prefix;
         bool ipv6_accept_ra_use_onlink_prefix;
@@ -242,26 +258,6 @@ struct Network {
         Set *ndisc_deny_listed_prefix;
         OrderedSet *ipv6_tokens;
 
-        IPv6PrivacyExtensions ipv6_privacy_extensions;
-
-        struct ether_addr *mac;
-        uint32_t mtu;
-        uint32_t group;
-        int arp;
-        int multicast;
-        int allmulticast;
-        bool unmanaged;
-        bool configure_without_carrier;
-        int ignore_carrier_loss;
-        KeepConfiguration keep_configuration;
-        uint32_t iaid;
-        DUID duid;
-
-        bool iaid_set;
-
-        bool required_for_online; /* Is this network required to be considered online? */
-        LinkOperationalStateRange required_operstate_for_online;
-
         /* LLDP support */
         LLDPMode lldp_mode; /* LLDP reception */
         LLDPEmit lldp_emit; /* LLDP transmission */
@@ -284,7 +280,6 @@ struct Network {
         struct in_addr_full **dns;
         unsigned n_dns;
         OrderedSet *search_domains, *route_domains;
-
         int dns_default_route;
         ResolveSupport llmnr;
         ResolveSupport mdns;
@@ -292,8 +287,8 @@ struct Network {
         DnsOverTlsMode dns_over_tls_mode;
         Set *dnssec_negative_trust_anchors;
 
+        /* NTP */
         char **ntp;
-        char **bind_carrier;
 };
 
 Network *network_ref(Network *network);
index 6edeaabf88afa0f2e76f92bbc6dea938432d7d8f..4a09b4c91268739d87b26383ef0d0a3b1dae4399 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc.
  */
 
index 3cdb068efd73f9605785b86f4ee785db15de92e1..75714e7ef5ff92310b2f3b62511197f433188e0a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc.
  */
 
index 1167f2865f61d44202cae9499fa5f00daa2997b1..a8e1b2b4898c023be491da8349db9c70e90e6d44 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2017 Intel Corporation. All rights reserved.
 ***/
@@ -180,6 +180,35 @@ void network_drop_invalid_route_prefixes(Network *network) {
                         route_prefix_free(prefix);
 }
 
+void network_adjust_radv(Network *network) {
+        assert(network);
+
+        /* After this function is called, network->router_prefix_delegation can be treated as a boolean. */
+
+        if (network->dhcp6_pd < 0)
+                /* For backward compatibility. */
+                network->dhcp6_pd = FLAGS_SET(network->router_prefix_delegation, RADV_PREFIX_DELEGATION_DHCP6);
+
+        if (!FLAGS_SET(network->link_local, ADDRESS_FAMILY_IPV6)) {
+                if (network->router_prefix_delegation != RADV_PREFIX_DELEGATION_NONE)
+                        log_warning("%s: IPv6PrefixDelegation= is enabled but IPv6 link local addressing is disabled. "
+                                    "Disabling IPv6PrefixDelegation=.", network->filename);
+
+                network->router_prefix_delegation = RADV_PREFIX_DELEGATION_NONE;
+        }
+
+        if (network->router_prefix_delegation == RADV_PREFIX_DELEGATION_NONE) {
+                network->n_router_dns = 0;
+                network->router_dns = mfree(network->router_dns);
+                network->router_search_domains = ordered_set_free(network->router_search_domains);
+        }
+
+        if (!FLAGS_SET(network->router_prefix_delegation, RADV_PREFIX_DELEGATION_STATIC)) {
+                network->prefixes_by_section = hashmap_free_with_destructor(network->prefixes_by_section, prefix_free);
+                network->route_prefixes_by_section = hashmap_free_with_destructor(network->route_prefixes_by_section, route_prefix_free);
+        }
+}
+
 int config_parse_prefix(
                 const char *unit,
                 const char *filename,
@@ -608,10 +637,13 @@ static bool link_radv_enabled(Link *link) {
         if (!link_ipv6ll_enabled(link))
                 return false;
 
-        return link->network->router_prefix_delegation != RADV_PREFIX_DELEGATION_NONE;
+        return link->network->router_prefix_delegation;
 }
 
 int radv_configure(Link *link) {
+        uint16_t router_lifetime;
+        RoutePrefix *q;
+        Prefix *p;
         int r;
 
         assert(link);
@@ -628,7 +660,7 @@ int radv_configure(Link *link) {
         if (r < 0)
                 return r;
 
-        r = sd_radv_set_mac(link->radv, &link->mac);
+        r = sd_radv_set_mac(link->radv, &link->hw_addr.addr.ether);
         if (r < 0)
                 return r;
 
@@ -644,43 +676,42 @@ int radv_configure(Link *link) {
         if (r < 0)
                 return r;
 
-        /* a value of 0xffffffff represents infinity, 0x0 means this host is
-           not a router */
-        r = sd_radv_set_router_lifetime(link->radv,
-                                        DIV_ROUND_UP(link->network->router_lifetime_usec, USEC_PER_SEC));
+        /* a value of UINT16_MAX represents infinity, 0x0 means this host is not a router */
+        if (link->network->router_lifetime_usec == USEC_INFINITY)
+                router_lifetime = UINT16_MAX;
+        else if (link->network->router_lifetime_usec > (UINT16_MAX - 1) * USEC_PER_SEC)
+                router_lifetime = UINT16_MAX - 1;
+        else
+                router_lifetime = DIV_ROUND_UP(link->network->router_lifetime_usec, USEC_PER_SEC);
+
+        r = sd_radv_set_router_lifetime(link->radv, router_lifetime);
         if (r < 0)
                 return r;
 
-        if (link->network->router_lifetime_usec > 0) {
-                r = sd_radv_set_preference(link->radv,
-                                           link->network->router_preference);
+        if (router_lifetime > 0) {
+                r = sd_radv_set_preference(link->radv, link->network->router_preference);
                 if (r < 0)
                         return r;
         }
 
-        if (link->network->router_prefix_delegation & RADV_PREFIX_DELEGATION_STATIC) {
-                RoutePrefix *q;
-                Prefix *p;
-
-                HASHMAP_FOREACH(p, link->network->prefixes_by_section) {
-                        r = sd_radv_add_prefix(link->radv, p->radv_prefix, false);
-                        if (r == -EEXIST)
-                                continue;
-                        if (r == -ENOEXEC) {
-                                log_link_warning_errno(link, r, "[IPv6Prefix] section configured without Prefix= setting, ignoring section.");
-                                continue;
-                        }
-                        if (r < 0)
-                                return r;
+        HASHMAP_FOREACH(p, link->network->prefixes_by_section) {
+                r = sd_radv_add_prefix(link->radv, p->radv_prefix, false);
+                if (r == -EEXIST)
+                        continue;
+                if (r == -ENOEXEC) {
+                        log_link_warning_errno(link, r, "[IPv6Prefix] section configured without Prefix= setting, ignoring section.");
+                        continue;
                 }
+                if (r < 0)
+                        return r;
+        }
 
-                HASHMAP_FOREACH(q, link->network->route_prefixes_by_section) {
-                        r = sd_radv_add_route_prefix(link->radv, q->radv_route_prefix, false);
-                        if (r == -EEXIST)
-                                continue;
-                        if (r < 0)
-                                return r;
-                }
+        HASHMAP_FOREACH(q, link->network->route_prefixes_by_section) {
+                r = sd_radv_add_route_prefix(link->radv, q->radv_route_prefix, false);
+                if (r == -EEXIST)
+                        continue;
+                if (r < 0)
+                        return r;
         }
 
         return 0;
@@ -697,13 +728,11 @@ int radv_update_mac(Link *link) {
 
         restart = sd_radv_is_running(link->radv);
 
-        if (restart) {
-                r = sd_radv_stop(link->radv);
-                if (r < 0)
-                        return r;
-        }
+        r = sd_radv_stop(link->radv);
+        if (r < 0)
+                return r;
 
-        r = sd_radv_set_mac(link->radv, &link->mac);
+        r = sd_radv_set_mac(link->radv, &link->hw_addr.addr.ether);
         if (r < 0)
                 return r;
 
@@ -773,6 +802,12 @@ int config_parse_radv_dns(
         assert(lvalue);
         assert(rvalue);
 
+        if (isempty(rvalue)) {
+                n->n_router_dns = 0;
+                n->router_dns = mfree(n->router_dns);
+                return 0;
+        }
+
         for (const char *p = rvalue;;) {
                 _cleanup_free_ char *w = NULL;
                 union in_addr_union a;
@@ -834,6 +869,11 @@ int config_parse_radv_search_domains(
         assert(lvalue);
         assert(rvalue);
 
+        if (isempty(rvalue)) {
+                n->router_search_domains = ordered_set_free(n->router_search_domains);
+                return 0;
+        }
+
         for (const char *p = rvalue;;) {
                 _cleanup_free_ char *w = NULL, *idna = NULL;
 
@@ -857,7 +897,7 @@ int config_parse_radv_search_domains(
                         /* transfer ownership to simplify subsequent operations */
                         idna = TAKE_PTR(w);
 
-                r = ordered_set_ensure_allocated(&n->router_search_domains, &string_hash_ops);
+                r = ordered_set_ensure_allocated(&n->router_search_domains, &string_hash_ops_free);
                 if (r < 0)
                         return log_oom();
 
@@ -879,11 +919,51 @@ DEFINE_STRING_TABLE_LOOKUP_WITH_BOOLEAN(
                 RADVPrefixDelegation,
                 RADV_PREFIX_DELEGATION_BOTH);
 
-DEFINE_CONFIG_PARSE_ENUM(
-                config_parse_router_prefix_delegation,
-                radv_prefix_delegation,
-                RADVPrefixDelegation,
-                "Invalid router prefix delegation");
+int config_parse_router_prefix_delegation(
+                const char *unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
+
+        RADVPrefixDelegation val, *ra = data;
+        int r;
+
+        assert(filename);
+        assert(lvalue);
+        assert(rvalue);
+        assert(data);
+
+        if (streq(lvalue, "IPv6SendRA")) {
+                r = parse_boolean(rvalue);
+                if (r < 0) {
+                        log_syntax(unit, LOG_WARNING, filename, line, r,
+                                   "Invalid %s= setting, ignoring assignment: %s", lvalue, rvalue);
+                        return 0;
+                }
+
+                /* When IPv6SendRA= is enabled, only static prefixes are sent by default, and users
+                 * need to explicitly enable DHCPv6PrefixDelegation=. */
+                *ra = r ? RADV_PREFIX_DELEGATION_STATIC : RADV_PREFIX_DELEGATION_NONE;
+                return 0;
+        }
+
+        /* For backward compatibility */
+        val = radv_prefix_delegation_from_string(rvalue);
+        if (val < 0) {
+                log_syntax(unit, LOG_WARNING, filename, line, 0,
+                           "Invalid %s= setting, ignoring assignment: %s", lvalue, rvalue);
+                return 0;
+        }
+
+        *ra = val;
+        return 0;
+}
 
 int config_parse_router_preference(
                 const char *unit,
index fbb93a9accccc1b76894f639a97b546f05b06003..4dfbefef95f4ae4878f00f24d50b33bd76ea35c5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
@@ -47,6 +47,7 @@ RoutePrefix *route_prefix_free(RoutePrefix *prefix);
 
 void network_drop_invalid_prefixes(Network *network);
 void network_drop_invalid_route_prefixes(Network *network);
+void network_adjust_radv(Network *network);
 
 int radv_emit_dns(Link *link);
 int radv_configure(Link *link);
index 1ed82d9adce0f62ba30e52e96fa1e56aba04ea31..f477db1902f99ef25f8f27b1a4cf404e92782dfa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/icmpv6.h>
 #include <linux/ipv6_route.h>
@@ -152,25 +152,19 @@ static const char *format_route_protocol(int protocol, char *buf, size_t size) {
 
 static unsigned routes_max(void) {
         static thread_local unsigned cached = 0;
-
         _cleanup_free_ char *s4 = NULL, *s6 = NULL;
         unsigned val4 = ROUTES_DEFAULT_MAX_PER_FAMILY, val6 = ROUTES_DEFAULT_MAX_PER_FAMILY;
 
         if (cached > 0)
                 return cached;
 
-        if (sysctl_read("net/ipv4/route/max_size", &s4) >= 0) {
-                truncate_nl(s4);
-                if (safe_atou(s4, &val4) >= 0 &&
-                    val4 == 2147483647U)
+        if (sysctl_read_ip_property(AF_INET, NULL, "route/max_size", &s4) >= 0)
+                if (safe_atou(s4, &val4) >= 0 && val4 == 2147483647U)
                         /* This is the default "no limit" value in the kernel */
                         val4 = ROUTES_DEFAULT_MAX_PER_FAMILY;
-        }
 
-        if (sysctl_read("net/ipv6/route/max_size", &s6) >= 0) {
-                truncate_nl(s6);
+        if (sysctl_read_ip_property(AF_INET6, NULL, "route/max_size", &s6) >= 0)
                 (void) safe_atou(s6, &val6);
-        }
 
         cached = MAX(ROUTES_DEFAULT_MAX_PER_FAMILY, val4) +
                  MAX(ROUTES_DEFAULT_MAX_PER_FAMILY, val6);
@@ -299,9 +293,10 @@ void route_hash_func(const Route *route, struct siphash *state) {
                 siphash24_compress(&route->src, FAMILY_ADDRESS_SIZE(route->family), state);
 
                 siphash24_compress(&route->gw_family, sizeof(route->gw_family), state);
-                if (IN_SET(route->gw_family, AF_INET, AF_INET6))
+                if (IN_SET(route->gw_family, AF_INET, AF_INET6)) {
                         siphash24_compress(&route->gw, FAMILY_ADDRESS_SIZE(route->gw_family), state);
-
+                        siphash24_compress(&route->gw_weight, sizeof(route->gw_weight), state);
+                }
 
                 siphash24_compress(&route->prefsrc, FAMILY_ADDRESS_SIZE(route->family), state);
 
@@ -356,6 +351,10 @@ int route_compare_func(const Route *a, const Route *b) {
                         r = memcmp(&a->gw, &b->gw, FAMILY_ADDRESS_SIZE(a->family));
                         if (r != 0)
                                 return r;
+
+                        r = CMP(a->gw_weight, b->gw_weight);
+                        if (r != 0)
+                                return r;
                 }
 
                 r = memcmp(&a->prefsrc, &b->prefsrc, FAMILY_ADDRESS_SIZE(a->family));
@@ -484,23 +483,23 @@ static void route_copy(Route *dest, const Route *src, const MultipathRoute *m) {
         } else {
                 dest->gw_family = src->gw_family;
                 dest->gw = src->gw;
+                dest->gw_weight = src->gw_weight;
         }
 }
 
-static int route_add_internal(Manager *manager, Link *link, Set **routes, const Route *in, const MultipathRoute *m, Route **ret) {
+static int route_add_internal(Manager *manager, Link *link, Set **routes, const Route *in, Route **ret) {
         _cleanup_(route_freep) Route *route = NULL;
         int r;
 
         assert(manager || link);
         assert(routes);
         assert(in);
-        assert(!m || (link && (m->ifindex == 0 || m->ifindex == link->ifindex)));
 
         r = route_new(&route);
         if (r < 0)
                 return r;
 
-        route_copy(route, in, m);
+        route_copy(route, in, NULL);
 
         r = set_ensure_put(routes, &route_hash_ops, route);
         if (r < 0)
@@ -521,20 +520,32 @@ static int route_add_internal(Manager *manager, Link *link, Set **routes, const
 
 static int route_add_foreign(Manager *manager, Link *link, const Route *in, Route **ret) {
         assert(manager || link);
-        return route_add_internal(manager, link, link ? &link->routes_foreign : &manager->routes_foreign, in, NULL, ret);
+        return route_add_internal(manager, link, link ? &link->routes_foreign : &manager->routes_foreign, in, ret);
 }
 
 static int route_add(Manager *manager, Link *link, const Route *in, const MultipathRoute *m, Route **ret) {
+        _cleanup_(route_freep) Route *tmp = NULL;
         Route *route;
         int r;
 
         assert(manager || link);
         assert(in);
 
+        if (m) {
+                assert(link && (m->ifindex == 0 || m->ifindex == link->ifindex));
+
+                r = route_new(&tmp);
+                if (r < 0)
+                        return r;
+
+                route_copy(tmp, in, m);
+                in = tmp;
+        }
+
         r = route_get(manager, link, in, &route);
         if (r == -ENOENT) {
                 /* Route does not exist, create a new one */
-                r = route_add_internal(manager, link, link ? &link->routes : &manager->routes, in, m, &route);
+                r = route_add_internal(manager, link, link ? &link->routes : &manager->routes, in, &route);
                 if (r < 0)
                         return r;
         } else if (r == 0) {
@@ -564,6 +575,110 @@ static int route_add(Manager *manager, Link *link, const Route *in, const Multip
         return 0;
 }
 
+static int route_set_netlink_message(const Route *route, sd_netlink_message *req, Link *link) {
+        unsigned flags;
+        int r;
+
+        assert(route);
+        assert(req);
+
+        /* link may be NULL */
+
+        if (in_addr_is_null(route->gw_family, &route->gw) == 0) {
+                if (route->gw_family == route->family) {
+                        r = netlink_message_append_in_addr_union(req, RTA_GATEWAY, route->gw_family, &route->gw);
+                        if (r < 0)
+                                return log_link_error_errno(link, r, "Could not append RTA_GATEWAY attribute: %m");
+                } else {
+                        RouteVia rtvia = {
+                                .family = route->gw_family,
+                                .address = route->gw,
+                        };
+
+                        r = sd_netlink_message_append_data(req, RTA_VIA, &rtvia, sizeof(rtvia));
+                        if (r < 0)
+                                return log_link_error_errno(link, r, "Could not append RTA_VIA attribute: %m");
+                }
+        }
+
+        if (route->dst_prefixlen > 0) {
+                r = netlink_message_append_in_addr_union(req, RTA_DST, route->family, &route->dst);
+                if (r < 0)
+                        return log_link_error_errno(link, r, "Could not append RTA_DST attribute: %m");
+
+                r = sd_rtnl_message_route_set_dst_prefixlen(req, route->dst_prefixlen);
+                if (r < 0)
+                        return log_link_error_errno(link, r, "Could not set destination prefix length: %m");
+        }
+
+        if (route->src_prefixlen > 0) {
+                r = netlink_message_append_in_addr_union(req, RTA_SRC, route->family, &route->src);
+                if (r < 0)
+                        return log_link_error_errno(link, r, "Could not append RTA_SRC attribute: %m");
+
+                r = sd_rtnl_message_route_set_src_prefixlen(req, route->src_prefixlen);
+                if (r < 0)
+                        return log_link_error_errno(link, r, "Could not set source prefix length: %m");
+        }
+
+        if (in_addr_is_null(route->family, &route->prefsrc) == 0) {
+                r = netlink_message_append_in_addr_union(req, RTA_PREFSRC, route->family, &route->prefsrc);
+                if (r < 0)
+                        return log_link_error_errno(link, r, "Could not append RTA_PREFSRC attribute: %m");
+        }
+
+        r = sd_rtnl_message_route_set_scope(req, route->scope);
+        if (r < 0)
+                return log_link_error_errno(link, r, "Could not set scope: %m");
+
+        flags = route->flags;
+        if (route->gateway_onlink >= 0)
+                SET_FLAG(flags, RTNH_F_ONLINK, route->gateway_onlink);
+
+        r = sd_rtnl_message_route_set_flags(req, flags);
+        if (r < 0)
+                return log_link_error_errno(link, r, "Could not set flags: %m");
+
+        if (route->table != RT_TABLE_MAIN) {
+                if (route->table < 256) {
+                        r = sd_rtnl_message_route_set_table(req, route->table);
+                        if (r < 0)
+                                return log_link_error_errno(link, r, "Could not set route table: %m");
+                } else {
+                        r = sd_rtnl_message_route_set_table(req, RT_TABLE_UNSPEC);
+                        if (r < 0)
+                                return log_link_error_errno(link, r, "Could not set route table: %m");
+
+                        /* Table attribute to allow more than 256. */
+                        r = sd_netlink_message_append_data(req, RTA_TABLE, &route->table, sizeof(route->table));
+                        if (r < 0)
+                                return log_link_error_errno(link, r, "Could not append RTA_TABLE attribute: %m");
+                }
+        }
+
+        r = sd_rtnl_message_route_set_type(req, route->type);
+        if (r < 0)
+                return log_link_error_errno(link, r, "Could not set route type: %m");
+
+        if (!IN_SET(route->type, RTN_UNREACHABLE, RTN_PROHIBIT, RTN_BLACKHOLE, RTN_THROW)) {
+                assert(link); /* Those routes must be attached to a specific link */
+
+                r = sd_netlink_message_append_u32(req, RTA_OIF, link->ifindex);
+                if (r < 0)
+                        return log_link_error_errno(link, r, "Could not append RTA_OIF attribute: %m");
+        }
+
+        r = sd_netlink_message_append_u8(req, RTA_PREF, route->pref);
+        if (r < 0)
+                return log_link_error_errno(link, r, "Could not append RTA_PREF attribute: %m");
+
+        r = sd_netlink_message_append_u32(req, RTA_PRIORITY, route->priority);
+        if (r < 0)
+                return log_link_error_errno(link, r, "Could not append RTA_PRIORITY attribute: %m");
+
+        return 0;
+}
+
 static int route_remove_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link) {
         int r;
 
@@ -625,66 +740,11 @@ int route_remove(
                                strna(route_type_to_string(route->type)));
         }
 
-        if (in_addr_is_null(route->gw_family, &route->gw) == 0) {
-                if (route->gw_family == route->family) {
-                        r = netlink_message_append_in_addr_union(req, RTA_GATEWAY, route->gw_family, &route->gw);
-                        if (r < 0)
-                                return log_link_error_errno(link, r, "Could not append RTA_GATEWAY attribute: %m");
-                } else {
-                        RouteVia rtvia = {
-                                .family = route->gw_family,
-                                .address = route->gw,
-                        };
-
-                        r = sd_netlink_message_append_data(req, RTA_VIA, &rtvia, sizeof(rtvia));
-                        if (r < 0)
-                                return log_link_error_errno(link, r, "Could not append RTA_VIA attribute: %m");
-                }
-        }
-
-        if (route->dst_prefixlen) {
-                r = netlink_message_append_in_addr_union(req, RTA_DST, route->family, &route->dst);
-                if (r < 0)
-                        return log_link_error_errno(link, r, "Could not append RTA_DST attribute: %m");
-
-                r = sd_rtnl_message_route_set_dst_prefixlen(req, route->dst_prefixlen);
-                if (r < 0)
-                        return log_link_error_errno(link, r, "Could not set destination prefix length: %m");
-        }
-
-        if (route->src_prefixlen) {
-                r = netlink_message_append_in_addr_union(req, RTA_SRC, route->family, &route->src);
-                if (r < 0)
-                        return log_link_error_errno(link, r, "Could not append RTA_SRC attribute: %m");
-
-                r = sd_rtnl_message_route_set_src_prefixlen(req, route->src_prefixlen);
-                if (r < 0)
-                        return log_link_error_errno(link, r, "Could not set source prefix length: %m");
-        }
-
-        if (in_addr_is_null(route->family, &route->prefsrc) == 0) {
-                r = netlink_message_append_in_addr_union(req, RTA_PREFSRC, route->family, &route->prefsrc);
-                if (r < 0)
-                        return log_link_error_errno(link, r, "Could not append RTA_PREFSRC attribute: %m");
-        }
-
-        r = sd_rtnl_message_route_set_scope(req, route->scope);
+        r = route_set_netlink_message(route, req, link);
         if (r < 0)
-                return log_link_error_errno(link, r, "Could not set scope: %m");
-
-        r = sd_netlink_message_append_u32(req, RTA_PRIORITY, route->priority);
-        if (r < 0)
-                return log_link_error_errno(link, r, "Could not append RTA_PRIORITY attribute: %m");
-
-        if (!IN_SET(route->type, RTN_UNREACHABLE, RTN_PROHIBIT, RTN_BLACKHOLE, RTN_THROW)) {
-                assert(link); /* Those routes must be attached to a specific link */
-
-                r = sd_netlink_message_append_u32(req, RTA_OIF, link->ifindex);
-                if (r < 0)
-                        return log_link_error_errno(link, r, "Could not append RTA_OIF attribute: %m");
-        }
+                return r;
 
-        r = netlink_call_async(link->manager->rtnl, NULL, req,
+        r = netlink_call_async(manager->rtnl, NULL, req,
                                callback ?: route_remove_handler,
                                link_netlink_destroy_callback, link);
         if (r < 0)
@@ -695,7 +755,7 @@ int route_remove(
         return 0;
 }
 
-static bool link_is_static_route_configured(const Link *link, const Route *route) {
+static bool link_has_route(const Link *link, const Route *route) {
         Route *net_route;
 
         assert(link);
@@ -711,11 +771,78 @@ static bool link_is_static_route_configured(const Link *link, const Route *route
         return false;
 }
 
+static bool links_have_route(Manager *manager, const Route *route, const Link *except) {
+        Link *link;
+
+        assert(manager);
+
+        HASHMAP_FOREACH(link, manager->links) {
+                if (link == except)
+                        continue;
+
+                if (link_has_route(link, route))
+                        return true;
+        }
+
+        return false;
+}
+
+static int manager_drop_foreign_routes(Manager *manager) {
+        Route *route;
+        int k, r = 0;
+
+        assert(manager);
+
+        SET_FOREACH(route, manager->routes_foreign) {
+                /* do not touch routes managed by the kernel */
+                if (route->protocol == RTPROT_KERNEL)
+                        continue;
+
+                if (links_have_route(manager, route, NULL))
+                        /* The route will be configured later. */
+                        continue;
+
+                /* The existing links do not have the route. Let's drop this now. It may by
+                 * re-configured later. */
+                k = route_remove(route, manager, NULL, NULL);
+                if (k < 0 && r >= 0)
+                        r = k;
+        }
+
+        return r;
+}
+
+static int manager_drop_routes(Manager *manager, Link *except) {
+        Route *route;
+        int k, r = 0;
+
+        assert(manager);
+
+        SET_FOREACH(route, manager->routes) {
+                /* do not touch routes managed by the kernel */
+                if (route->protocol == RTPROT_KERNEL)
+                        continue;
+
+                if (links_have_route(manager, route, except))
+                        /* The route will be configured later. */
+                        continue;
+
+                /* The existing links do not have the route. Let's drop this now. It may by
+                 * re-configured later. */
+                k = route_remove(route, manager, NULL, NULL);
+                if (k < 0 && r >= 0)
+                        r = k;
+        }
+
+        return r;
+}
+
 int link_drop_foreign_routes(Link *link) {
         Route *route;
         int k, r = 0;
 
         assert(link);
+        assert(link->manager);
 
         SET_FOREACH(route, link->routes_foreign) {
                 /* do not touch routes managed by the kernel */
@@ -739,7 +866,7 @@ int link_drop_foreign_routes(Link *link) {
                     FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP))
                         continue;
 
-                if (link_is_static_route_configured(link, route))
+                if (link_has_route(link, route))
                         k = route_add(NULL, link, route, NULL, NULL);
                 else
                         k = route_remove(route, NULL, link, NULL);
@@ -747,6 +874,10 @@ int link_drop_foreign_routes(Link *link) {
                         r = k;
         }
 
+        k = manager_drop_foreign_routes(link->manager);
+        if (k < 0 && r >= 0)
+                r = k;
+
         return r;
 }
 
@@ -766,6 +897,10 @@ int link_drop_routes(Link *link) {
                         r = k;
         }
 
+        k = manager_drop_routes(link->manager, link);
+        if (k < 0 && r >= 0)
+                r = k;
+
         return r;
 }
 
@@ -913,7 +1048,6 @@ int route_configure(
                 Route **ret) {
 
         _cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL;
-        unsigned flags;
         int r;
 
         assert(link);
@@ -957,85 +1091,9 @@ int route_configure(
         if (r < 0)
                 return log_link_error_errno(link, r, "Could not create RTM_NEWROUTE message: %m");
 
-        if (in_addr_is_null(route->gw_family, &route->gw) == 0) {
-                if (route->gw_family == route->family) {
-                        r = netlink_message_append_in_addr_union(req, RTA_GATEWAY, route->gw_family, &route->gw);
-                        if (r < 0)
-                                return log_link_error_errno(link, r, "Could not append RTA_GATEWAY attribute: %m");
-                } else {
-                        RouteVia rtvia = {
-                                .family = route->gw_family,
-                                .address = route->gw,
-                        };
-
-                        r = sd_netlink_message_append_data(req, RTA_VIA, &rtvia, sizeof(rtvia));
-                        if (r < 0)
-                                return log_link_error_errno(link, r, "Could not append RTA_VIA attribute: %m");
-                }
-        }
-
-        if (route->dst_prefixlen > 0) {
-                r = netlink_message_append_in_addr_union(req, RTA_DST, route->family, &route->dst);
-                if (r < 0)
-                        return log_link_error_errno(link, r, "Could not append RTA_DST attribute: %m");
-
-                r = sd_rtnl_message_route_set_dst_prefixlen(req, route->dst_prefixlen);
-                if (r < 0)
-                        return log_link_error_errno(link, r, "Could not set destination prefix length: %m");
-        }
-
-        if (route->src_prefixlen > 0) {
-                r = netlink_message_append_in_addr_union(req, RTA_SRC, route->family, &route->src);
-                if (r < 0)
-                        return log_link_error_errno(link, r, "Could not append RTA_SRC attribute: %m");
-
-                r = sd_rtnl_message_route_set_src_prefixlen(req, route->src_prefixlen);
-                if (r < 0)
-                        return log_link_error_errno(link, r, "Could not set source prefix length: %m");
-        }
-
-        if (in_addr_is_null(route->family, &route->prefsrc) == 0) {
-                r = netlink_message_append_in_addr_union(req, RTA_PREFSRC, route->family, &route->prefsrc);
-                if (r < 0)
-                        return log_link_error_errno(link, r, "Could not append RTA_PREFSRC attribute: %m");
-        }
-
-        r = sd_rtnl_message_route_set_scope(req, route->scope);
-        if (r < 0)
-                return log_link_error_errno(link, r, "Could not set scope: %m");
-
-        flags = route->flags;
-        if (route->gateway_onlink >= 0)
-                SET_FLAG(flags, RTNH_F_ONLINK, route->gateway_onlink);
-
-        r = sd_rtnl_message_route_set_flags(req, flags);
-        if (r < 0)
-                return log_link_error_errno(link, r, "Could not set flags: %m");
-
-        if (route->table != RT_TABLE_MAIN) {
-                if (route->table < 256) {
-                        r = sd_rtnl_message_route_set_table(req, route->table);
-                        if (r < 0)
-                                return log_link_error_errno(link, r, "Could not set route table: %m");
-                } else {
-                        r = sd_rtnl_message_route_set_table(req, RT_TABLE_UNSPEC);
-                        if (r < 0)
-                                return log_link_error_errno(link, r, "Could not set route table: %m");
-
-                        /* Table attribute to allow more than 256. */
-                        r = sd_netlink_message_append_data(req, RTA_TABLE, &route->table, sizeof(route->table));
-                        if (r < 0)
-                                return log_link_error_errno(link, r, "Could not append RTA_TABLE attribute: %m");
-                }
-        }
-
-        r = sd_netlink_message_append_u32(req, RTA_PRIORITY, route->priority);
+        r = route_set_netlink_message(route, req, link);
         if (r < 0)
-                return log_link_error_errno(link, r, "Could not append RTA_PRIORITY attribute: %m");
-
-        r = sd_netlink_message_append_u8(req, RTA_PREF, route->pref);
-        if (r < 0)
-                return log_link_error_errno(link, r, "Could not append RTA_PREF attribute: %m");
+                return r;
 
         if (route->lifetime != USEC_INFINITY && kernel_route_expiration_supported()) {
                 r = sd_netlink_message_append_u32(req, RTA_EXPIRES,
@@ -1044,16 +1102,6 @@ int route_configure(
                         return log_link_error_errno(link, r, "Could not append RTA_EXPIRES attribute: %m");
         }
 
-        r = sd_rtnl_message_route_set_type(req, route->type);
-        if (r < 0)
-                return log_link_error_errno(link, r, "Could not set route type: %m");
-
-        if (!IN_SET(route->type, RTN_UNREACHABLE, RTN_PROHIBIT, RTN_BLACKHOLE, RTN_THROW)) {
-                r = sd_netlink_message_append_u32(req, RTA_OIF, link->ifindex);
-                if (r < 0)
-                        return log_link_error_errno(link, r, "Could not append RTA_OIF attribute: %m");
-        }
-
         if (route->ttl_propagate >= 0) {
                 r = sd_netlink_message_append_u8(req, RTA_TTL_PROPAGATE, route->ttl_propagate);
                 if (r < 0)
@@ -1102,13 +1150,6 @@ int route_configure(
         if (r < 0)
                 return log_link_error_errno(link, r, "Could not append RTA_MULTIPATH attribute: %m");
 
-        r = netlink_call_async(link->manager->rtnl, NULL, req, callback,
-                               link_netlink_destroy_callback, link);
-        if (r < 0)
-                return log_link_error_errno(link, r, "Could not send rtnetlink message: %m");
-
-        link_ref(link);
-
         if (ordered_set_isempty(route->multipath_routes)) {
                 Route *nr;
 
@@ -1130,7 +1171,14 @@ int route_configure(
                 }
         }
 
-        return 1;
+        r = netlink_call_async(link->manager->rtnl, NULL, req, callback,
+                               link_netlink_destroy_callback, link);
+        if (r < 0)
+                return log_link_error_errno(link, r, "Could not send rtnetlink message: %m");
+
+        link_ref(link);
+
+        return 0;
 }
 
 static int route_handler(sd_netlink *rtnl, sd_netlink_message *m, Link *link) {
@@ -1192,7 +1240,7 @@ int link_set_routes(Link *link) {
         /* First add the routes that enable us to talk to gateways, then add in the others that need a gateway. */
         for (phase = 0; phase < _PHASE_MAX; phase++)
                 HASHMAP_FOREACH(rt, link->network->routes_by_section) {
-                        if (rt->gateway_from_dhcp)
+                        if (rt->gateway_from_dhcp_or_ra)
                                 continue;
 
                         if ((in_addr_is_null(rt->gw_family, &rt->gw) && ordered_set_isempty(rt->multipath_routes)) != (phase == PHASE_NON_GATEWAY))
@@ -1201,8 +1249,8 @@ int link_set_routes(Link *link) {
                         r = route_configure(rt, link, route_handler, NULL);
                         if (r < 0)
                                 return log_link_warning_errno(link, r, "Could not set routes: %m");
-                        if (r > 0)
-                                link->route_messages++;
+
+                        link->route_messages++;
                 }
 
         if (link->route_messages == 0) {
@@ -1543,84 +1591,6 @@ int manager_rtnl_process_route(sd_netlink *rtnl, sd_netlink_message *message, Ma
         return 1;
 }
 
-int link_serialize_routes(const Link *link, FILE *f) {
-        bool space = false;
-        Route *route;
-
-        assert(link);
-        assert(link->network);
-        assert(f);
-
-        fputs("ROUTES=", f);
-        SET_FOREACH(route, link->routes) {
-                _cleanup_free_ char *route_str = NULL;
-
-                if (in_addr_to_string(route->family, &route->dst, &route_str) < 0)
-                        continue;
-
-                fprintf(f, "%s%s/%hhu/%hhu/%"PRIu32"/%"PRIu32"/"USEC_FMT,
-                        space ? " " : "", route_str,
-                        route->dst_prefixlen, route->tos, route->priority, route->table, route->lifetime);
-                space = true;
-        }
-        fputc('\n', f);
-
-        return 0;
-}
-
-int link_deserialize_routes(Link *link, const char *routes) {
-        int r;
-
-        assert(link);
-
-        for (const char *p = routes;; ) {
-                _cleanup_(route_freep) Route *tmp = NULL;
-                _cleanup_free_ char *route_str = NULL;
-                char *prefixlen_str;
-
-                r = extract_first_word(&p, &route_str, NULL, 0);
-                if (r < 0)
-                        return log_link_debug_errno(link, r, "Failed to parse ROUTES=: %m");
-                if (r == 0)
-                        return 0;
-
-                prefixlen_str = strchr(route_str, '/');
-                if (!prefixlen_str) {
-                        log_link_debug(link, "Failed to parse route, ignoring: %s", route_str);
-                        continue;
-                }
-                *prefixlen_str++ = '\0';
-
-                r = route_new(&tmp);
-                if (r < 0)
-                        return log_oom();
-
-                r = sscanf(prefixlen_str,
-                           "%hhu/%hhu/%"SCNu32"/%"PRIu32"/"USEC_FMT,
-                           &tmp->dst_prefixlen,
-                           &tmp->tos,
-                           &tmp->priority,
-                           &tmp->table,
-                           &tmp->lifetime);
-                if (r != 5) {
-                        log_link_debug(link,
-                                       "Failed to parse destination prefix length, tos, priority, table or expiration: %s",
-                                       prefixlen_str);
-                        continue;
-                }
-
-                r = in_addr_from_string_auto(route_str, &tmp->family, &tmp->dst);
-                if (r < 0) {
-                        log_link_debug_errno(link, r, "Failed to parse route destination %s: %m", route_str);
-                        continue;
-                }
-
-                r = route_add_and_setup_timer(link, tmp, NULL, NULL);
-                if (r < 0)
-                        return log_link_debug_errno(link, r, "Failed to add route: %m");
-        }
-}
-
 int network_add_ipv4ll_route(Network *network) {
         _cleanup_(route_free_or_set_invalidp) Route *n = NULL;
         unsigned section_line;
@@ -1723,7 +1693,7 @@ int config_parse_gateway(
                 }
 
                 if (isempty(rvalue)) {
-                        n->gateway_from_dhcp = false;
+                        n->gateway_from_dhcp_or_ra = false;
                         n->gw_family = AF_UNSPEC;
                         n->gw = IN_ADDR_NULL;
                         TAKE_PTR(n);
@@ -1731,21 +1701,21 @@ int config_parse_gateway(
                 }
 
                 if (streq(rvalue, "_dhcp")) {
-                        n->gateway_from_dhcp = true;
+                        n->gateway_from_dhcp_or_ra = true;
                         TAKE_PTR(n);
                         return 0;
                 }
 
                 if (streq(rvalue, "_dhcp4")) {
                         n->gw_family = AF_INET;
-                        n->gateway_from_dhcp = true;
+                        n->gateway_from_dhcp_or_ra = true;
                         TAKE_PTR(n);
                         return 0;
                 }
 
-                if (streq(rvalue, "_dhcp6")) {
+                if (streq(rvalue, "_ipv6ra")) {
                         n->gw_family = AF_INET6;
-                        n->gateway_from_dhcp = true;
+                        n->gateway_from_dhcp_or_ra = true;
                         TAKE_PTR(n);
                         return 0;
                 }
@@ -1758,7 +1728,7 @@ int config_parse_gateway(
                 return 0;
         }
 
-        n->gateway_from_dhcp = false;
+        n->gateway_from_dhcp_or_ra = false;
         TAKE_PTR(n);
         return 0;
 }
@@ -1902,6 +1872,7 @@ int config_parse_route_priority(
                 return 0;
         }
 
+        n->priority_set = true;
         TAKE_PTR(n);
         return 0;
 }
@@ -2086,6 +2057,7 @@ int config_parse_ipv6_route_preference(
                 return 0;
         }
 
+        n->pref_set = true;
         TAKE_PTR(n);
         return 0;
 }
@@ -2380,25 +2352,55 @@ static int route_section_verify(Route *route, Network *network) {
         if (section_is_invalid(route->section))
                 return -EINVAL;
 
+        if (route->gateway_from_dhcp_or_ra) {
+                if (route->gw_family == AF_UNSPEC) {
+                        /* When deprecated Gateway=_dhcp is set, then assume gateway family based on other settings. */
+                        switch (route->family) {
+                        case AF_UNSPEC:
+                                log_warning("%s: Deprecated value \"_dhcp\" is specified for Gateway= in [Route] section from line %u. "
+                                            "Please use \"_dhcp4\" or \"_ipv6ra\" instead. Assuming \"_dhcp4\".",
+                                            route->section->filename, route->section->line);
+                                route->family = AF_INET;
+                                break;
+                        case AF_INET:
+                        case AF_INET6:
+                                log_warning("%s: Deprecated value \"_dhcp\" is specified for Gateway= in [Route] section from line %u. "
+                                            "Assuming \"%s\" based on Destination=, Source=, or PreferredSource= setting.",
+                                            route->section->filename, route->section->line, route->family == AF_INET ? "_dhcp4" : "_ipv6ra");
+                                break;
+                        default:
+                                return log_warning_errno(SYNTHETIC_ERRNO(EINVAL),
+                                                         "%s: Invalid route family. Ignoring [Route] section from line %u.",
+                                                         route->section->filename, route->section->line);
+                        }
+                        route->gw_family = route->family;
+                }
+
+                if (route->gw_family == AF_INET && !FLAGS_SET(network->dhcp, ADDRESS_FAMILY_IPV4))
+                        return log_warning_errno(SYNTHETIC_ERRNO(EINVAL),
+                                                 "%s: Gateway=\"_dhcp4\" is specified but DHCPv4 client is disabled. "
+                                                 "Ignoring [Route] section from line %u.",
+                                                 route->section->filename, route->section->line);
+
+                if (route->gw_family == AF_INET6 && !network->ipv6_accept_ra)
+                        return log_warning_errno(SYNTHETIC_ERRNO(EINVAL),
+                                                 "%s: Gateway=\"_ipv6ra\" is specified but IPv6AcceptRA= is disabled. "
+                                                 "Ignoring [Route] section from line %u.",
+                                                 route->section->filename, route->section->line);
+        }
+
+        /* When only Gateway= is specified, assume the route family based on the Gateway address. */
         if (route->family == AF_UNSPEC)
                 route->family = route->gw_family;
 
         if (route->family == AF_UNSPEC) {
                 assert(route->section);
 
-                if (route->gateway_from_dhcp) {
-                        log_warning("%s: Deprecated value \"_dhcp\" is specified for Gateway= in [Route] section from line %u. "
-                                    "Please use \"_dhcp4\" or \"_dhcp6\" instead. Assuming \"_dhcp4\".",
-                                    route->section->filename, route->section->line);
-
-                        route->family = AF_INET;
-                        route->gw_family = AF_INET;
-                } else
-                        return log_warning_errno(SYNTHETIC_ERRNO(EINVAL),
-                                                 "%s: Route section without Gateway=, Destination=, Source=, "
-                                                 "or PreferredSource= field configured. "
-                                                 "Ignoring [Route] section from line %u.",
-                                                 route->section->filename, route->section->line);
+                return log_warning_errno(SYNTHETIC_ERRNO(EINVAL),
+                                         "%s: Route section without Gateway=, Destination=, Source=, "
+                                         "or PreferredSource= field configured. "
+                                         "Ignoring [Route] section from line %u.",
+                                         route->section->filename, route->section->line);
         }
 
         if (route->family == AF_INET6 && route->gw_family == AF_INET)
index 8207b67a2df594f07c79ab9b23494c41614ef283..82ef4ee2a0e370f2cf76a2ad10a6b7fd599414af 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
@@ -32,20 +32,24 @@ typedef struct Route {
         unsigned char dst_prefixlen;
         unsigned char src_prefixlen;
         unsigned char scope;
-        bool scope_set;
         unsigned char protocol;  /* RTPROT_* */
         unsigned char type; /* RTN_* */
         unsigned char tos;
         uint32_t priority; /* note that ip(8) calls this 'metric' */
         uint32_t table;
-        bool table_set;
         uint32_t mtu;
         uint32_t initcwnd;
         uint32_t initrwnd;
         unsigned char pref;
         unsigned flags;
         int gateway_onlink;
-        bool gateway_from_dhcp;
+
+        bool scope_set:1;
+        bool table_set:1;
+        bool priority_set:1;
+        bool protocol_set:1;
+        bool pref_set:1;
+        bool gateway_from_dhcp_or_ra:1;
 
         union in_addr_union gw;
         union in_addr_union dst;
@@ -71,8 +75,6 @@ int route_remove(const Route *route, Manager *manager, Link *link, link_netlink_
 int link_set_routes(Link *link);
 int link_drop_routes(Link *link);
 int link_drop_foreign_routes(Link *link);
-int link_serialize_routes(const Link *link, FILE *f);
-int link_deserialize_routes(Link *link, const char *routes);
 
 uint32_t link_get_dhcp_route_table(const Link *link);
 uint32_t link_get_ipv6_accept_ra_route_table(const Link *link);
index de60bd9555cdf9b2ea5af810904cc4eaa081146f..a31fb31fa4804b5c3333ce110c2480f6b32c08ca 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 #include <linux/fib_rules.h>
index bc1193a111171a8c2e7478209eb1b7fadcbe9cf0..baf086f25e9ddfddffd0506f9695688714044471 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index ecf034634422db6451d2094d4de1d36e37353d1d..e7f0682c3eaa622e2c974d84023bfdd86946af31 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index f5727784a904e624816c7b92d35244c76ea41006..4dd024b62a31b709293caed11ad40e3ed1750148 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /* Default interval is 10sec. The speed meter periodically make networkd
index 61382a89937cc199409110d1c17be39e9b1ff662..68f43b5ce63228f895cc23e16b6e43b67e235766 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 
 #include "alloc-util.h"
index 8a48545d64b8019c78ad89930ad6814476f07325..dae5ff0306486c078ad5c741744c3c521eb78017 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 #pragma once
 
index c8facbf8316b934614223ad3e4ac74ae13e8ad43..add069e4707b06dfb5b49f2acee1f22c3598578a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
 #include <linux/if.h>
@@ -38,7 +38,7 @@ static int link_set_proxy_arp(Link *link) {
         return sysctl_write_ip_property_boolean(AF_INET, link->ifname, "proxy_arp", link->network->proxy_arp > 0);
 }
 
-bool link_ip_forward_enabled(Link *link, int family) {
+static bool link_ip_forward_enabled(Link *link, int family) {
         assert(link);
         assert(IN_SET(family, AF_INET, AF_INET6));
 
@@ -194,7 +194,7 @@ int link_set_sysctl(Link *link) {
 
         r = link_set_ipv6_privacy_extensions(link);
         if (r < 0)
-                log_link_warning_errno(link, r, "Cannot configure IPv6 privacy extension for interface, ignorign: %m");
+                log_link_warning_errno(link, r, "Cannot configure IPv6 privacy extension for interface, ignoring: %m");
 
         r = link_set_ipv6_accept_ra(link);
         if (r < 0)
@@ -212,6 +212,15 @@ int link_set_sysctl(Link *link) {
         if (r < 0)
                 log_link_warning_errno(link, r, "Cannot set IPv4 accept_local flag for interface, ignoring: %m");
 
+        /* If promote_secondaries is not set, DHCP will work only as long as the IP address does not
+         * changes between leases. The kernel will remove all secondary IP addresses of an interface
+         * otherwise. The way systemd-networkd works is that the new IP of a lease is added as a
+         * secondary IP and when the primary one expires it relies on the kernel to promote the
+         * secondary IP. See also https://github.com/systemd/systemd/issues/7163 */
+        r = sysctl_write_ip_property_boolean(AF_INET, link->ifname, "promote_secondaries", true);
+        if (r < 0)
+                log_link_warning_errno(link, r, "Cannot enable promote_secondaries for interface, ignoring: %m");
+
         return 0;
 }
 
index a409d8f54f22a43ee89617fbfc2e8da7f0af9c53..3568900a1fccb8bd9ad7ebcaff811372dc85a584 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
@@ -16,7 +16,6 @@ typedef enum IPv6PrivacyExtensions {
         _IPV6_PRIVACY_EXTENSIONS_INVALID = -1,
 } IPv6PrivacyExtensions;
 
-bool link_ip_forward_enabled(Link *link, int family);
 int link_set_sysctl(Link *link);
 int link_set_ipv6_mtu(Link *link);
 
index bae4ee5cbacf1ac2174eeb44d9880054c34d3883..83b38b2b0538d75fd9c1e92f2b2a03473d4d07d3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "condition.h"
 #include "conf-parser.h"
@@ -15,15 +15,6 @@ static const char* const address_family_table[_ADDRESS_FAMILY_MAX] = {
         [ADDRESS_FAMILY_IPV6]          = "ipv6",
 };
 
-static const char* const link_local_address_family_table[_ADDRESS_FAMILY_MAX] = {
-        [ADDRESS_FAMILY_NO]            = "no",
-        [ADDRESS_FAMILY_YES]           = "yes",
-        [ADDRESS_FAMILY_IPV4]          = "ipv4",
-        [ADDRESS_FAMILY_IPV6]          = "ipv6",
-        [ADDRESS_FAMILY_FALLBACK]      = "fallback",
-        [ADDRESS_FAMILY_FALLBACK_IPV4] = "ipv4-fallback",
-};
-
 static const char* const routing_policy_rule_address_family_table[_ADDRESS_FAMILY_MAX] = {
         [ADDRESS_FAMILY_YES]           = "both",
         [ADDRESS_FAMILY_IPV4]          = "ipv4",
@@ -47,7 +38,15 @@ static const char* const dhcp_lease_server_type_table[_SD_DHCP_LEASE_SERVER_TYPE
 };
 
 DEFINE_STRING_TABLE_LOOKUP_WITH_BOOLEAN(address_family, AddressFamily, ADDRESS_FAMILY_YES);
-DEFINE_STRING_TABLE_LOOKUP_WITH_BOOLEAN(link_local_address_family, AddressFamily, ADDRESS_FAMILY_YES);
+
+AddressFamily link_local_address_family_from_string(const char *s) {
+        if (streq_ptr(s, "fallback"))         /* compat name */
+                return ADDRESS_FAMILY_YES;
+        if (streq_ptr(s, "fallback-ipv4"))    /* compat name */
+                return ADDRESS_FAMILY_IPV4;
+        return address_family_from_string(s);
+}
+
 DEFINE_STRING_TABLE_LOOKUP(routing_policy_rule_address_family, AddressFamily);
 DEFINE_STRING_TABLE_LOOKUP(duplicate_address_detection_address_family, AddressFamily);
 DEFINE_CONFIG_PARSE_ENUM(config_parse_link_local_address_family, link_local_address_family,
index ce169fa731b4b0d50973d6589847df137fc3d69e..7b48046c351ec0c546967ae816a2f2a788a4a7c1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-dhcp-lease.h"
@@ -16,8 +16,6 @@ typedef enum AddressFamily {
         ADDRESS_FAMILY_IPV4           = 1 << 0,
         ADDRESS_FAMILY_IPV6           = 1 << 1,
         ADDRESS_FAMILY_YES            = ADDRESS_FAMILY_IPV4 | ADDRESS_FAMILY_IPV6,
-        ADDRESS_FAMILY_FALLBACK_IPV4  = 1 << 2,
-        ADDRESS_FAMILY_FALLBACK       = ADDRESS_FAMILY_FALLBACK_IPV4 | ADDRESS_FAMILY_IPV6,
         _ADDRESS_FAMILY_MAX,
         _ADDRESS_FAMILY_INVALID = -1,
 } AddressFamily;
@@ -34,7 +32,6 @@ CONFIG_PARSER_PROTOTYPE(config_parse_address_family_with_kernel);
 const char *address_family_to_string(AddressFamily b) _const_;
 AddressFamily address_family_from_string(const char *s) _pure_;
 
-const char *link_local_address_family_to_string(AddressFamily b) _const_;
 AddressFamily link_local_address_family_from_string(const char *s) _pure_;
 
 const char *routing_policy_rule_address_family_to_string(AddressFamily b) _const_;
index 53b65286b37b42f767ea1d9207817237cbdc14ce..0f2def7a16b635601f32c2f0f092889ca986caab 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/ethernet.h>
 #include <linux/nl80211.h>
index 57aa1533704125a1d07eb0cb17d599e826004362..ab868eba27e16d22b41a43d53fe95ded433d8a82 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index f78ff9db547024b9071960d4d1a6a4bd39e812f8..b448d9b011788246183a9f8d437b634d7df08a47 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
 #include <sys/stat.h>
index 50b0ef081422e31b7a683dbb720952b093197959..9e27f728bc48917e39cb473e761402a2ac97871d 100644 (file)
@@ -3,7 +3,7 @@
         "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   This file is part of systemd.
 
index 641a1a5cc133aacc6faf76a0616fda1496d1f3a8..ddbf3eb4ee7abc74f4e7b4834c2cdd61ce9ed85c 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 1da1ec40c3542216d72a02143910cf7e101c39ea..76fb718f9c41fd7ae209b9312a1887610269c0bc 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
index 36de5110ddd9884b19f378f8b7834db791825dc2..1da28b7d203929e4ec6ee4bff0e557a615a41594 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 #pragma once
 
index cba6faf37696d3a66332f8b65a9baf9a1a39f1d5..807c247b5747e38359dd0efb048a15e1d1303903 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
index 4023a7dee578b3b398e1b7521b5cffd1b0085146..4fe52831a08d848dfac4623837dec3324481169c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 #pragma once
 
index 9810a120d1fb202873daef578323699eb3e5d16b..86b7f433112b8c60d7cb8d107f858d79350b57f7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
index ff2b658acc97d5ab7d74a786ffe5da81a8fdfad7..c96cc4db0070190156f669b3c6d19c4a6a92507c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 #pragma once
 
index ece1f369d56adbfadeb840c59b5e13c827b3072e..8214a575bf7b96d12644c9da1fd9d54bf62fd172 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/pkt_sched.h>
 
index c35d5976d8fd7e5ae5d2546ffc8fa3807f1fce78..b6dd42811c22a4d1dfe22f1587267c5bfb4957bb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <linux/pkt_sched.h>
index e955223a89954b34967b2f66834bbeb54541c0f6..8b1fa6ee405a40dbdb12c76d6db7dbf62abbe00e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
index e4c976b942cf0583861245f95b7b20255411b7fd..b9bbd0994ca7265d4457553d319a20ccf06db952 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 #pragma once
 
index 17a2915143208301ca9204b85f89dd93a99059fc..958f65a28b3ed7fcdae0c1c03ae7b580872cc394 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
index 1a80963df6b27ff30423c659498b0fc9788f2c9f..2553c59886e00007bd33dce6025317cf7bee587c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 #pragma once
 
index 3065ac0150a78272dee39054557402a642ed0f37..c7d7623b47b7fc7a1757a52615355c0b303d827a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
index 8de9593c44fa6012fd91e68574555b148fd1e923..51fb626a7a4decd773b7de6d087106f67437269b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 #pragma once
 
index d3218203b952afc08f540aa4dd864c234a200326..d48aea86fbca05885f54cb242b6bb74c58f24bc4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
index 5a8ed6d651223e446fedaa080a570c816204cac5..77469c4103d065ac39a196b0d117fea568655e88 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 #pragma once
 
index 7c9e01aba7bfa60c9b222bad1eb495aa47e370a6..46a9eadf8764de9eca0365c3d8d7ab0f36c623ef 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
index 4fb2b37c116dfa3b528c52168661dc3ab898c56d..c084ff12ececdadad435e32f6476dd25ab291c4a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 #pragma once
 
index 324a975aa8d5d71f0f1394b9cb7013654bdcf58a..69c02f481033dbd7a2260cb3380c30f7b99bb3ad 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
index a555998eeec6c911b8f0b3abe4afe67b51ff76e0..04caaa8aa4085ac62ab4d44482a6a256cd9a04fb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 #pragma once
 
index 65481a76bcff555d63dc1e57be9fd829db00fa70..0969587c40a718d047bce2536a58d7628a130809 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/pkt_sched.h>
 
index b385872e0a696fe29eea215893c3e60e24d4e66d..55644dbdd2a60d41321e74c5d3a14439b2e5c550 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "conf-parser.h"
index a94a9a369e966f1f2b8a49d54fc8a6279e6f3406..454e556d2e11f9edf8ca7b623b886cfcefcdd3f6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
index 6319c7252174b3724a172bc93ee149ab532c023e..d58d5ac765a16663d77e192f7c747e5c61267318 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 #pragma once
 
index eccbaa2cf5dd0a59a674f628b66eb76c2ecefeb9..695a38171d00d1f0cee49c3b13473b157527d2fc 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
index 7c764742ada8afebd42b90127c7e8c079d389721..40a114e7d1620fb8ac01ce310c474dcd0b82db15 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 #pragma once
 
index 619a2f4b9850ec2dc1b19dc74e00db4719209a0d..2add12816aefadac1b495d216290f32d9a9dfb54 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
index a92460faf9b7e9f945f830847e554c5f0297fa1e..f9a9954861dd01c36b14f8385ce33d7f6bcf0692 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 #pragma once
 
index 2104067f3b728debd4bd0bcd00a7654c0d58c024..320f2c1c5251a3e3f77c215d2feb05926f251aa0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
index 10bab3e642d7e55a8fee3f66554a7f168e5630d4..0f013a9863da6f32427efbfbf1103df92a2a29c0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 #pragma once
 
index 3692a50ed88f7f40365f5f45f5b20a8d53f2b5fa..674fdf6ac7d71adfa7eb408cb7efce16ab5f3be8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
index 3cc87d7373438137b0eba2c1058c9f3ef0d4e568..628df358e8999b427d6e10794a0aad8dca706a01 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2020 VMware, Inc. */
 #pragma once
 
index d671281c46a0c95b7eddc65892c7b3ec8b4d3377..387be83a99698d896c5f1e9dfa638280edb5fb39 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
index 19c8decf131ae4dcb25334e6df06cd143752460b..1626775d63d8cce83837ac0a5b97276178fcd69f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 #pragma once
 
index cb3c3bcc15c34a9c402753a3d74f95911bd0f67d..2d84c5a833b95d8817df107905c609df4bf88eb6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
index a785be25e0e60b287ef11458c8da9407cc6f5eca..6b4b017c7c84a592e25e158b0035db40871ce645 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 #pragma once
 
index 8a5afeab2d03c66a8dda71f8fadd2164daf9ea2c..3e10b50c96b1cf2fab3a2a6accc7c3a21d13622d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 
 #include "alloc-util.h"
index 6287b35a76571e1311172bfb2601afbcca225fd2..83bad8e3b769320d70285ca45a1a117e6f837757 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 #pragma once
 
index 974bb8c8220d53cdcc0c7c5395276a47946f8aed..c32b040919926395efc92b0b0c31e8dbdb518946 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "macro.h"
 #include "qdisc.h"
index 916ad3300aafffa944d7208f444ff3bae4ffaee3..7fbd744142c21e5d7b8bb6bbd9e1b51bbb36f789 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "networkd-link.h"
index 9a39713b320c782dbb5504d0b1e104912713b5fe..21b26b01a0d5adb78da685bfc3e57ecceebca8b1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 
 #include <linux/pkt_sched.h>
index dc6886ac3febe61b81cf943b3df855f99ff821d8..f02a6a734a099200f401aa88859c1d78154812f6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  * Copyright © 2019 VMware, Inc. */
 #pragma once
 
index f727d1434174e6b4f6e810460452fd3e40d29e57..0da2fc357e2a7c7328bbaa54370cea9b8b1a2b48 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "macro.h"
 #include "netlink-util.h"
index 5b091aaf0f388e0ed75c9d987a3c346833f27d61..8d0085ea5467ed56ce05f1c05cd0b8dd17470878 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "conf-parser.h"
index 25b9396397752b4c35eb40fd1e0e9126933874a7..475cac7527b2c2626ef9c89641bc1a272b68dbdd 100644 (file)
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
 #include "bond.h"
 #include "dhcp6-internal.h"
 #include "dhcp6-protocol.h"
index f6168fc3fa47484fd38ff78a1aad212838b7e07c..bb67c74e9b71217f95071eebb5ecaddc155e650e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <arpa/inet.h>
 #include <sys/param.h>
index 030e50688a4e9ecd0a94f6340dd0a970a8b3687c..1142f10b101098006e64dfc04eb126254a8b1404 100644 (file)
@@ -1,15 +1,12 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include "ether-addr-util.h"
 #include "hexdecoct.h"
 #include "log.h"
 #include "macro.h"
-#include "set.h"
-#include "string-util.h"
-
-#include "network-internal.h"
+#include "net-condition.h"
 #include "networkd-conf.h"
 #include "networkd-network.h"
+#include "strv.h"
 
 static void test_config_parse_duid_type_one(const char *rvalue, int ret, DUIDType expected, usec_t expected_time) {
         DUID actual = {};
@@ -174,7 +171,7 @@ static void test_config_parse_address_one(const char *rvalue, int family, unsign
         assert_se(network = new0(Network, 1));
         network->n_ref = 1;
         assert_se(network->filename = strdup("hogehoge.network"));
-        assert_se(config_parse_match_ifnames("network", "filename", 1, "section", 1, "Name", 0, "*", &network->match_name, network) == 0);
+        assert_se(config_parse_match_ifnames("network", "filename", 1, "section", 1, "Name", 0, "*", &network->match.ifname, network) == 0);
         assert_se(config_parse_address("network", "filename", 1, "section", 1, "Address", 0, rvalue, network, network) == 0);
         assert_se(ordered_hashmap_size(network->addresses_by_section) == 1);
         assert_se(network_verify(network) >= 0);
@@ -224,7 +221,7 @@ static void test_config_parse_match_ifnames(void) {
         assert_se(config_parse_match_ifnames("network", "filename", 1, "section", 1, "Name", 0, "!baz", &names, NULL) == 0);
         assert_se(config_parse_match_ifnames("network", "filename", 1, "section", 1, "Name", 0, "aaa bbb ccc", &names, NULL) == 0);
 
-        strv_equal(names, STRV_MAKE("!hoge", "!hogehoge", "!foo", "!baz", "aaa", "bbb", "ccc"));
+        assert_se(strv_equal(names, STRV_MAKE("!hoge", "!hogehoge", "!foo", "!baz", "aaa", "bbb", "ccc")));
 }
 
 static void test_config_parse_match_strv(void) {
index 40341d607380a43554ed69433f85c4cd9a7b66fd..8d87cdf9c9e34288826460c182c8b605cc4ab082 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "fd-util.h"
 #include "fileio.h"
index 69b0057707a52c9e68dc80ab51b862816891cc25..529fc9f22a27fc4f4fefc8bc6b74b81c5c549bd3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-network.h"
 
index 73d9f9cc3ec8d2213da93774f8dbe2e2928cb38c..3aa835729383cd27b5b54c6d23d13d9fd23b0412 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-netlink.h"
index e84eed46ac8d0ba93c2eaf4e8e2b1384b5c91ac1..e3b350f52694bc4f77ab8fdc54e8d79a4fc84786 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/ether.h>
 #include <linux/if.h>
@@ -8,7 +8,6 @@
 #include "link.h"
 #include "manager.h"
 #include "netlink-util.h"
-#include "network-internal.h"
 #include "strv.h"
 #include "time-util.h"
 #include "util.h"
index 7398783df713893778270d9db7c1d65cdac321d5..f5e83532ae502839b2409b5bca8e6cd9ea09a2ea 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-event.h"
index cfd9093f1a3e954b609736ab85adf9994855214f..c2bdcd49076d00ec8646d38ac0fd476894fd0949 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 #include <sys/stat.h>
index 69d473401da661b1f48185abdc63976f90c8edc7..6a506db3a4499dd4336ccc9d9da232488b153ef5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <getopt.h>
index ae3d72faca0d803800a6ccc78dfa1f2b8f0cbb8f..539ed56c369187aafe4e8079c69395dec0f9a011 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 libnspawn_core_sources = files('''
         nspawn-cgroup.c
index f7b34ccc5828852379e538e5c27e51a7ffd08a62..cb01b25bc6705b972710e11eae63abefcb8c6533 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/mount.h>
 
index 035e8fbd0f53e2125a0f35e45fd12b366fc67683..3f5ba622d8c6d0d54bfe87b1ca502a904726f401 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 41a38d37eadb03d05acb67e2174e3f7bbedb6c99..0900d8c211ee587ba099ad494f461da8f87f4f79 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "macro.h"
index b3c90bb17a2d40377b9f43688569f8504e04d28e..de0661b204f0ec3cdfb51615d3ff8f5ed36ef00a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/types.h>
index ac3a1a02c4857e488544a1189aa79331f03970a3..32a20aabd589e417f83563c2e4d608837fb21f71 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/types.h>
index 69f36691fb72b4df119291261cd80a57e9269a8a..d1e29d7b82e96b611417f007471656bb3ece7ebc 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-netlink.h"
 
@@ -100,9 +100,6 @@ int expose_port_flush(ExposePort* l, union in_addr_union *exposed) {
                 r = fw_add_local_dnat(false,
                                       af,
                                       p->protocol,
-                                      NULL,
-                                      NULL, 0,
-                                      NULL, 0,
                                       p->host_port,
                                       exposed,
                                       p->container_port,
@@ -156,9 +153,6 @@ int expose_port_execute(sd_netlink *rtnl, ExposePort *l, union in_addr_union *ex
                 r = fw_add_local_dnat(true,
                                       af,
                                       p->protocol,
-                                      NULL,
-                                      NULL, 0,
-                                      NULL, 0,
                                       p->host_port,
                                       &new_exposed,
                                       p->container_port,
index 7ed7bee03f21fae7ba83062408102c37a63ee4db..cc834a4197bb426462ff61b10a260b7db7851284 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index 065099cf399f08fdb2015a638993794239c2a492..2ea1bed36112166c5e2f224aa87794084218faac 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/mount.h>
 #include <linux/magic.h>
index 8f9d094fae027f228569c3a98719ce3d7bf75763..e8b75fba609d62419944eef2c68b2ec813a2b319 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index a9aff9a67ffb6dde9502cebf0b4fed47573b6a18..d6b7d8e1d899550ee9de766678eea254a8bb93f7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 #include <linux/if.h>
index 4999b172c4c1acb110fcb4269c8499bd6e7aadfe..5c2d9834180a504ca5cebba16844052de5a93b4f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <net/if.h>
index 9445dc5b0e6e7351540f7d66de9c7e5bea8e8641..ca708be7556b66b90b8256876f2c68a39090ea30 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/oom.h>
 #if HAVE_SECCOMP
index d23a2f3daec3abe71a092f9de45ae326df3cc153..ee72c917321cd3a2f0099a56a1b7771847aab9b9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "nspawn-settings.h"
index 112c3562acea99883c8d15cff7d8dd1bfaf5d0a2..785332e09103633d42bc8c2aff5aab5ed6b6d892 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/statvfs.h>
index b7c6ce2b730d2d87a80397174c9a96085b7f1dce..5c7349bc733c4db31380b75246cb2f8c4a8310f4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #pragma once
 
index 50867f38435dbbfd3eb6556d6f95cad81ae926ba..2e6c12b3b7e64c08af6bdb11f1c1f9be5ac0b1e0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-bus.h"
 
index 07cca7fadce4c21ba1e5a4a6e4a57ae747c2431f..59fdd1bd61f938ec094df9043b3c74ffa2a53170 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/types.h>
index 1ab50553a95ffdacf65469b6c9fbd7284f8df2c2..1da719124c7bec31382e06b8a648941e49961f2b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <linux/netlink.h>
@@ -186,7 +186,7 @@ int setup_seccomp(uint64_t cap_list_retain, char **syscall_allow_list, char **sy
         int r;
 
         if (!is_seccomp_available()) {
-                log_debug("SECCOMP features not detected in the kernel, disabling SECCOMP filterering");
+                log_debug("SECCOMP features not detected in the kernel or disabled at runtime, disabling SECCOMP filtering");
                 return 0;
         }
 
index 6a48e6459b9dc2deced741a38f2208dd1d01063e..2690fba686580abff5e21c8eb65a552ec7198203 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/types.h>
index bd8062d3ec5cee68b0d755c1680b6f63bf17bfb0..92bb5120abe82e2056e98d52548264f949fd51f3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "cap-list.h"
index b8fa145f77bba447af1faade37e5565cde8904be..4a83e552026a1e455aeb58b3b88bb2c3b8023e5c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sched.h>
index 62b949f58cd2250ae16c4a4fe002fe94a3ad93e6..c224fd0b2f089c907c0f73e66eb1eac32e606032 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/types.h>
index c82d50bdf131ebe805a8a2ad699a0781c7597b30..192471143f1738351614f5a1ec44249d89563e59 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int change_uid_gid_raw(uid_t uid, gid_t gid, const gid_t *supplementary_gids, size_t n_supplementary_gids, bool chown_stdio);
index 60d7439fb17b02bbb0c30008a17c4f04a2cde5cd..3cbe4ef5a6c1a3717ed21836dde57f241a51f777 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/ioctl.h>
 #include <sys/reboot.h>
index 8982d5034e3e90a2214e5d6a0bb7106a525584fe..e0810fee12e274092998464a83466b21ae191c6f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-id128.h"
index 82bb1673975ed0dde2724155355b07430cf4e511..ad2f572869cc3553f14ed7b56a9febc4dd3e0cb9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if HAVE_BLKID
 #endif
@@ -1589,7 +1589,10 @@ static int parse_argv(int argc, char *argv[]) {
                                         return log_oom();
                         }
 
-                        r = read_full_file_full(AT_FDCWD, j ?: p, flags, &data, &size);
+                        r = read_full_file_full(AT_FDCWD, j ?: p, UINT64_MAX, SIZE_MAX,
+                                                flags,
+                                                NULL,
+                                                &data, &size);
                         if (r < 0)
                                 return log_error_errno(r, "Failed to read credential '%s': %m", j ?: p);
 
@@ -2726,7 +2729,7 @@ static int setup_machine_id(const char *directory) {
 
         etc_machine_id = prefix_roota(directory, "/etc/machine-id");
 
-        r = id128_read(etc_machine_id, ID128_PLAIN, &id);
+        r = id128_read(etc_machine_id, ID128_PLAIN_OR_UNINIT, &id);
         if (r < 0) {
                 if (!IN_SET(r, -ENOENT, -ENOMEDIUM)) /* If the file is missing or empty, we don't mind */
                         return log_error_errno(r, "Failed to read machine ID from container image: %m");
index 2c5f2ef6db384a6a40370804f9590e56084930fe..3baf5d301fabb892364df926eafe3f2ff6a3c063 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "nspawn-settings.h"
 #include "test-tables.h"
index a6829629b49c8c59ee95c62d8b3e2f0ee9ad0d7e..f8f44b0b0b14d206d89f419f2457d2f47d1ac509 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdlib.h>
 
index 9aa6debc164e945be224444f8238248e0a79c1e7..ffabc60c7094e37e7d1b08899dac9953ee2e4f33 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <net/if.h>
index fc7aa99574b5781fc460e4367145f15bbdc742bd..21ab637eca753fdfbf8bb1a0449a899c8a031dee 100644 (file)
@@ -1,5 +1,5 @@
 /***
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   systemd is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
index 5db0dcef7687358331cc6eb1d70693522a171354..53f049211686c79c03638094f477981630178e9b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netdb.h>
 #include <nss.h>
index ade64474a2d6af5f687ca889f8101b619c143bec..258244e765413e8ed182931770af4cdeb891c8a1 100644 (file)
@@ -1,5 +1,5 @@
 /***
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   systemd is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
index a8e6ce97a1b38f538c2a903a73d70ee5544be608..566b3194840a1eafcc6ea4ad3f94b53fd1bafcaa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <netdb.h>
index e690a0092f1a2f9f57c7e0a9842723bc8e423b82..ecc958ed6ac18ae93000df8f5c367450040d061c 100644 (file)
@@ -1,5 +1,5 @@
 /***
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   systemd is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
index 06ac335b291a9deb9be1bf46e244fb8d3a63cfe2..758f3816e0d32c6a204f53035bbb8c8480476f80 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <nss.h>
 #include <pthread.h>
index ffa75c12c4b298a7aa6b7aa31f90f2f223ee147b..e97b801575528ef76552de40ccf5d3693207ced4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index f86d7643d1a412dc316c1f5633187c4b8c55a760..7caf21714482d565c8f9efbd7acddcd2f58cb31c 100644 (file)
@@ -1,5 +1,5 @@
 /***
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   systemd is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as published by
index 2ac299d9a76eb5cc5278c00a62164cdcbee4b06d..22af0fde60176e50f524bb7c2128c21db0bae373 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "env-util.h"
 #include "fd-util.h"
index 02add24b6b814564627e4ab842121818a0cad600..cb0dcb9302413d84c3ab1d3d44411179533bc5e1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <nss.h>
diff --git a/src/oom/meson.build b/src/oom/meson.build
new file mode 100644 (file)
index 0000000..1ea6766
--- /dev/null
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+systemd_oomd_sources = files('''
+        oomd-manager-bus.c
+        oomd-manager-bus.h
+        oomd-manager.c
+        oomd-manager.h
+        oomd-util.c
+        oomd-util.h
+        oomd.c
+'''.split())
+
+oomctl_sources = files('''
+        oomctl.c
+'''.split())
+
+if conf.get('ENABLE_OOMD') == 1
+        tests += [
+                [['src/oom/test-oomd-util.c',
+                  'src/oom/oomd-util.c',
+                  'src/oom/oomd-util.h'],
+                 [],
+                 []]
+        ]
+
+        install_data('org.freedesktop.oom1.conf',
+                     install_dir : dbuspolicydir)
+
+        install_data('org.freedesktop.oom1.service',
+                     install_dir : dbussystemservicedir)
+
+        if install_sysconfdir
+                install_data('oomd.conf',
+                             install_dir : pkgsysconfdir)
+        endif
+endif
diff --git a/src/oom/oomctl.c b/src/oom/oomctl.c
new file mode 100644 (file)
index 0000000..dd393fc
--- /dev/null
@@ -0,0 +1,138 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#include <getopt.h>
+#include <unistd.h>
+
+#include "bus-error.h"
+#include "copy.h"
+#include "main-func.h"
+#include "pretty-print.h"
+#include "terminal-util.h"
+#include "verbs.h"
+
+static PagerFlags arg_pager_flags = 0;
+
+static int help(int argc, char *argv[], void *userdata) {
+        _cleanup_free_ char *link = NULL;
+        int r;
+
+        (void) pager_open(arg_pager_flags);
+
+        r = terminal_urlify_man("oomctl", "1", &link);
+        if (r < 0)
+                return log_oom();
+
+        printf("%1$s [OPTIONS...] COMMAND ...\n\n"
+               "%2$sManage or inspect the userspace OOM killer.%3$s\n"
+               "\n%4$sCommands:%5$s\n"
+               "  dump                        Output the current state of systemd-oomd\n"
+               "\n%4$sOptions:%5$s\n"
+               "  -h --help                   Show this help\n"
+               "     --version                Show package version\n"
+               "     --no-pager               Do not pipe output into a pager\n"
+               "\nSee the %6$s for details.\n"
+               , program_invocation_short_name
+               , ansi_highlight(), ansi_normal()
+               , ansi_underline(), ansi_normal()
+               , link
+        );
+
+        return 0;
+}
+
+static int dump_state(int argc, char *argv[], void *userdata) {
+        _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
+        _cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL;
+        _cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
+        int fd = -1;
+        int r;
+
+        r = sd_bus_open_system(&bus);
+        if (r < 0)
+                return log_error_errno(r, "Failed to connect system bus: %m");
+
+        (void) pager_open(arg_pager_flags);
+
+        r = sd_bus_call_method(
+                        bus,
+                        "org.freedesktop.oom1",
+                        "/org/freedesktop/oom1",
+                        "org.freedesktop.oom1.Manager",
+                        "DumpByFileDescriptor",
+                        &error,
+                        &reply,
+                        NULL);
+        if (r < 0)
+                return log_error_errno(r, "Failed to dump context: %s", bus_error_message(&error, r));
+
+        r = sd_bus_message_read(reply, "h", &fd);
+        if (r < 0)
+                return bus_log_parse_error(r);
+
+        fflush(stdout);
+        return copy_bytes(fd, STDOUT_FILENO, (uint64_t) -1, 0);
+}
+
+static int parse_argv(int argc, char *argv[]) {
+        enum {
+                ARG_VERSION = 0x100,
+                ARG_NO_PAGER,
+        };
+
+        static const struct option options[] = {
+                { "help",     no_argument, NULL, 'h'          },
+                { "version",  no_argument, NULL, ARG_VERSION  },
+                { "no-pager", no_argument, NULL, ARG_NO_PAGER },
+                {}
+        };
+
+        int c;
+
+        assert(argc >= 0);
+        assert(argv);
+
+        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
+
+                switch (c) {
+
+                        case 'h':
+                                return help(0, NULL, NULL);
+
+                        case ARG_VERSION:
+                                return version();
+
+                        case ARG_NO_PAGER:
+                                arg_pager_flags |= PAGER_DISABLE;
+                                break;
+
+                        case '?':
+                                return -EINVAL;
+
+                        default:
+                                assert_not_reached("Invalid option passed.");
+                }
+
+        return 1;
+}
+
+static int run(int argc, char* argv[]) {
+        static const Verb verbs[] = {
+                { "help", VERB_ANY, VERB_ANY, 0,            help       },
+                { "dump", VERB_ANY, 1,        VERB_DEFAULT, dump_state },
+                {}
+        };
+
+        int r;
+
+        log_show_color(true);
+        log_parse_environment();
+        log_open();
+
+        r = parse_argv(argc, argv);
+        if (r <= 0)
+                return r;
+
+        return dispatch_verb(argc, argv, verbs, NULL);
+}
+
+DEFINE_MAIN_FUNCTION(run);
diff --git a/src/oom/oomd-manager-bus.c b/src/oom/oomd-manager-bus.c
new file mode 100644 (file)
index 0000000..4ea2a33
--- /dev/null
@@ -0,0 +1,47 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#include <linux/capability.h>
+
+#include "bus-common-errors.h"
+#include "bus-polkit.h"
+#include "fd-util.h"
+#include "oomd-manager-bus.h"
+#include "oomd-manager.h"
+#include "user-util.h"
+
+static int bus_method_dump_by_fd(sd_bus_message *message, void *userdata, sd_bus_error *error) {
+        _cleanup_free_ char *dump = NULL;
+        _cleanup_close_ int fd = -1;
+        Manager *m = userdata;
+        int r;
+
+        assert(message);
+        assert(m);
+
+        r = manager_get_dump_string(m, &dump);
+        if (r < 0)
+                return r;
+
+        fd = acquire_data_fd(dump, strlen(dump), 0);
+        if (fd < 0)
+                return fd;
+
+        return sd_bus_reply_method_return(message, "h", fd);
+}
+
+static const sd_bus_vtable manager_vtable[] = {
+        SD_BUS_VTABLE_START(0),
+        SD_BUS_METHOD_WITH_NAMES("DumpByFileDescriptor",
+                                 NULL,,
+                                 "h",
+                                 SD_BUS_PARAM(fd),
+                                 bus_method_dump_by_fd,
+                                 SD_BUS_VTABLE_UNPRIVILEGED),
+        SD_BUS_VTABLE_END
+};
+
+const BusObjectImplementation manager_object = {
+        "/org/freedesktop/oom1",
+        "org.freedesktop.oom1.Manager",
+        .vtables = BUS_VTABLES(manager_vtable),
+};
diff --git a/src/oom/oomd-manager-bus.h b/src/oom/oomd-manager-bus.h
new file mode 100644 (file)
index 0000000..7935b35
--- /dev/null
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#pragma once
+
+#include "bus-object.h"
+
+typedef struct Manager Manager;
+
+extern const BusObjectImplementation manager_object;
diff --git a/src/oom/oomd-manager.c b/src/oom/oomd-manager.c
new file mode 100644 (file)
index 0000000..fec9651
--- /dev/null
@@ -0,0 +1,546 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#include "bus-log-control-api.h"
+#include "bus-util.h"
+#include "bus-polkit.h"
+#include "cgroup-util.h"
+#include "fd-util.h"
+#include "fileio.h"
+#include "oomd-manager-bus.h"
+#include "oomd-manager.h"
+#include "path-util.h"
+
+typedef struct ManagedOOMReply {
+        ManagedOOMMode mode;
+        char *path;
+        char *property;
+        unsigned limit;
+} ManagedOOMReply;
+
+static void managed_oom_reply_destroy(ManagedOOMReply *reply) {
+        assert(reply);
+        free(reply->path);
+        free(reply->property);
+}
+
+static int managed_oom_mode(const char *name, JsonVariant *v, JsonDispatchFlags flags, void *userdata) {
+        ManagedOOMMode *mode = userdata, m;
+        const char *s;
+
+        assert(mode);
+        assert_se(s = json_variant_string(v));
+
+        m = managed_oom_mode_from_string(s);
+        if (m < 0)
+                return json_log(v, flags, SYNTHETIC_ERRNO(EINVAL), "%s is not a valid ManagedOOMMode", s);
+
+        *mode = m;
+        return 0;
+}
+
+static int process_managed_oom_reply(
+                Varlink *link,
+                JsonVariant *parameters,
+                const char *error_id,
+                VarlinkReplyFlags flags,
+                void *userdata) {
+        JsonVariant *c, *cgroups;
+        Manager *m = userdata;
+        int r = 0;
+
+        assert(m);
+
+        static const JsonDispatch dispatch_table[] = {
+                { "mode",     JSON_VARIANT_STRING,   managed_oom_mode,       offsetof(ManagedOOMReply, mode),     JSON_MANDATORY },
+                { "path",     JSON_VARIANT_STRING,   json_dispatch_string,   offsetof(ManagedOOMReply, path),     JSON_MANDATORY },
+                { "property", JSON_VARIANT_STRING,   json_dispatch_string,   offsetof(ManagedOOMReply, property), JSON_MANDATORY },
+                { "limit",    JSON_VARIANT_UNSIGNED, json_dispatch_unsigned, offsetof(ManagedOOMReply, limit),    0 },
+                {},
+        };
+
+        if (error_id) {
+                r = -EIO;
+                log_debug("Error getting ManagedOOM cgroups: %s", error_id);
+                goto finish;
+        }
+
+        cgroups = json_variant_by_key(parameters, "cgroups");
+        if (!cgroups) {
+                r = -EINVAL;
+                goto finish;
+        }
+
+        /* Skip malformed elements and keep processing in case the others are good */
+        JSON_VARIANT_ARRAY_FOREACH(c, cgroups) {
+                _cleanup_(managed_oom_reply_destroy) ManagedOOMReply reply = {};
+                OomdCGroupContext *ctx;
+                Hashmap *monitor_hm;
+                loadavg_t limit;
+                int ret;
+
+                if (!json_variant_is_object(c))
+                        continue;
+
+                ret = json_dispatch(c, dispatch_table, NULL, 0, &reply);
+                if (ret == -ENOMEM) {
+                        r = ret;
+                        goto finish;
+                } else if (ret < 0)
+                        continue;
+
+                monitor_hm = streq(reply.property, "ManagedOOMSwap") ?
+                                m->monitored_swap_cgroup_contexts : m->monitored_mem_pressure_cgroup_contexts;
+
+                if (reply.mode == MANAGED_OOM_AUTO) {
+                        (void) oomd_cgroup_context_free(hashmap_remove(monitor_hm, reply.path));
+                        continue;
+                }
+
+                limit = m->default_mem_pressure_limit;
+
+                if (streq(reply.property, "ManagedOOMMemoryPressure")) {
+                        if (reply.limit > 100)
+                                continue;
+                        else if (reply.limit != 0) {
+                                ret = store_loadavg_fixed_point((unsigned long) reply.limit, 0, &limit);
+                                if (ret < 0)
+                                        continue;
+                        }
+                }
+
+                ret = oomd_insert_cgroup_context(NULL, monitor_hm, reply.path);
+                if (ret == -ENOMEM) {
+                        r = ret;
+                        goto finish;
+                }
+
+                /* Always update the limit in case it was changed. For non-memory pressure detection the value is
+                 * ignored so always updating it here is not a problem. */
+                ctx = hashmap_get(monitor_hm, reply.path);
+                if (ctx)
+                        ctx->mem_pressure_limit = limit;
+        }
+
+finish:
+        if (!FLAGS_SET(flags, VARLINK_REPLY_CONTINUES))
+                m->varlink = varlink_close_unref(link);
+
+        return r;
+}
+
+/* Fill `new_h` with `path`'s descendent OomdCGroupContexts. Only include descendent cgroups that are possible
+ * candidates for action. That is, only leaf cgroups or cgroups with memory.oom.group set to "1".
+ *
+ * This function ignores most errors in order to handle cgroups that may have been cleaned up while populating
+ * the hashmap.
+ *
+ * `new_h` is of the form { key: cgroup paths -> value: OomdCGroupContext } */
+static int recursively_get_cgroup_context(Hashmap *new_h, const char *path) {
+        _cleanup_free_ char *subpath = NULL;
+        _cleanup_closedir_ DIR *d = NULL;
+        int r;
+
+        assert(new_h);
+        assert(path);
+
+        r = cg_enumerate_subgroups(SYSTEMD_CGROUP_CONTROLLER, path, &d);
+        if (r < 0)
+                return r;
+
+        r = cg_read_subgroup(d, &subpath);
+        if (r < 0)
+                return r;
+        else if (r == 0) { /* No subgroups? We're a leaf node */
+                r = oomd_insert_cgroup_context(NULL, new_h, path);
+                return (r == -ENOMEM) ? r : 0;
+        }
+
+        do {
+                _cleanup_free_ char *cg_path = NULL;
+                bool oom_group;
+
+                cg_path = path_join(empty_to_root(path), subpath);
+                if (!cg_path)
+                        return -ENOMEM;
+
+                subpath = mfree(subpath);
+
+                r = cg_get_attribute_as_bool("memory", cg_path, "memory.oom.group", &oom_group);
+                /* The cgroup might be gone. Skip it as a candidate since we can't get information on it. */
+                if (r < 0)
+                        return (r == -ENOMEM) ? r : 0;
+
+                if (oom_group)
+                        r = oomd_insert_cgroup_context(NULL, new_h, cg_path);
+                else
+                        r = recursively_get_cgroup_context(new_h, cg_path);
+                if (r == -ENOMEM)
+                        return r;
+        } while ((r = cg_read_subgroup(d, &subpath)) > 0);
+
+        return 0;
+}
+
+static int update_monitored_cgroup_contexts(Hashmap **monitored_cgroups) {
+        _cleanup_hashmap_free_ Hashmap *new_base = NULL;
+        OomdCGroupContext *ctx;
+        int r;
+
+        assert(monitored_cgroups);
+
+        new_base = hashmap_new(&oomd_cgroup_ctx_hash_ops);
+        if (!new_base)
+                return -ENOMEM;
+
+        HASHMAP_FOREACH(ctx, *monitored_cgroups) {
+                /* Skip most errors since the cgroup we're trying to update might not exist anymore. */
+                r = oomd_insert_cgroup_context(*monitored_cgroups, new_base, ctx->path);
+                if (r == -ENOMEM)
+                        return r;
+        }
+
+        hashmap_free(*monitored_cgroups);
+        *monitored_cgroups = TAKE_PTR(new_base);
+
+        return 0;
+}
+
+static int get_monitored_cgroup_contexts_candidates(Hashmap *monitored_cgroups, Hashmap **ret_candidates) {
+        _cleanup_hashmap_free_ Hashmap *candidates = NULL;
+        OomdCGroupContext *ctx;
+        int r;
+
+        assert(monitored_cgroups);
+        assert(ret_candidates);
+
+        candidates = hashmap_new(&oomd_cgroup_ctx_hash_ops);
+        if (!candidates)
+                return -ENOMEM;
+
+        HASHMAP_FOREACH(ctx, monitored_cgroups) {
+                r = recursively_get_cgroup_context(candidates, ctx->path);
+                if (r == -ENOMEM)
+                        return r;
+        }
+
+        *ret_candidates = TAKE_PTR(candidates);
+
+        return 0;
+}
+
+static int acquire_managed_oom_connect(Manager *m) {
+        _cleanup_(varlink_close_unrefp) Varlink *link = NULL;
+        int r;
+
+        assert(m);
+        assert(m->event);
+
+        r = varlink_connect_address(&link, VARLINK_ADDR_PATH_MANAGED_OOM);
+        if (r < 0)
+                return log_error_errno(r, "Failed to connect to %s: %m", VARLINK_ADDR_PATH_MANAGED_OOM);
+
+        (void) varlink_set_userdata(link, m);
+        (void) varlink_set_description(link, "oomd");
+        (void) varlink_set_relative_timeout(link, USEC_INFINITY);
+
+        r = varlink_attach_event(link, m->event, SD_EVENT_PRIORITY_NORMAL);
+        if (r < 0)
+                return log_error_errno(r, "Failed to attach varlink connection to event loop: %m");
+
+        r = varlink_bind_reply(link, process_managed_oom_reply);
+        if (r < 0)
+                return log_error_errno(r, "Failed to bind reply callback: %m");
+
+        r = varlink_observe(link, "io.systemd.ManagedOOM.SubscribeManagedOOMCGroups", NULL);
+        if (r < 0)
+                return log_error_errno(r, "Failed to observe varlink call: %m");
+
+        m->varlink = TAKE_PTR(link);
+        return 0;
+}
+
+static int monitor_cgroup_contexts_handler(sd_event_source *s, uint64_t usec, void *userdata) {
+        _cleanup_set_free_ Set *targets = NULL;
+        Manager *m = userdata;
+        usec_t usec_now;
+        int r;
+
+        assert(s);
+        assert(userdata);
+
+        /* Reset timer */
+        r = sd_event_now(sd_event_source_get_event(s), CLOCK_MONOTONIC, &usec_now);
+        if (r < 0)
+                return log_error_errno(r, "Failed to reset event timer");
+
+        r = sd_event_source_set_time_relative(s, INTERVAL_USEC);
+        if (r < 0)
+                return log_error_errno(r, "Failed to set relative time for timer");
+
+        /* Reconnect if our connection dropped */
+        if (!m->varlink) {
+                r = acquire_managed_oom_connect(m);
+                if (r < 0)
+                        return log_error_errno(r, "Failed to acquire varlink connection");
+        }
+
+        /* Update the cgroups used for detection/action */
+        r = update_monitored_cgroup_contexts(&m->monitored_swap_cgroup_contexts);
+        if (r == -ENOMEM)
+                return log_error_errno(r, "Failed to update monitored swap cgroup contexts");
+
+        r = update_monitored_cgroup_contexts(&m->monitored_mem_pressure_cgroup_contexts);
+        if (r == -ENOMEM)
+                return log_error_errno(r, "Failed to update monitored memory pressure cgroup contexts");
+
+        r = oomd_system_context_acquire("/proc/swaps", &m->system_context);
+        /* If there aren't units depending on swap actions, the only error we exit on is ENOMEM */
+        if (r == -ENOMEM || (r < 0 && !hashmap_isempty(m->monitored_swap_cgroup_contexts)))
+                return log_error_errno(r, "Failed to acquire system context");
+
+        /* If we're still recovering from a kill, don't try to kill again yet */
+        if (m->post_action_delay_start > 0) {
+                if (m->post_action_delay_start + POST_ACTION_DELAY_USEC > usec_now)
+                        return 0;
+                else
+                        m->post_action_delay_start = 0;
+        }
+
+        r = oomd_pressure_above(m->monitored_mem_pressure_cgroup_contexts, PRESSURE_DURATION_USEC, &targets);
+        if (r == -ENOMEM)
+                return log_error_errno(r, "Failed to check if memory pressure exceeded limits");
+        else if (r == 1) {
+                /* Check if there was reclaim activity in the last interval. The concern is the following case:
+                 * Pressure climbed, a lot of high-frequency pages were reclaimed, and we killed the offending
+                 * cgroup. Even after this, well-behaved processes will fault in recently resident pages and
+                 * this will cause pressure to remain high. Thus if there isn't any reclaim pressure, no need
+                 * to kill something (it won't help anyways). */
+                if (oomd_memory_reclaim(m->monitored_mem_pressure_cgroup_contexts)) {
+                        _cleanup_hashmap_free_ Hashmap *candidates = NULL;
+                        OomdCGroupContext *t;
+
+                        r = get_monitored_cgroup_contexts_candidates(m->monitored_mem_pressure_cgroup_contexts, &candidates);
+                        if (r == -ENOMEM)
+                                return log_error_errno(r, "Failed to get monitored memory pressure cgroup candidates");
+
+                        SET_FOREACH(t, targets) {
+                                log_notice("Memory pressure for %s is greater than %lu for more than %"PRIu64" seconds and there was reclaim activity",
+                                        t->path, LOAD_INT(t->mem_pressure_limit), PRESSURE_DURATION_USEC / USEC_PER_SEC);
+
+                                r = oomd_kill_by_pgscan(candidates, t->path, m->dry_run);
+                                if (r == -ENOMEM)
+                                        return log_error_errno(r, "Failed to kill cgroup processes by pgscan");
+                                if (r < 0)
+                                        log_info("Failed to kill any cgroup(s) under %s based on pressure", t->path);
+                                else {
+                                        /* Don't act on all the high pressure cgroups at once; return as soon as we kill one */
+                                        m->post_action_delay_start = usec_now;
+                                        return 0;
+                                }
+                        }
+                }
+        }
+
+        if (oomd_swap_free_below(&m->system_context, (100 - m->swap_used_limit))) {
+                _cleanup_hashmap_free_ Hashmap *candidates = NULL;
+
+                log_notice("Swap used (%"PRIu64") / total (%"PRIu64") is more than %u%%",
+                        m->system_context.swap_used, m->system_context.swap_total, m->swap_used_limit);
+
+                r = get_monitored_cgroup_contexts_candidates(m->monitored_swap_cgroup_contexts, &candidates);
+                if (r == -ENOMEM)
+                        return log_error_errno(r, "Failed to get monitored swap cgroup candidates");
+
+                r = oomd_kill_by_swap_usage(candidates, m->dry_run);
+                if (r == -ENOMEM)
+                        return log_error_errno(r, "Failed to kill cgroup processes by swap usage");
+                if (r < 0)
+                        log_info("Failed to kill any cgroup(s) based on swap");
+                else {
+                        m->post_action_delay_start = usec_now;
+                        return 0;
+                }
+        }
+
+        return 0;
+}
+
+static int monitor_cgroup_contexts(Manager *m) {
+        _cleanup_(sd_event_source_unrefp) sd_event_source *s = NULL;
+        int r;
+
+        assert(m);
+        assert(m->event);
+
+        r = sd_event_add_time(m->event, &s, CLOCK_MONOTONIC, 0, 0, monitor_cgroup_contexts_handler, m);
+        if (r < 0)
+                return r;
+
+        r = sd_event_source_set_exit_on_failure(s, true);
+        if (r < 0)
+                return r;
+
+        r = sd_event_source_set_enabled(s, SD_EVENT_ON);
+        if (r < 0)
+                return r;
+
+        (void) sd_event_source_set_description(s, "oomd-timer");
+
+        m->cgroup_context_event_source = TAKE_PTR(s);
+        return 0;
+}
+
+void manager_free(Manager *m) {
+        assert(m);
+
+        varlink_close_unref(m->varlink);
+        sd_event_source_unref(m->cgroup_context_event_source);
+        sd_event_unref(m->event);
+
+        bus_verify_polkit_async_registry_free(m->polkit_registry);
+        sd_bus_flush_close_unref(m->bus);
+
+        hashmap_free(m->monitored_swap_cgroup_contexts);
+        hashmap_free(m->monitored_mem_pressure_cgroup_contexts);
+
+        free(m);
+}
+
+int manager_new(Manager **ret) {
+        _cleanup_(manager_freep) Manager *m = NULL;
+        int r;
+
+        assert(ret);
+
+        m = new0(Manager, 1);
+        if (!m)
+                return -ENOMEM;
+
+        r = sd_event_default(&m->event);
+        if (r < 0)
+                return r;
+
+        (void) sd_event_set_watchdog(m->event, true);
+
+        r = sd_event_add_signal(m->event, NULL, SIGINT, NULL, NULL);
+        if (r < 0)
+                return r;
+
+        r = sd_event_add_signal(m->event, NULL, SIGTERM, NULL, NULL);
+        if (r < 0)
+                return r;
+
+        m->monitored_swap_cgroup_contexts = hashmap_new(&oomd_cgroup_ctx_hash_ops);
+        if (!m->monitored_swap_cgroup_contexts)
+                return -ENOMEM;
+
+        m->monitored_mem_pressure_cgroup_contexts = hashmap_new(&oomd_cgroup_ctx_hash_ops);
+        if (!m->monitored_mem_pressure_cgroup_contexts)
+                return -ENOMEM;
+
+        *ret = TAKE_PTR(m);
+        return 0;
+}
+
+static int manager_connect_bus(Manager *m) {
+        int r;
+
+        assert(m);
+        assert(!m->bus);
+
+        r = bus_open_system_watch_bind_with_description(&m->bus, "bus-api-oom");
+        if (r < 0)
+                return log_error_errno(r, "Failed to connect to bus: %m");
+
+        r = bus_add_implementation(m->bus, &manager_object, m);
+        if (r < 0)
+                return r;
+
+        r = bus_log_control_api_register(m->bus);
+        if (r < 0)
+                return r;
+
+        r = sd_bus_request_name_async(m->bus, NULL, "org.freedesktop.oom1", 0, NULL, NULL);
+        if (r < 0)
+                return log_error_errno(r, "Failed to request name: %m");
+
+        r = sd_bus_attach_event(m->bus, m->event, 0);
+        if (r < 0)
+                return log_error_errno(r, "Failed to attach bus to event loop: %m");
+
+        return 0;
+}
+
+int manager_start(Manager *m, bool dry_run, int swap_used_limit, int mem_pressure_limit) {
+        unsigned long l;
+        int r;
+
+        assert(m);
+
+        m->dry_run = dry_run;
+
+        m->swap_used_limit = swap_used_limit != -1 ? swap_used_limit : DEFAULT_SWAP_USED_LIMIT;
+        assert(m->swap_used_limit <= 100);
+
+        l = mem_pressure_limit != -1 ? mem_pressure_limit : DEFAULT_MEM_PRESSURE_LIMIT;
+        r = store_loadavg_fixed_point(l, 0, &m->default_mem_pressure_limit);
+        if (r < 0)
+                return r;
+
+        r = manager_connect_bus(m);
+        if (r < 0)
+                return r;
+
+        r = acquire_managed_oom_connect(m);
+        if (r < 0)
+                return r;
+
+        r = monitor_cgroup_contexts(m);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+int manager_get_dump_string(Manager *m, char **ret) {
+        _cleanup_free_ char *dump = NULL;
+        _cleanup_fclose_ FILE *f = NULL;
+        OomdCGroupContext *c;
+        size_t size;
+        char *key;
+        int r;
+
+        assert(m);
+        assert(ret);
+
+        f = open_memstream_unlocked(&dump, &size);
+        if (!f)
+                return -errno;
+
+        fprintf(f,
+                "Dry Run: %s\n"
+                "Swap Used Limit: %u%%\n"
+                "Default Memory Pressure Limit: %lu%%\n"
+                "System Context:\n",
+                yes_no(m->dry_run),
+                m->swap_used_limit,
+                LOAD_INT(m->default_mem_pressure_limit));
+        oomd_dump_system_context(&m->system_context, f, "\t");
+
+        fprintf(f, "Swap Monitored CGroups:\n");
+        HASHMAP_FOREACH_KEY(c, key, m->monitored_swap_cgroup_contexts)
+                oomd_dump_swap_cgroup_context(c, f, "\t");
+
+        fprintf(f, "Memory Pressure Monitored CGroups:\n");
+        HASHMAP_FOREACH_KEY(c, key, m->monitored_mem_pressure_cgroup_contexts)
+                oomd_dump_memory_pressure_cgroup_context(c, f, "\t");
+
+        r = fflush_and_check(f);
+        if (r < 0)
+                return r;
+
+        f = safe_fclose(f);
+
+        *ret = TAKE_PTR(dump);
+        return 0;
+}
diff --git a/src/oom/oomd-manager.h b/src/oom/oomd-manager.h
new file mode 100644 (file)
index 0000000..3f3eb5a
--- /dev/null
@@ -0,0 +1,60 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#pragma once
+
+#include "conf-parser.h"
+#include "oomd-util.h"
+#include "sd-event.h"
+#include "varlink.h"
+
+/* Polling interval for monitoring stats */
+#define INTERVAL_USEC (1 * USEC_PER_SEC)
+
+/* Used to weight the averages */
+#define AVERAGE_SIZE_DECAY 4
+
+/* Take action if 10s of memory pressure > 60 for more than 30s. We use the "full" value from PSI so this is the
+ * percentage of time all tasks were delayed (i.e. unproductive).
+ * Generally 60 or higher might be acceptable for something like system.slice with no memory.high set; processes in
+ * system.slice are assumed to be less latency sensitive. */
+#define PRESSURE_DURATION_USEC (30 * USEC_PER_SEC)
+#define DEFAULT_MEM_PRESSURE_LIMIT 60
+#define DEFAULT_SWAP_USED_LIMIT 90
+
+#define POST_ACTION_DELAY_USEC (15 * USEC_PER_SEC)
+
+typedef struct Manager Manager;
+
+struct Manager {
+        sd_bus *bus;
+        sd_event *event;
+
+        Hashmap *polkit_registry;
+
+        bool dry_run;
+        unsigned swap_used_limit;
+        loadavg_t default_mem_pressure_limit;
+
+        /* k: cgroup paths -> v: OomdCGroupContext
+         * Used to detect when to take action. */
+        Hashmap *monitored_swap_cgroup_contexts;
+        Hashmap *monitored_mem_pressure_cgroup_contexts;
+
+        OomdSystemContext system_context;
+
+        usec_t post_action_delay_start;
+
+        sd_event_source *cgroup_context_event_source;
+
+        Varlink *varlink;
+};
+
+void manager_free(Manager *m);
+DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_free);
+
+int manager_new(Manager **ret);
+
+int manager_start(Manager *m, bool dry_run, int swap_used_limit, int mem_pressure_limit);
+
+int manager_get_dump_string(Manager *m, char **ret);
+
+CONFIG_PARSER_PROTOTYPE(config_parse_oomd_default);
diff --git a/src/oom/oomd-util.c b/src/oom/oomd-util.c
new file mode 100644 (file)
index 0000000..cec656f
--- /dev/null
@@ -0,0 +1,451 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#include <sys/xattr.h>
+#include <unistd.h>
+
+#include "cgroup-util.h"
+#include "fd-util.h"
+#include "format-util.h"
+#include "oomd-util.h"
+#include "parse-util.h"
+#include "path-util.h"
+#include "procfs-util.h"
+#include "signal-util.h"
+#include "sort-util.h"
+#include "stat-util.h"
+#include "stdio-util.h"
+
+DEFINE_HASH_OPS_WITH_VALUE_DESTRUCTOR(
+                oomd_cgroup_ctx_hash_ops,
+                char,
+                string_hash_func,
+                string_compare_func,
+                OomdCGroupContext,
+                oomd_cgroup_context_free);
+
+static int log_kill(pid_t pid, int sig, void *userdata) {
+        log_debug("oomd attempting to kill " PID_FMT " with %s", pid, signal_to_string(sig));
+        return 0;
+}
+
+static int increment_oomd_xattr(const char *path, const char *xattr, uint64_t num_procs_killed) {
+        _cleanup_free_ char *value = NULL;
+        char buf[DECIMAL_STR_MAX(uint64_t) + 1];
+        uint64_t curr_count = 0;
+        int r;
+
+        assert(path);
+        assert(xattr);
+
+        r = cg_get_xattr_malloc(SYSTEMD_CGROUP_CONTROLLER, path, xattr, &value);
+        if (r < 0 && r != -ENODATA)
+                return r;
+
+        if (!isempty(value)) {
+                 r = safe_atou64(value, &curr_count);
+                 if (r < 0)
+                         return r;
+        }
+
+        if (curr_count > UINT64_MAX - num_procs_killed)
+                return -EOVERFLOW;
+
+        xsprintf(buf, "%"PRIu64, curr_count + num_procs_killed);
+        r = cg_set_xattr(SYSTEMD_CGROUP_CONTROLLER, path, xattr, buf, strlen(buf), 0);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+OomdCGroupContext *oomd_cgroup_context_free(OomdCGroupContext *ctx) {
+        if (!ctx)
+                return NULL;
+
+        free(ctx->path);
+        return mfree(ctx);
+}
+
+int oomd_pressure_above(Hashmap *h, usec_t duration, Set **ret) {
+        _cleanup_set_free_ Set *targets = NULL;
+        OomdCGroupContext *ctx;
+        char *key;
+        int r;
+
+        assert(h);
+        assert(ret);
+
+        targets = set_new(NULL);
+        if (!targets)
+                return -ENOMEM;
+
+        HASHMAP_FOREACH_KEY(ctx, key, h) {
+                if (ctx->memory_pressure.avg10 > ctx->mem_pressure_limit) {
+                        usec_t diff;
+
+                        if (ctx->last_hit_mem_pressure_limit == 0)
+                                ctx->last_hit_mem_pressure_limit = now(CLOCK_MONOTONIC);
+
+                        diff = now(CLOCK_MONOTONIC) - ctx->last_hit_mem_pressure_limit;
+                        if (diff >= duration) {
+                                r = set_put(targets, ctx);
+                                if (r < 0)
+                                        return -ENOMEM;
+                        }
+                } else
+                        ctx->last_hit_mem_pressure_limit = 0;
+        }
+
+        if (!set_isempty(targets)) {
+                *ret = TAKE_PTR(targets);
+                return 1;
+        }
+
+        *ret = NULL;
+        return 0;
+}
+
+bool oomd_memory_reclaim(Hashmap *h) {
+        uint64_t pgscan = 0, pgscan_of = 0, last_pgscan = 0, last_pgscan_of = 0;
+        OomdCGroupContext *ctx;
+
+        assert(h);
+
+        /* If sum of all the current pgscan values are greater than the sum of all the last_pgscan values,
+         * there was reclaim activity. Used along with pressure checks to decide whether to take action. */
+
+        HASHMAP_FOREACH(ctx, h) {
+                uint64_t sum;
+
+                sum = pgscan + ctx->pgscan;
+                if (sum < pgscan || sum < ctx->pgscan)
+                        pgscan_of++; /* count overflows */
+                pgscan = sum;
+
+                sum = last_pgscan + ctx->last_pgscan;
+                if (sum < last_pgscan || sum < ctx->last_pgscan)
+                        last_pgscan_of++; /* count overflows */
+                last_pgscan = sum;
+        }
+
+        /* overflow counts are the same, return sums comparison */
+        if (last_pgscan_of == pgscan_of)
+                return pgscan > last_pgscan;
+
+        return pgscan_of > last_pgscan_of;
+}
+
+bool oomd_swap_free_below(const OomdSystemContext *ctx, uint64_t threshold_percent) {
+        uint64_t swap_threshold;
+
+        assert(ctx);
+        assert(threshold_percent <= 100);
+
+        swap_threshold = ctx->swap_total * threshold_percent / ((uint64_t) 100);
+        return (ctx->swap_total - ctx->swap_used) < swap_threshold;
+}
+
+int oomd_sort_cgroup_contexts(Hashmap *h, oomd_compare_t compare_func, const char *prefix, OomdCGroupContext ***ret) {
+        _cleanup_free_ OomdCGroupContext **sorted = NULL;
+        OomdCGroupContext *item;
+        size_t k = 0;
+
+        assert(h);
+        assert(compare_func);
+        assert(ret);
+
+        sorted = new0(OomdCGroupContext*, hashmap_size(h));
+        if (!sorted)
+                return -ENOMEM;
+
+        HASHMAP_FOREACH(item, h) {
+                if (item->path && prefix && !path_startswith(item->path, prefix))
+                        continue;
+
+                sorted[k++] = item;
+        }
+
+        typesafe_qsort(sorted, k, compare_func);
+
+        *ret = TAKE_PTR(sorted);
+
+        assert(k <= INT_MAX);
+        return (int) k;
+}
+
+int oomd_cgroup_kill(const char *path, bool recurse, bool dry_run) {
+        _cleanup_set_free_ Set *pids_killed = NULL;
+        int r;
+
+        assert(path);
+
+        if (dry_run) {
+                _cleanup_free_ char *cg_path = NULL;
+
+                r = cg_get_path(SYSTEMD_CGROUP_CONTROLLER, path, NULL, &cg_path);
+                if (r < 0)
+                        return r;
+
+                log_debug("oomd dry-run: Would have tried to kill %s with recurse=%s", cg_path, true_false(recurse));
+                return 0;
+        }
+
+        pids_killed = set_new(NULL);
+        if (!pids_killed)
+                return -ENOMEM;
+
+        if (recurse)
+                r = cg_kill_recursive(SYSTEMD_CGROUP_CONTROLLER, path, SIGKILL, CGROUP_IGNORE_SELF, pids_killed, log_kill, NULL);
+        else
+                r = cg_kill(SYSTEMD_CGROUP_CONTROLLER, path, SIGKILL, CGROUP_IGNORE_SELF, pids_killed, log_kill, NULL);
+        if (r < 0)
+                return r;
+
+        r = increment_oomd_xattr(path, "user.systemd_oomd_kill", set_size(pids_killed));
+        if (r < 0)
+                log_debug_errno(r, "Failed to set user.systemd_oomd_kill on kill: %m");
+
+        return set_size(pids_killed) != 0;
+}
+
+int oomd_kill_by_pgscan(Hashmap *h, const char *prefix, bool dry_run) {
+        _cleanup_free_ OomdCGroupContext **sorted = NULL;
+        int r;
+
+        assert(h);
+
+        r = oomd_sort_cgroup_contexts(h, compare_pgscan, prefix, &sorted);
+        if (r < 0)
+                return r;
+
+        for (int i = 0; i < r; i++) {
+                if (sorted[i]->pgscan == 0)
+                        break;
+
+                r = oomd_cgroup_kill(sorted[i]->path, true, dry_run);
+                if (r > 0 || r == -ENOMEM)
+                        break;
+        }
+
+        return r;
+}
+
+int oomd_kill_by_swap_usage(Hashmap *h, bool dry_run) {
+        _cleanup_free_ OomdCGroupContext **sorted = NULL;
+        int r;
+
+        assert(h);
+
+        r = oomd_sort_cgroup_contexts(h, compare_swap_usage, NULL, &sorted);
+        if (r < 0)
+                return r;
+
+        /* Try to kill cgroups with non-zero swap usage until we either succeed in
+         * killing or we get to a cgroup with no swap usage. */
+        for (int i = 0; i < r; i++) {
+                if (sorted[i]->swap_usage == 0)
+                        break;
+
+                r = oomd_cgroup_kill(sorted[i]->path, true, dry_run);
+                if (r > 0 || r == -ENOMEM)
+                        break;
+        }
+
+        return r;
+}
+
+int oomd_cgroup_context_acquire(const char *path, OomdCGroupContext **ret) {
+        _cleanup_(oomd_cgroup_context_freep) OomdCGroupContext *ctx = NULL;
+        _cleanup_free_ char *p = NULL, *val = NULL;
+        bool is_root;
+        int r;
+
+        assert(path);
+        assert(ret);
+
+        ctx = new0(OomdCGroupContext, 1);
+        if (!ctx)
+                return -ENOMEM;
+
+        is_root = empty_or_root(path);
+
+        r = cg_get_path(SYSTEMD_CGROUP_CONTROLLER, path, "memory.pressure", &p);
+        if (r < 0)
+                return log_debug_errno(r, "Error getting cgroup memory pressure path from %s: %m", path);
+
+        r = read_resource_pressure(p, PRESSURE_TYPE_FULL, &ctx->memory_pressure);
+        if (r < 0)
+                return log_debug_errno(r, "Error parsing memory pressure from %s: %m", p);
+
+        if (is_root) {
+                r = procfs_memory_get_used(&ctx->current_memory_usage);
+                if (r < 0)
+                        return log_debug_errno(r, "Error getting memory used from procfs: %m");
+        } else {
+                r = cg_get_attribute_as_uint64(SYSTEMD_CGROUP_CONTROLLER, path, "memory.current", &ctx->current_memory_usage);
+                if (r < 0)
+                        return log_debug_errno(r, "Error getting memory.current from %s: %m", path);
+
+                r = cg_get_attribute_as_uint64(SYSTEMD_CGROUP_CONTROLLER, path, "memory.min", &ctx->memory_min);
+                if (r < 0)
+                        return log_debug_errno(r, "Error getting memory.min from %s: %m", path);
+
+                r = cg_get_attribute_as_uint64(SYSTEMD_CGROUP_CONTROLLER, path, "memory.low", &ctx->memory_low);
+                if (r < 0)
+                        return log_debug_errno(r, "Error getting memory.low from %s: %m", path);
+
+                r = cg_get_attribute_as_uint64(SYSTEMD_CGROUP_CONTROLLER, path, "memory.swap.current", &ctx->swap_usage);
+                if (r < 0)
+                        return log_debug_errno(r, "Error getting memory.swap.current from %s: %m", path);
+
+                r = cg_get_keyed_attribute(SYSTEMD_CGROUP_CONTROLLER, path, "memory.stat", STRV_MAKE("pgscan"), &val);
+                if (r < 0)
+                        return log_debug_errno(r, "Error getting pgscan from memory.stat under %s: %m", path);
+
+                r = safe_atou64(val, &ctx->pgscan);
+                if (r < 0)
+                        return log_debug_errno(r, "Error converting pgscan value to uint64_t: %m");
+        }
+
+        ctx->path = strdup(empty_to_root(path));
+        if (!ctx->path)
+                return -ENOMEM;
+
+        *ret = TAKE_PTR(ctx);
+        return 0;
+}
+
+int oomd_system_context_acquire(const char *proc_swaps_path, OomdSystemContext *ret) {
+        _cleanup_fclose_ FILE *f = NULL;
+        OomdSystemContext ctx = {};
+        int r;
+
+        assert(proc_swaps_path);
+        assert(ret);
+
+        f = fopen(proc_swaps_path, "re");
+        if (!f)
+                return -errno;
+
+        (void) fscanf(f, "%*s %*s %*s %*s %*s\n");
+
+        for (;;) {
+                uint64_t total, used;
+
+                r = fscanf(f,
+                           "%*s "          /* device/file */
+                           "%*s "          /* type of swap */
+                           "%" PRIu64 " "  /* swap size */
+                           "%" PRIu64 " "  /* used */
+                           "%*s\n",        /* priority */
+                           &total, &used);
+
+                if (r == EOF && feof(f))
+                         break;
+
+                if (r != 2) {
+                        if (ferror(f))
+                                return log_debug_errno(errno, "Error reading from %s: %m", proc_swaps_path);
+
+                        return log_debug_errno(SYNTHETIC_ERRNO(EIO),
+                                               "Failed to parse values from %s: %m", proc_swaps_path);
+                }
+
+                ctx.swap_total += total * 1024U;
+                ctx.swap_used += used * 1024U;
+        }
+
+        *ret = ctx;
+        return 0;
+}
+
+int oomd_insert_cgroup_context(Hashmap *old_h, Hashmap *new_h, const char *path) {
+        _cleanup_(oomd_cgroup_context_freep) OomdCGroupContext *curr_ctx = NULL;
+        OomdCGroupContext *old_ctx, *ctx;
+        int r;
+
+        assert(new_h);
+        assert(path);
+
+        r = oomd_cgroup_context_acquire(path, &curr_ctx);
+        if (r < 0)
+                return log_debug_errno(r, "Failed to get OomdCGroupContext for %s: %m", path);
+
+        old_ctx = hashmap_get(old_h, path);
+        if (old_ctx) {
+                curr_ctx->last_pgscan = old_ctx->pgscan;
+                curr_ctx->mem_pressure_limit = old_ctx->mem_pressure_limit;
+                curr_ctx->last_hit_mem_pressure_limit = old_ctx->last_hit_mem_pressure_limit;
+        }
+
+        ctx = TAKE_PTR(curr_ctx);
+        r = hashmap_put(new_h, ctx->path, ctx);
+        if (r < 0)
+                return r;
+
+        return 0;
+}
+
+void oomd_dump_swap_cgroup_context(const OomdCGroupContext *ctx, FILE *f, const char *prefix) {
+        char swap[FORMAT_BYTES_MAX];
+
+        assert(ctx);
+        assert(f);
+
+        if (!empty_or_root(ctx->path))
+                fprintf(f,
+                        "%sPath: %s\n"
+                        "%s\tSwap Usage: %s\n",
+                        strempty(prefix), ctx->path,
+                        strempty(prefix), format_bytes(swap, sizeof(swap), ctx->swap_usage));
+        else
+                fprintf(f,
+                        "%sPath: %s\n"
+                        "%s\tSwap Usage: (see System Context)\n",
+                        strempty(prefix), ctx->path,
+                        strempty(prefix));
+}
+
+void oomd_dump_memory_pressure_cgroup_context(const OomdCGroupContext *ctx, FILE *f, const char *prefix) {
+        char tbuf[FORMAT_TIMESPAN_MAX], mem_use[FORMAT_BYTES_MAX];
+        char mem_min[FORMAT_BYTES_MAX], mem_low[FORMAT_BYTES_MAX];
+
+        assert(ctx);
+        assert(f);
+
+        fprintf(f,
+                "%sPath: %s\n"
+                "%s\tMemory Pressure Limit: %lu%%\n"
+                "%s\tPressure: Avg10: %lu.%02lu Avg60: %lu.%02lu Avg300: %lu.%02lu Total: %s\n"
+                "%s\tCurrent Memory Usage: %s\n",
+                strempty(prefix), ctx->path,
+                strempty(prefix), LOAD_INT(ctx->mem_pressure_limit),
+                strempty(prefix),
+                LOAD_INT(ctx->memory_pressure.avg10), LOAD_FRAC(ctx->memory_pressure.avg10),
+                LOAD_INT(ctx->memory_pressure.avg60), LOAD_FRAC(ctx->memory_pressure.avg60),
+                LOAD_INT(ctx->memory_pressure.avg300), LOAD_FRAC(ctx->memory_pressure.avg300),
+                format_timespan(tbuf, sizeof(tbuf), ctx->memory_pressure.total, USEC_PER_SEC),
+                strempty(prefix), format_bytes(mem_use, sizeof(mem_use), ctx->current_memory_usage));
+
+        if (!empty_or_root(ctx->path))
+                fprintf(f,
+                        "%s\tMemory Min: %s\n"
+                        "%s\tMemory Low: %s\n"
+                        "%s\tPgscan: %" PRIu64 "\n",
+                        strempty(prefix), format_bytes_cgroup_protection(mem_min, sizeof(mem_min), ctx->memory_min),
+                        strempty(prefix), format_bytes_cgroup_protection(mem_low, sizeof(mem_low), ctx->memory_low),
+                        strempty(prefix), ctx->pgscan);
+}
+
+void oomd_dump_system_context(const OomdSystemContext *ctx, FILE *f, const char *prefix) {
+        char used[FORMAT_BYTES_MAX], total[FORMAT_BYTES_MAX];
+
+        assert(ctx);
+        assert(f);
+
+        fprintf(f,
+                "%sSwap: Used: %s Total: %s\n",
+                strempty(prefix),
+                format_bytes(used, sizeof(used), ctx->swap_used),
+                format_bytes(total, sizeof(total), ctx->swap_total));
+}
diff --git a/src/oom/oomd-util.h b/src/oom/oomd-util.h
new file mode 100644 (file)
index 0000000..0834cbf
--- /dev/null
@@ -0,0 +1,102 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#pragma once
+
+#include <stdbool.h>
+
+#include "hashmap.h"
+#include "psi-util.h"
+
+#define GROWING_SIZE_PERCENTILE 80
+
+extern const struct hash_ops oomd_cgroup_ctx_hash_ops;
+
+typedef struct OomdCGroupContext OomdCGroupContext;
+typedef struct OomdSystemContext OomdSystemContext;
+
+typedef int (oomd_compare_t)(OomdCGroupContext * const *, OomdCGroupContext * const *);
+
+struct OomdCGroupContext {
+        char *path;
+
+        ResourcePressure memory_pressure;
+
+        uint64_t current_memory_usage;
+
+        uint64_t memory_min;
+        uint64_t memory_low;
+        uint64_t swap_usage;
+
+        uint64_t last_pgscan;
+        uint64_t pgscan;
+
+        /* These are only used by oomd_pressure_above for acting on high memory pressure. */
+        loadavg_t mem_pressure_limit;
+        usec_t last_hit_mem_pressure_limit;
+};
+
+struct OomdSystemContext {
+        uint64_t swap_total;
+        uint64_t swap_used;
+};
+
+OomdCGroupContext *oomd_cgroup_context_free(OomdCGroupContext *ctx);
+DEFINE_TRIVIAL_CLEANUP_FUNC(OomdCGroupContext*, oomd_cgroup_context_free);
+
+/* All hashmaps used with these functions are expected to be of the form
+ * key: cgroup paths -> value: OomdCGroupContext. */
+
+/* Scans all the OomdCGroupContexts in `h` and returns 1 and a set of pointers to those OomdCGroupContexts in `ret`
+ * if any of them have exceeded their supplied memory pressure limits for the `duration` length of time.
+ * `last_hit_mem_pressure_limit` is updated accordingly for each entry when the limit is exceeded, and when it returns
+ * below the limit.
+ * Returns 0 and sets `ret` to an empty set if no entries exceeded limits for `duration`.
+ * Returns -ENOMEM for allocation errors. */
+int oomd_pressure_above(Hashmap *h, usec_t duration, Set **ret);
+
+/* Sum up current OomdCGroupContexts' pgscan values and last interval's pgscan values in `h`. Returns true if the
+ * current sum is higher than the last interval's sum (there was some reclaim activity). */
+bool oomd_memory_reclaim(Hashmap *h);
+
+/* Returns true if the amount of swap free is below the percentage of swap specified by `threshold_percent`. */
+bool oomd_swap_free_below(const OomdSystemContext *ctx, uint64_t threshold_percent);
+
+static inline int compare_pgscan(OomdCGroupContext * const *c1, OomdCGroupContext * const *c2) {
+        assert(c1);
+        assert(c2);
+
+        return CMP((*c2)->pgscan, (*c1)->pgscan);
+}
+
+static inline int compare_swap_usage(OomdCGroupContext * const *c1, OomdCGroupContext * const *c2) {
+        assert(c1);
+        assert(c2);
+
+        return CMP((*c2)->swap_usage, (*c1)->swap_usage);
+}
+
+/* Get an array of OomdCGroupContexts from `h`, qsorted from largest to smallest values according to `compare_func`.
+ * If `prefix` is not NULL, only include OomdCGroupContexts whose paths start with prefix. Otherwise all paths are sorted.
+ * Returns the number of sorted items; negative on error. */
+int oomd_sort_cgroup_contexts(Hashmap *h, oomd_compare_t compare_func, const char *prefix, OomdCGroupContext ***ret);
+
+/* Returns a negative value on error, 0 if no processes were killed, or 1 if processes were killed. */
+int oomd_cgroup_kill(const char *path, bool recurse, bool dry_run);
+
+/* The following oomd_kill_by_* functions return 1 if processes were killed, or negative otherwise. */
+/* If `prefix` is supplied, only cgroups whose paths start with `prefix` are eligible candidates. Otherwise,
+ * everything in `h` is a candidate. */
+int oomd_kill_by_pgscan(Hashmap *h, const char *prefix, bool dry_run);
+int oomd_kill_by_swap_usage(Hashmap *h, bool dry_run);
+
+int oomd_cgroup_context_acquire(const char *path, OomdCGroupContext **ret);
+int oomd_system_context_acquire(const char *proc_swaps_path, OomdSystemContext *ret);
+
+/* Get the OomdCGroupContext of `path` and insert it into `new_h`. The key for the inserted context will be `path`.
+ *
+ * `old_h` is used to get data used to calculate prior interval information. `old_h` can be NULL in which case there
+ * was no prior data to reference. */
+int oomd_insert_cgroup_context(Hashmap *old_h, Hashmap *new_h, const char *path);
+
+void oomd_dump_swap_cgroup_context(const OomdCGroupContext *ctx, FILE *f, const char *prefix);
+void oomd_dump_memory_pressure_cgroup_context(const OomdCGroupContext *ctx, FILE *f, const char *prefix);
+void oomd_dump_system_context(const OomdSystemContext *ctx, FILE *f, const char *prefix);
diff --git a/src/oom/oomd.c b/src/oom/oomd.c
new file mode 100644 (file)
index 0000000..8cf776e
--- /dev/null
@@ -0,0 +1,178 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#include <getopt.h>
+
+#include "bus-log-control-api.h"
+#include "bus-object.h"
+#include "cgroup-util.h"
+#include "conf-parser.h"
+#include "daemon-util.h"
+#include "log.h"
+#include "main-func.h"
+#include "oomd-manager.h"
+#include "oomd-manager-bus.h"
+#include "parse-util.h"
+#include "pretty-print.c"
+#include "psi-util.h"
+#include "signal-util.h"
+
+static bool arg_dry_run = false;
+static int arg_swap_used_limit = -1;
+static int arg_mem_pressure_limit = -1;
+
+static int parse_config(void) {
+        static const ConfigTableItem items[] = {
+                { "OOM", "SwapUsedLimitPercent",              config_parse_percent, 0, &arg_swap_used_limit    },
+                { "OOM", "DefaultMemoryPressureLimitPercent", config_parse_percent, 0, &arg_mem_pressure_limit },
+                {}
+        };
+
+        return config_parse_many_nulstr(PKGSYSCONFDIR "/oomd.conf",
+                                        CONF_PATHS_NULSTR("systemd/oomd.conf.d"),
+                                        "OOM\0",
+                                        config_item_table_lookup,
+                                        items,
+                                        CONFIG_PARSE_WARN,
+                                        NULL,
+                                        NULL);
+}
+
+static int help(void) {
+        _cleanup_free_ char *link = NULL;
+        int r;
+
+        r = terminal_urlify_man("systemd-oomd", "1", &link);
+        if (r < 0)
+                return log_oom();
+
+        printf("%s [OPTIONS...]\n\n"
+               "Run the userspace out-of-memory (OOM) killer.\n\n"
+               "  -h --help                 Show this help\n"
+               "     --version              Show package version\n"
+               "     --dry-run              Only print destructive actions instead of doing them\n"
+               "     --bus-introspect=PATH  Write D-Bus XML introspection data\n"
+               "\nSee the %s for details.\n"
+               , program_invocation_short_name
+               , link
+        );
+
+        return 0;
+}
+
+static int parse_argv(int argc, char *argv[]) {
+        enum {
+                ARG_VERSION = 0x100,
+                ARG_DRY_RUN,
+                ARG_BUS_INTROSPECT,
+        };
+
+        static const struct option options[] = {
+                { "help",           no_argument,       NULL, 'h'                },
+                { "version",        no_argument,       NULL, ARG_VERSION        },
+                { "dry-run",        no_argument,       NULL, ARG_DRY_RUN        },
+                { "bus-introspect", required_argument, NULL, ARG_BUS_INTROSPECT },
+                {}
+        };
+
+        int c;
+
+        assert(argc >= 0);
+        assert(argv);
+
+        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
+
+                switch (c) {
+
+                case 'h':
+                        return help();
+
+                case ARG_VERSION:
+                        return version();
+
+                case ARG_DRY_RUN:
+                        arg_dry_run = true;
+                        break;
+
+                case ARG_BUS_INTROSPECT:
+                        return bus_introspect_implementations(
+                                        stdout,
+                                        optarg,
+                                        BUS_IMPLEMENTATIONS(&manager_object,
+                                                            &log_control_object));
+
+                case '?':
+                        return -EINVAL;
+
+                default:
+                        assert_not_reached("Unknown option code.");
+                }
+
+        if (optind < argc)
+                return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
+                                       "This program takes no arguments.");
+
+        return 1;
+}
+
+static int run(int argc, char *argv[]) {
+        _cleanup_(notify_on_cleanup) const char *notify_msg = NULL;
+        _cleanup_(manager_freep) Manager *m = NULL;
+        _cleanup_free_ char *swap = NULL;
+        unsigned long long s = 0;
+        int r;
+
+        log_setup_service();
+
+        r = parse_argv(argc, argv);
+        if (r <= 0)
+                return r;
+
+        r = parse_config();
+        if (r < 0)
+                return r;
+
+        /* Do some basic requirement checks for running systemd-oomd. It's not exhaustive as some of the other
+         * requirements do not have a reliable means to check for in code. */
+
+        /* SwapTotal is always available in /proc/meminfo and defaults to 0, even on swap-disabled kernels. */
+        r = get_proc_field("/proc/meminfo", "SwapTotal", WHITESPACE, &swap);
+        if (r < 0)
+                return log_error_errno(r, "Failed to get SwapTotal from /proc/meminfo: %m");
+
+        r = safe_atollu(swap, &s);
+        if (r < 0)
+                return log_error_errno(r, "Failed to parse SwapTotal from /proc/meminfo: %s: %m", swap);
+        if (s == 0)
+                return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Requires swap to operate");
+
+        if (!is_pressure_supported())
+                return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Pressure Stall Information (PSI) is not supported");
+
+        r = cg_all_unified();
+        if (r < 0)
+                return log_error_errno(r, "Failed to determine whether the unified cgroups hierarchy is used: %m");
+        if (r == 0)
+                return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Requires the unified cgroups hierarchy");
+
+        assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, -1) >= 0);
+
+        r = manager_new(&m);
+        if (r < 0)
+                return log_error_errno(r, "Failed to create manager: %m");
+
+        r = manager_start(m, arg_dry_run, arg_swap_used_limit, arg_mem_pressure_limit);
+        if (r < 0)
+                return log_error_errno(r, "Failed to start up daemon: %m");
+
+        notify_msg = notify_start(NOTIFY_READY, NOTIFY_STOPPING);
+
+        log_info("systemd-oomd starting%s!", arg_dry_run ? " in dry run mode" : "");
+
+        r = sd_event_loop(m->event);
+        if (r < 0)
+                return log_error_errno(r, "Event loop failed: %m");
+
+        return 0;
+}
+
+DEFINE_MAIN_FUNCTION(run);
diff --git a/src/oom/oomd.conf b/src/oom/oomd.conf
new file mode 100644 (file)
index 0000000..8ac9716
--- /dev/null
@@ -0,0 +1,16 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+#
+# Entries in this file show the compile time defaults.
+# You can change settings by editing this file.
+# Defaults can be restored by simply deleting this file.
+#
+# See oomd.conf(5) for details
+
+[OOM]
+#SwapUsedLimitPercent=90%
+#DefaultMemoryPressureLimitPercent=60%
diff --git a/src/oom/org.freedesktop.oom1.conf b/src/oom/org.freedesktop.oom1.conf
new file mode 100644 (file)
index 0000000..cc1143a
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0"?> <!--*-nxml-*-->
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+        "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
+
+<busconfig>
+
+        <policy user="systemd-oom">
+                <allow own="org.freedesktop.oom1"/>
+                <allow send_destination="org.freedesktop.oom1"/>
+                <allow receive_sender="org.freedesktop.oom1"/>
+        </policy>
+
+        <policy user="root">
+                <allow send_destination="org.freedesktop.oom1"/>
+        </policy>
+
+        <policy context="default">
+                <deny send_destination="org.freedesktop.oom1"/>
+
+                <!-- Generic interfaces -->
+
+                <allow send_destination="org.freedesktop.oom1"
+                       send_interface="org.freedesktop.DBus.Introspectable"/>
+
+                <allow send_destination="org.freedesktop.oom1"
+                       send_interface="org.freedesktop.DBus.Peer"/>
+
+                <allow send_destination="org.freedesktop.oom1"
+                       send_interface="org.freedesktop.DBus.Properties"
+                       send_member="Get"/>
+
+                <allow send_destination="org.freedesktop.oom1"
+                       send_interface="org.freedesktop.DBus.Properties"
+                       send_member="GetAll"/>
+
+                <!-- Manager interface -->
+
+                <allow send_destination="org.freedesktop.oom1"
+                       send_interface="org.freedesktop.oom1.Manager"
+                       send_member="DumpByFileDescriptor"/>
+
+                <allow receive_sender="org.freedesktop.oom1"/>
+        </policy>
+
+</busconfig>
diff --git a/src/oom/org.freedesktop.oom1.service b/src/oom/org.freedesktop.oom1.service
new file mode 100644 (file)
index 0000000..4fd5138
--- /dev/null
@@ -0,0 +1,14 @@
+#  SPDX-License-Identifier: LGPL-2.1-or-later
+#
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[D-BUS Service]
+Name=org.freedesktop.oom1
+Exec=/bin/false
+User=root
+SystemdService=dbus-org.freedesktop.oom1.service
diff --git a/src/oom/test-oomd-util.c b/src/oom/test-oomd-util.c
new file mode 100644 (file)
index 0000000..8143408
--- /dev/null
@@ -0,0 +1,346 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#include <unistd.h>
+
+#include "alloc-util.h"
+#include "cgroup-setup.h"
+#include "cgroup-util.h"
+#include "fileio.h"
+#include "fs-util.h"
+#include "oomd-util.h"
+#include "parse-util.h"
+#include "path-util.h"
+#include "string-util.h"
+#include "strv.h"
+#include "tests.h"
+
+static int fork_and_sleep(unsigned sleep_min) {
+        usec_t n, timeout, ts;
+
+        pid_t pid = fork();
+        assert_se(pid >= 0);
+
+        if (pid == 0) {
+                timeout = sleep_min * USEC_PER_MINUTE;
+                ts = now(CLOCK_MONOTONIC);
+                for (;;) {
+                        n = now(CLOCK_MONOTONIC);
+                        if (ts + timeout < n) {
+                                log_error("Child timed out waiting to be killed");
+                                abort();
+                        }
+                        sleep(1);
+                }
+        }
+
+        return pid;
+}
+
+static void test_oomd_cgroup_kill(void) {
+        _cleanup_free_ char *cgroup_root = NULL, *cgroup = NULL;
+        int pid[2];
+        int r;
+
+        if (geteuid() != 0)
+                return (void) log_tests_skipped("not root");
+
+        if (cg_all_unified() <= 0)
+                return (void) log_tests_skipped("cgroups are not running in unified mode");
+
+        assert_se(cg_pid_get_path(NULL, 0, &cgroup_root) >= 0);
+
+        /* Create another cgroup below this one for the pids we forked off. We need this to be managed
+         * by the test so that pid1 doesn't delete it before we can read the xattrs. */
+        cgroup = path_join(cgroup_root, "oomdkilltest");
+        assert(cgroup);
+        assert_se(cg_create(SYSTEMD_CGROUP_CONTROLLER, cgroup) >= 0);
+
+        /* If we don't have permissions to set xattrs we're likely in a userns or missing capabilities */
+        r = cg_set_xattr(SYSTEMD_CGROUP_CONTROLLER, cgroup, "user.oomd_test", "test", 4, 0);
+        if (ERRNO_IS_PRIVILEGE(r) || ERRNO_IS_NOT_SUPPORTED(r))
+                return (void) log_tests_skipped("Cannot set user xattrs");
+
+        /* Do this twice to also check the increment behavior on the xattrs */
+        for (int i = 0; i < 2; i++) {
+                _cleanup_free_ char *v = NULL;
+
+                for (int j = 0; j < 2; j++) {
+                        pid[j] = fork_and_sleep(5);
+                        assert_se(cg_attach(SYSTEMD_CGROUP_CONTROLLER, cgroup, pid[j]) >= 0);
+                }
+
+                r = oomd_cgroup_kill(cgroup, false /* recurse */, false /* dry run */);
+                if (r <= 0) {
+                        log_debug_errno(r, "Failed to kill processes under %s: %m", cgroup);
+                        abort();
+                }
+
+                /* Wait a bit since processes may take some time to be cleaned up. */
+                sleep(2);
+                assert_se(cg_is_empty(SYSTEMD_CGROUP_CONTROLLER, cgroup) == true);
+
+                assert_se(cg_get_xattr_malloc(SYSTEMD_CGROUP_CONTROLLER, cgroup, "user.systemd_oomd_kill", &v) >= 0);
+                assert_se(memcmp(v, i == 0 ? "2" : "4", 2) == 0);
+        }
+}
+
+static void test_oomd_cgroup_context_acquire_and_insert(void) {
+        _cleanup_hashmap_free_ Hashmap *h1 = NULL, *h2 = NULL;
+        _cleanup_(oomd_cgroup_context_freep) OomdCGroupContext *ctx = NULL;
+        _cleanup_free_ char *cgroup = NULL;
+        OomdCGroupContext *c1, *c2;
+
+        if (geteuid() != 0)
+                return (void) log_tests_skipped("not root");
+
+        if (!is_pressure_supported())
+                return (void) log_tests_skipped("system does not support pressure");
+
+        if (cg_all_unified() <= 0)
+                return (void) log_tests_skipped("cgroups are not running in unified mode");
+
+        assert_se(cg_pid_get_path(NULL, 0, &cgroup) >= 0);
+
+        assert_se(oomd_cgroup_context_acquire(cgroup, &ctx) == 0);
+
+        assert_se(streq(ctx->path, cgroup));
+        assert_se(ctx->current_memory_usage > 0);
+        assert_se(ctx->memory_min == 0);
+        assert_se(ctx->memory_low == 0);
+        assert_se(ctx->swap_usage == 0);
+        assert_se(ctx->last_pgscan == 0);
+        assert_se(ctx->pgscan == 0);
+        ctx = oomd_cgroup_context_free(ctx);
+
+        /* Test the root cgroup */
+        assert_se(oomd_cgroup_context_acquire("", &ctx) == 0);
+        assert_se(streq(ctx->path, "/"));
+        assert_se(ctx->current_memory_usage > 0);
+
+        /* Test hashmap inserts */
+        assert_se(h1 = hashmap_new(&oomd_cgroup_ctx_hash_ops));
+        assert_se(oomd_insert_cgroup_context(NULL, h1, cgroup) == 0);
+        c1 = hashmap_get(h1, cgroup);
+        assert_se(c1);
+
+         /* make sure certain values from h1 get updated in h2 */
+        c1->pgscan = 5555;
+        c1->mem_pressure_limit = 6789;
+        c1->last_hit_mem_pressure_limit = 42;
+        assert_se(h2 = hashmap_new(&oomd_cgroup_ctx_hash_ops));
+        assert_se(oomd_insert_cgroup_context(h1, h2, cgroup) == 0);
+        c1 = hashmap_get(h1, cgroup);
+        c2 = hashmap_get(h2, cgroup);
+        assert_se(c1);
+        assert_se(c2);
+        assert_se(c1 != c2);
+        assert_se(c2->last_pgscan == 5555);
+        assert_se(c2->mem_pressure_limit == 6789);
+        assert_se(c2->last_hit_mem_pressure_limit == 42);
+}
+
+static void test_oomd_system_context_acquire(void) {
+        _cleanup_(unlink_tempfilep) char path[] = "/oomdgetsysctxtestXXXXXX";
+        OomdSystemContext ctx;
+
+        if (geteuid() != 0)
+                return (void) log_tests_skipped("not root");
+
+        assert_se(mkstemp(path));
+
+        assert_se(oomd_system_context_acquire("/verylikelynonexistentpath", &ctx) == -ENOENT);
+
+        assert_se(oomd_system_context_acquire(path, &ctx) == 0);
+        assert_se(ctx.swap_total == 0);
+        assert_se(ctx.swap_used == 0);
+
+        assert_se(write_string_file(path, "some\nwords\nacross\nmultiple\nlines", WRITE_STRING_FILE_CREATE) == 0);
+        assert_se(oomd_system_context_acquire(path, &ctx) == 0);
+        assert_se(ctx.swap_total == 0);
+        assert_se(ctx.swap_used == 0);
+
+        assert_se(write_string_file(path, "Filename                                Type            Size    Used    Priority\n"
+                                          "/swapvol/swapfile                       file            18971644        0       -3\n"
+                                          "/dev/vda2                               partition       1999868 993780  -2", WRITE_STRING_FILE_CREATE) == 0);
+        assert_se(oomd_system_context_acquire(path, &ctx) == 0);
+        assert_se(ctx.swap_total == 21474828288);
+        assert_se(ctx.swap_used == 1017630720);
+}
+
+static void test_oomd_pressure_above(void) {
+        _cleanup_hashmap_free_ Hashmap *h1 = NULL, *h2 = NULL;
+        _cleanup_set_free_ Set *t1 = NULL, *t2 = NULL, *t3 = NULL;
+        OomdCGroupContext ctx[2], *c;
+        loadavg_t threshold;
+
+        assert_se(store_loadavg_fixed_point(80, 0, &threshold) == 0);
+
+        /* /herp.slice */
+        assert_se(store_loadavg_fixed_point(99, 99, &(ctx[0].memory_pressure.avg10)) == 0);
+        assert_se(store_loadavg_fixed_point(99, 99, &(ctx[0].memory_pressure.avg60)) == 0);
+        assert_se(store_loadavg_fixed_point(99, 99, &(ctx[0].memory_pressure.avg300)) == 0);
+        ctx[0].mem_pressure_limit = threshold;
+
+        /* /derp.slice */
+        assert_se(store_loadavg_fixed_point(1, 11, &(ctx[1].memory_pressure.avg10)) == 0);
+        assert_se(store_loadavg_fixed_point(1, 11, &(ctx[1].memory_pressure.avg60)) == 0);
+        assert_se(store_loadavg_fixed_point(1, 11, &(ctx[1].memory_pressure.avg300)) == 0);
+        ctx[1].mem_pressure_limit = threshold;
+
+
+        /* High memory pressure */
+        assert_se(h1 = hashmap_new(&string_hash_ops));
+        assert_se(hashmap_put(h1, "/herp.slice", &ctx[0]) >= 0);
+        assert_se(oomd_pressure_above(h1, 0 /* duration */, &t1) == 1);
+        assert_se(set_contains(t1, &ctx[0]) == true);
+        assert_se(c = hashmap_get(h1, "/herp.slice"));
+        assert_se(c->last_hit_mem_pressure_limit > 0);
+
+        /* Low memory pressure */
+        assert_se(h2 = hashmap_new(&string_hash_ops));
+        assert_se(hashmap_put(h2, "/derp.slice", &ctx[1]) >= 0);
+        assert_se(oomd_pressure_above(h2, 0 /* duration */, &t2) == 0);
+        assert_se(t2 == NULL);
+        assert_se(c = hashmap_get(h2, "/derp.slice"));
+        assert_se(c->last_hit_mem_pressure_limit == 0);
+
+        /* High memory pressure w/ multiple cgroups */
+        assert_se(hashmap_put(h1, "/derp.slice", &ctx[1]) >= 0);
+        assert_se(oomd_pressure_above(h1, 0 /* duration */, &t3) == 1);
+        assert_se(set_contains(t3, &ctx[0]) == true);
+        assert_se(set_size(t3) == 1);
+        assert_se(c = hashmap_get(h1, "/herp.slice"));
+        assert_se(c->last_hit_mem_pressure_limit > 0);
+        assert_se(c = hashmap_get(h1, "/derp.slice"));
+        assert_se(c->last_hit_mem_pressure_limit == 0);
+}
+
+static void test_oomd_memory_reclaim(void) {
+        _cleanup_hashmap_free_ Hashmap *h1 = NULL;
+        char **paths = STRV_MAKE("/0.slice",
+                                 "/1.slice",
+                                 "/2.slice",
+                                 "/3.slice",
+                                 "/4.slice");
+
+        OomdCGroupContext ctx[5] = {
+                { .path = paths[0],
+                  .last_pgscan = 100,
+                  .pgscan = 100 },
+                { .path = paths[1],
+                  .last_pgscan = 100,
+                  .pgscan = 100 },
+                { .path = paths[2],
+                  .last_pgscan = 77,
+                  .pgscan = 33 },
+                { .path = paths[3],
+                  .last_pgscan = UINT64_MAX,
+                  .pgscan = 100 },
+                { .path = paths[4],
+                  .last_pgscan = 100,
+                  .pgscan = UINT64_MAX },
+        };
+
+        assert_se(h1 = hashmap_new(&string_hash_ops));
+        assert_se(hashmap_put(h1, paths[0], &ctx[0]) >= 0);
+        assert_se(hashmap_put(h1, paths[1], &ctx[1]) >= 0);
+        assert_se(oomd_memory_reclaim(h1) == false);
+
+        assert_se(hashmap_put(h1, paths[2], &ctx[2]) >= 0);
+        assert_se(oomd_memory_reclaim(h1) == false);
+
+        assert_se(hashmap_put(h1, paths[4], &ctx[4]) >= 0);
+        assert_se(oomd_memory_reclaim(h1) == true);
+
+        assert_se(hashmap_put(h1, paths[3], &ctx[3]) >= 0);
+        assert_se(oomd_memory_reclaim(h1) == false);
+}
+
+static void test_oomd_swap_free_below(void) {
+        OomdSystemContext ctx = (OomdSystemContext) {
+                .swap_total = 20971512 * 1024U,
+                .swap_used = 20971440 * 1024U,
+        };
+        assert_se(oomd_swap_free_below(&ctx, 20) == true);
+
+        ctx = (OomdSystemContext) {
+                .swap_total = 20971512 * 1024U,
+                .swap_used = 3310136 * 1024U,
+        };
+        assert_se(oomd_swap_free_below(&ctx, 20) == false);
+}
+
+static void test_oomd_sort_cgroups(void) {
+        _cleanup_hashmap_free_ Hashmap *h = NULL;
+        _cleanup_free_ OomdCGroupContext **sorted_cgroups;
+        char **paths = STRV_MAKE("/herp.slice",
+                                 "/herp.slice/derp.scope",
+                                 "/herp.slice/derp.scope/sheep.service",
+                                 "/zupa.slice");
+
+        OomdCGroupContext ctx[4] = {
+                { .path = paths[0],
+                  .swap_usage = 20,
+                  .pgscan = 60 },
+                { .path = paths[1],
+                  .swap_usage = 60,
+                  .pgscan = 40 },
+                { .path = paths[2],
+                  .swap_usage = 40,
+                  .pgscan = 20 },
+                { .path = paths[3],
+                  .swap_usage = 10,
+                  .pgscan = 80 },
+        };
+
+        assert_se(h = hashmap_new(&string_hash_ops));
+
+        assert_se(hashmap_put(h, "/herp.slice", &ctx[0]) >= 0);
+        assert_se(hashmap_put(h, "/herp.slice/derp.scope", &ctx[1]) >= 0);
+        assert_se(hashmap_put(h, "/herp.slice/derp.scope/sheep.service", &ctx[2]) >= 0);
+        assert_se(hashmap_put(h, "/zupa.slice", &ctx[3]) >= 0);
+
+        assert_se(oomd_sort_cgroup_contexts(h, compare_swap_usage, NULL, &sorted_cgroups) == 4);
+        assert_se(sorted_cgroups[0] == &ctx[1]);
+        assert_se(sorted_cgroups[1] == &ctx[2]);
+        assert_se(sorted_cgroups[2] == &ctx[0]);
+        assert_se(sorted_cgroups[3] == &ctx[3]);
+        sorted_cgroups = mfree(sorted_cgroups);
+
+        assert_se(oomd_sort_cgroup_contexts(h, compare_pgscan, NULL, &sorted_cgroups) == 4);
+        assert_se(sorted_cgroups[0] == &ctx[3]);
+        assert_se(sorted_cgroups[1] == &ctx[0]);
+        assert_se(sorted_cgroups[2] == &ctx[1]);
+        assert_se(sorted_cgroups[3] == &ctx[2]);
+        sorted_cgroups = mfree(sorted_cgroups);
+
+        assert_se(oomd_sort_cgroup_contexts(h, compare_pgscan, "/herp.slice/derp.scope", &sorted_cgroups) == 2);
+        assert_se(sorted_cgroups[0] == &ctx[1]);
+        assert_se(sorted_cgroups[1] == &ctx[2]);
+        assert_se(sorted_cgroups[2] == 0);
+        assert_se(sorted_cgroups[3] == 0);
+        sorted_cgroups = mfree(sorted_cgroups);
+}
+
+int main(void) {
+        int r;
+
+        test_setup_logging(LOG_DEBUG);
+
+        test_oomd_system_context_acquire();
+        test_oomd_pressure_above();
+        test_oomd_memory_reclaim();
+        test_oomd_swap_free_below();
+        test_oomd_sort_cgroups();
+
+        /* The following tests operate on live cgroups */
+
+        r = enter_cgroup_root(NULL);
+        if (r < 0)
+                return log_tests_skipped_errno(r, "failed to enter a test cgroup scope");
+
+        test_oomd_cgroup_kill();
+        test_oomd_cgroup_context_acquire_and_insert();
+
+        return 0;
+}
index 3f34ad3f7c934f3dae48e29e19f2ce47f8fbd15d..9406ae8373f62f2085ee0815d0d4fcca24884717 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 30dcef20757d709347cc67694dc97b53e790a969..fd924d2231cdf3c6fcca628b910132dd3c32a219 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/file.h>
index 3a75d5712d5f03868c185b34f11c2dcc6498bed4..d2729daba4e89a16b75642bd1b4542c8edf1c439 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 systemd_repart_sources = files('''
         repart.c
index d406c9dbe3ed0d5a15955c8c9f8f4798e5f235cf..ddb9476cec94ed4e8f1868d90e884e295a13a8fb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if HAVE_VALGRIND_MEMCHECK_H
 #include <valgrind/memcheck.h>
@@ -918,16 +918,7 @@ static int config_parse_type(
 }
 
 static const Specifier specifier_table[] = {
-        { 'm', specifier_machine_id,      NULL },
-        { 'b', specifier_boot_id,         NULL },
-        { 'H', specifier_host_name,       NULL },
-        { 'l', specifier_short_host_name, NULL },
-        { 'v', specifier_kernel_release,  NULL },
-        { 'a', specifier_architecture,    NULL },
-        { 'o', specifier_os_id,           NULL },
-        { 'w', specifier_os_version_id,   NULL },
-        { 'B', specifier_os_build_id,     NULL },
-        { 'W', specifier_os_variant_id,   NULL },
+        COMMON_SYSTEM_SPECIFIERS,
         {}
 };
 
@@ -3245,7 +3236,7 @@ static int context_read_seed(Context *context, const char *root) {
                 else if (fd < 0)
                         return log_error_errno(fd, "Failed to determine machine ID of image: %m");
                 else {
-                        r = id128_read_fd(fd, ID128_PLAIN, &context->seed);
+                        r = id128_read_fd(fd, ID128_PLAIN_OR_UNINIT, &context->seed);
                         if (r == -ENOMEDIUM)
                                 log_info("No machine ID set, using randomized partition UUIDs.");
                         else if (r < 0)
@@ -3630,7 +3621,11 @@ static int parse_argv(int argc, char *argv[]) {
                         _cleanup_(erase_and_freep) char *k = NULL;
                         size_t n = 0;
 
-                        r = read_full_file_full(AT_FDCWD, optarg, READ_FULL_FILE_SECURE|READ_FULL_FILE_CONNECT_SOCKET, &k, &n);
+                        r = read_full_file_full(
+                                        AT_FDCWD, optarg, UINT64_MAX, SIZE_MAX,
+                                        READ_FULL_FILE_SECURE|READ_FULL_FILE_WARN_WORLD_READABLE|READ_FULL_FILE_CONNECT_SOCKET,
+                                        NULL,
+                                        &k, &n);
                         if (r < 0)
                                 return log_error_errno(r, "Failed to read key file '%s': %m", optarg);
 
index 33018999bf4e83c3adc768f85f888e14d32909c2..5f1bb14e45ea75fcd5b39f2c4f9a5a1e896bb581 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <getopt.h>
index dc57163460f3b01163866244d0379d10f63f2adb..8f866f57e47a3d7c540ef22c7233b04570a25bba 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 systemd_portabled_sources = files('''
         portable.c
index 31d41af12ad608b1e8ce38403faba6c40735786b..1343e1d544426c46d4713509f0fe05fb8de75cca 100644 (file)
@@ -2,7 +2,7 @@
 <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
         "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
 
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <busconfig>
 
index 50bb44c4a4a41396d8443ac60514bafa33e0b1f5..17e22b01552fc9fe88bfb11986d26735261e3160 100644 (file)
@@ -2,7 +2,7 @@
 <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
         "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
 
-<!-- SPDX-License-Identifier: LGPL-2.1+ -->
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
 
 <policyconfig>
 
index eff37b0183faecd1373ba414c7cdefa519d98ec4..873746e2d89148ec55cfdd3b50efaec0068194fb 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 [D-BUS Service]
 Name=org.freedesktop.portable1
index 55ea6759e912d08ffbc47c7e996fb1bbe7cdcc28..ed7eac029119286166520c18218187ac38ca34e7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/loop.h>
 
index ad81b584a5765bd7be3939006d084428a5b45c51..fd9605ed84ed3782a9c1e7547f5cfc3fa6080b10 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 4369dfd1563b8acbff9961735741aedda65cdd87..457170e6843c405031ee6dbaea03473c332c06a3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <getopt.h>
@@ -178,7 +178,7 @@ static int acquire_bus(sd_bus **bus) {
 
         r = bus_connect_transport(arg_transport, arg_host, false, bus);
         if (r < 0)
-                return log_error_errno(r, "Failed to connect to bus: %m");
+                return bus_log_connect_error(r);
 
         (void) sd_bus_set_allow_interactive_authorization(*bus, arg_ask_password);
 
index 0169dcb463f1bba99687d04ed9a3ef0a57c0c16f..cf50d58c71dff5da8e53b9b805456ace19920d05 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "btrfs-util.h"
index 5810517ca3c3d0b8828e759680c9c1f8309fe4d8..e8e4c3a60085867408f649b13a5218a36fdd60fb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index b9914f594079b744e3b3110807a029e3223e56ba..eb0786e4bb017df80d1cf471a77fc3209b61579e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/stat.h>
index 825dea268210562eea94653dcf889f885d21dbe7..aa2a3ade7706723c1f4edb6f6e0460026ed73ab0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index e498ba318e099c2e9f8ac7d7d5296831857b5bae..b025c2054907bf3e53400ac16640c4d5907e0177 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "portable.h"
 #include "portabled-image.h"
index 26ce2f6b5958f199f74ba2cc6e193be94bd3ea28..eeefffee64e3180d214bdd8d45e1b0db9cfcaa2b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "hashmap.h"
index 305c96ca6f1327d3a49fd1ebee4b71de2dd021c6..848b784908f0693680d57607e6d2bfdfdaeab1d3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "fd-util.h"
index 701f399bbb03ca463ea5aec7b90543f34b116bc8..f64740e9b82486022a5251ec6c813df259d5191b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/types.h>
index 265f7a7440d3910f3d3d151918ec988533094e67..f008f84e53cc371cf27d503348907d9e0b65f89f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/stat.h>
 #include <sys/types.h>
index 00461edfca4c4a048fb9f3406ee842d52d09ea2f..03a99969162bf5d7ebcff0c8489fbc1e69ccec88 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index adbac24b5495612a4be76a50bd7cbf5cd32f4f1c..6c0ab0563b5345dc1bbe813f2c8a41c8e3ca78c0 100644 (file)
@@ -1,10 +1,10 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 systemd_pstore_sources = files('''
         pstore.c
 '''.split())
 
-if conf.get('ENABLE_PSTORE') == 1
+if conf.get('ENABLE_PSTORE') == 1 and install_sysconfdir
         install_data('pstore.conf',
                      install_dir : pkgsysconfdir)
 endif
index 9b888a2baacdfb89451e4679fd5318cd1b808092..db8a71fbab20f4c88b510d2a8813e7cfc5c2c134 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 /* Copyright © 2019 Oracle and/or its affiliates. */
 
@@ -304,7 +304,7 @@ static void process_dmesg_files(PStoreList *list) {
                  * output either. */
                 size_t needed = strlen(pe->dirent.d_name) + strlen(":\n") + pe->content_size + 1;
                 if (!GREEDY_REALLOC(dmesg, dmesg_allocated, dmesg_size + needed)) {
-                        log_warning_errno(ENOMEM, "Failed to write dmesg file: %m");
+                        log_oom();
                         dmesg_bad = true;
                         continue;
                 }
index 4e83fc83d54427738c726f7a7a91d9866d923044..d617b0bf3d6f2459549a4d7cde3e356610e5a966 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdbool.h>
index 63ad977514d8eabdeb1dcaa4bcb41766506c439d..8f8766cdd7046391fcfc4ae9d628c7cdb7f328e0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 75bb875b7978ca7158ae25063b3440f417426a94..ad8dfabb546f76e60201a458f6dbef775ab97a06 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdio.h>
index 7386f705291c5b17660e2d04e07a7983baa75af3..19f5bd0d1197a7771b9f1a365ea1123ea89349bf 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <mntent.h>
index 3a0eb5c4b805f35a268a131693dff9a08fd882f7..a73334e2b8808b363edc731bd0a15f9d671f4bd6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stddef.h>
index c96f60a064cdecb7ef8538485eee9957d3079a61..1f7334723e97212715b37742ec792c3303cc181f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/socket.h>
 #include <errno.h>
index 8721536b5de47d12245414957c20f5005319eea4..4370db9cff699b632f36a490f36f320107078825 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "macro.h"
index a145117efd129d366aff4672c4e84f1839cb585e..8e7bad06592fcefdd92b4640c282ed1d05271f38 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 basic_dns_sources = files('''
         resolved-dns-dnssec.c
@@ -169,8 +169,10 @@ if conf.get('ENABLE_RESOLVE') == 1
                 input : 'resolved.conf.in',
                 output : 'resolved.conf',
                 configuration : substs)
-        install_data(resolved_conf,
-                     install_dir : pkgsysconfdir)
+        if install_sysconfdir
+                install_data(resolved_conf,
+                             install_dir : pkgsysconfdir)
+        endif
 
         install_data('resolv.conf',
                      install_dir : rootlibexecdir)
index fd27327f48a933e370b87c6edaa851fdacde222c..08615ec6a408a9bb836ecadb727cb5cec480b392 100644 (file)
@@ -3,7 +3,7 @@
         "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   This file is part of systemd.
 
index 2c25a6129c939f9273f8b652a13bb216018ea31f..32a04f3b811ce66309c647bc7cc2e96dcf077054 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 8cd14711dff7b5aa23b15d57d16bc14c7472e3e1..5bc936faa709673564325a36ec4ec570b664086e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 #include <net/if.h>
index 872add1d56ccafaf97fee9b2618a3547a77a26f4..33a53181399292949ada95e6e9eabcb4bc20e521 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int resolvconf_parse_argv(int argc, char *argv[]);
index f3aabcc50e9baf6c357c739e7aab8eff89508a90..b479335769105d4beb125c5a16a80e3c81cce222 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 #include <locale.h>
@@ -35,6 +35,7 @@
 #include "string-table.h"
 #include "strv.h"
 #include "terminal-util.h"
+#include "utf8.h"
 #include "verbs.h"
 
 static int arg_family = AF_UNSPEC;
@@ -144,13 +145,12 @@ static void print_source(uint64_t flags, usec_t rtt) {
 
         printf("\n%s-- Information acquired via", ansi_grey());
 
-        if (flags != 0)
-                printf(" protocol%s%s%s%s%s",
-                       flags & SD_RESOLVED_DNS ? " DNS" :"",
-                       flags & SD_RESOLVED_LLMNR_IPV4 ? " LLMNR/IPv4" : "",
-                       flags & SD_RESOLVED_LLMNR_IPV6 ? " LLMNR/IPv6" : "",
-                       flags & SD_RESOLVED_MDNS_IPV4 ? " mDNS/IPv4" : "",
-                       flags & SD_RESOLVED_MDNS_IPV6 ? " mDNS/IPv6" : "");
+        printf(" protocol%s%s%s%s%s",
+               flags & SD_RESOLVED_DNS ? " DNS" :"",
+               flags & SD_RESOLVED_LLMNR_IPV4 ? " LLMNR/IPv4" : "",
+               flags & SD_RESOLVED_LLMNR_IPV6 ? " LLMNR/IPv6" : "",
+               flags & SD_RESOLVED_MDNS_IPV4 ? " mDNS/IPv4" : "",
+               flags & SD_RESOLVED_MDNS_IPV6 ? " mDNS/IPv6" : "");
 
         assert_se(format_timespan(rtt_str, sizeof(rtt_str), rtt, 100));
 
@@ -1296,24 +1296,46 @@ static int map_link_domains(sd_bus *bus, const char *member, sd_bus_message *m,
         if (r < 0)
                 return r;
 
+        strv_sort(*l);
+
         return 0;
 }
 
 static int status_print_strv_ifindex(int ifindex, const char *ifname, char **p) {
+        const unsigned indent = strlen("Global: "); /* Use the same indentation everywhere to make things nice */
+        int pos1, pos2;
+
+        if (ifname)
+                printf("%s%nLink %i (%s)%n%s:", ansi_highlight(), &pos1, ifindex, ifname, &pos2, ansi_normal());
+        else
+                printf("%s%nGlobal%n%s:", ansi_highlight(), &pos1, &pos2, ansi_normal());
+
+        size_t cols = columns(), position = pos2 - pos1 + 2;
         char **i;
 
-        printf("%sLink %i (%s)%s:",
-               ansi_highlight(), ifindex, ifname, ansi_normal());
+        STRV_FOREACH(i, p) {
+                size_t our_len = utf8_console_width(*i); /* This returns -1 on invalid utf-8 (which shouldn't happen).
+                                                          * If that happens, we'll just print one item per line. */
 
-        STRV_FOREACH(i, p)
-                printf(" %s", *i);
+                if (position <= indent || size_add(size_add(position, 1), our_len) < cols) {
+                        printf(" %s", *i);
+                        position = size_add(size_add(position, 1), our_len);
+                } else {
+                        printf("\n%*s%s", indent, "", *i);
+                        position = size_add(our_len, indent);
+                }
+        }
 
         printf("\n");
 
         return 0;
 }
 
-struct link_info {
+static int status_print_strv_global(char **p) {
+        return status_print_strv_ifindex(0, NULL, p);
+}
+
+typedef struct LinkInfo {
         uint64_t scopes_mask;
         const char *llmnr;
         const char *mdns;
@@ -1327,13 +1349,41 @@ struct link_info {
         char **ntas;
         bool dnssec_supported;
         bool default_route;
-};
+} LinkInfo;
 
-static void link_info_clear(struct link_info *p) {
+typedef struct GlobalInfo {
+        char *current_dns;
+        char *current_dns_ex;
+        char **dns;
+        char **dns_ex;
+        char **fallback_dns;
+        char **fallback_dns_ex;
+        char **domains;
+        char **ntas;
+        const char *llmnr;
+        const char *mdns;
+        const char *dns_over_tls;
+        const char *dnssec;
+        const char *resolv_conf_mode;
+        bool dnssec_supported;
+} GlobalInfo;
+
+static void link_info_clear(LinkInfo *p) {
+        free(p->current_dns);
+        free(p->current_dns_ex);
+        strv_free(p->dns);
+        strv_free(p->dns_ex);
+        strv_free(p->domains);
+        strv_free(p->ntas);
+}
+
+static void global_info_clear(GlobalInfo *p) {
         free(p->current_dns);
         free(p->current_dns_ex);
         strv_free(p->dns);
         strv_free(p->dns_ex);
+        strv_free(p->fallback_dns);
+        strv_free(p->fallback_dns_ex);
         strv_free(p->domains);
         strv_free(p->ntas);
 }
@@ -1346,33 +1396,88 @@ static int dump_list(Table *table, const char *prefix, char * const *l) {
 
         r = table_add_many(table,
                            TABLE_STRING, prefix,
-                           TABLE_STRV, l);
+                           TABLE_STRV_WRAPPED, l);
         if (r < 0)
                 return table_log_add_error(r);
 
         return 0;
 }
 
+static int strv_extend_extended_bool(char ***strv, const char *name, const char *value) {
+        int r;
+
+        if (value) {
+                r = parse_boolean(value);
+                if (r >= 0)
+                        return strv_extendf(strv, "%s%s", plus_minus(r), name);
+        }
+
+        return strv_extendf(strv, "%s=%s", name, value ?: "???");
+}
+
+static char** link_protocol_status(const LinkInfo *info) {
+        _cleanup_strv_free_ char **s = NULL;
+
+        if (strv_extendf(&s, "%sDefaultRoute", plus_minus(info->default_route)) < 0)
+                return NULL;
+
+        if (strv_extend_extended_bool(&s, "LLMNR", info->llmnr) < 0)
+                return NULL;
+
+        if (strv_extend_extended_bool(&s, "mDNS", info->mdns) < 0)
+                return NULL;
+
+        if (strv_extend_extended_bool(&s, "DNSOverTLS", info->dns_over_tls) < 0)
+                return NULL;
+
+        if (strv_extendf(&s, "DNSSEC=%s/%s",
+                         info->dnssec ?: "???",
+                         info->dnssec_supported ? "supported" : "unsupported") < 0)
+                return NULL;
+
+        return TAKE_PTR(s);
+}
+
+static char** global_protocol_status(const GlobalInfo *info) {
+        _cleanup_strv_free_ char **s = NULL;
+
+        if (strv_extend_extended_bool(&s, "LLMNR", info->llmnr) < 0)
+                return NULL;
+
+        if (strv_extend_extended_bool(&s, "mDNS", info->mdns) < 0)
+                return NULL;
+
+        if (strv_extend_extended_bool(&s, "DNSOverTLS", info->dns_over_tls) < 0)
+                return NULL;
+
+        if (strv_extendf(&s, "DNSSEC=%s/%s",
+                         info->dnssec ?: "???",
+                         info->dnssec_supported ? "supported" : "unsupported") < 0)
+                return NULL;
+
+        return TAKE_PTR(s);
+}
+
 static int status_ifindex(sd_bus *bus, int ifindex, const char *name, StatusMode mode, bool *empty_line) {
         static const struct bus_properties_map property_map[] = {
-                { "ScopesMask",                 "t",        NULL,                           offsetof(struct link_info, scopes_mask)      },
-                { "DNS",                        "a(iay)",   map_link_dns_servers,           offsetof(struct link_info, dns)              },
-                { "DNSEx",                      "a(iayqs)", map_link_dns_servers_ex,        offsetof(struct link_info, dns_ex)           },
-                { "CurrentDNSServer",           "(iay)",    map_link_current_dns_server,    offsetof(struct link_info, current_dns)      },
-                { "CurrentDNSServerEx",         "(iayqs)",  map_link_current_dns_server_ex, offsetof(struct link_info, current_dns_ex)   },
-                { "Domains",                    "a(sb)",    map_link_domains,               offsetof(struct link_info, domains)          },
-                { "DefaultRoute",               "b",        NULL,                           offsetof(struct link_info, default_route)    },
-                { "LLMNR",                      "s",        NULL,                           offsetof(struct link_info, llmnr)            },
-                { "MulticastDNS",               "s",        NULL,                           offsetof(struct link_info, mdns)             },
-                { "DNSOverTLS",                 "s",        NULL,                           offsetof(struct link_info, dns_over_tls)     },
-                { "DNSSEC",                     "s",        NULL,                           offsetof(struct link_info, dnssec)           },
-                { "DNSSECNegativeTrustAnchors", "as",       NULL,                           offsetof(struct link_info, ntas)             },
-                { "DNSSECSupported",            "b",        NULL,                           offsetof(struct link_info, dnssec_supported) },
+                { "ScopesMask",                 "t",        NULL,                           offsetof(LinkInfo, scopes_mask)      },
+                { "DNS",                        "a(iay)",   map_link_dns_servers,           offsetof(LinkInfo, dns)              },
+                { "DNSEx",                      "a(iayqs)", map_link_dns_servers_ex,        offsetof(LinkInfo, dns_ex)           },
+                { "CurrentDNSServer",           "(iay)",    map_link_current_dns_server,    offsetof(LinkInfo, current_dns)      },
+                { "CurrentDNSServerEx",         "(iayqs)",  map_link_current_dns_server_ex, offsetof(LinkInfo, current_dns_ex)   },
+                { "Domains",                    "a(sb)",    map_link_domains,               offsetof(LinkInfo, domains)          },
+                { "DefaultRoute",               "b",        NULL,                           offsetof(LinkInfo, default_route)    },
+                { "LLMNR",                      "s",        NULL,                           offsetof(LinkInfo, llmnr)            },
+                { "MulticastDNS",               "s",        NULL,                           offsetof(LinkInfo, mdns)             },
+                { "DNSOverTLS",                 "s",        NULL,                           offsetof(LinkInfo, dns_over_tls)     },
+                { "DNSSEC",                     "s",        NULL,                           offsetof(LinkInfo, dnssec)           },
+                { "DNSSECNegativeTrustAnchors", "as",       bus_map_strv_sort,              offsetof(LinkInfo, ntas)             },
+                { "DNSSECSupported",            "b",        NULL,                           offsetof(LinkInfo, dnssec_supported) },
                 {}
         };
         _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
         _cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
-        _cleanup_(link_info_clear) struct link_info link_info = {};
+        _cleanup_(link_info_clear) LinkInfo link_info = {};
         _cleanup_(table_unrefp) Table *table = NULL;
         _cleanup_free_ char *p = NULL;
         char ifi[DECIMAL_STR_MAX(int)], ifname[IF_NAMESIZE + 1] = "";
@@ -1496,19 +1601,13 @@ static int status_ifindex(sd_bus *bus, int ifindex, const char *name, StatusMode
         if (r < 0)
                 return table_log_add_error(r);
 
+        _cleanup_strv_free_ char **pstatus = link_protocol_status(&link_info);
+        if (!pstatus)
+                return log_oom();
+
         r = table_add_many(table,
-                           TABLE_STRING, "DefaultRoute setting:",
-                           TABLE_BOOLEAN, link_info.default_route,
-                           TABLE_STRING, "LLMNR setting:",
-                           TABLE_STRING, strna(link_info.llmnr),
-                           TABLE_STRING, "MulticastDNS setting:",
-                           TABLE_STRING, strna(link_info.mdns),
-                           TABLE_STRING, "DNSOverTLS setting:",
-                           TABLE_STRING, strna(link_info.dns_over_tls),
-                           TABLE_STRING, "DNSSEC setting:",
-                           TABLE_STRING, strna(link_info.dnssec),
-                           TABLE_STRING, "DNSSEC supported:",
-                           TABLE_BOOLEAN, link_info.dnssec_supported);
+                           TABLE_STRING,       "Protocols:",
+                           TABLE_STRV_WRAPPED, pstatus);
         if (r < 0)
                 return table_log_add_error(r);
 
@@ -1631,71 +1730,32 @@ static int map_global_domains(sd_bus *bus, const char *member, sd_bus_message *m
         if (r < 0)
                 return r;
 
-        return 0;
-}
-
-static int status_print_strv_global(char **p) {
-        char **i;
-
-        printf("%sGlobal%s:", ansi_highlight(), ansi_normal());
-
-        STRV_FOREACH(i, p)
-                printf(" %s", *i);
-
-        printf("\n");
+        strv_sort(*l);
 
         return 0;
 }
 
-struct global_info {
-        char *current_dns;
-        char *current_dns_ex;
-        char **dns;
-        char **dns_ex;
-        char **fallback_dns;
-        char **fallback_dns_ex;
-        char **domains;
-        char **ntas;
-        const char *llmnr;
-        const char *mdns;
-        const char *dns_over_tls;
-        const char *dnssec;
-        const char *resolv_conf_mode;
-        bool dnssec_supported;
-};
-
-static void global_info_clear(struct global_info *p) {
-        free(p->current_dns);
-        free(p->current_dns_ex);
-        strv_free(p->dns);
-        strv_free(p->dns_ex);
-        strv_free(p->fallback_dns);
-        strv_free(p->fallback_dns_ex);
-        strv_free(p->domains);
-        strv_free(p->ntas);
-}
-
 static int status_global(sd_bus *bus, StatusMode mode, bool *empty_line) {
         static const struct bus_properties_map property_map[] = {
-                { "DNS",                        "a(iiay)",   map_global_dns_servers,           offsetof(struct global_info, dns)              },
-                { "DNSEx",                      "a(iiayqs)", map_global_dns_servers_ex,        offsetof(struct global_info, dns_ex)           },
-                { "FallbackDNS",                "a(iiay)",   map_global_dns_servers,           offsetof(struct global_info, fallback_dns)     },
-                { "FallbackDNSEx",              "a(iiayqs)", map_global_dns_servers_ex,        offsetof(struct global_info, fallback_dns_ex)  },
-                { "CurrentDNSServer",           "(iiay)",    map_global_current_dns_server,    offsetof(struct global_info, current_dns)      },
-                { "CurrentDNSServerEx",         "(iiayqs)",  map_global_current_dns_server_ex, offsetof(struct global_info, current_dns_ex)   },
-                { "Domains",                    "a(isb)",    map_global_domains,               offsetof(struct global_info, domains)          },
-                { "DNSSECNegativeTrustAnchors", "as",        NULL,                             offsetof(struct global_info, ntas)             },
-                { "LLMNR",                      "s",         NULL,                             offsetof(struct global_info, llmnr)            },
-                { "MulticastDNS",               "s",         NULL,                             offsetof(struct global_info, mdns)             },
-                { "DNSOverTLS",                 "s",         NULL,                             offsetof(struct global_info, dns_over_tls)     },
-                { "DNSSEC",                     "s",         NULL,                             offsetof(struct global_info, dnssec)           },
-                { "DNSSECSupported",            "b",         NULL,                             offsetof(struct global_info, dnssec_supported) },
-                { "ResolvConfMode",             "s",         NULL,                             offsetof(struct global_info, resolv_conf_mode) },
+                { "DNS",                        "a(iiay)",   map_global_dns_servers,           offsetof(GlobalInfo, dns)              },
+                { "DNSEx",                      "a(iiayqs)", map_global_dns_servers_ex,        offsetof(GlobalInfo, dns_ex)           },
+                { "FallbackDNS",                "a(iiay)",   map_global_dns_servers,           offsetof(GlobalInfo, fallback_dns)     },
+                { "FallbackDNSEx",              "a(iiayqs)", map_global_dns_servers_ex,        offsetof(GlobalInfo, fallback_dns_ex)  },
+                { "CurrentDNSServer",           "(iiay)",    map_global_current_dns_server,    offsetof(GlobalInfo, current_dns)      },
+                { "CurrentDNSServerEx",         "(iiayqs)",  map_global_current_dns_server_ex, offsetof(GlobalInfo, current_dns_ex)   },
+                { "Domains",                    "a(isb)",    map_global_domains,               offsetof(GlobalInfo, domains)          },
+                { "DNSSECNegativeTrustAnchors", "as",        bus_map_strv_sort,                offsetof(GlobalInfo, ntas)             },
+                { "LLMNR",                      "s",         NULL,                             offsetof(GlobalInfo, llmnr)            },
+                { "MulticastDNS",               "s",         NULL,                             offsetof(GlobalInfo, mdns)             },
+                { "DNSOverTLS",                 "s",         NULL,                             offsetof(GlobalInfo, dns_over_tls)     },
+                { "DNSSEC",                     "s",         NULL,                             offsetof(GlobalInfo, dnssec)           },
+                { "DNSSECSupported",            "b",         NULL,                             offsetof(GlobalInfo, dnssec_supported) },
+                { "ResolvConfMode",             "s",         NULL,                             offsetof(GlobalInfo, resolv_conf_mode) },
                 {}
         };
         _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
         _cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
-        _cleanup_(global_info_clear) struct global_info global_info = {};
+        _cleanup_(global_info_clear) GlobalInfo global_info = {};
         _cleanup_(table_unrefp) Table *table = NULL;
         int r;
 
@@ -1760,18 +1820,14 @@ static int status_global(sd_bus *bus, StatusMode mode, bool *empty_line) {
 
         table_set_header(table, false);
 
+        _cleanup_strv_free_ char **pstatus = global_protocol_status(&global_info);
+        if (!pstatus)
+                return log_oom();
+
         r = table_add_many(table,
-                           TABLE_STRING, "LLMNR setting:",
+                           TABLE_STRING,            "Protocols:",
                            TABLE_SET_ALIGN_PERCENT, 100,
-                           TABLE_STRING, strna(global_info.llmnr),
-                           TABLE_STRING, "MulticastDNS setting:",
-                           TABLE_STRING, strna(global_info.mdns),
-                           TABLE_STRING, "DNSOverTLS setting:",
-                           TABLE_STRING, strna(global_info.dns_over_tls),
-                           TABLE_STRING, "DNSSEC setting:",
-                           TABLE_STRING, strna(global_info.dnssec),
-                           TABLE_STRING, "DNSSEC supported:",
-                           TABLE_BOOLEAN, global_info.dnssec_supported);
+                           TABLE_STRV_WRAPPED,      pstatus);
         if (r < 0)
                 return table_log_add_error(r);
 
index 6b3a1f844515f49739b2ccda31d041e87e1e8755..830c81d6923f143e90ef61a105e0dc3bb36c58db 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <in-addr-util.h>
index 724c3d4a6a10dbe25d7da09a613bfb94024ebc6e..9a4789543a0636cceba27d590967065f2aa77ecc 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "bus-common-errors.h"
@@ -1762,7 +1762,7 @@ static int bus_method_flush_caches(sd_bus_message *message, void *userdata, sd_b
         assert(message);
         assert(m);
 
-        manager_flush_caches(m);
+        manager_flush_caches(m, LOG_INFO);
 
         return sd_bus_reply_method_return(message, NULL);
 }
@@ -1795,6 +1795,7 @@ static int bus_method_register_service(sd_bus_message *message, void *userdata,
         _cleanup_(dnssd_service_freep) DnssdService *service = NULL;
         _cleanup_(sd_bus_track_unrefp) sd_bus_track *bus_track = NULL;
         _cleanup_free_ char *path = NULL;
+        _cleanup_free_ char *instance_name = NULL;
         Manager *m = userdata;
         DnssdService *s = NULL;
         const char *name;
@@ -1835,10 +1836,6 @@ static int bus_method_register_service(sd_bus_message *message, void *userdata,
         if (!dnssd_srv_type_is_valid(type))
                 return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "DNS-SD service type '%s' is invalid", type);
 
-        r = dnssd_render_instance_name(name_template, NULL);
-        if (r < 0)
-                return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "DNS-SD service name '%s' is invalid", name_template);
-
         service->name = strdup(name);
         if (!service->name)
                 return log_oom();
@@ -1851,6 +1848,10 @@ static int bus_method_register_service(sd_bus_message *message, void *userdata,
         if (!service->type)
                 return log_oom();
 
+        r = dnssd_render_instance_name(service, &instance_name);
+        if (r < 0)
+                return r;
+
         r = sd_bus_message_enter_container(message, SD_BUS_TYPE_ARRAY, "a{say}");
         if (r < 0)
                 return r;
index 28caa64a6b5abae77bfba6d6da1a2f2423f11497..8628d8ba6fdfe08ba92415933de41645715562d2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "bus-object.h"
index 0b7c5c8fc9f7314405ea0fe2cbe62e3c8afbec31..f2a331625174fb49ebd4b278d7190853c737661b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "conf-parser.h"
@@ -229,7 +229,20 @@ int config_parse_dnssd_service_name(
                 void *data,
                 void *userdata) {
 
+        static const Specifier specifier_table[] = {
+                { 'a', specifier_architecture,    NULL },
+                { 'b', specifier_boot_id,         NULL },
+                { 'B', specifier_os_build_id,     NULL },
+                { 'H', specifier_host_name,       NULL }, /* We will use specifier_dnssd_host_name(). */
+                { 'm', specifier_machine_id,      NULL },
+                { 'o', specifier_os_id,           NULL },
+                { 'v', specifier_kernel_release,  NULL },
+                { 'w', specifier_os_version_id,   NULL },
+                { 'W', specifier_os_variant_id,   NULL },
+                {}
+        };
         DnssdService *s = userdata;
+        _cleanup_free_ char *name = NULL;
         int r;
 
         assert(filename);
@@ -242,20 +255,21 @@ int config_parse_dnssd_service_name(
                 return 0;
         }
 
-        r = dnssd_render_instance_name(rvalue, NULL);
-        if (r == -ENOMEM)
-                return log_oom();
+        r = specifier_printf(rvalue, specifier_table, NULL, &name);
         if (r < 0) {
                 log_syntax(unit, LOG_WARNING, filename, line, r,
-                           "Invalid service instance name template '%s', ignoring: %m", rvalue);
+                           "Invalid service instance name template '%s', ignoring assignment: %m", rvalue);
                 return 0;
         }
 
-        r = free_and_strdup(&s->name_template, rvalue);
-        if (r < 0)
-                return log_oom();
+        if (!dns_service_name_is_valid(name)) {
+                log_syntax(unit, LOG_WARNING, filename, line, 0,
+                           "Service instance name template '%s' renders to invalid name '%s'. Ignoring assignment.",
+                           rvalue, name);
+                return 0;
+        }
 
-        return 0;
+        return free_and_strdup_warn(&s->name_template, rvalue);
 }
 
 int config_parse_dnssd_service_type(
index 09ae8d7a5b3adccd71f4e5e20eca5d12a8bc21be..07ce2591a9ca2fdb110602f8e9bddcac474cb60e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "conf-parser.h"
index 63c24a023f6da2eb56eb7fa64660645fa4faff15..21eb6994e62302755ae39ab9330d178aff1655e4 100644 (file)
@@ -1,24 +1,34 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
 
 #include "time-util.h"
 
-#define SD_RESOLVED_DNS           (UINT64_C(1) << 0)
-#define SD_RESOLVED_LLMNR_IPV4    (UINT64_C(1) << 1)
-#define SD_RESOLVED_LLMNR_IPV6    (UINT64_C(1) << 2)
-#define SD_RESOLVED_MDNS_IPV4     (UINT64_C(1) << 3)
-#define SD_RESOLVED_MDNS_IPV6     (UINT64_C(1) << 4)
-#define SD_RESOLVED_NO_CNAME      (UINT64_C(1) << 5)
-#define SD_RESOLVED_NO_TXT        (UINT64_C(1) << 6)
-#define SD_RESOLVED_NO_ADDRESS    (UINT64_C(1) << 7)
-#define SD_RESOLVED_NO_SEARCH     (UINT64_C(1) << 8)
-#define SD_RESOLVED_AUTHENTICATED (UINT64_C(1) << 9)
-
-#define SD_RESOLVED_LLMNR         (SD_RESOLVED_LLMNR_IPV4|SD_RESOLVED_LLMNR_IPV6)
-#define SD_RESOLVED_MDNS          (SD_RESOLVED_MDNS_IPV4|SD_RESOLVED_MDNS_IPV6)
-
-#define SD_RESOLVED_PROTOCOLS_ALL (SD_RESOLVED_MDNS|SD_RESOLVED_LLMNR|SD_RESOLVED_DNS)
+/* Input + Output: The various protocols we can use */
+#define SD_RESOLVED_DNS             (UINT64_C(1) << 0)
+#define SD_RESOLVED_LLMNR_IPV4      (UINT64_C(1) << 1)
+#define SD_RESOLVED_LLMNR_IPV6      (UINT64_C(1) << 2)
+#define SD_RESOLVED_MDNS_IPV4       (UINT64_C(1) << 3)
+#define SD_RESOLVED_MDNS_IPV6       (UINT64_C(1) << 4)
+
+/* Input: Don't follow CNAMEs/DNAMEs */
+#define SD_RESOLVED_NO_CNAME        (UINT64_C(1) << 5)
+
+/* Input: When doing service (SRV) resolving, don't resolve associated mDNS-style TXT records */
+#define SD_RESOLVED_NO_TXT          (UINT64_C(1) << 6)
+
+/* Input: When doing service (SRV) resolving, don't resolve A/AAA RR for included hostname */
+#define SD_RESOLVED_NO_ADDRESS      (UINT64_C(1) << 7)
+
+/* Input: Don't apply search domain logic to request */
+#define SD_RESOLVED_NO_SEARCH       (UINT64_C(1) << 8)
+
+/* Output: Result is authenticated */
+#define SD_RESOLVED_AUTHENTICATED   (UINT64_C(1) << 9)
+
+#define SD_RESOLVED_LLMNR           (SD_RESOLVED_LLMNR_IPV4|SD_RESOLVED_LLMNR_IPV6)
+#define SD_RESOLVED_MDNS            (SD_RESOLVED_MDNS_IPV4|SD_RESOLVED_MDNS_IPV6)
+#define SD_RESOLVED_PROTOCOLS_ALL   (SD_RESOLVED_MDNS|SD_RESOLVED_LLMNR|SD_RESOLVED_DNS)
 
 #define SD_RESOLVED_QUERY_TIMEOUT_USEC (120 * USEC_PER_SEC)
index d6fba7ead0e79b0268067aab086dd52e6cd208d5..5b762a82e819624f256c7c7062087b2a296cf039 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 
@@ -11,6 +11,9 @@
 DnsAnswer *dns_answer_new(size_t n) {
         DnsAnswer *a;
 
+        if (n > UINT16_MAX) /* We can only place 64K RRs in an answer at max */
+                n = UINT16_MAX;
+
         a = malloc0(offsetof(DnsAnswer, items) + sizeof(DnsAnswerItem) * n);
         if (!a)
                 return NULL;
@@ -318,6 +321,11 @@ int dns_answer_merge(DnsAnswer *a, DnsAnswer *b, DnsAnswer **ret) {
 
         assert(ret);
 
+        if (a == b) {
+                *ret = dns_answer_ref(a);
+                return 0;
+        }
+
         if (dns_answer_size(a) <= 0) {
                 *ret = dns_answer_ref(b);
                 return 0;
@@ -624,12 +632,16 @@ int dns_answer_reserve(DnsAnswer **a, size_t n_free) {
                         return -EBUSY;
 
                 ns = (*a)->n_rrs + n_free;
+                if (ns > UINT16_MAX) /* Maximum number of RRs we can stick into a DNS packet section */
+                        ns = UINT16_MAX;
 
                 if ((*a)->n_allocated >= ns)
                         return 0;
 
                 /* Allocate more than we need */
                 ns *= 2;
+                if (ns > UINT16_MAX)
+                        ns = UINT16_MAX;
 
                 n = realloc(*a, offsetof(DnsAnswer, items) + sizeof(DnsAnswerItem) * ns);
                 if (!n)
@@ -702,17 +714,21 @@ void dns_answer_dump(DnsAnswer *answer, FILE *f) {
 
                 fputs(t, f);
 
-                if (ifindex != 0 || flags & (DNS_ANSWER_AUTHENTICATED|DNS_ANSWER_CACHEABLE|DNS_ANSWER_SHARED_OWNER))
+                if (ifindex != 0 || flags != 0)
                         fputs("\t;", f);
 
                 if (ifindex != 0)
-                        printf(" ifindex=%i", ifindex);
+                        fprintf(f, " ifindex=%i", ifindex);
                 if (flags & DNS_ANSWER_AUTHENTICATED)
                         fputs(" authenticated", f);
                 if (flags & DNS_ANSWER_CACHEABLE)
                         fputs(" cacheable", f);
                 if (flags & DNS_ANSWER_SHARED_OWNER)
                         fputs(" shared-owner", f);
+                if (flags & DNS_ANSWER_CACHE_FLUSH)
+                        fputs(" cache-flush", f);
+                if (flags & DNS_ANSWER_GOODBYE)
+                        fputs(" goodbye", f);
 
                 fputc('\n', f);
         }
index 47fc80e2b0258e3167853384643631f97f10fa32..fd94c516de9a7b1012617190416842d7b3c7f261 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct DnsAnswer DnsAnswer;
index 683f11375159998ac7924b549dfa08c54fa712ed..75f1ccb6498ef9987d272aebd46bce1e8473c3d9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 
@@ -20,7 +20,7 @@
 
 /* How long to cache strange rcodes, i.e. rcodes != SUCCESS and != NXDOMAIN (specifically: that's only SERVFAIL for
  * now) */
-#define CACHE_TTL_STRANGE_RCODE_USEC (30 * USEC_PER_SEC)
+#define CACHE_TTL_STRANGE_RCODE_USEC (10 * USEC_PER_SEC)
 
 typedef enum DnsCacheItemType DnsCacheItemType;
 typedef struct DnsCacheItem DnsCacheItem;
@@ -436,20 +436,22 @@ static int dns_cache_put_positive(
 
         dns_cache_make_space(c, 1);
 
-        i = new0(DnsCacheItem, 1);
+        i = new(DnsCacheItem, 1);
         if (!i)
                 return -ENOMEM;
 
-        i->type = DNS_CACHE_POSITIVE;
-        i->key = dns_resource_key_ref(rr->key);
-        i->rr = dns_resource_record_ref(rr);
-        i->until = calculate_until(rr, (uint32_t) -1, timestamp, false);
-        i->authenticated = authenticated;
-        i->shared_owner = shared_owner;
-        i->ifindex = ifindex;
-        i->owner_family = owner_family;
-        i->owner_address = *owner_address;
-        i->prioq_idx = PRIOQ_IDX_NULL;
+        *i = (DnsCacheItem) {
+                .type = DNS_CACHE_POSITIVE,
+                .key = dns_resource_key_ref(rr->key),
+                .rr = dns_resource_record_ref(rr),
+                .until = calculate_until(rr, (uint32_t) -1, timestamp, false),
+                .authenticated = authenticated,
+                .shared_owner = shared_owner,
+                .ifindex = ifindex,
+                .owner_family = owner_family,
+                .owner_address = *owner_address,
+                .prioq_idx = PRIOQ_IDX_NULL,
+        };
 
         r = dns_cache_link_item(c, i);
         if (r < 0)
@@ -521,21 +523,24 @@ static int dns_cache_put_negative(
 
         dns_cache_make_space(c, 1);
 
-        i = new0(DnsCacheItem, 1);
+        i = new(DnsCacheItem, 1);
         if (!i)
                 return -ENOMEM;
 
-        i->type =
-                rcode == DNS_RCODE_SUCCESS ? DNS_CACHE_NODATA :
-                rcode == DNS_RCODE_NXDOMAIN ? DNS_CACHE_NXDOMAIN : DNS_CACHE_RCODE;
+        *i = (DnsCacheItem) {
+                .type =
+                        rcode == DNS_RCODE_SUCCESS ? DNS_CACHE_NODATA :
+                        rcode == DNS_RCODE_NXDOMAIN ? DNS_CACHE_NXDOMAIN : DNS_CACHE_RCODE,
+                .authenticated = authenticated,
+                .owner_family = owner_family,
+                .owner_address = *owner_address,
+                .prioq_idx = PRIOQ_IDX_NULL,
+                .rcode = rcode,
+        };
+
         i->until =
                 i->type == DNS_CACHE_RCODE ? timestamp + CACHE_TTL_STRANGE_RCODE_USEC :
                 calculate_until(soa, nsec_ttl, timestamp, true);
-        i->authenticated = authenticated;
-        i->owner_family = owner_family;
-        i->owner_address = *owner_address;
-        i->prioq_idx = PRIOQ_IDX_NULL;
-        i->rcode = rcode;
 
         if (i->type == DNS_CACHE_NXDOMAIN) {
                 /* NXDOMAIN entries should apply equally to all types, so we use ANY as
index afd7d45db6617442be2ac2fb406e51c480052b33..4ab213dc9cd5317d610f0924f41f187d274de42c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "hashmap.h"
index 5a4f5c58b6b354e399022e84b6a7f4d3a560333b..2f5776b5edae2749e767232490271c5fb33832b4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "dns-domain.h"
@@ -1380,7 +1380,7 @@ static int nsec3_hashed_domain_make(DnsResourceRecord *nsec3, const char *domain
  * matches the wildcard domain.
  *
  * Based on this we can prove either the existence of the record in @key, or NXDOMAIN or NODATA, or
- * that there is no proof either way. The latter is the case if a the proof of non-existence of a given
+ * that there is no proof either way. The latter is the case if a proof of non-existence of a given
  * name uses an NSEC3 record with the opt-out bit set. Lastly, if we are given insufficient NSEC3 records
  * to conclude anything we indicate this by returning NO_RR. */
 static int dnssec_test_nsec3(DnsAnswer *answer, DnsResourceKey *key, DnssecNsecResult *result, bool *authenticated, uint32_t *ttl) {
@@ -1813,6 +1813,8 @@ int dnssec_nsec_test(DnsAnswer *answer, DnsResourceKey *key, DnssecNsecResult *r
 
                 /* The following checks only make sense for NSEC RRs that are not expanded from a wildcard */
                 r = dns_resource_record_is_synthetic(rr);
+                if (r == -ENODATA) /* No signing RR known. */
+                        continue;
                 if (r < 0)
                         return r;
                 if (r > 0)
index 1f70861cd064e712431da459e0a40e462b790a81..9c3c0dcfc961970788340f6805db1112e8bc6840 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef enum DnssecResult DnssecResult;
index 62240399925709b174aad3780c9e9bcdb4127ef2..b4eb5efae7cbace38175047f43add96fc629869b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if HAVE_GCRYPT
 #include <gcrypt.h>
@@ -75,12 +75,16 @@ int dns_packet_new(
         if (!p)
                 return -ENOMEM;
 
-        p->size = p->rindex = DNS_PACKET_HEADER_SIZE;
-        p->allocated = a;
-        p->max_size = max_size;
-        p->protocol = protocol;
-        p->opt_start = p->opt_size = (size_t) -1;
-        p->n_ref = 1;
+        *p = (DnsPacket) {
+                .n_ref = 1,
+                .protocol = protocol,
+                .size = DNS_PACKET_HEADER_SIZE,
+                .rindex = DNS_PACKET_HEADER_SIZE,
+                .allocated = a,
+                .max_size = max_size,
+                .opt_start = (size_t) -1,
+                .opt_size = (size_t) -1,
+        };
 
         *ret = p;
 
index 964aff38c4629df38426f9a642ea3e8af6abdc7a..0c804d6d2bef62d018d46e851481d09bde569267 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <netinet/ip.h>
@@ -221,14 +221,6 @@ void dns_packet_rewind(DnsPacket *p, size_t idx);
 int dns_packet_skip_question(DnsPacket *p);
 int dns_packet_extract(DnsPacket *p);
 
-static inline bool DNS_PACKET_SHALL_CACHE(DnsPacket *p) {
-        /* Never cache data originating from localhost, under the
-         * assumption, that it's coming from a locally DNS forwarder
-         * or server, that is caching on its own. */
-
-        return in_addr_is_localhost(p->family, &p->sender) == 0;
-}
-
 /* https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6 */
 enum {
         DNS_RCODE_SUCCESS = 0,
index 1eff893b21de6126bf824ac50f95b5772640fe88..c4d620ac8b710edf4158cb4e8ef1ba795fba4382 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "dns-domain.h"
@@ -21,12 +21,14 @@ static int dns_query_candidate_new(DnsQueryCandidate **ret, DnsQuery *q, DnsScop
         assert(q);
         assert(s);
 
-        c = new0(DnsQueryCandidate, 1);
+        c = new(DnsQueryCandidate, 1);
         if (!c)
                 return -ENOMEM;
 
-        c->query = q;
-        c->scope = s;
+        *c = (DnsQueryCandidate) {
+                .query = q,
+                .scope = s,
+        };
 
         LIST_PREPEND(candidates_by_query, q->candidates, c);
         LIST_PREPEND(candidates_by_scope, s->query_candidates, c);
@@ -280,8 +282,7 @@ void dns_query_candidate_notify(DnsQueryCandidate *c) {
         return;
 
 fail:
-        log_warning_errno(r, "Failed to follow search domains: %m");
-        c->error_code = r;
+        c->error_code = log_warning_errno(r, "Failed to follow search domains: %m");
         dns_query_ready(c->query);
 }
 
@@ -413,17 +414,19 @@ int dns_query_new(
         if (m->n_dns_queries >= QUERIES_MAX)
                 return -EBUSY;
 
-        q = new0(DnsQuery, 1);
+        q = new(DnsQuery, 1);
         if (!q)
                 return -ENOMEM;
 
-        q->question_utf8 = dns_question_ref(question_utf8);
-        q->question_idna = dns_question_ref(question_idna);
-        q->ifindex = ifindex;
-        q->flags = flags;
-        q->answer_dnssec_result = _DNSSEC_RESULT_INVALID;
-        q->answer_protocol = _DNS_PROTOCOL_INVALID;
-        q->answer_family = AF_UNSPEC;
+        *q = (DnsQuery) {
+                .question_utf8 = dns_question_ref(question_utf8),
+                .question_idna = dns_question_ref(question_idna),
+                .ifindex = ifindex,
+                .flags = flags,
+                .answer_dnssec_result = _DNSSEC_RESULT_INVALID,
+                .answer_protocol = _DNS_PROTOCOL_INVALID,
+                .answer_family = AF_UNSPEC,
+        };
 
         /* First dump UTF8  question */
         DNS_QUESTION_FOREACH(key, question_utf8)
index 36a9b7be8f836bb5a21c760c7fd9e9cd620086aa..8056aa372748d1e82120902f4d9614c34e982e9a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 62833efa0e1f787b7b1083dfd479aac90caa3c54..047170899db0167d5725b043eaaa1ff947453908 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "dns-domain.h"
@@ -8,7 +8,8 @@
 DnsQuestion *dns_question_new(size_t n) {
         DnsQuestion *q;
 
-        assert(n > 0);
+        if (n > UINT16_MAX) /* We can only place 64K key in an question section at max */
+                n = UINT16_MAX;
 
         q = malloc0(offsetof(DnsQuestion, keys) + sizeof(DnsResourceKey*) * n);
         if (!q)
index 0803f49b8bb1c8f5eb713d782384bfe0eff61e52..a6444b0baf9cd629dd556920f497f9a2c5279c9e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct DnsQuestion DnsQuestion;
index 63ed9ebf10cdabf4de72daabb6f210ed602637b7..219f66451ae33bf2483b66947be6cc83c5e89e90 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <math.h>
 
@@ -97,14 +97,16 @@ DnsResourceKey* dns_resource_key_new_consume(uint16_t class, uint16_t type, char
 
         assert(name);
 
-        k = new0(DnsResourceKey, 1);
+        k = new(DnsResourceKey, 1);
         if (!k)
                 return NULL;
 
-        k->n_ref = 1;
-        k->class = class;
-        k->type = type;
-        k->_name = name;
+        *k = (DnsResourceKey) {
+                .n_ref = 1,
+                .class = class,
+                .type = type,
+                ._name = name,
+        };
 
         return k;
 }
@@ -372,14 +374,17 @@ bool dns_resource_key_reduce(DnsResourceKey **a, DnsResourceKey **b) {
 DnsResourceRecord* dns_resource_record_new(DnsResourceKey *key) {
         DnsResourceRecord *rr;
 
-        rr = new0(DnsResourceRecord, 1);
+        rr = new(DnsResourceRecord, 1);
         if (!rr)
                 return NULL;
 
-        rr->n_ref = 1;
-        rr->key = dns_resource_key_ref(key);
-        rr->expiry = USEC_INFINITY;
-        rr->n_skip_labels_signer = rr->n_skip_labels_source = (unsigned) -1;
+        *rr = (DnsResourceRecord) {
+                .n_ref = 1,
+                .key = dns_resource_key_ref(key),
+                .expiry = USEC_INFINITY,
+                .n_skip_labels_signer = (unsigned) -1,
+                .n_skip_labels_source = (unsigned) -1,
+        };
 
         return rr;
 }
@@ -1645,7 +1650,7 @@ DnsResourceRecord *dns_resource_record_copy(DnsResourceRecord *rr) {
                         return NULL;
                 copy->nsec3.salt_size = rr->nsec3.salt_size;
                 copy->nsec3.next_hashed_name = memdup(rr->nsec3.next_hashed_name, rr->nsec3.next_hashed_name_size);
-                if (!copy->nsec3.next_hashed_name_size)
+                if (!copy->nsec3.next_hashed_name)
                         return NULL;
                 copy->nsec3.next_hashed_name_size = rr->nsec3.next_hashed_name_size;
                 copy->nsec3.types = bitmap_copy(rr->nsec3.types);
index 6c824f7962e1e71b43650e85557f285405b14bdd..59b3a70179c5c787cbf4de1febc5eed7d4eab390 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <netinet/in.h>
index 2ad4544002d5dc1eb47cc6cdea83c1803b115bd1..666aa892ea991a54deabe6e270011c4bdc7794f4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/tcp.h>
 
@@ -412,9 +412,36 @@ static int dns_scope_socket(
         if (ret_socket_address)
                 *ret_socket_address = sa;
         else {
+                bool bound = false;
+
+                /* Let's temporarily bind the socket to the specified ifindex. The kernel currently takes
+                 * only the SO_BINDTODEVICE/SO_BINDTOINDEX ifindex into account when making routing decisions
+                 * in connect() — and not IP_UNICAST_IF. We don't really want any of the other semantics of
+                 * SO_BINDTODEVICE/SO_BINDTOINDEX, hence we immediately unbind the socket after the fact
+                 * again.
+                 *
+                 * As a special exception we don't do this if we notice that the specified IP address is on
+                 * the local host. SO_BINDTODEVICE in combination with destination addresses on the local
+                 * host result in EHOSTUNREACH, since Linux won't send the packets out of the specified
+                 * interface, but delivers them directly to the local socket. */
+                if (s->link &&
+                    !manager_find_link_address(s->manager, sa.sa.sa_family, sockaddr_in_addr(&sa.sa))) {
+                        r = socket_bind_to_ifindex(fd, ifindex);
+                        if (r < 0)
+                                return r;
+
+                        bound = true;
+                }
+
                 r = connect(fd, &sa.sa, salen);
                 if (r < 0 && errno != EINPROGRESS)
                         return -errno;
+
+                if (bound) {
+                        r = socket_bind_to_ifindex(fd, 0);
+                        if (r < 0)
+                                return r;
+                }
         }
 
         return TAKE_FD(fd);
@@ -478,9 +505,8 @@ DnsScopeMatch dns_scope_good_domain(
         if ((SD_RESOLVED_FLAGS_MAKE(s->protocol, s->family, 0) & flags) == 0)
                 return DNS_SCOPE_NO;
 
-        /* Never resolve any loopback hostname or IP address via DNS,
-         * LLMNR or mDNS. Instead, always rely on synthesized RRs for
-         * these. */
+        /* Never resolve any loopback hostname or IP address via DNS, LLMNR or mDNS. Instead, always rely on
+         * synthesized RRs for these. */
         if (is_localhost(domain) ||
             dns_name_endswith(domain, "127.in-addr.arpa") > 0 ||
             dns_name_equal(domain, "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa") > 0)
@@ -496,6 +522,15 @@ DnsScopeMatch dns_scope_good_domain(
         if (dns_name_endswith(domain, "invalid") > 0)
                 return DNS_SCOPE_NO;
 
+        /* Never go to network for the _gateway domain, it's something special, synthesized locally. Note
+         * that we don't use is_gateway_hostname() here, since that has support for the legacy "gateway"
+         * hostname (without the prefix underscore), which we don't want to filter on all protocols. i.e. we
+         * don't want to filter "gateway" on classic DNS, since there might very well be such a host inside
+         * some search domain, and we shouldn't block that. We do filter it in LLMNR however (and on mDNS by
+         * side-effect, since it's a single-label name which mDNS doesn't accept anyway). */
+        if (dns_name_equal(domain, "_gateway") > 0)
+                return DNS_SCOPE_NO;
+
         switch (s->protocol) {
 
         case DNS_PROTOCOL_DNS: {
@@ -588,7 +623,8 @@ DnsScopeMatch dns_scope_good_domain(
                         return DNS_SCOPE_MAYBE;
 
                 if ((dns_name_is_single_label(domain) && /* only resolve single label names via LLMNR */
-                     !is_gateway_hostname(domain) && /* don't resolve "gateway" with LLMNR, let nss-myhostname handle this */
+                     !is_gateway_hostname(domain) && /* don't resolve "_gateway" with LLMNR, let local synthesizing logic handle that */
+                     dns_name_equal(domain, "local") == 0 && /* don't resolve "local" with LLMNR, it's the top-level domain of mDNS after all, see above */
                      manager_is_own_hostname(s->manager, domain) <= 0))  /* never resolve the local hostname via LLMNR */
                         return DNS_SCOPE_YES_BASE + 1; /* Return +1, as we consider ourselves authoritative
                                                         * for single-label names, i.e. one label. This is
@@ -1156,12 +1192,16 @@ bool dns_scope_name_wants_search_domain(DnsScope *s, const char *name) {
 bool dns_scope_network_good(DnsScope *s) {
         /* Checks whether the network is in good state for lookups on this scope. For mDNS/LLMNR/Classic DNS scopes
          * bound to links this is easy, as they don't even exist if the link isn't in a suitable state. For the global
-         * DNS scope we check whether there are any links that are up and have an address. */
+         * DNS scope we check whether there are any links that are up and have an address.
+         *
+         * Note that Linux routing is complex and even systems that superficially have no IPv4 address might
+         * be able to route IPv4 (and similar for IPv6), hence let's make a check here independent of address
+         * family. */
 
         if (s->link)
                 return true;
 
-        return manager_routable(s->manager, AF_UNSPEC);
+        return manager_routable(s->manager);
 }
 
 int dns_scope_ifindex(DnsScope *s) {
index 8b1a958551c2f47b161797d601628d96b54be51d..de05c0838f4d6c79d156ef3ac245de8657e5b862 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "list.h"
index 425a46334948c7531cc37877c69f06c52fe7135a..a01f3dced98a3b2a08c035ff6570af94dc3dad99 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "dns-domain.h"
@@ -33,14 +33,16 @@ int dns_search_domain_new(
                         return -E2BIG;
         }
 
-        d = new0(DnsSearchDomain, 1);
+        d = new(DnsSearchDomain, 1);
         if (!d)
                 return -ENOMEM;
 
-        d->n_ref = 1;
-        d->manager = m;
-        d->type = type;
-        d->name = TAKE_PTR(normalized);
+        *d = (DnsSearchDomain) {
+                .n_ref = 1,
+                .manager = m,
+                .type = type,
+                .name = TAKE_PTR(normalized),
+        };
 
         switch (type) {
 
index df0b2f14049928e072de232462ba295fe74a2879..ea91a4e2a471803ad466e62082c9cd2da7a074f7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "list.h"
index d9ac44f9b5b58f4687197df08560698d72d7f899..541266ff9d6fdb929b709797545fe6e4aeeb94f7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-messages.h"
 
@@ -530,7 +530,7 @@ int dns_server_adjust_opt(DnsServer *server, DnsPacket *packet, DnsServerFeature
 
         edns_do = level >= DNS_SERVER_FEATURE_LEVEL_DO;
 
-        if (level >= DNS_SERVER_FEATURE_LEVEL_LARGE)
+        if (level == DNS_SERVER_FEATURE_LEVEL_LARGE)
                 packet_size = DNS_PACKET_UNICAST_SIZE_LARGE_MAX;
         else
                 packet_size = server->received_udp_packet_max;
index 464e8dc2515d51ad733e1db6493a9dd561eec2f8..20afee74ac34131b5b35ec18a5863778fe207649 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "in-addr-util.h"
index e6f72f00b43a28553b107f5ba52bd696481cbe48..1aab0899347bf41bfc47a5369fa1377276d0d1f9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/tcp.h>
 #include <unistd.h>
index de193931c18d509769656569eb20e75eed1bd56c..dba06447cf96151ea4f97a31991eeed154ce9fc2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-event.h"
index 445fa86dd1fca6e060438f7ba6f4e82eccfedab3..6a3dc9901ae8326e93147a373be567739b865d9c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if_arp.h>
 
@@ -15,6 +15,9 @@
  * IP and UDP header sizes */
 #define ADVERTISE_DATAGRAM_SIZE_MAX (65536U-14U-20U-8U)
 
+/* On the extra stubs, use a more conservative choice */
+#define ADVERTISE_EXTRA_DATAGRAM_SIZE_MAX DNS_PACKET_UNICAST_SIZE_LARGE_MAX
+
 static int manager_dns_stub_fd_extra(Manager *m, DnsStubListenerExtra *l, int type);
 
 static void dns_stub_listener_extra_hash_func(const DnsStubListenerExtra *a, struct siphash *state) {
@@ -155,14 +158,15 @@ static int dns_stub_finish_reply_packet(
                 bool tc,        /* set the Truncated bit? */
                 bool add_opt,   /* add an OPT RR to this packet? */
                 bool edns0_do,  /* set the EDNS0 DNSSEC OK bit? */
-                bool ad) {      /* set the DNSSEC authenticated data bit? */
+                bool ad,        /* set the DNSSEC authenticated data bit? */
+                uint16_t max_udp_size) { /* The maximum UDP datagram size to advertise to clients */
 
         int r;
 
         assert(p);
 
         if (add_opt) {
-                r = dns_packet_append_opt(p, ADVERTISE_DATAGRAM_SIZE_MAX, edns0_do, /* include_rfc6975 = */ false, rcode, NULL);
+                r = dns_packet_append_opt(p, max_udp_size, edns0_do, /* include_rfc6975 = */ false, rcode, NULL);
                 if (r == -EMSGSIZE) /* Hit the size limit? then indicate truncation */
                         tc = true;
                 else if (r < 0)
@@ -245,7 +249,15 @@ static int dns_stub_send_failure(
         if (r < 0)
                 return log_debug_errno(r, "Failed to make failure packet: %m");
 
-        r = dns_stub_finish_reply_packet(reply, DNS_PACKET_ID(p), rcode, false, !!p->opt, DNS_PACKET_DO(p), authenticated);
+        r = dns_stub_finish_reply_packet(
+                        reply,
+                        DNS_PACKET_ID(p),
+                        rcode,
+                        /* truncated = */ false,
+                        !!p->opt,
+                        DNS_PACKET_DO(p),
+                        authenticated,
+                        l ? ADVERTISE_EXTRA_DATAGRAM_SIZE_MAX : ADVERTISE_DATAGRAM_SIZE_MAX);
         if (r < 0)
                 return log_debug_errno(r, "Failed to build failure packet: %m");
 
@@ -290,7 +302,8 @@ static void dns_stub_query_complete(DnsQuery *q) {
                                 truncated,
                                 !!q->request_dns_packet->opt,
                                 DNS_PACKET_DO(q->request_dns_packet),
-                                dns_query_fully_authenticated(q));
+                                dns_query_fully_authenticated(q),
+                                q->stub_listener_extra ? ADVERTISE_EXTRA_DATAGRAM_SIZE_MAX : ADVERTISE_DATAGRAM_SIZE_MAX);
                 if (r < 0) {
                         log_debug_errno(r, "Failed to finish reply packet: %m");
                         break;
@@ -366,8 +379,7 @@ static void dns_stub_process_query(Manager *m, DnsStubListenerExtra *l, DnsStrea
         if (!l && /* l == NULL if this is the main stub */
             (in_addr_is_localhost(p->family, &p->sender) <= 0 ||
              in_addr_is_localhost(p->family, &p->destination) <= 0)) {
-                log_error("Got packet on unexpected IP range, refusing.");
-                dns_stub_send_failure(m, l, s, p, DNS_RCODE_SERVFAIL, false);
+                log_warning("Got packet on unexpected (i.e. non-localhost) IP range, ignoring.");
                 return;
         }
 
index 6686de5e58ca6a094b78b106c111ee266d7a980c..072f2130e57d65d8070fc7d1ffae111f4302d08f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "hash-funcs.h"
index f65116c3b45462f93109267c6386aa1422c97ca0..67f0dda246d4a71eff57ed04ab10c66ac74a826c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "hostname-util.h"
index 0d9d17bac7fe387ee8803788551c0db771e5a8ce..fb624589d75f5afe689edadf681603fc0f558427 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "resolved-dns-answer.h"
index 36f57eae629e27a02188000d02a2cdcca0148ce1..95f643ddcb3212579fc4f954a941e1f8ac6f912e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-messages.h"
 
@@ -194,19 +194,20 @@ int dns_transaction_new(DnsTransaction **ret, DnsScope *s, DnsResourceKey *key)
         if (r < 0)
                 return r;
 
-        t = new0(DnsTransaction, 1);
+        t = new(DnsTransaction, 1);
         if (!t)
                 return -ENOMEM;
 
-        t->dns_udp_fd = -1;
-        t->answer_source = _DNS_TRANSACTION_SOURCE_INVALID;
-        t->answer_dnssec_result = _DNSSEC_RESULT_INVALID;
-        t->answer_nsec_ttl = (uint32_t) -1;
-        t->key = dns_resource_key_ref(key);
-        t->current_feature_level = _DNS_SERVER_FEATURE_LEVEL_INVALID;
-        t->clamp_feature_level = _DNS_SERVER_FEATURE_LEVEL_INVALID;
-
-        t->id = pick_new_id(s->manager);
+        *t = (DnsTransaction) {
+                .dns_udp_fd = -1,
+                .answer_source = _DNS_TRANSACTION_SOURCE_INVALID,
+                .answer_dnssec_result = _DNSSEC_RESULT_INVALID,
+                .answer_nsec_ttl = (uint32_t) -1,
+                .key = dns_resource_key_ref(key),
+                .current_feature_level = _DNS_SERVER_FEATURE_LEVEL_INVALID,
+                .clamp_feature_level = _DNS_SERVER_FEATURE_LEVEL_INVALID,
+                .id = pick_new_id(s->manager),
+        };
 
         r = hashmap_put(s->manager->dns_transactions, UINT_TO_PTR(t->id), t);
         if (r < 0) {
@@ -681,11 +682,9 @@ static void dns_transaction_cache_answer(DnsTransaction *t) {
         if (t->scope->manager->enable_cache == DNS_CACHE_MODE_NO)
                 return;
 
-        /* We never cache if this packet is from the local host, under
-         * the assumption that a locally running DNS server would
-         * cache this anyway, and probably knows better when to flush
-         * the cache then we could. */
-        if (!DNS_PACKET_SHALL_CACHE(t->received))
+        /* Packet from localhost? */
+        if (!t->scope->manager->cache_from_localhost &&
+            in_addr_is_localhost(t->received->family, &t->received->sender) != 0)
                 return;
 
         dns_cache_put(&t->scope->cache,
@@ -1112,58 +1111,52 @@ void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p) {
         if (r > 0) /* Transaction got restarted... */
                 return;
 
-        if (IN_SET(t->scope->protocol, DNS_PROTOCOL_DNS, DNS_PROTOCOL_LLMNR, DNS_PROTOCOL_MDNS)) {
-
-                /* When dealing with protocols other than mDNS only consider responses with
-                 * equivalent query section to the request. For mDNS this check doesn't make
-                 * sense, because the section 6 of RFC6762 states that "Multicast DNS responses MUST NOT
-                 * contain any questions in the Question Section". */
-                if (t->scope->protocol != DNS_PROTOCOL_MDNS) {
-                        r = dns_packet_is_reply_for(p, t->key);
-                        if (r < 0)
-                                goto fail;
-                        if (r == 0) {
-                                dns_transaction_complete(t, DNS_TRANSACTION_INVALID_REPLY);
-                                return;
-                        }
+        /* When dealing with protocols other than mDNS only consider responses with equivalent query section
+         * to the request. For mDNS this check doesn't make sense, because the section 6 of RFC6762 states
+         * that "Multicast DNS responses MUST NOT contain any questions in the Question Section". */
+        if (t->scope->protocol != DNS_PROTOCOL_MDNS) {
+                r = dns_packet_is_reply_for(p, t->key);
+                if (r < 0)
+                        goto fail;
+                if (r == 0) {
+                        dns_transaction_complete(t, DNS_TRANSACTION_INVALID_REPLY);
+                        return;
                 }
+        }
 
-                /* Install the answer as answer to the transaction */
-                dns_answer_unref(t->answer);
-                t->answer = dns_answer_ref(p->answer);
-                t->answer_rcode = DNS_PACKET_RCODE(p);
-                t->answer_dnssec_result = _DNSSEC_RESULT_INVALID;
-                t->answer_authenticated = false;
+        /* Install the answer as answer to the transaction */
+        dns_answer_unref(t->answer);
+        t->answer = dns_answer_ref(p->answer);
+        t->answer_rcode = DNS_PACKET_RCODE(p);
+        t->answer_dnssec_result = _DNSSEC_RESULT_INVALID;
+        t->answer_authenticated = false;
 
-                r = dns_transaction_fix_rcode(t);
-                if (r < 0)
-                        goto fail;
+        r = dns_transaction_fix_rcode(t);
+        if (r < 0)
+                goto fail;
 
-                /* Block GC while starting requests for additional DNSSEC RRs */
-                t->block_gc++;
-                r = dns_transaction_request_dnssec_keys(t);
-                t->block_gc--;
+        /* Block GC while starting requests for additional DNSSEC RRs */
+        t->block_gc++;
+        r = dns_transaction_request_dnssec_keys(t);
+        t->block_gc--;
 
-                /* Maybe the transaction is ready for GC'ing now? If so, free it and return. */
-                if (!dns_transaction_gc(t))
-                        return;
+        /* Maybe the transaction is ready for GC'ing now? If so, free it and return. */
+        if (!dns_transaction_gc(t))
+                return;
 
-                /* Requesting additional keys might have resulted in
-                 * this transaction to fail, since the auxiliary
-                 * request failed for some reason. If so, we are not
-                 * in pending state anymore, and we should exit
-                 * quickly. */
-                if (t->state != DNS_TRANSACTION_PENDING)
-                        return;
-                if (r < 0)
-                        goto fail;
-                if (r > 0) {
-                        /* There are DNSSEC transactions pending now. Update the state accordingly. */
-                        t->state = DNS_TRANSACTION_VALIDATING;
-                        dns_transaction_close_connection(t);
-                        dns_transaction_stop_timeout(t);
-                        return;
-                }
+        /* Requesting additional keys might have resulted in this transaction to fail, since the auxiliary
+         * request failed for some reason. If so, we are not in pending state anymore, and we should exit
+         * quickly. */
+        if (t->state != DNS_TRANSACTION_PENDING)
+                return;
+        if (r < 0)
+                goto fail;
+        if (r > 0) {
+                /* There are DNSSEC transactions pending now. Update the state accordingly. */
+                t->state = DNS_TRANSACTION_VALIDATING;
+                dns_transaction_close_connection(t);
+                dns_transaction_stop_timeout(t);
+                return;
         }
 
         dns_transaction_process_dnssec(t);
@@ -1894,7 +1887,7 @@ static int dns_transaction_negative_trust_anchor_lookup(DnsTransaction *t, const
         if (!t->scope->link)
                 return 0;
 
-        return set_contains(t->scope->link->dnssec_negative_trust_anchors, name);
+        return link_negative_trust_anchor_lookup(t->scope->link, name);
 }
 
 static int dns_transaction_has_unsigned_negative_answer(DnsTransaction *t) {
@@ -2122,7 +2115,7 @@ int dns_transaction_request_dnssec_keys(DnsTransaction *t) {
                                 return r;
                         if (r == 0) {
                                 /* Hmm, so this SOA RR doesn't match our original question. In this case, maybe this is
-                                 * a negative reply, and we need the SOA RR's TTL in order to cache a negative entry?
+                                 * a negative reply, and we need the SOA RR's TTL in order to cache a negative entry?
                                  * If so, we need to validate it, too. */
 
                                 r = dns_answer_match_key(t->answer, t->key, NULL);
index 167541806a28eaa5f0deac78cc7664bf271ba1e8..7f0b8e784723b66a24134debf7c30ffa5bb4b7f5 100644 (file)
@@ -1,7 +1,8 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-event.h"
+#include "in-addr-util.h"
 
 typedef struct DnsTransaction DnsTransaction;
 typedef enum DnsTransactionState DnsTransactionState;
index ad5061c2bd795e562db6dc9a5d4889cb1a1355e3..3e5d25586c7a34c6066449a7b2e9db8921aea095 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-messages.h"
 
index df49777e263c20b637964fcafab7c76f4b2853d7..14047ec7eb69c47b32822b1db57210ad026d5050 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct DnsTrustAnchor DnsTrustAnchor;
index f8e1491f8be603364ec5bebbeab19ef42ccf1581..00eb6725f9ff753eb68ffd7602cd4cf4ba06fb5b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "dns-domain.h"
@@ -231,13 +231,15 @@ int dns_zone_put(DnsZone *z, DnsScope *s, DnsResourceRecord *rr, bool probe) {
         if (r < 0)
                 return r;
 
-        i = new0(DnsZoneItem, 1);
+        i = new(DnsZoneItem, 1);
         if (!i)
                 return -ENOMEM;
 
-        i->scope = s;
-        i->rr = dns_resource_record_ref(rr);
-        i->probing_enabled = probe;
+        *i = (DnsZoneItem) {
+                .scope = s,
+                .rr = dns_resource_record_ref(rr),
+                .probing_enabled = probe,
+        };
 
         r = dns_zone_link_item(z, i);
         if (r < 0)
index 2719b2188aa3e4dbc65c780e526010c298814bc4..1f5a6e0571faf81206cddf1e95c028860426a5a3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "hashmap.h"
index 7798746e67a23cc0a9edfb0d7aed232df3fc0869..d908cc64e6b5d9d06fcf57022da363b95568af7f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "bus-polkit.h"
index 403455e89f4439d81cbe999eea2215ee7c9c9ecd..f396e23cd76acd0f66ca3396110d569aab328dd5 100644 (file)
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
 #pragma once
 
 #include "sd-bus.h"
index d7f3a5adef2ee6eed245b5e9604cb12f81169a19..8b40639728e8789a5626c9af2199162cdcf9ac68 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "conf-files.h"
 #include "conf-parser.h"
@@ -155,33 +155,35 @@ static int specifier_dnssd_host_name(char specifier, const void *data, const voi
         return 0;
 }
 
-int dnssd_render_instance_name(const char *name_template, char **ret_name) {
+int dnssd_render_instance_name(DnssdService *s, char **ret_name) {
         static const Specifier specifier_table[] = {
-                { 'm', specifier_machine_id,      NULL },
+                { 'a', specifier_architecture,    NULL },
                 { 'b', specifier_boot_id,         NULL },
+                { 'B', specifier_os_build_id,     NULL },
                 { 'H', specifier_dnssd_host_name, NULL },
-                { 'v', specifier_kernel_release,  NULL },
-                { 'a', specifier_architecture,    NULL },
+                { 'm', specifier_machine_id,      NULL },
                 { 'o', specifier_os_id,           NULL },
+                { 'v', specifier_kernel_release,  NULL },
                 { 'w', specifier_os_version_id,   NULL },
-                { 'B', specifier_os_build_id,     NULL },
                 { 'W', specifier_os_variant_id,   NULL },
                 {}
         };
         _cleanup_free_ char *name = NULL;
         int r;
 
-        assert(name_template);
+        assert(s);
+        assert(s->name_template);
 
-        r = specifier_printf(name_template, specifier_table, NULL, &name);
+        r = specifier_printf(s->name_template, specifier_table, s, &name);
         if (r < 0)
-                return r;
+                return log_debug_errno(r, "Failed to replace specifiers: %m");
 
         if (!dns_service_name_is_valid(name))
-                return -EINVAL;
+                return log_debug_errno(SYNTHETIC_ERRNO(EINVAL),
+                                       "Service instance name '%s' is invalid.",
+                                       name);
 
-        if (ret_name)
-                *ret_name = TAKE_PTR(name);
+        *ret_name = TAKE_PTR(name);
 
         return 0;
 }
@@ -225,7 +227,7 @@ int dnssd_update_rrs(DnssdService *s) {
         LIST_FOREACH(items, txt_data, s->txt_data_items)
                 txt_data->rr = dns_resource_record_unref(txt_data->rr);
 
-        r = dnssd_render_instance_name(s->name_template, &n);
+        r = dnssd_render_instance_name(s, &n);
         if (r < 0)
                 return r;
 
index 304bd890c95f007bf0980e9734c695ca945b6318..8fe755687e170d1564681221211856416fc8d39c 100644 (file)
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
 #pragma once
 
 #include "list.h"
@@ -51,7 +53,7 @@ DnssdTxtData *dnssd_txtdata_free_all(DnssdTxtData *txt_data);
 DEFINE_TRIVIAL_CLEANUP_FUNC(DnssdService*, dnssd_service_free);
 DEFINE_TRIVIAL_CLEANUP_FUNC(DnssdTxtData*, dnssd_txtdata_free);
 
-int dnssd_render_instance_name(const char *name_template, char **ret_name);
+int dnssd_render_instance_name(DnssdService *s, char **ret_name);
 int dnssd_load(Manager *manager);
 int dnssd_txt_item_new_from_string(const char *key, const char *value, DnsTxtItem **ret_item);
 int dnssd_txt_item_new_from_data(const char *key, const void *value, const size_t size, DnsTxtItem **ret_item);
index 6b7db7ef8c4a1f99a2114f5d24ba3d839008b244..d3edd350b392a05a58695b3f70fa803d14d732c8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if !ENABLE_DNS_OVER_TLS || !DNS_OVER_TLS_USE_GNUTLS
 #error This source file requires DNS-over-TLS to be enabled and GnuTLS to be available.
index d4da2017c3a03ec86c29d2b29e1db5e0048e02dc..dc1255fbb9776bc776b377301babd3bfdab9c5d5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #if !ENABLE_DNS_OVER_TLS || !DNS_OVER_TLS_USE_GNUTLS
index f95738649df7115ce02af3af612335fc602db05e..defddb52378216a073f4bafb73a6e9583863ae4b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if !ENABLE_DNS_OVER_TLS || !DNS_OVER_TLS_USE_OPENSSL
 #error This source file requires DNS-over-TLS to be enabled and OpenSSL to be available.
index 8100d2ba6b027bcf7e859bdca2c79bc548553591..a73b77bb581612562de8edf1b8c8b60c1d4a8167 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #if !ENABLE_DNS_OVER_TLS || !DNS_OVER_TLS_USE_OPENSSL
index 6199335b7091682f3b5f8cb8bd5c580ff03fb4c3..b638d61ec7a4d1efd763736909635891ae66c824 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #if ENABLE_DNS_OVER_TLS
index 6a7f7499572cfc9592e64ab7233468960e9654ee..2cb90d201a3f86b07c53ba115910f64f12619266 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -10,6 +10,7 @@
 #include "resolved-dns-synthesize.h"
 #include "resolved-etc-hosts.h"
 #include "socket-netlink.h"
+#include "stat-util.h"
 #include "string-util.h"
 #include "strv.h"
 #include "time-util.h"
@@ -36,9 +37,7 @@ void etc_hosts_free(EtcHosts *hosts) {
 
 void manager_etc_hosts_flush(Manager *m) {
         etc_hosts_free(&m->etc_hosts);
-        m->etc_hosts_mtime = USEC_INFINITY;
-        m->etc_hosts_ino = 0;
-        m->etc_hosts_dev = 0;
+        m->etc_hosts_stat = (struct stat) {};
 }
 
 static int parse_line(EtcHosts *hosts, unsigned nr, const char *line) {
@@ -80,11 +79,13 @@ static int parse_line(EtcHosts *hosts, unsigned nr, const char *line) {
                         if (r < 0)
                                 return log_oom();
 
-                        item = new0(EtcHostsItem, 1);
+                        item = new(EtcHostsItem, 1);
                         if (!item)
                                 return log_oom();
 
-                        item->address = address;
+                        *item = (EtcHostsItem) {
+                                .address = address,
+                        };
 
                         r = hashmap_put(hosts->by_address, &item->address, item);
                         if (r < 0) {
@@ -112,10 +113,6 @@ static int parse_line(EtcHosts *hosts, unsigned nr, const char *line) {
                         continue;
                 }
 
-                if (is_localhost(name))
-                        /* Suppress the "localhost" line that is often seen */
-                        continue;
-
                 if (!item) {
                         /* Optimize the case where we don't need to store any addresses, by storing
                          * only the name in a dedicated Set instead of the hashmap */
@@ -162,6 +159,95 @@ static int parse_line(EtcHosts *hosts, unsigned nr, const char *line) {
         return 0;
 }
 
+static void strip_localhost(EtcHosts *hosts) {
+        static const struct in_addr_data local_in_addrs[] = {
+                {
+                        .family = AF_INET,
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+                        /* We want constant expressions here, that's why we don't use htole32() here */
+                        .address.in.s_addr = UINT32_C(0x0100007F),
+#else
+                        .address.in.s_addr = UINT32_C(0x7F000001),
+#endif
+                },
+                {
+                        .family = AF_INET6,
+                        .address.in6 = IN6ADDR_LOOPBACK_INIT,
+                },
+        };
+
+        EtcHostsItem *item;
+
+        assert(hosts);
+
+        /* Removes the 'localhost' entry from what we loaded. But only if the mapping is exclusively between
+         * 127.0.0.1 and localhost (or aliases to that we recognize). If there's any other name assigned to
+         * it, we leave the entry in.
+         *
+         * This way our regular synthesizing can take over, but only if it would result in the exact same
+         * mappings.  */
+
+        for (size_t j = 0; j < ELEMENTSOF(local_in_addrs); j++) {
+                bool all_localhost, in_order;
+                char **i;
+
+                item = hashmap_get(hosts->by_address, local_in_addrs + j);
+                if (!item)
+                        continue;
+
+                /* Check whether all hostnames the loopback address points to are localhost ones */
+                all_localhost = true;
+                STRV_FOREACH(i, item->names)
+                        if (!is_localhost(*i)) {
+                                all_localhost = false;
+                                break;
+                        }
+
+                if (!all_localhost) /* Not all names are localhost, hence keep the entries for this address. */
+                        continue;
+
+                /* Now check if the names listed for this address actually all point back just to this
+                 * address (or the other loopback address). If not, let's stay away from this too. */
+                in_order = true;
+                STRV_FOREACH(i, item->names) {
+                        EtcHostsItemByName *n;
+                        bool all_local_address;
+
+                        n = hashmap_get(hosts->by_name, *i);
+                        if (!n) /* No reverse entry? Then almost certainly the entry already got deleted from
+                                 * the previous iteration of this loop, i.e. via the other protocol */
+                                break;
+
+                        /* Now check if the addresses of this item are all localhost addresses */
+                        all_local_address = true;
+                        for (size_t m = 0; m < n->n_addresses; m++)
+                                if (!in_addr_is_localhost(n->addresses[m]->family, &n->addresses[m]->address)) {
+                                        all_local_address = false;
+                                        break;
+                                }
+
+                        if (!all_local_address) {
+                                in_order = false;
+                                break;
+                        }
+                }
+
+                if (!in_order)
+                        continue;
+
+                STRV_FOREACH(i, item->names) {
+                        EtcHostsItemByName *n;
+
+                        n = hashmap_remove(hosts->by_name, *i);
+                        if (n)
+                                etc_hosts_item_by_name_free(n);
+                }
+
+                assert_se(hashmap_remove(hosts->by_address, local_in_addrs + j) == item);
+                etc_hosts_item_free(item);
+        }
+}
+
 int etc_hosts_parse(EtcHosts *hosts, FILE *f) {
         _cleanup_(etc_hosts_free) EtcHosts t = {};
         unsigned nr = 0;
@@ -192,6 +278,8 @@ int etc_hosts_parse(EtcHosts *hosts, FILE *f) {
                         return r;
         }
 
+        strip_localhost(&t);
+
         etc_hosts_free(hosts);
         *hosts = t;
         t = (EtcHosts) {}; /* prevent cleanup */
@@ -212,7 +300,7 @@ static int manager_etc_hosts_read(Manager *m) {
 
         m->etc_hosts_last = ts;
 
-        if (m->etc_hosts_mtime != USEC_INFINITY) {
+        if (m->etc_hosts_stat.st_mode != 0) {
                 if (stat("/etc/hosts", &st) < 0) {
                         if (errno != ENOENT)
                                 return log_error_errno(errno, "Failed to stat /etc/hosts: %m");
@@ -222,8 +310,7 @@ static int manager_etc_hosts_read(Manager *m) {
                 }
 
                 /* Did the mtime or ino/dev change? If not, there's no point in re-reading the file. */
-                if (timespec_load(&st.st_mtim) == m->etc_hosts_mtime &&
-                    st.st_ino == m->etc_hosts_ino && st.st_dev == m->etc_hosts_dev)
+                if (stat_inode_unmodified(&m->etc_hosts_stat, &st))
                         return 0;
         }
 
@@ -246,9 +333,7 @@ static int manager_etc_hosts_read(Manager *m) {
         if (r < 0)
                 return r;
 
-        m->etc_hosts_mtime = timespec_load(&st.st_mtim);
-        m->etc_hosts_ino = st.st_ino;
-        m->etc_hosts_dev = st.st_dev;
+        m->etc_hosts_stat = st;
         m->etc_hosts_last = ts;
 
         return 1;
index caf32a53ddae230c869f3a2bc0e1cfbc5d530106..459b310185298aa7cdf20dc0c5443484eabc2a4e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "resolved-manager.h"
index b54fa1ba99bbf38c195264190deaffadfccb5820..2da273ab1e660f35d6822fc6c283cef6b37d257c 100644 (file)
@@ -30,3 +30,4 @@ Resolve.DNSStubListener,           config_parse_dns_stub_listener_mode,  0,
 Resolve.ReadEtcHosts,              config_parse_bool,                    0,                   offsetof(Manager, read_etc_hosts)
 Resolve.ResolveUnicastSingleLabel, config_parse_bool,                    0,                   offsetof(Manager, resolve_unicast_single_label)
 Resolve.DNSStubListenerExtra,      config_parse_dns_stub_listener_extra, 0,                   offsetof(Manager, dns_extra_stub_listeners)
+Resolve.CacheFromLocalhost,        config_parse_bool,                    0,                   offsetof(Manager, cache_from_localhost)
index 3665d69f3c84c8bf69e76daa4328f9aa39374081..d27d46b11f40f7d3efb6dbc16794f87fab179888 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 #include <netinet/in.h>
@@ -9,6 +9,7 @@
 #include "bus-get-properties.h"
 #include "bus-message-util.h"
 #include "bus-polkit.h"
+#include "log-link.h"
 #include "parse-util.h"
 #include "resolve-util.h"
 #include "resolved-bus.h"
@@ -252,6 +253,7 @@ static int verify_unmanaged_link(Link *l, sd_bus_error *error) {
 }
 
 static int bus_link_method_set_dns_servers_internal(sd_bus_message *message, void *userdata, sd_bus_error *error, bool extended) {
+        _cleanup_free_ char *j = NULL;
         struct in_addr_full **dns;
         Link *l = userdata;
         size_t n;
@@ -279,6 +281,21 @@ static int bus_link_method_set_dns_servers_internal(sd_bus_message *message, voi
                 goto finalize;
         }
 
+        for (size_t i = 0; i < n; i++) {
+                const char *s;
+
+                s = in_addr_full_to_string(dns[i]);
+                if (!s) {
+                        r = -ENOMEM;
+                        goto finalize;
+                }
+
+                if (!strextend_with_separator(&j, ", ", s, NULL)) {
+                        r = -ENOMEM;
+                        goto finalize;
+                }
+        }
+
         dns_server_mark_all(l->dns_servers);
 
         for (size_t i = 0; i < n; i++) {
@@ -304,6 +321,11 @@ static int bus_link_method_set_dns_servers_internal(sd_bus_message *message, voi
         (void) manager_write_resolv_conf(l->manager);
         (void) manager_send_changed(l->manager, "DNS");
 
+        if (j)
+                log_link_info(l, "Bus client set DNS server list to: %s", j);
+        else
+                log_link_info(l, "Bus client reset DNS server list.");
+
         r = sd_bus_reply_method_return(message, NULL);
 
 finalize:
@@ -323,6 +345,7 @@ int bus_link_method_set_dns_servers_ex(sd_bus_message *message, void *userdata,
 }
 
 int bus_link_method_set_domains(sd_bus_message *message, void *userdata, sd_bus_error *error) {
+        _cleanup_free_ char *j = NULL;
         Link *l = userdata;
         int r;
 
@@ -338,6 +361,7 @@ int bus_link_method_set_domains(sd_bus_message *message, void *userdata, sd_bus_
                 return r;
 
         for (;;) {
+                _cleanup_free_ char *prefixed = NULL;
                 const char *name;
                 int route_only;
 
@@ -354,6 +378,17 @@ int bus_link_method_set_domains(sd_bus_message *message, void *userdata, sd_bus_
                         return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid search domain %s", name);
                 if (!route_only && dns_name_is_root(name))
                         return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Root domain is not suitable as search domain");
+
+                if (route_only) {
+                        prefixed = strjoin("~", name);
+                        if (!prefixed)
+                                return -ENOMEM;
+
+                        name = prefixed;
+                }
+
+                if (!strextend_with_separator(&j, ", ", name, NULL))
+                        return -ENOMEM;
         }
 
         r = sd_bus_message_rewind(message, false);
@@ -406,6 +441,11 @@ int bus_link_method_set_domains(sd_bus_message *message, void *userdata, sd_bus_
         (void) link_save_user(l);
         (void) manager_write_resolv_conf(l->manager);
 
+        if (j)
+                log_link_info(l, "Bus client set search domain list to: %s", j);
+        else
+                log_link_info(l, "Bus client reset search domain list.");
+
         return sd_bus_reply_method_return(message, NULL);
 
 clear:
@@ -444,6 +484,8 @@ int bus_link_method_set_default_route(sd_bus_message *message, void *userdata, s
                 (void) manager_write_resolv_conf(l->manager);
         }
 
+        log_link_info(l, "Bus client set default route setting: %s", yes_no(b));
+
         return sd_bus_reply_method_return(message, NULL);
 }
 
@@ -487,6 +529,8 @@ int bus_link_method_set_llmnr(sd_bus_message *message, void *userdata, sd_bus_er
 
         (void) link_save_user(l);
 
+        log_link_info(l, "Bus client set LLMNR setting: %s", resolve_support_to_string(mode));
+
         return sd_bus_reply_method_return(message, NULL);
 }
 
@@ -530,6 +574,8 @@ int bus_link_method_set_mdns(sd_bus_message *message, void *userdata, sd_bus_err
 
         (void) link_save_user(l);
 
+        log_link_info(l, "Bus client set MulticastDNS setting: %s", resolve_support_to_string(mode));
+
         return sd_bus_reply_method_return(message, NULL);
 }
 
@@ -571,6 +617,9 @@ int bus_link_method_set_dns_over_tls(sd_bus_message *message, void *userdata, sd
 
         (void) link_save_user(l);
 
+        log_link_info(l, "Bus client set DNSOverTLS setting: %s",
+                      mode < 0 ? "default" : dns_over_tls_mode_to_string(mode));
+
         return sd_bus_reply_method_return(message, NULL);
 }
 
@@ -612,12 +661,16 @@ int bus_link_method_set_dnssec(sd_bus_message *message, void *userdata, sd_bus_e
 
         (void) link_save_user(l);
 
+        log_link_info(l, "Bus client set DNSSEC setting: %s",
+                      mode < 0 ? "default" : dnssec_mode_to_string(mode));
+
         return sd_bus_reply_method_return(message, NULL);
 }
 
 int bus_link_method_set_dnssec_negative_trust_anchors(sd_bus_message *message, void *userdata, sd_bus_error *error) {
         _cleanup_set_free_free_ Set *ns = NULL;
         _cleanup_strv_free_ char **ntas = NULL;
+        _cleanup_free_ char *j = NULL;
         Link *l = userdata;
         int r;
         char **i;
@@ -648,6 +701,9 @@ int bus_link_method_set_dnssec_negative_trust_anchors(sd_bus_message *message, v
                 r = set_put_strdup(&ns, *i);
                 if (r < 0)
                         return r;
+
+                if (!strextend_with_separator(&j, ", ", *i, NULL))
+                        return -ENOMEM;
         }
 
         r = bus_verify_polkit_async(message, CAP_NET_ADMIN,
@@ -664,6 +720,11 @@ int bus_link_method_set_dnssec_negative_trust_anchors(sd_bus_message *message, v
 
         (void) link_save_user(l);
 
+        if (j)
+                log_link_info(l, "Bus client set NTA list to: %s", j);
+        else
+                log_link_info(l, "Bus client reset NTA list.");
+
         return sd_bus_reply_method_return(message, NULL);
 }
 
index fc85ff855c16f83e403906d0aaa05c2cab6f9658..b882df5c40c325dc6fcd80148038690e8dd66cae 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 79d84dde1fa55ba0decdaa52069d14f972a06a89..4fa4451ab75f10a06625fdee6a10f825e0cbcbc5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/if.h>
 #include <unistd.h>
@@ -818,14 +818,16 @@ int link_address_new(Link *l, LinkAddress **ret, int family, const union in_addr
         assert(l);
         assert(in_addr);
 
-        a = new0(LinkAddress, 1);
+        a = new(LinkAddress, 1);
         if (!a)
                 return -ENOMEM;
 
-        a->family = family;
-        a->in_addr = *in_addr;
+        *a = (LinkAddress) {
+                .family = family,
+                .in_addr = *in_addr,
+                .link = l,
+        };
 
-        a->link = l;
         LIST_PREPEND(addresses, l->addresses, a);
         l->n_addresses++;
 
@@ -1405,3 +1407,26 @@ void link_remove_user(Link *l) {
 
         (void) unlink(l->state_file);
 }
+
+bool link_negative_trust_anchor_lookup(Link *l, const char *name) {
+        int r;
+
+        assert(l);
+        assert(name);
+
+        /* Checks whether the specified domain (or any of its parent domains) are listed as per-link NTA. */
+
+        for (;;) {
+                if (set_contains(l->dnssec_negative_trust_anchors, name))
+                        return true;
+
+                /* And now, let's look at the parent, and check that too */
+                r = dns_name_parent(&name);
+                if (r < 0)
+                        return r;
+                if (r == 0)
+                        break;
+        }
+
+        return false;
+}
index 44d489ce4792435fbe61f2e862ca82ffeb21b041..26b0d13127d5652e0e8f0dbe8dca35fcd7cdaf48 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-netlink.h"
@@ -108,4 +108,6 @@ int link_address_update_rtnl(LinkAddress *a, sd_netlink_message *m);
 bool link_address_relevant(LinkAddress *l, bool local_multicast);
 void link_address_add_rrs(LinkAddress *a, bool force_remove);
 
+bool link_negative_trust_anchor_lookup(Link *l, const char *name);
+
 DEFINE_TRIVIAL_CLEANUP_FUNC(Link*, link_free);
index 03f2764d58908d4d9994718325eff808e8db4421..2ddf08815ad40774131553c4f5e24cb7e4c2c7d1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
 #include <resolv.h>
index a3b12cf38c3c73eb56d34b8d87a98e49583e37cf..4cdd2606e6ddb397d3b9c5d1a1cfa3244f0279b9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "resolved-manager.h"
index c19710881091dec3284e29eb7fc56e5b7137ef20..81d043a3fa0c2a9e395c6cc44d14678df92bbd1d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <netinet/in.h>
@@ -20,7 +20,6 @@
 #include "io-util.h"
 #include "missing_network.h"
 #include "netlink-util.h"
-#include "network-internal.h"
 #include "ordered-set.h"
 #include "parse-util.h"
 #include "random-util.h"
@@ -314,6 +313,54 @@ static int manager_network_monitor_listen(Manager *m) {
         return 0;
 }
 
+static int manager_clock_change_listen(Manager *m);
+
+static int on_clock_change(sd_event_source *source, int fd, uint32_t revents, void *userdata) {
+        Manager *m = userdata;
+
+        assert(m);
+
+        /* The clock has changed, let's flush all caches. Why that? That's because DNSSEC validation takes
+         * the system clock into consideration, and if the clock changes the old validations might have been
+         * wrong. Let's redo all validation with the new, correct time.
+         *
+         * (Also, this is triggered after system suspend, which is also a good reason to drop caches, since
+         * we might be connected to a different network now without this being visible in a dropped link
+         * carrier or so.) */
+
+        log_info("Clock change detected. Flushing caches.");
+        manager_flush_caches(m, LOG_DEBUG /* downgrade the functions own log message, since we already logged here at LOG_INFO level */);
+
+        /* The clock change timerfd is unusable after it triggered once, create a new one. */
+        return manager_clock_change_listen(m);
+}
+
+static int manager_clock_change_listen(Manager *m) {
+        _cleanup_close_ int fd = -1;
+        int r;
+
+        assert(m);
+
+        m->clock_change_event_source = sd_event_source_unref(m->clock_change_event_source);
+
+        fd = time_change_fd();
+        if (fd < 0)
+                return log_error_errno(fd, "Failed to allocate clock change timer fd: %m");
+
+        r = sd_event_add_io(m->event, &m->clock_change_event_source, fd, EPOLLIN, on_clock_change, m);
+        if (r < 0)
+                return log_error_errno(r, "Failed to create clock change event source: %m");
+
+        r = sd_event_source_set_io_fd_own(m->clock_change_event_source, true);
+        if (r < 0)
+                return log_error_errno(r, "Failed to pass ownership of clock fd to event source: %m");
+        TAKE_FD(fd);
+
+        (void) sd_event_source_set_description(m->clock_change_event_source, "clock-change");
+
+        return 0;
+}
+
 static int determine_hostname(char **full_hostname, char **llmnr_hostname, char **mdns_hostname) {
         _cleanup_free_ char *h = NULL, *n = NULL;
 #if HAVE_LIBIDN2
@@ -550,7 +597,7 @@ static int manager_sigusr2(sd_event_source *s, const struct signalfd_siginfo *si
         assert(si);
         assert(m);
 
-        manager_flush_caches(m);
+        manager_flush_caches(m, LOG_INFO);
 
         return 0;
 }
@@ -594,9 +641,6 @@ int manager_new(Manager **ret) {
                 .read_resolv_conf = true,
                 .need_builtin_fallbacks = true,
                 .etc_hosts_last = USEC_INFINITY,
-                .etc_hosts_mtime = USEC_INFINITY,
-                .etc_hosts_ino = 0,
-                .etc_hosts_dev = 0,
                 .read_etc_hosts = true,
         };
 
@@ -643,6 +687,10 @@ int manager_new(Manager **ret) {
         if (r < 0)
                 return r;
 
+        r = manager_clock_change_listen(m);
+        if (r < 0)
+                return r;
+
         r = manager_connect_bus(m);
         if (r < 0)
                 return r;
@@ -710,6 +758,7 @@ Manager *manager_free(Manager *m) {
 
         sd_netlink_unref(m->rtnl);
         sd_event_source_unref(m->rtnl_event_source);
+        sd_event_source_unref(m->clock_change_event_source);
 
         manager_llmnr_stop(m);
         manager_mdns_stop(m);
@@ -919,7 +968,11 @@ static int write_loop(int fd, void *message, size_t length) {
 int manager_write(Manager *m, int fd, DnsPacket *p) {
         int r;
 
-        log_debug("Sending %s packet with id %" PRIu16 ".", DNS_PACKET_QR(p) ? "response" : "query", DNS_PACKET_ID(p));
+        log_debug("Sending %s%s packet with id %" PRIu16 " of size %zu.",
+                  DNS_PACKET_TC(p) ? "truncated (!) " : "",
+                  DNS_PACKET_QR(p) ? "response" : "query",
+                  DNS_PACKET_ID(p),
+                  p->size);
 
         r = write_loop(fd, DNS_PACKET_DATA(p), p->size);
         if (r < 0)
@@ -1055,7 +1108,12 @@ int manager_send(
         assert(port > 0);
         assert(p);
 
-        log_debug("Sending %s packet with id %" PRIu16 " on interface %i/%s.", DNS_PACKET_QR(p) ? "response" : "query", DNS_PACKET_ID(p), ifindex, af_to_name(family));
+        log_debug("Sending %s%s packet with id %" PRIu16 " on interface %i/%s of size %zu.",
+                  DNS_PACKET_TC(p) ? "truncated (!) " : "",
+                  DNS_PACKET_QR(p) ? "response" : "query",
+                  DNS_PACKET_ID(p),
+                  ifindex, af_to_name(family),
+                  p->size);
 
         if (family == AF_INET)
                 return manager_ipv4_send(m, fd, ifindex, &destination->in, port, source ? &source->in : NULL, p);
@@ -1418,21 +1476,21 @@ void manager_dnssec_verdict(Manager *m, DnssecVerdict verdict, const DnsResource
         m->n_dnssec_verdict[verdict]++;
 }
 
-bool manager_routable(Manager *m, int family) {
+bool manager_routable(Manager *m) {
         Link *l;
 
         assert(m);
 
-        /* Returns true if the host has at least one interface with a routable address of the specified type */
+        /* Returns true if the host has at least one interface with a routable address (regardless if IPv4 or IPv6) */
 
         HASHMAP_FOREACH(l, m->links)
-                if (link_relevant(l, family, false))
+                if (link_relevant(l, AF_UNSPEC, false))
                         return true;
 
         return false;
 }
 
-void manager_flush_caches(Manager *m) {
+void manager_flush_caches(Manager *m, int log_level) {
         DnsScope *scope;
 
         assert(m);
@@ -1440,7 +1498,7 @@ void manager_flush_caches(Manager *m) {
         LIST_FOREACH(scopes, scope, m->dns_scopes)
                 dns_cache_flush(&scope->cache);
 
-        log_info("Flushed all caches.");
+        log_full(log_level, "Flushed all caches.");
 }
 
 void manager_reset_server_features(Manager *m) {
index c30052195a6b0ad56f21b7f98033d10b865acd79..5471b20ff9741598d667458f65f62d6d960548db 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/stat.h>
@@ -39,6 +39,7 @@ struct Manager {
         DnssecMode dnssec_mode;
         DnsOverTlsMode dns_over_tls_mode;
         DnsCacheMode enable_cache;
+        bool cache_from_localhost;
         DnsStubListenerMode dns_stub_listener_mode;
 
 #if ENABLE_DNS_OVER_TLS
@@ -128,9 +129,8 @@ struct Manager {
 
         /* Data from /etc/hosts */
         EtcHosts etc_hosts;
-        usec_t etc_hosts_last, etc_hosts_mtime;
-        ino_t etc_hosts_ino;
-        dev_t etc_hosts_dev;
+        usec_t etc_hosts_last;
+        struct stat etc_hosts_stat;
         bool read_etc_hosts;
 
         OrderedSet *dns_extra_stub_listeners;
@@ -142,6 +142,8 @@ struct Manager {
         Hashmap *polkit_registry;
 
         VarlinkServer *varlink_server;
+
+        sd_event_source *clock_change_event_source;
 };
 
 /* Manager */
@@ -185,9 +187,9 @@ DnsOverTlsMode manager_get_dns_over_tls_mode(Manager *m);
 
 void manager_dnssec_verdict(Manager *m, DnssecVerdict verdict, const DnsResourceKey *key);
 
-bool manager_routable(Manager *m, int family);
+bool manager_routable(Manager *m);
 
-void manager_flush_caches(Manager *m);
+void manager_flush_caches(Manager *m, int log_level);
 void manager_reset_server_features(Manager *m);
 
 void manager_cleanup_saved_user(Manager *m);
index 921720febfedd63a5522f3a91eca38fb85c1ce4e..a09374719892a26fb575d2b05d3cd790cf18ec3e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <resolv.h>
 #include <netinet/in.h>
index 2f69478681594d8c7db425dac7c062b92a253f14..38ef1808dfb69769d21f70b0e12c4e516100116f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "resolved-manager.h"
index 40f1f32f0a8b01ca73f50fa88a7dafd7038b461e..33fc435a9a374f9a870e590cfdeacba9e7075771 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <resolv.h>
 #include <sys/stat.h>
@@ -156,6 +156,8 @@ int manager_read_resolv_conf(Manager *m) {
                         r = manager_parse_search_domains_and_warn(m, a);
                         if (r < 0)
                                 log_warning_errno(r, "Failed to parse search domain string '%s', ignoring.", a);
+
+                        continue;
                 }
 
                 log_syntax(NULL, LOG_DEBUG, "/etc/resolv.conf", n, 0, "Ignoring resolv.conf line: %s", l);
@@ -273,8 +275,8 @@ static int write_uplink_resolv_conf_contents(FILE *f, OrderedSet *dns, OrderedSe
         }
 
         if (ordered_set_isempty(domains))
-                fputs("search .", f); /* Make sure that if the local hostname is chosen as fqdn this does not
-                                       * imply a search domain */
+                fputs("search .\n", f); /* Make sure that if the local hostname is chosen as fqdn this does not
+                                         * imply a search domain */
         else
                 write_resolv_conf_search(domains, f);
 
@@ -302,8 +304,8 @@ static int write_stub_resolv_conf_contents(FILE *f, OrderedSet *dns, OrderedSet
               "options edns0 trust-ad\n", f);
 
         if (ordered_set_isempty(domains))
-                fputs("search .", f); /* Make sure that if the local hostname is chosen as fqdn this does not
-                                       * imply a search domain */
+                fputs("search .\n", f); /* Make sure that if the local hostname is chosen as fqdn this does not
+                                         * imply a search domain */
         else
                 write_resolv_conf_search(domains, f);
 
@@ -357,8 +359,9 @@ int manager_write_resolv_conf(Manager *m) {
                         goto fail;
                 }
 
-                if (rename(temp_path_stub, PRIVATE_STUB_RESOLV_CONF) < 0)
-                        r = log_error_errno(errno, "Failed to move new %s into place: %m", PRIVATE_STUB_RESOLV_CONF);
+                r = conservative_rename(AT_FDCWD, temp_path_stub, AT_FDCWD, PRIVATE_STUB_RESOLV_CONF);
+                if (r < 0)
+                        log_error_errno(r, "Failed to move new %s into place: %m", PRIVATE_STUB_RESOLV_CONF);
 
         } else {
                 r = symlink_atomic(basename(PRIVATE_UPLINK_RESOLV_CONF), PRIVATE_STUB_RESOLV_CONF);
@@ -366,8 +369,9 @@ int manager_write_resolv_conf(Manager *m) {
                         log_error_errno(r, "Failed to symlink %s: %m", PRIVATE_STUB_RESOLV_CONF);
         }
 
-        if (rename(temp_path_uplink, PRIVATE_UPLINK_RESOLV_CONF) < 0)
-                r = log_error_errno(errno, "Failed to move new %s into place: %m", PRIVATE_UPLINK_RESOLV_CONF);
+        r = conservative_rename(AT_FDCWD, temp_path_uplink, AT_FDCWD, PRIVATE_UPLINK_RESOLV_CONF);
+        if (r < 0)
+                log_error_errno(r, "Failed to move new %s into place: %m", PRIVATE_UPLINK_RESOLV_CONF);
 
  fail:
         if (r < 0) {
index 584d25c0f7cf729cfe3d9ec40f31ab0a17e51c77..3734e28a99702082890ead8f7bd7476f30520af8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "resolved-manager.h"
index 2f11a780911d5882dade7361817b8de964b38660..70d6f9056d5aa46a7c08ca919699a7d2093a037d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "in-addr-util.h"
 #include "resolved-dns-synthesize.h"
index cfb90e5e5ec3f9016f7517df41a046b00c1972c4..57fdfe909bd9943b7e056eac6415b5b7e0c7036f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "resolved-manager.h"
index 16477f28d69e73d30638689a81a76f254ab6c639..4c42b6591d03809965d8651ceb4f44c4bf7d75b7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -58,7 +58,7 @@ static int run(int argc, char *argv[]) {
                 if (r < 0)
                         return log_error_errno(r, "Could not create runtime directory: %m");
 
-                /* Drop privileges, but keep three caps. Note that we drop those too, later on (see below) */
+                /* Drop privileges, but keep three caps. Note that we drop two of those too, later on (see below) */
                 r = drop_privileges(uid, gid,
                                     (UINT64_C(1) << CAP_NET_RAW)|          /* needed for SO_BINDTODEVICE */
                                     (UINT64_C(1) << CAP_NET_BIND_SERVICE)| /* needed to bind on port 53 */
@@ -83,7 +83,7 @@ static int run(int argc, char *argv[]) {
         (void) manager_check_resolv_conf(m);
 
         /* Let's drop the remaining caps now */
-        r = capability_bounding_set_drop(0, true);
+        r = capability_bounding_set_drop((UINT64_C(1) << CAP_NET_RAW), true);
         if (r < 0)
                 return log_error_errno(r, "Failed to drop remaining caps: %m");
 
index 514021792fc65b0a48a2a726f93df94517547d80..e1d06c0fb19067290b4fbbc3fb2a7e41bf76d72a 100644 (file)
@@ -24,6 +24,8 @@
 #MulticastDNS=@DEFAULT_MDNS_MODE@
 #LLMNR=@DEFAULT_LLMNR_MODE@
 #Cache=yes
+#CacheFromLocalhost=no
 #DNSStubListener=yes
+#DNSStubListenerExtra=
 #ReadEtcHosts=yes
 #ResolveUnicastSingleLabel=no
index bdd96aa9a20241055f6fd0515714a8d10ddc9c39..47c7d671cd3733fb2795d1c510eb417b5558866d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 
index ccd62a14d119f2611d0837c44109b38669e657b3..e21eb86756987ca85c37402ff06501b92f9c6b4c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/ip.h>
 
index 213177d4da646bcd9f9236ece374009e537835ef..0275d0eb948bf8b09f13cf4666f594c4c50367c3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <arpa/inet.h>
 #if HAVE_GCRYPT
index 2230a66ef5e21397adda728afe8ef125e9bfd4f6..e4f4e14cc308c3f445daf4d6ec52326ea134baa8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "dns-type.h"
 #include "resolved-dns-dnssec.h"
index 721bf8732ef620461eb94a9525752af2df2027c2..045952e825d4a1cc2ff24c631e12136552f34999 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <arpa/inet.h>
 #include <netinet/in.h>
index c9a511beba9ea6c8f9e2bb3c9b60b64f53c548fb..cd93b1c23de6da65b59ee1289eff639b7d129eac 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "log.h"
 #include "resolved-dns-packet.h"
index 501982819aa2e9d967b5fefabdca2964c5031dff..c38716842b2f1099954fad50019195161a555b7e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <linux/rfkill.h>
index a149b9c9c298e052e81021e3747356331b1b85bb..11e7d9e83103ea22f4ed13a934fed8708e2ecb66 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
index 41796243131afac004b4564a0b7b4577ac1aff38..b4cc6fe7f84076f8bee1869074316c9af67c50ad 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 #include <stdio.h>
index 7a2767c37b33e66727b216b7e33095188b4fdf9e..ef4b88361f29bf14d62f85dee9e4c583670d2aae 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdbool.h>
index b6a6f480f800ffbaa1ff9bdc214680cf3f9c5397..837e8699ee950a5e629b887693340f6eb1b92518 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <errno.h>
index 38c464c912a53e4f2c76ed7b37ce169d4f95930b..11244537991e60c57c0eb956a258da6e113a50be 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 8d288937efb30085980ceadcec4b6707c50f0853..9eef92bc35b0ef5d084fde63d88b8a74e4d08537 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <time-util.h>
index c4a4b04d22c5175d52d2d1278a23b7d0939e2be5..68e1c557c0c846a9d332f8698b3074b5f0484e00 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stddef.h>
 
index 7fbaf90dcc821cc49af73b07816c9f090aed76f5..8007aeb6957a4c96875acf0a993a2766854ce27f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index a727b98e7c67dd66a6c72f8391e75aeba9661e6d..eea1434be991fa634e80117e4313e343edd19bbf 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -334,9 +334,6 @@ int ask_password_plymouth(
 
                 p += k;
 
-                if (p < 1)
-                        continue;
-
                 if (buffer[0] == 5) {
 
                         if (flags & ASK_PASSWORD_ACCEPT_CACHED) {
index 528e3d01976ca1364ad4251473df922e30df03a7..7aac5e597608208bb9923e532125b14c13bedf30 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 80b597b5cadda9b94bea9daa463d7d04244d25ca..9c93d61a3c3d6106e11e23812eccd83337e6a8c3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 0eb3d2792e0961c8d8cffc3056558e49c1f93808..b11dce4fc0b48f111f80fd68dccf6f98cb7d4ece 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 657407da2d3794661f96cbf71c00f8f919f154f9..1d054090863e68ed4fee2fd2b9c86ec417e270f1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 39d970811d0d6217ec5a217404f2e82326b19848..a33975f3b5b36164282528540887797884c927ef 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/types.h>
index 0229726b42d59abd8f381dc5809c3a20e87460fb..724d7f27d999ac2324f3af808aae84b568ce0900 100644 (file)
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
 #include <sys/stat.h>
 #include <sys/statvfs.h>
 #include <sys/vfs.h>
index 70feaad31418eb1d6abcb8fe1052ae3338d7a031..2f008d12ffe3d1aa18592a4ddcb0a5a7ac8e5fe8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int disable_binfmt(void);
index 2eba72dd59fc4b1602cada712ae189f7bc530855..5d450c8832e94eec65f83a04d14c59b46fbd69ce 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stddef.h>
index 312cee9ce78321bd97e072af4939d0e206aad0cf..1c305a2c4124dda78bdecd8590b5e9d931f91b10 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index eb07a88ba98ee67091d9777594311d08a343078b..3f38e9b3089abde8383d23119c9cf47439ae778b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #if HAVE_BLKID
index 2296ecd9def0e0cb234d2936941f55d9ac104af5..e04b201155bd34130b6592c49755b9cfdf17e430 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bond-util.h"
 #include "string-table.h"
index 66f86e77fa00b77814871d0d9a950ba849b15ca5..a8f9ecb4547015bd0e6bb284a83059d7ad42af89 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <netinet/in.h>
index 4ce146033d5227e1feea42c55bbb7b93ac13f56a..8786e89c0eeda16bd3e90a87a300733c0bd1baa6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "acpi-fpdt.h"
 #include "boot-timestamps.h"
index 4e648f18e2843bf76effeb203239a968984444c5..55b7ad19aa7c96aea619c99bdb27c90294014650 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <time-util.h>
index 565979e5cfc60a2d69009ce19496f4acbf101d1b..e50408ab53bb308113b47ae45e0ffe4748c1a6ac 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 #include <linux/magic.h>
@@ -80,7 +80,7 @@ static int boot_entry_load(
                 return log_oom();
 
         if (!efi_loader_entry_name_valid(tmp.id))
-                return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid loader entry: %s", tmp.id);
+                return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid loader entry name: %s", tmp.id);
 
         tmp.path = strdup(path);
         if (!tmp.path)
@@ -327,7 +327,7 @@ static int boot_entry_load_unified(
                 return log_oom();
 
         if (!efi_loader_entry_name_valid(tmp.id))
-                return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid loader entry: %s", tmp.id);
+                return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid loader entry name: %s", tmp.id);
 
         tmp.path = strdup(path);
         if (!tmp.path)
index 1075a41d54151d70a237a67eca524020fd796ed3..1557bd0680927f08409b2f2d33813c3ac0480a65 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #pragma once
 
index e5c9df400429ed15d4607d35b938a2f236f5f3db..067f26d2f0b091dab5c59f4093f1cbcd52b89511 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/stat.h>
@@ -8,7 +8,6 @@
 #include "alloc-util.h"
 #include "bpf-program.h"
 #include "fd-util.h"
-#include "log.h"
 #include "memory-util.h"
 #include "missing_syscall.h"
 #include "path-util.h"
@@ -18,7 +17,7 @@ int bpf_program_new(uint32_t prog_type, BPFProgram **ret) {
 
         p = new0(BPFProgram, 1);
         if (!p)
-                return log_oom();
+                return -ENOMEM;
 
         p->n_ref = 1;
         p->prog_type = prog_type;
index a21589eb1f63a12c46b6946da424547b11f56379..eef77f9d8e1a6dde7c7be9bf836ce8f9eabc3998 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <linux/bpf.h>
index 83a94ef104e0b960e9bc3550ca9753faad970aa3..e1a8bcb6802013063648d7ed006fbd8091cdb672 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bridge-util.h"
 #include "string-table.h"
index 5b1c3e9ea9237720a00f187e058f5c375cba0b25..c9b02d822f87fb042210eb3cab460e611b5a77a9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <netinet/in.h>
index 8ad4694046607ac719afe31c5058d9805925a6b1..32f68d5e6a869fa9ff5a81f3e32d5f4d4a83cdbc 100644 (file)
@@ -1,7 +1,8 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-get-properties.h"
 #include "rlimit-util.h"
+#include "stdio-util.h"
 #include "string-util.h"
 
 int bus_property_get_bool(
@@ -54,6 +55,23 @@ int bus_property_get_id128(
                 return sd_bus_message_append_array(reply, 'y', id->bytes, 16);
 }
 
+int bus_property_get_percent(
+                sd_bus *bus,
+                const char *path,
+                const char *interface,
+                const char *property,
+                sd_bus_message *reply,
+                void *userdata,
+                sd_bus_error *error) {
+
+        char pstr[DECIMAL_STR_MAX(int) + 2];
+        int p = *(int*) userdata;
+
+        xsprintf(pstr, "%d%%", p);
+
+        return sd_bus_message_append_basic(reply, 's', pstr);
+}
+
 #if __SIZEOF_SIZE_T__ != 8
 int bus_property_get_size(
                 sd_bus *bus,
index 81af74309d965699c237214c3df09254cb84a3c5..9832c0d067f224bd3026950a029bacc32b8ff9ca 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
@@ -8,6 +8,7 @@
 int bus_property_get_bool(sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *error);
 int bus_property_set_bool(sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *value, void *userdata, sd_bus_error *error);
 int bus_property_get_id128(sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *error);
+int bus_property_get_percent(sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *error);
 
 #define bus_property_get_usec ((sd_bus_property_get_t) NULL)
 #define bus_property_set_usec ((sd_bus_property_set_t) NULL)
index 2a5aa7467717039b246ea684eb877db01b6bfffc..3754d1dd68c88bac49f31f5a1890ce1d85b12bf9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-locator.h"
 #include "macro.h"
index 2b892360b8c73960012287c593200111dc1109dd..fe3b8765279312d25d234f06f30049ed5a4d675d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 7c487ada9fadb1d5f7513f87de9a379e54444d74..06e6697a3301a044c53ac4fc1fb3296eecafc7ba 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "bus-get-properties.h"
index 64eaa540f478f3e2ba84a8b6fb24f1a9705d76a8..85f60a7a2f0e2b98c396d913f884b82320ccb99e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index ab393c395204c904642b29c78d14c8a45ca2bd96..84608567aa69b0ed0eacfe0023a8564e4d7bbce8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-map-properties.h"
 #include "alloc-util.h"
@@ -25,6 +25,23 @@ int bus_map_id128(sd_bus *bus, const char *member, sd_bus_message *m, sd_bus_err
         return 0;
 }
 
+int bus_map_strv_sort(sd_bus *bus, const char *member, sd_bus_message *m, sd_bus_error *error, void *userdata) {
+        _cleanup_strv_free_ char **l = NULL;
+        char ***p = userdata;
+        int r;
+
+        r = bus_message_read_strv_extend(m, &l);
+        if (r < 0)
+                return r;
+
+        r = strv_extend_strv(p, l, false);
+        if (r < 0)
+                return r;
+
+        strv_sort(*p);
+        return 0;
+}
+
 static int map_basic(sd_bus *bus, const char *member, sd_bus_message *m, unsigned flags, sd_bus_error *error, void *userdata) {
         char type;
         int r;
index 11b899227b2f0895a85fc97c8596332f821eb661..2a766e3cc0280d1eb870d7353f794a525843ffda 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
@@ -18,6 +18,7 @@ enum {
 };
 
 int bus_map_id128(sd_bus *bus, const char *member, sd_bus_message *m, sd_bus_error *error, void *userdata);
+int bus_map_strv_sort(sd_bus *bus, const char *member, sd_bus_message *m, sd_bus_error *error, void *userdata);
 
 int bus_message_map_all_properties(sd_bus_message *m, const struct bus_properties_map *map, unsigned flags, sd_bus_error *error, void *userdata);
 int bus_map_all_properties(sd_bus *bus, const char *destination, const char *path, const struct bus_properties_map *map,
index 85e1e98e19aa95c9f20550f2aad5ab492f41ccc6..19500a552d7ef9b6d2ec3c5a09949f75f5eba32e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-message-util.h"
 
index 98ad035ee47da9b2dfc1bf4dcacd1f0eb50203f1..b82c0830a0718ecf51c4c2411676bae55c91585b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 217d43d333a3ebe6c1cf0c49567753015382b864..f2e53913fbfcaf96547b187562570330c44cd48f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-introspect.h"
 #include "bus-object.h"
index 8add854e59f1163a06be6bfb7666408eaba5954f..145bbd268f588158071cf87dddc0b4946063a889 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 0722b1a118b25864ccf10ffb7329bec80efb2f05..14122e0876a6bc6ecf46d51e0e58a652df174562 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-internal.h"
 #include "bus-message.h"
index 29b392304727c64724ba9a70e73648527b7d388f..91a88a28079b9a341a4cfa64d014f31170b19b75 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index bf7d050fa3970bfb6bfdea168315d8bde608dd79..4cea25073d1a78741e60547007921e1edb8c3b78 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-print-properties.h"
 #include "cap-list.h"
index 1c21dff2c83a68158e64d6579dcc823bc2cc3cde..a4574758e5522a50886e9e880a8af4032a0f9509 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 5ae54efb1948d0819e00513c91b8a7c9cb00eb93..3e97be9671566012f5a1df84cdba7cc67137fbc1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-unit-procs.h"
 #include "hashmap.h"
index 1cb5ca6271eb73b55c840df04af9093dfef371ab..78c55697aea4709592ebb46af9decacfbbfb10a5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 6fe6131292dceee15ff159948396a5814fa25b12..2bab2299fbe2b58c3db6fb8f8f726dc02c7b5f3a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "bus-error.h"
@@ -432,7 +432,11 @@ static int bus_append_ip_address_access(sd_bus_message *m, int family, const uni
 static int bus_append_cgroup_property(sd_bus_message *m, const char *field, const char *eq) {
         int r;
 
-        if (STR_IN_SET(field, "DevicePolicy", "Slice"))
+        if (STR_IN_SET(field, "DevicePolicy",
+                              "Slice",
+                              "ManagedOOMSwap",
+                              "ManagedOOMMemoryPressure",
+                              "ManagedOOMMemoryPressureLimitPercent"))
                 return bus_append_string(m, field, eq);
 
         if (STR_IN_SET(field, "CPUAccounting",
@@ -2033,7 +2037,8 @@ static int bus_append_socket_property(sd_bus_message *m, const char *field, cons
                               "BindIPv6Only",
                               "FileDescriptorName",
                               "SocketUser",
-                              "SocketGroup"))
+                              "SocketGroup",
+                              "Timestamping"))
                 return bus_append_string(m, field, eq);
 
         if (streq(field, "Symlinks"))
@@ -2069,7 +2074,8 @@ static int bus_append_timer_property(sd_bus_message *m, const char *field, const
                               "RemainAfterElapse",
                               "Persistent",
                               "OnTimezoneChange",
-                              "OnClockChange"))
+                              "OnClockChange",
+                              "FixedRandomDelay"))
                 return bus_append_parse_boolean(m, field, eq);
 
         if (STR_IN_SET(field, "AccuracySec",
index 544767b0336eb99e1439ccc812963eb18e11ae8a..999caf65cd3087f0f9b09876e2ef475b6b4547a9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index aa5dadba45573f780113b0705eabf027ac553d9f..fbda218b3b335b43d0848a376eab0199a13ac9a9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 9b86f9526e0c1b0049e5680c44561b7de7043288..a02d82a52ea1d923fdc2c315b289d25e9872c48f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
@@ -38,13 +38,19 @@ int bus_connect_user_systemd(sd_bus **_bus);
 int bus_connect_transport(BusTransport transport, const char *host, bool user, sd_bus **bus);
 int bus_connect_transport_systemd(BusTransport transport, const char *host, bool user, sd_bus **bus);
 
-#define bus_log_connect_error(r) \
-        log_error_errno(r, "Failed to create bus connection: %m")
+#define bus_log_address_error(r)                                        \
+        log_error_errno(r,                                              \
+                r == -ENOMEDIUM ? "Failed to set bus address: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined" : \
+                                  "Failed to set bus address: %m")
+#define bus_log_connect_error(r)                                        \
+        log_error_errno(r,                                              \
+                r == -ENOMEDIUM ? "Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined" : \
+                                  "Failed to connect to bus: %m")
 
-#define bus_log_parse_error(r) \
+#define bus_log_parse_error(r)                                  \
         log_error_errno(r, "Failed to parse bus message: %m")
 
-#define bus_log_create_error(r) \
+#define bus_log_create_error(r)                                 \
         log_error_errno(r, "Failed to create bus message: %m")
 
 int bus_path_encode_unique(sd_bus *b, const char *prefix, const char *sender_id, const char *external_id, char **ret_path);
index eb33ba23400d11d639d713c9c7f82c5ce102eeb3..b2a9e031ce749be127e44ba869c36acdf579cbae 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "bus-wait-for-jobs.h"
index 614a2c9de95445037a7069ec22258e0f7a5ec656..0155887455d927d7ee152f4e3761ee707f83c673 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 7592dcf18d2d29f0463990502820e45f095e9b66..4f1c505bd3f1bae01b165d45c03f01b7f080fcd6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-map-properties.h"
 #include "bus-wait-for-units.h"
index a20f3d8fd7ffba67e1024635ff38d692b7209559..f7ab666f15bc07473293357a03c8cf3e4cf63ad5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "macro.h"
index bcc51f973c9054d5a3019fab07b11e527486d296..7162592fbf7d00b7efd126b432097f8239872d69 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <ctype.h>
 #include <errno.h>
index 0a5d95b4b1299d36a56d6297a37612081725ed98..3bfe82d7f60c0173d218d172a8cb3c997ff1fe32 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /* A structure for specifying (possibly repetitive) points in calendar
index e9995645eb4a435b58232976f3073a07ec3cd6e7..f197f715c7927f31c89aeb9d9bcdb5bccab99664 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <ftw.h>
 #include <unistd.h>
index 43ce32e30d36fa0a2ef3433641c5b71da4b3f9f2..7eabce24512dedf101c27545d4a39b4946579133 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index b8bf3c27264295ac2142e072fec4f5daa126f1bf..f7c24f88604a59937b264f21ae5dcdb438a7f054 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <dirent.h>
 #include <errno.h>
index dfb26f82910f82e2f45298c4953301263f994a7f..fbbf7663b32a16ce9fe9ccf401a049e551999123 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index cb75d9a11bdf453bd06d5360837626040043fd03..4563729b7c9c03023ff6eb3cf8d6d8e42b7c5293 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/stat.h>
index 14a79733f531e1b4b7a79161ade98e9700d99db6..00038c3b3250e814b3088a36037dc5a4946ad31f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/types.h>
index e4cd2d30d0a34748e5075989072deae94c36cc8a..77fe227e36f8d5f0e625331bc39792dedd73e60d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -218,7 +218,7 @@ static int clean_sysvipc_msg(uid_t delete_uid, gid_t delete_gid, bool rm) {
         return ret;
 }
 
-static int clean_posix_shm_internal(DIR *dir, uid_t uid, gid_t gid, bool rm) {
+static int clean_posix_shm_internal(const char *dirname, DIR *dir, uid_t uid, gid_t gid, bool rm) {
         struct dirent *de;
         int ret = 0, r;
 
@@ -234,7 +234,8 @@ static int clean_posix_shm_internal(DIR *dir, uid_t uid, gid_t gid, bool rm) {
                         if (errno == ENOENT)
                                 continue;
 
-                        ret = log_warning_errno(errno, "Failed to stat() POSIX shared memory segment %s: %m", de->d_name);
+                        ret = log_warning_errno(errno, "Failed to stat() POSIX shared memory segment %s/%s: %m",
+                                                dirname, de->d_name);
                         continue;
                 }
 
@@ -244,9 +245,10 @@ static int clean_posix_shm_internal(DIR *dir, uid_t uid, gid_t gid, bool rm) {
                         kid = xopendirat(dirfd(dir), de->d_name, O_NOFOLLOW|O_NOATIME);
                         if (!kid) {
                                 if (errno != ENOENT)
-                                        ret = log_warning_errno(errno, "Failed to enter shared memory directory %s: %m", de->d_name);
+                                        ret = log_warning_errno(errno, "Failed to enter shared memory directory %s/%s: %m",
+                                                                dirname, de->d_name);
                         } else {
-                                r = clean_posix_shm_internal(kid, uid, gid, rm);
+                                r = clean_posix_shm_internal(de->d_name, kid, uid, gid, rm);
                                 if (r < 0)
                                         ret = r;
                         }
@@ -262,7 +264,8 @@ static int clean_posix_shm_internal(DIR *dir, uid_t uid, gid_t gid, bool rm) {
                                 if (errno == ENOENT)
                                         continue;
 
-                                ret = log_warning_errno(errno, "Failed to remove POSIX shared memory directory %s: %m", de->d_name);
+                                ret = log_warning_errno(errno, "Failed to remove POSIX shared memory directory %s/%s: %m",
+                                                        dirname, de->d_name);
                         } else {
                                 log_debug("Removed POSIX shared memory directory %s", de->d_name);
                                 if (ret == 0)
@@ -307,7 +310,7 @@ static int clean_posix_shm(uid_t uid, gid_t gid, bool rm) {
                 return log_warning_errno(errno, "Failed to open /dev/shm: %m");
         }
 
-        return clean_posix_shm_internal(dir, uid, gid, rm);
+        return clean_posix_shm_internal("/dev/shm", dir, uid, gid, rm);
 }
 
 static int clean_posix_mq(uid_t uid, gid_t gid, bool rm) {
index eaff47d4b783476bc60059e64a48c80359a2348e..ed348fb6014c0a81f7b41d16638e253d3f8afe19 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/types.h>
index 0f0dd8281ca6fcdea3098a5ac1c4e722715bd307..2caa70fa52bfd6cd79d30e2c995e6e3afbaff768 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -151,9 +151,9 @@ int clock_apply_epoch(void) {
 
         if (stat(EPOCH_FILE, &st) < 0) {
                 if (errno != ENOENT)
-                        log_warning_errno(errno, "Cannot stat %s: %m\n", EPOCH_FILE);
+                        log_warning_errno(errno, "Cannot stat " EPOCH_FILE ": %m");
 
-                epoch_usec = ((usec_t) TIME_EPOCH * USEC_PER_SEC);
+                epoch_usec = (usec_t) TIME_EPOCH * USEC_PER_SEC;
         } else
                 epoch_usec = timespec_load(&st.st_mtim);
 
index b9db54eac9d27cdbf8847ae47bc4d57fce3a6bb3..3f1ae7abfc68cf88f055d6f65629375fb030c244 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <time.h>
index af5d48f55be313adf19af3e43446f951b8f4db4c..b2ec690bc3beead7088de60ff922c40bb508a2c5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index e5ad43f945b5295130e258c9608bacd9a13fdce1..0d9754eb85cbac7d261d12aa2abf682968f4c9c4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 02a27e3a88695bd12d367694cb817462e389d032..e8b3dc78f910d5e0a1811f89a79d6d552824e9b3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <limits.h>
@@ -11,6 +11,7 @@
 #include "conf-files.h"
 #include "conf-parser.h"
 #include "def.h"
+#include "ether-addr-util.h"
 #include "extract-word.h"
 #include "fd-util.h"
 #include "fileio.h"
@@ -24,6 +25,7 @@
 #include "process-util.h"
 #include "rlimit-util.h"
 #include "sd-id128.h"
+#include "set.h"
 #include "signal-util.h"
 #include "socket-util.h"
 #include "string-util.h"
@@ -251,15 +253,16 @@ static int parse_line(
 }
 
 /* Go through the file and parse each line */
-int config_parse(const char *unit,
-                 const char *filename,
-                 FILE *f,
-                 const char *sections,
-                 ConfigItemLookup lookup,
-                 const void *table,
-                 ConfigParseFlags flags,
-                 void *userdata,
-                 usec_t *ret_mtime) {
+int config_parse(
+                const char *unit,
+                const char *filename,
+                FILE *f,
+                const char *sections,
+                ConfigItemLookup lookup,
+                const void *table,
+                ConfigParseFlags flags,
+                void *userdata,
+                usec_t *ret_mtime) {
 
         _cleanup_free_ char *section = NULL, *continuation = NULL;
         _cleanup_fclose_ FILE *ours = NULL;
@@ -522,16 +525,17 @@ DEFINE_PARSER(sec, usec_t, parse_sec);
 DEFINE_PARSER(sec_def_infinity, usec_t, parse_sec_def_infinity);
 DEFINE_PARSER(mode, mode_t, parse_mode);
 
-int config_parse_iec_size(const char* unit,
-                            const char *filename,
-                            unsigned line,
-                            const char *section,
-                            unsigned section_line,
-                            const char *lvalue,
-                            int ltype,
-                            const char *rvalue,
-                            void *data,
-                            void *userdata) {
+int config_parse_iec_size(
+                const char* unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
 
         size_t *sz = data;
         uint64_t v;
@@ -608,16 +612,17 @@ int config_parse_iec_uint64(
         return 0;
 }
 
-int config_parse_bool(const char* unit,
-                      const char *filename,
-                      unsigned line,
-                      const char *section,
-                      unsigned section_line,
-                      const char *lvalue,
-                      int ltype,
-                      const char *rvalue,
-                      void *data,
-                      void *userdata) {
+int config_parse_bool(
+                const char* unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
 
         int k;
         bool *b = data;
@@ -1181,16 +1186,17 @@ int config_parse_rlimit(
         return 0;
 }
 
-int config_parse_permille(const char* unit,
-                          const char *filename,
-                          unsigned line,
-                          const char *section,
-                          unsigned section_line,
-                          const char *lvalue,
-                          int ltype,
-                          const char *rvalue,
-                          void *data,
-                          void *userdata) {
+int config_parse_permille(
+                const char* unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
 
         unsigned *permille = data;
         int r;
@@ -1212,17 +1218,20 @@ int config_parse_permille(const char* unit,
         return 0;
 }
 
-int config_parse_vlanprotocol(const char* unit,
-                              const char *filename,
-                              unsigned line,
-                              const char *section,
-                              unsigned section_line,
-                              const char *lvalue,
-                              int ltype,
-                              const char *rvalue,
-                              void *data,
-                              void *userdata) {
+int config_parse_vlanprotocol(
+                const char* unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
+
         int *vlan_protocol = data;
+
         assert(filename);
         assert(lvalue);
 
@@ -1243,3 +1252,107 @@ int config_parse_vlanprotocol(const char* unit,
 
         return 0;
 }
+
+int config_parse_hwaddr(
+                const char *unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
+
+        _cleanup_free_ struct ether_addr *n = NULL;
+        struct ether_addr **hwaddr = data;
+        int r;
+
+        assert(filename);
+        assert(lvalue);
+        assert(rvalue);
+        assert(data);
+
+        if (isempty(rvalue)) {
+                *hwaddr = mfree(*hwaddr);
+                return 0;
+        }
+
+        n = new0(struct ether_addr, 1);
+        if (!n)
+                return log_oom();
+
+        r = ether_addr_from_string(rvalue, n);
+        if (r < 0) {
+                log_syntax(unit, LOG_WARNING, filename, line, r,
+                           "Not a valid MAC address, ignoring assignment: %s", rvalue);
+                return 0;
+        }
+
+        free_and_replace(*hwaddr, n);
+
+        return 0;
+}
+
+int config_parse_hwaddrs(
+                const char *unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
+
+        Set **hwaddrs = data;
+        int r;
+
+        assert(filename);
+        assert(lvalue);
+        assert(rvalue);
+        assert(data);
+
+        if (isempty(rvalue)) {
+                /* Empty assignment resets the list */
+                *hwaddrs = set_free_free(*hwaddrs);
+                return 0;
+        }
+
+        for (const char *p = rvalue;;) {
+                _cleanup_free_ char *word = NULL;
+                _cleanup_free_ struct ether_addr *n = NULL;
+
+                r = extract_first_word(&p, &word, NULL, 0);
+                if (r == 0)
+                        return 0;
+                if (r == -ENOMEM)
+                        return log_oom();
+                if (r < 0) {
+                        log_syntax(unit, LOG_WARNING, filename, line, r,
+                                   "Invalid syntax, ignoring: %s", rvalue);
+                        return 0;
+                }
+
+                n = new(struct ether_addr, 1);
+                if (!n)
+                        return log_oom();
+
+                r = ether_addr_from_string(word, n);
+                if (r < 0) {
+                        log_syntax(unit, LOG_WARNING, filename, line, r,
+                                   "Not a valid MAC address, ignoring: %s", word);
+                        continue;
+                }
+
+                r = set_ensure_put(hwaddrs, &ether_addr_hash_ops, n);
+                if (r < 0)
+                        return log_oom();
+                if (r > 0)
+                        TAKE_PTR(n); /* avoid cleanup */
+        }
+}
+
+DEFINE_CONFIG_PARSE(config_parse_percent, parse_percent, "Failed to parse percent value");
index 57787ea033b7644d0b5a5a086d7770c9df083467..b19482193701bd1eca7c36b9c227325ef2d9a269 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <errno.h>
@@ -35,7 +35,7 @@ typedef enum ConfigParseFlags {
 /* Prototype for a parser for a specific configuration setting */
 typedef int (*ConfigParserCallback)(CONFIG_PARSER_ARGUMENTS);
 
-/* A macro declaring the a function prototype, following the typedef above, simply because it's so cumbersomely long
+/* A macro declaring a function prototype, following the typedef above, simply because it's so cumbersomely long
  * otherwise. (And current emacs gets irritatingly slow when editing files that contain lots of very long function
  * prototypes on the same screen…) */
 #define CONFIG_PARSER_PROTOTYPE(name) int name(CONFIG_PARSER_ARGUMENTS)
@@ -147,6 +147,9 @@ CONFIG_PARSER_PROTOTYPE(config_parse_ip_port);
 CONFIG_PARSER_PROTOTYPE(config_parse_mtu);
 CONFIG_PARSER_PROTOTYPE(config_parse_rlimit);
 CONFIG_PARSER_PROTOTYPE(config_parse_vlanprotocol);
+CONFIG_PARSER_PROTOTYPE(config_parse_hwaddr);
+CONFIG_PARSER_PROTOTYPE(config_parse_hwaddrs);
+CONFIG_PARSER_PROTOTYPE(config_parse_percent);
 
 typedef enum Disabled {
         DISABLED_CONFIGURATION,
@@ -192,7 +195,7 @@ typedef enum Disabled {
                 return 0;                                               \
         }
 
-#define DEFINE_CONFIG_PARSE_ENUM(function, name, type, msg)             \
+#define DEFINE_CONFIG_PARSE_ENUM_FULL(function, from_string, type, msg) \
         CONFIG_PARSER_PROTOTYPE(function) {                             \
                 type *i = data, x;                                      \
                                                                         \
@@ -201,7 +204,7 @@ typedef enum Disabled {
                 assert(rvalue);                                         \
                 assert(data);                                           \
                                                                         \
-                x = name##_from_string(rvalue);                         \
+                x = from_string(rvalue);                                \
                 if (x < 0) {                                            \
                         log_syntax(unit, LOG_WARNING, filename, line, 0, \
                                    msg ", ignoring: %s", rvalue);       \
@@ -212,6 +215,9 @@ typedef enum Disabled {
                 return 0;                                               \
         }
 
+#define DEFINE_CONFIG_PARSE_ENUM(function, name, type, msg)             \
+        DEFINE_CONFIG_PARSE_ENUM_FULL(function, name##_from_string, type, msg)
+
 #define DEFINE_CONFIG_PARSE_ENUM_WITH_DEFAULT(function, name, type, default_value, msg) \
         CONFIG_PARSER_PROTOTYPE(function) {                             \
                 type *i = data, x;                                      \
index 67897414bc1978f7c099ea72189857d5081df412..a0b648bf791887c116c957bd0efe0e9964e6a380 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "coredump-util.h"
 #include "extract-word.h"
index ff2e511bf17aea7a29e4b02253fc7b6f80b8d82c..a7f3c0e86c838bb7c266b8ba26edaac8ebf7e352 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "macro.h"
index 8779d1d4d306a7af1389405a6a273ac4b01fde9f..2c3b5bb034340cef1bcf09c91f092cdf3e9076a3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stddef.h>
index 9ec83f69302e68af2ad2a90244d23de8bc74bd98..3c63a5882616fe2d571ab981d644325344a9320f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sched.h>
index 9d86478b06b07a3f523ce5d0adb464fc8d8414ec..34a078e7e77e571c42266e6dfd7478935e358f1a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if HAVE_LIBCRYPTSETUP
 #include "alloc-util.h"
index 046953b8ccd94f38321e5bf78f3579111c509efa..b96ffc74e3b59886635d7e3d65097d35054e36a6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "macro.h"
index 5e9eca1d9e73907cd4a786bcd6db96ddc6f13d79..585e4894a01365459792e54e2d41a45280e5f41f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
@@ -17,6 +17,6 @@ static inline const char *notify_start(const char *start, const char *stop) {
 
 /* This is intended to be used with _cleanup_ attribute. */
 static inline void notify_on_cleanup(const char **p) {
-        if (p)
+        if (*p)
                 (void) sd_notify(false, *p);
 }
index d97064099325c835d0efad2ec19e4143deefff60..b788b06913dd90fe5b229fbc06019b8ca0d7570d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdlib.h>
index 437c0e96e65289cae26243b1b22740980b9105dd..92ba6cf76403346dc55a8da9c50a158f4fb6791f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/types.h>
index 91120d72194f490dcc6c51542937e8e0d9d643ef..c2c46e1816fb79f1403032c29fc436ea506b1af5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if HAVE_VALGRIND_MEMCHECK_H
 #include <valgrind/memcheck.h>
@@ -109,172 +109,240 @@ not_found:
 }
 
 #if HAVE_BLKID
-/* Detect RPMB and Boot partitions, which are not listed by blkid.
- * See https://github.com/systemd/systemd/issues/5806. */
-static bool device_is_mmc_special_partition(sd_device *d) {
-        const char *sysname;
+static int enumerator_for_parent(sd_device *d, sd_device_enumerator **ret) {
+        _cleanup_(sd_device_enumerator_unrefp) sd_device_enumerator *e = NULL;
+        int r;
 
         assert(d);
+        assert(ret);
 
-        if (sd_device_get_sysname(d, &sysname) < 0)
-                return false;
+        r = sd_device_enumerator_new(&e);
+        if (r < 0)
+                return r;
 
-        return startswith(sysname, "mmcblk") &&
-                (endswith(sysname, "rpmb") || endswith(sysname, "boot0") || endswith(sysname, "boot1"));
+        r = sd_device_enumerator_allow_uninitialized(e);
+        if (r < 0)
+                return r;
+
+        r = sd_device_enumerator_add_match_parent(e, d);
+        if (r < 0)
+                return r;
+
+        *ret = TAKE_PTR(e);
+        return 0;
 }
 
-static bool device_is_block(sd_device *d) {
-        const char *ss;
+static int device_is_partition(sd_device *d, blkid_partition pp) {
+        blkid_loff_t bsize, bstart;
+        uint64_t size, start;
+        int partno, bpartno, r;
+        const char *ss, *v;
 
         assert(d);
+        assert(pp);
 
-        if (sd_device_get_subsystem(d, &ss) < 0)
+        r = sd_device_get_subsystem(d, &ss);
+        if (r < 0)
+                return r;
+        if (!streq(ss, "block"))
                 return false;
 
-        return streq(ss, "block");
-}
+        r = sd_device_get_sysattr_value(d, "partition", &v);
+        if (r == -ENOENT) /* Not a partition device */
+                return false;
+        if (r < 0)
+                return r;
+        r = safe_atoi(v, &partno);
+        if (r < 0)
+                return r;
 
-static int enumerator_for_parent(sd_device *d, sd_device_enumerator **ret) {
-        _cleanup_(sd_device_enumerator_unrefp) sd_device_enumerator *e = NULL;
-        int r;
+        errno = 0;
+        bpartno = blkid_partition_get_partno(pp);
+        if (bpartno < 0)
+                return errno_or_else(EIO);
 
-        assert(d);
-        assert(ret);
+        if (partno != bpartno)
+                return false;
 
-        r = sd_device_enumerator_new(&e);
+        r = sd_device_get_sysattr_value(d, "start", &v);
         if (r < 0)
                 return r;
-
-        r = sd_device_enumerator_allow_uninitialized(e);
+        r = safe_atou64(v, &start);
         if (r < 0)
                 return r;
 
-        r = sd_device_enumerator_add_match_parent(e, d);
+        errno = 0;
+        bstart = blkid_partition_get_start(pp);
+        if (bstart < 0)
+                return errno_or_else(EIO);
+
+        if (start != (uint64_t) bstart)
+                return false;
+
+        r = sd_device_get_sysattr_value(d, "size", &v);
+        if (r < 0)
+                return r;
+        r = safe_atou64(v, &size);
         if (r < 0)
                 return r;
 
-        *ret = TAKE_PTR(e);
-        return 0;
+        errno = 0;
+        bsize = blkid_partition_get_size(pp);
+        if (bsize < 0)
+                return errno_or_else(EIO);
+
+        if (size != (uint64_t) bsize)
+                return false;
+
+        return true;
 }
 
-static int wait_for_partitions_to_appear(
-                int fd,
-                sd_device *d,
-                unsigned num_partitions,
-                DissectImageFlags flags,
-                sd_device_enumerator **ret_enumerator) {
+static int find_partition(
+                sd_device *parent,
+                blkid_partition pp,
+                sd_device **ret) {
 
         _cleanup_(sd_device_enumerator_unrefp) sd_device_enumerator *e = NULL;
         sd_device *q;
-        unsigned n;
         int r;
 
-        assert(fd >= 0);
-        assert(d);
-        assert(ret_enumerator);
+        assert(parent);
+        assert(pp);
+        assert(ret);
 
-        r = enumerator_for_parent(d, &e);
+        r = enumerator_for_parent(parent, &e);
         if (r < 0)
                 return r;
 
-        /* Count the partitions enumerated by the kernel */
-        n = 0;
         FOREACH_DEVICE(e, q) {
-                if (sd_device_get_devnum(q, NULL) < 0)
-                        continue;
-                if (!device_is_block(q))
-                        continue;
-                if (device_is_mmc_special_partition(q))
-                        continue;
-
-                if (!FLAGS_SET(flags, DISSECT_IMAGE_NO_UDEV)) {
-                        r = device_wait_for_initialization(q, "block", USEC_INFINITY, NULL);
-                        if (r < 0)
-                                return r;
+                r = device_is_partition(q, pp);
+                if (r < 0)
+                        return r;
+                if (r > 0) {
+                        *ret = sd_device_ref(q);
+                        return 0;
                 }
-
-                n++;
         }
 
-        if (n == num_partitions + 1) {
-                *ret_enumerator = TAKE_PTR(e);
-                return 0; /* success! */
-        }
-        if (n > num_partitions + 1)
-                return log_debug_errno(SYNTHETIC_ERRNO(EIO),
-                                       "blkid and kernel partition lists do not match.");
+        return -ENXIO;
+}
 
-        /* The kernel has probed fewer partitions than blkid? Maybe the kernel prober is still running or it
-         * got EBUSY because udev already opened the device. Let's reprobe the device, which is a synchronous
-         * call that waits until probing is complete. */
+struct wait_data {
+        sd_device *parent_device;
+        blkid_partition blkidp;
+        sd_device *found;
+};
 
-        for (unsigned j = 0; ; j++) {
-                if (j++ > 20)
-                        return -EBUSY;
+static inline void wait_data_done(struct wait_data *d) {
+        sd_device_unref(d->found);
+}
 
-                if (ioctl(fd, BLKRRPART, 0) >= 0)
-                        break;
-                r = -errno;
-                if (r == -EINVAL) {
-                        /* If we are running on a block device that has partition scanning off, return an
-                         * explicit recognizable error about this, so that callers can generate a proper
-                         * message explaining the situation. */
+static int device_monitor_handler(sd_device_monitor *monitor, sd_device *device, void *userdata) {
+        const char *parent1_path, *parent2_path;
+        struct wait_data *w = userdata;
+        sd_device *pp;
+        int r;
 
-                        r = blockdev_partscan_enabled(fd);
-                        if (r < 0)
-                                return r;
-                        if (r == 0)
-                                return log_debug_errno(SYNTHETIC_ERRNO(EPROTONOSUPPORT),
-                                                       "Device is a loop device and partition scanning is off!");
+        assert(w);
 
-                        return -EINVAL; /* original error */
-                }
-                if (r != -EBUSY)
-                        return r;
+        if (device_for_action(device, DEVICE_ACTION_REMOVE))
+                return 0;
 
-                /* If something else has the device open, such as an udev rule, the ioctl will return
-                 * EBUSY. Since there's no way to wait until it isn't busy anymore, let's just wait a bit,
-                 * and try again.
-                 *
-                 * This is really something they should fix in the kernel! */
-                (void) usleep(50 * USEC_PER_MSEC);
+        r = sd_device_get_parent(device, &pp);
+        if (r < 0)
+                return 0; /* Doesn't have a parent? No relevant to us */
 
-        }
+        r = sd_device_get_syspath(pp, &parent1_path); /* Check parent of device of this action */
+        if (r < 0)
+                goto finish;
+
+        r = sd_device_get_syspath(w->parent_device, &parent2_path); /* Check parent of device we are looking for */
+        if (r < 0)
+                goto finish;
+
+        if (!path_equal(parent1_path, parent2_path))
+                return 0; /* Has a different parent than what we need, not interesting to us */
+
+        r = device_is_partition(device, w->blkidp);
+        if (r < 0)
+                goto finish;
+        if (r == 0) /* Not the one we need */
+                return 0;
+
+        /* It's the one we need! Yay! */
+        assert(!w->found);
+        w->found = sd_device_ref(device);
+        r = 0;
 
-        return -EAGAIN; /* no success yet, try again */
+finish:
+        return sd_event_exit(sd_device_monitor_get_event(monitor), r);
 }
 
-static int loop_wait_for_partitions_to_appear(
-                int fd,
-                sd_device *d,
-                unsigned num_partitions,
-                DissectImageFlags flags,
-                sd_device_enumerator **ret_enumerator) {
-        _cleanup_(sd_device_unrefp) sd_device *device = NULL;
+static int wait_for_partition_device(
+                sd_device *parent,
+                blkid_partition pp,
+                usec_t deadline,
+                sd_device **ret) {
+
+        _cleanup_(sd_event_source_unrefp) sd_event_source *timeout_source = NULL;
+        _cleanup_(sd_device_monitor_unrefp) sd_device_monitor *monitor = NULL;
+        _cleanup_(sd_event_unrefp) sd_event *event = NULL;
         int r;
 
-        assert(fd >= 0);
-        assert(d);
-        assert(ret_enumerator);
+        assert(parent);
+        assert(pp);
+        assert(ret);
 
-        log_debug("Waiting for device (parent + %d partitions) to appear...", num_partitions);
+        r = find_partition(parent, pp, ret);
+        if (r != -ENXIO)
+                return r;
 
-        if (!FLAGS_SET(flags, DISSECT_IMAGE_NO_UDEV)) {
-                r = device_wait_for_initialization(d, "block", USEC_INFINITY, &device);
-                if (r < 0)
-                        return r;
-        } else
-                device = sd_device_ref(d);
+        r = sd_event_new(&event);
+        if (r < 0)
+                return r;
 
-        for (unsigned i = 0; i < N_DEVICE_NODE_LIST_ATTEMPTS; i++) {
-                r = wait_for_partitions_to_appear(fd, device, num_partitions, flags, ret_enumerator);
-                if (r != -EAGAIN)
+        r = sd_device_monitor_new(&monitor);
+        if (r < 0)
+                return r;
+
+        r = sd_device_monitor_filter_add_match_subsystem_devtype(monitor, "block", "partition");
+        if (r < 0)
+                return r;
+
+        r = sd_device_monitor_attach_event(monitor, event);
+        if (r < 0)
+                return r;
+
+        _cleanup_(wait_data_done) struct wait_data w = {
+                .parent_device = parent,
+                .blkidp = pp,
+        };
+
+        r = sd_device_monitor_start(monitor, device_monitor_handler, &w);
+        if (r < 0)
+                return r;
+
+        /* Check again, the partition might have appeared in the meantime */
+        r = find_partition(parent, pp, ret);
+        if (r != -ENXIO)
+                return r;
+
+        if (deadline != USEC_INFINITY) {
+                r = sd_event_add_time(
+                                event, &timeout_source,
+                                CLOCK_MONOTONIC, deadline, 0,
+                                NULL, INT_TO_PTR(-ETIMEDOUT));
+                if (r < 0)
                         return r;
         }
 
-        return log_debug_errno(SYNTHETIC_ERRNO(ENXIO),
-                               "Kernel partitions dit not appear within %d attempts",
-                               N_DEVICE_NODE_LIST_ATTEMPTS);
+        r = sd_event_loop(event);
+        if (r < 0)
+                return r;
+
+        assert(w.found);
+        *ret = TAKE_PTR(w.found);
+        return 0;
 }
 
 static void check_partition_flags(
@@ -300,8 +368,90 @@ static void check_partition_flags(
         }
 }
 
+static int device_wait_for_initialization_harder(
+                sd_device *device,
+                const char *subsystem,
+                usec_t deadline,
+                sd_device **ret) {
+
+        _cleanup_free_ char *uevent = NULL;
+        usec_t start, left, retrigger_timeout;
+        int r;
+
+        start = now(CLOCK_MONOTONIC);
+        left = usec_sub_unsigned(deadline, start);
+
+        if (DEBUG_LOGGING) {
+                char buf[FORMAT_TIMESPAN_MAX];
+                const char *sn = NULL;
+
+                (void) sd_device_get_sysname(device, &sn);
+                log_debug("Waiting for device '%s' to initialize for %s.", strna(sn), format_timespan(buf, sizeof(buf), left, 0));
+        }
+
+        if (left != USEC_INFINITY)
+                retrigger_timeout = CLAMP(left / 4, 1 * USEC_PER_SEC, 5 * USEC_PER_SEC); /* A fourth of the total timeout, but let's clamp to 1s…5s range */
+        else
+                retrigger_timeout = 2 * USEC_PER_SEC;
+
+        for (;;) {
+                usec_t local_deadline, n;
+                bool last_try;
+
+                n = now(CLOCK_MONOTONIC);
+                assert(n >= start);
+
+                /* Find next deadline, when we'll retrigger */
+                local_deadline = start +
+                        DIV_ROUND_UP(n - start, retrigger_timeout) * retrigger_timeout;
+
+                if (deadline != USEC_INFINITY && deadline <= local_deadline) {
+                        local_deadline = deadline;
+                        last_try = true;
+                } else
+                        last_try = false;
+
+                r = device_wait_for_initialization(device, subsystem, local_deadline, ret);
+                if (r >= 0 && DEBUG_LOGGING) {
+                        char buf[FORMAT_TIMESPAN_MAX];
+                        const char *sn = NULL;
+
+                        (void) sd_device_get_sysname(device, &sn);
+                        log_debug("Successfully waited for device '%s' to initialize for %s.", strna(sn), format_timespan(buf, sizeof(buf), usec_sub_unsigned(now(CLOCK_MONOTONIC), start), 0));
+
+                }
+                if (r != -ETIMEDOUT || last_try)
+                        return r;
+
+                if (!uevent) {
+                        const char *syspath;
+
+                        r = sd_device_get_syspath(device, &syspath);
+                        if (r < 0)
+                                return r;
+
+                        uevent = path_join(syspath, "uevent");
+                        if (!uevent)
+                                return -ENOMEM;
+                }
+
+                if (DEBUG_LOGGING) {
+                        char buf[FORMAT_TIMESPAN_MAX];
+
+                        log_debug("Device didn't initialize within %s, assuming lost event. Retriggering device through %s.",
+                                  format_timespan(buf, sizeof(buf), usec_sub_unsigned(now(CLOCK_MONOTONIC), start), 0),
+                                  uevent);
+                }
+
+                r = write_string_file(uevent, "change", WRITE_STRING_FILE_DISABLE_BUFFER);
+                if (r < 0)
+                        return r;
+        }
+}
 #endif
 
+#define DEVICE_TIMEOUT_USEC (45 * USEC_PER_SEC)
+
 int dissect_image(
                 int fd,
                 const VeritySettings *verity,
@@ -312,7 +462,6 @@ int dissect_image(
 #if HAVE_BLKID
         sd_id128_t root_uuid = SD_ID128_NULL, root_verity_uuid = SD_ID128_NULL,
                 usr_uuid = SD_ID128_NULL, usr_verity_uuid = SD_ID128_NULL;
-        _cleanup_(sd_device_enumerator_unrefp) sd_device_enumerator *e = NULL;
         bool is_gpt, is_mbr, generic_rw, multiple_generic = false;
         _cleanup_(sd_device_unrefp) sd_device *d = NULL;
         _cleanup_(dissected_image_unrefp) DissectedImage *m = NULL;
@@ -321,9 +470,9 @@ int dissect_image(
         sd_id128_t generic_uuid = SD_ID128_NULL;
         const char *pttype = NULL;
         blkid_partlist pl;
-        int r, generic_nr;
+        int r, generic_nr, n_partitions;
         struct stat st;
-        sd_device *q;
+        usec_t deadline;
 
         assert(fd >= 0);
         assert(ret);
@@ -370,6 +519,27 @@ int dissect_image(
         if (!S_ISBLK(st.st_mode))
                 return -ENOTBLK;
 
+        r = sd_device_new_from_devnum(&d, 'b', st.st_rdev);
+        if (r < 0)
+                return r;
+
+        if (!FLAGS_SET(flags, DISSECT_IMAGE_NO_UDEV)) {
+                _cleanup_(sd_device_unrefp) sd_device *initialized = NULL;
+
+                /* If udev support is enabled, then let's wait for the device to be initialized before we doing anything. */
+
+                r = device_wait_for_initialization_harder(
+                                d,
+                                "block",
+                                usec_add(now(CLOCK_MONOTONIC), DEVICE_TIMEOUT_USEC),
+                                &initialized);
+                if (r < 0)
+                        return r;
+
+                sd_device_unref(d);
+                d = TAKE_PTR(initialized);
+        }
+
         b = blkid_new_probe();
         if (!b)
                 return -ENOMEM;
@@ -399,10 +569,6 @@ int dissect_image(
         if (!m)
                 return -ENOMEM;
 
-        r = sd_device_new_from_devnum(&d, 'b', st.st_rdev);
-        if (r < 0)
-                return r;
-
         if ((!(flags & DISSECT_IMAGE_GPT_ONLY) &&
             (flags & DISSECT_IMAGE_REQUIRE_ROOT)) ||
             (flags & DISSECT_IMAGE_NO_PARTITION_TABLE)) {
@@ -412,8 +578,8 @@ int dissect_image(
 
                 (void) blkid_probe_lookup_value(b, "USAGE", &usage, NULL);
                 if (STRPTR_IN_SET(usage, "filesystem", "crypto")) {
+                        const char *fstype = NULL, *options = NULL, *devname = NULL;
                         _cleanup_free_ char *t = NULL, *n = NULL, *o = NULL;
-                        const char *fstype = NULL, *options = NULL;
 
                         /* OK, we have found a file system, that's our root partition then. */
                         (void) blkid_probe_lookup_value(b, "TYPE", &fstype, NULL);
@@ -424,10 +590,14 @@ int dissect_image(
                                         return -ENOMEM;
                         }
 
-                        r = device_path_make_major_minor(st.st_mode, st.st_rdev, &n);
+                        r = sd_device_get_devname(d, &devname);
                         if (r < 0)
                                 return r;
 
+                        n = strdup(devname);
+                        if (!n)
+                                return -ENOMEM;
+
                         m->single_file_system = true;
                         m->verity = verity && verity->root_hash && verity->data_path && (verity->designator < 0 || verity->designator == PARTITION_ROOT);
                         m->can_verity = verity && verity->data_path;
@@ -451,13 +621,7 @@ int dissect_image(
 
                         m->encrypted = streq_ptr(fstype, "crypto_LUKS");
 
-                        /* Even on a single partition we need to wait for udev to create the
-                         * /dev/block/X:Y symlink to /dev/loopZ */
-                        r = loop_wait_for_partitions_to_appear(fd, d, 0, flags, &e);
-                        if (r < 0)
-                                return r;
                         *ret = TAKE_PTR(m);
-
                         return 0;
                 }
         }
@@ -472,48 +636,51 @@ int dissect_image(
         if (!is_gpt && ((flags & DISSECT_IMAGE_GPT_ONLY) || !is_mbr))
                 return -ENOPKG;
 
+        /* Safety check: refuse block devices that carry a partition table but for which the kernel doesn't
+         * do partition scanning. */
+        r = blockdev_partscan_enabled(fd);
+        if (r < 0)
+                return r;
+        if (r == 0)
+                return -EPROTONOSUPPORT;
+
         errno = 0;
         pl = blkid_probe_get_partitions(b);
         if (!pl)
                 return errno_or_else(ENOMEM);
 
-        r = loop_wait_for_partitions_to_appear(fd, d, blkid_partlist_numof_partitions(pl), flags, &e);
-        if (r < 0)
-                return r;
+        errno = 0;
+        n_partitions = blkid_partlist_numof_partitions(pl);
+        if (n_partitions < 0)
+                return errno_or_else(EIO);
 
-        FOREACH_DEVICE(e, q) {
+        deadline = usec_add(now(CLOCK_MONOTONIC), DEVICE_TIMEOUT_USEC);
+        for (int i = 0; i < n_partitions; i++) {
+                _cleanup_(sd_device_unrefp) sd_device *q = NULL;
                 unsigned long long pflags;
                 blkid_partition pp;
                 const char *node;
-                dev_t qn;
                 int nr;
 
-                r = sd_device_get_devnum(q, &qn);
-                if (r < 0)
-                        continue;
-
-                if (st.st_rdev == qn)
-                        continue;
-
-                if (!device_is_block(q))
-                        continue;
+                errno = 0;
+                pp = blkid_partlist_get_partition(pl, i);
+                if (!pp)
+                        return errno_or_else(EIO);
 
-                if (device_is_mmc_special_partition(q))
-                        continue;
+                r = wait_for_partition_device(d, pp, deadline, &q);
+                if (r < 0)
+                        return r;
 
                 r = sd_device_get_devname(q, &node);
                 if (r < 0)
-                        continue;
-
-                pp = blkid_partlist_devno_to_partition(pl, qn);
-                if (!pp)
-                        continue;
+                        return r;
 
                 pflags = blkid_partition_get_flags(pp);
 
+                errno = 0;
                 nr = blkid_partition_get_partno(pp);
                 if (nr < 0)
-                        continue;
+                        return errno_or_else(EIO);
 
                 if (is_gpt) {
                         PartitionDesignator designator = _PARTITION_DESIGNATOR_INVALID;
@@ -1643,7 +1810,7 @@ static int verity_partition(
                         if (r == 0) {
                                 /* devmapper might say that the device exists, but the devlink might not yet have been
                                  * created. Check and wait for the udev event in that case. */
-                                r = device_wait_for_devlink(node, "block", 100 * USEC_PER_MSEC, NULL);
+                                r = device_wait_for_devlink(node, "block", usec_add(now(CLOCK_MONOTONIC), 100 * USEC_PER_MSEC), NULL);
                                 /* Fallback to activation with a unique device if it's taking too long */
                                 if (r == -ETIMEDOUT)
                                         break;
@@ -1948,7 +2115,7 @@ int verity_settings_load(
 
         if (verity->root_hash && !verity->root_hash_sig) {
                 if (root_hash_sig_path) {
-                        r = read_full_file_full(AT_FDCWD, root_hash_sig_path, 0, (char**) &root_hash_sig, &root_hash_sig_size);
+                        r = read_full_file(root_hash_sig_path, (char**) &root_hash_sig, &root_hash_sig_size);
                         if (r < 0 && r != -ENOENT)
                                 return r;
 
@@ -1964,7 +2131,7 @@ int verity_settings_load(
                                 if (!p)
                                         return -ENOMEM;
 
-                                r = read_full_file_full(AT_FDCWD, p, 0, (char**) &root_hash_sig, &root_hash_sig_size);
+                                r = read_full_file(p, (char**) &root_hash_sig, &root_hash_sig_size);
                                 if (r < 0 && r != -ENOENT)
                                         return r;
                                 if (r >= 0)
@@ -1978,7 +2145,7 @@ int verity_settings_load(
                                 if (!p)
                                         return -ENOMEM;
 
-                                r = read_full_file_full(AT_FDCWD, p, 0, (char**) &root_hash_sig, &root_hash_sig_size);
+                                r = read_full_file(p, (char**) &root_hash_sig, &root_hash_sig_size);
                                 if (r < 0 && r != -ENOENT)
                                         return r;
                                 if (r >= 0)
@@ -2148,6 +2315,8 @@ int dissected_image_acquire_metadata(DissectedImage *m) {
                                         log_debug_errno(r, "Image contains invalid /etc/machine-id: %s", line);
                         } else if (r == 0)
                                 log_debug("/etc/machine-id file is empty.");
+                        else if (streq(line, "uninitialized"))
+                                log_debug("/etc/machine-id file is uninitialized (likely aborted first boot).");
                         else
                                 log_debug("/etc/machine-id has unexpected length %i.", r);
 
index f5db7327bd6a10e6b7fd70efc406fd7617158a67..3b30e08f90fbcfc1d9827dd596e0f1629ac8186b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 7efcb6b2aae432599a511819eb5f90ee743a15b5..b48b9b5cbcf08a8c194fc96a12e1152fd72ec87b 100644 (file)
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
 #include <fcntl.h>
 #include <linux/dm-ioctl.h>
 #include <sys/ioctl.h>
index 997963c042b6858b9a1c53305711686d1be68a1e..e6e3d7d8c54cd8b8c5725ff8402d69cbe9f135ce 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int dm_deferred_remove_cancel(const char *name);
index 35d2eaa9f1519b8fa49bca4239d80f99e0f5d68d..b02ad3f5217b76be921d011fd3bc15e20592d9d2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <endian.h>
 #include <netinet/in.h>
@@ -1291,8 +1291,14 @@ int dns_name_apply_idna(const char *name, char **ret) {
         assert(name);
         assert(ret);
 
+        /* First, try non-transitional mode (i.e. IDN2008 rules) */
         r = sym_idn2_lookup_u8((uint8_t*) name, (uint8_t**) &t,
                                IDN2_NFC_INPUT | IDN2_NONTRANSITIONAL);
+        if (r == IDN2_DISALLOWED) /* If that failed, because of disallowed characters, try transitional mode.
+                                   * (i.e. IDN2003 rules which supports some unicode chars IDN2008 doesn't allow). */
+                r = sym_idn2_lookup_u8((uint8_t*) name, (uint8_t**) &t,
+                                       IDN2_NFC_INPUT | IDN2_TRANSITIONAL);
+
         log_debug("idn2_lookup_u8: %s → %s", name, t);
         if (r == IDN2_OK) {
                 if (!startswith(name, "xn--")) {
index 60de7af22721d892cf7cfba5dc76788d9177ce28..77f596294de3b45bd20df6f24417a2b0d8d91984 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <errno.h>
index 6c614b5c0a4851157b7c1f9606182533bf6e7a26..89f4b8ad897dc943a0e8c8f389ec89c2213859fc 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdarg.h>
index addf1dab140af2ef3985a7effbdd2a7c69121292..54cceaff1aca3d249905357583fe6f7934cb3355 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "hashmap.h"
index 9411fc8cef8647b2ab243734bc6f1109a11960e5..20f70da31a87295d68ff0bcf1c7f528a3ccc8445 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdlib.h>
 #include <sys/stat.h>
index 171274a0e342edafdc7cf798c45584deab8f035d..34476f4ced00dbf84ace2ea099e6d13757c886b4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "efivars.h"
index a571b43f5791da25b492a06fed2a46173b5b7ca3..1abfccbd817e1f1b59c5c9ccf8d9a3bb043d5844 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "mempool.h"
 
index add68d224dbd14ad5d3106669f886494e4200380..468afce2ba0ed347a47b8ac720d069623f53c7bb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/stat.h>
 
index 158fc4ec0b5303563fba04702bd3bd892232586e..d68058ab2ec95f0d3409b1a3f6ba9698fca9b8a4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /* These functions are split out of fileio.h (and not for example just flags to the functions they wrap) in order to
index adbf8d1db35df4997a417c5f4c2af70496304214..3b3d37ccccac1f87a424375c9a02e8297c8c1228 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 #include <sys/ioctl.h>
@@ -112,21 +112,46 @@ static const char* const ethtool_link_mode_bit_table[] = {
         [ETHTOOL_LINK_MODE_FEC_NONE_BIT]                   = "fec-none",
         [ETHTOOL_LINK_MODE_FEC_RS_BIT]                     = "fec-rs",
         [ETHTOOL_LINK_MODE_FEC_BASER_BIT]                  = "fec-baser",
-        [ETHTOOL_LINK_MODE_50000baseKR_Full_BIT]           = "50000basekr_full",
-        [ETHTOOL_LINK_MODE_50000baseSR_Full_BIT]           = "50000basesr_full",
-        [ETHTOOL_LINK_MODE_50000baseCR_Full_BIT]           = "50000basecr_full",
-        [ETHTOOL_LINK_MODE_50000baseLR_ER_FR_Full_BIT]     = "50000baselr_er_fr_full",
-        [ETHTOOL_LINK_MODE_50000baseDR_Full_BIT]           = "50000basedr_full",
-        [ETHTOOL_LINK_MODE_100000baseKR2_Full_BIT]         = "100000basekr2_full",
-        [ETHTOOL_LINK_MODE_100000baseSR2_Full_BIT]         = "100000basesr2_full",
-        [ETHTOOL_LINK_MODE_100000baseCR2_Full_BIT]         = "100000basecr2_full",
-        [ETHTOOL_LINK_MODE_100000baseLR2_ER2_FR2_Full_BIT] = "100000baselr2_er2_fr2_full",
-        [ETHTOOL_LINK_MODE_100000baseDR2_Full_BIT]         = "100000basedr2_full",
-        [ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT]         = "200000basekr4_full",
-        [ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT]         = "200000basesr4_full",
-        [ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT]         = "200000basecr4_full",
-        [ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT] = "200000baselr4_er4_fr4_full",
-        [ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT]         = "200000basedr4_full",
+        [ETHTOOL_LINK_MODE_50000baseKR_Full_BIT]           = "50000basekr-full",
+        [ETHTOOL_LINK_MODE_50000baseSR_Full_BIT]           = "50000basesr-full",
+        [ETHTOOL_LINK_MODE_50000baseCR_Full_BIT]           = "50000basecr-full",
+        [ETHTOOL_LINK_MODE_50000baseLR_ER_FR_Full_BIT]     = "50000baselr-er-fr-full",
+        [ETHTOOL_LINK_MODE_50000baseDR_Full_BIT]           = "50000basedr-full",
+        [ETHTOOL_LINK_MODE_100000baseKR2_Full_BIT]         = "100000basekr2-full",
+        [ETHTOOL_LINK_MODE_100000baseSR2_Full_BIT]         = "100000basesr2-full",
+        [ETHTOOL_LINK_MODE_100000baseCR2_Full_BIT]         = "100000basecr2-full",
+        [ETHTOOL_LINK_MODE_100000baseLR2_ER2_FR2_Full_BIT] = "100000baselr2-er2-fr2-full",
+        [ETHTOOL_LINK_MODE_100000baseDR2_Full_BIT]         = "100000basedr2-full",
+        [ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT]         = "200000basekr4-full",
+        [ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT]         = "200000basesr4-full",
+        [ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT] = "200000baselr4-er4-fr4-full",
+        [ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT]         = "200000basedr4-full",
+        [ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT]         = "200000basecr4-full",
+        [ETHTOOL_LINK_MODE_100baseT1_Full_BIT]             = "100baset1-full",
+        [ETHTOOL_LINK_MODE_1000baseT1_Full_BIT]            = "1000baset1-full",
+        [ETHTOOL_LINK_MODE_400000baseKR8_Full_BIT]         = "400000basekr8-full",
+        [ETHTOOL_LINK_MODE_400000baseSR8_Full_BIT]         = "400000basesr8-full",
+        [ETHTOOL_LINK_MODE_400000baseLR8_ER8_FR8_Full_BIT] = "400000baselr8-er8-fr8-full",
+        [ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT]         = "400000basedr8-full",
+        [ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT]         = "400000basecr8-full",
+        [ETHTOOL_LINK_MODE_FEC_LLRS_BIT]                   = "fec-llrs",
+        [ETHTOOL_LINK_MODE_100000baseKR_Full_BIT]          = "100000basekr-full",
+        [ETHTOOL_LINK_MODE_100000baseSR_Full_BIT]          = "100000basesr-full",
+        [ETHTOOL_LINK_MODE_100000baseLR_ER_FR_Full_BIT]    = "100000baselr-er-fr-full",
+        [ETHTOOL_LINK_MODE_100000baseCR_Full_BIT]          = "100000basecr-full",
+        [ETHTOOL_LINK_MODE_100000baseDR_Full_BIT]          = "100000basedr-full",
+        [ETHTOOL_LINK_MODE_200000baseKR2_Full_BIT]         = "200000basekr2-full",
+        [ETHTOOL_LINK_MODE_200000baseSR2_Full_BIT]         = "200000basesr2-full",
+        [ETHTOOL_LINK_MODE_200000baseLR2_ER2_FR2_Full_BIT] = "200000baselr2-er2-fr2-full",
+        [ETHTOOL_LINK_MODE_200000baseDR2_Full_BIT]         = "200000basedr2-full",
+        [ETHTOOL_LINK_MODE_200000baseCR2_Full_BIT]         = "200000basecr2-full",
+        [ETHTOOL_LINK_MODE_400000baseKR4_Full_BIT]         = "400000basekr4-full",
+        [ETHTOOL_LINK_MODE_400000baseSR4_Full_BIT]         = "400000basesr4-full",
+        [ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT] = "400000baselr4-er4-fr4-full",
+        [ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT]         = "400000basedr4-full",
+        [ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT]         = "400000basecr4-full",
+        [ETHTOOL_LINK_MODE_100baseFX_Half_BIT]             = "100basefx-half",
+        [ETHTOOL_LINK_MODE_100baseFX_Full_BIT]             = "100basefx-full",
 };
 /* Make sure the array is large enough to fit all bits */
 assert_cc((ELEMENTSOF(ethtool_link_mode_bit_table)-1) / 32 < N_ADVERTISE);
@@ -150,14 +175,18 @@ static int ethtool_connect_or_warn(int *ret, bool warn) {
 
 int ethtool_get_driver(int *ethtool_fd, const char *ifname, char **ret) {
         struct ethtool_drvinfo ecmd = {
-                .cmd = ETHTOOL_GDRVINFO
+                .cmd = ETHTOOL_GDRVINFO,
         };
         struct ifreq ifr = {
-                .ifr_data = (void*) &ecmd
+                .ifr_data = (void*) &ecmd,
         };
         char *d;
         int r;
 
+        assert(ethtool_fd);
+        assert(ifname);
+        assert(ret);
+
         if (*ethtool_fd < 0) {
                 r = ethtool_connect_or_warn(ethtool_fd, true);
                 if (r < 0)
@@ -170,6 +199,9 @@ int ethtool_get_driver(int *ethtool_fd, const char *ifname, char **ret) {
         if (r < 0)
                 return -errno;
 
+        if (isempty(ecmd.driver))
+                return -ENODATA;
+
         d = strdup(ecmd.driver);
         if (!d)
                 return -ENOMEM;
@@ -178,9 +210,14 @@ int ethtool_get_driver(int *ethtool_fd, const char *ifname, char **ret) {
         return 0;
 }
 
-int ethtool_get_link_info(int *ethtool_fd, const char *ifname,
-                          int *ret_autonegotiation, uint64_t *ret_speed,
-                          Duplex *ret_duplex, NetDevPort *ret_port) {
+int ethtool_get_link_info(
+                int *ethtool_fd,
+                const char *ifname,
+                int *ret_autonegotiation,
+                uint64_t *ret_speed,
+                Duplex *ret_duplex,
+                NetDevPort *ret_port) {
+
         struct ethtool_cmd ecmd = {
                 .cmd = ETHTOOL_GSET,
         };
@@ -189,6 +226,9 @@ int ethtool_get_link_info(int *ethtool_fd, const char *ifname,
         };
         int r;
 
+        assert(ethtool_fd);
+        assert(ifname);
+
         if (*ethtool_fd < 0) {
                 r = ethtool_connect_or_warn(ethtool_fd, false);
                 if (r < 0)
@@ -269,14 +309,17 @@ int ethtool_get_permanent_macaddr(int *ethtool_fd, const char *ifname, struct et
 
 int ethtool_set_speed(int *ethtool_fd, const char *ifname, unsigned speed, Duplex duplex) {
         struct ethtool_cmd ecmd = {
-                .cmd = ETHTOOL_GSET
+                .cmd = ETHTOOL_GSET,
         };
         struct ifreq ifr = {
-                .ifr_data = (void*) &ecmd
+                .ifr_data = (void*) &ecmd,
         };
         bool need_update = false;
         int r;
 
+        assert(ethtool_fd);
+        assert(ifname);
+
         if (speed == 0 && duplex == _DUP_INVALID)
                 return 0;
 
@@ -327,14 +370,17 @@ int ethtool_set_speed(int *ethtool_fd, const char *ifname, unsigned speed, Duple
 
 int ethtool_set_wol(int *ethtool_fd, const char *ifname, WakeOnLan wol) {
         struct ethtool_wolinfo ecmd = {
-                .cmd = ETHTOOL_GWOL
+                .cmd = ETHTOOL_GWOL,
         };
         struct ifreq ifr = {
-                .ifr_data = (void*) &ecmd
+                .ifr_data = (void*) &ecmd,
         };
         bool need_update = false;
         int r;
 
+        assert(ethtool_fd);
+        assert(ifname);
+
         if (wol == _WOL_INVALID)
                 return 0;
 
@@ -416,14 +462,18 @@ int ethtool_set_wol(int *ethtool_fd, const char *ifname, WakeOnLan wol) {
 
 int ethtool_set_nic_buffer_size(int *ethtool_fd, const char *ifname, const netdev_ring_param *ring) {
         struct ethtool_ringparam ecmd = {
-                .cmd = ETHTOOL_GRINGPARAM
+                .cmd = ETHTOOL_GRINGPARAM,
         };
         struct ifreq ifr = {
-                .ifr_data = (void*) &ecmd
+                .ifr_data = (void*) &ecmd,
         };
         bool need_update = false;
         int r;
 
+        assert(ethtool_fd);
+        assert(ifname);
+        assert(ring);
+
         if (*ethtool_fd < 0) {
                 r = ethtool_connect_or_warn(ethtool_fd, true);
                 if (r < 0)
@@ -467,7 +517,7 @@ int ethtool_set_nic_buffer_size(int *ethtool_fd, const char *ifname, const netde
         return 0;
 }
 
-static int get_stringset(int ethtool_fd, struct ifreq *ifr, int stringset_id, struct ethtool_gstrings **gstrings) {
+static int get_stringset(int ethtool_fd, struct ifreq *ifr, int stringset_id, struct ethtool_gstrings **ret) {
         _cleanup_free_ struct ethtool_gstrings *strings = NULL;
         struct {
                 struct ethtool_sset_info info;
@@ -481,6 +531,10 @@ static int get_stringset(int ethtool_fd, struct ifreq *ifr, int stringset_id, st
         unsigned len;
         int r;
 
+        assert(ethtool_fd >= 0);
+        assert(ifr);
+        assert(ret);
+
         ifr->ifr_data = (void *) &buffer.info;
 
         r = ioctl(ethtool_fd, SIOCETHTOOL, ifr);
@@ -511,7 +565,7 @@ static int get_stringset(int ethtool_fd, struct ifreq *ifr, int stringset_id, st
         if (r < 0)
                 return -errno;
 
-        *gstrings = TAKE_PTR(strings);
+        *ret = TAKE_PTR(strings);
 
         return 0;
 }
@@ -549,6 +603,10 @@ int ethtool_set_features(int *ethtool_fd, const char *ifname, const int *feature
         struct ifreq ifr = {};
         int i, r;
 
+        assert(ethtool_fd);
+        assert(ifname);
+        assert(features);
+
         if (*ethtool_fd < 0) {
                 r = ethtool_connect_or_warn(ethtool_fd, true);
                 if (r < 0)
@@ -583,7 +641,7 @@ int ethtool_set_features(int *ethtool_fd, const char *ifname, const int *feature
         return 0;
 }
 
-static int get_glinksettings(int fd, struct ifreq *ifr, struct ethtool_link_usettings **g) {
+static int get_glinksettings(int fd, struct ifreq *ifr, struct ethtool_link_usettings **ret) {
         struct ecmd {
                 struct ethtool_link_settings req;
                 __u32 link_mode_data[3 * ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32];
@@ -594,6 +652,10 @@ static int get_glinksettings(int fd, struct ifreq *ifr, struct ethtool_link_uset
         unsigned offset;
         int r;
 
+        assert(fd >= 0);
+        assert(ifr);
+        assert(ret);
+
         /* The interaction user/kernel via the new API requires a small ETHTOOL_GLINKSETTINGS
            handshake first to agree on the length of the link mode bitmaps. If kernel doesn't
            agree with user, it returns the bitmap length it is expecting from user as a negative
@@ -639,18 +701,22 @@ static int get_glinksettings(int fd, struct ifreq *ifr, struct ethtool_link_uset
         offset += ecmd.req.link_mode_masks_nwords;
         memcpy(u->link_modes.lp_advertising, &ecmd.link_mode_data[offset], 4 * ecmd.req.link_mode_masks_nwords);
 
-        *g = u;
+        *ret = u;
 
         return 0;
 }
 
-static int get_gset(int fd, struct ifreq *ifr, struct ethtool_link_usettings **u) {
+static int get_gset(int fd, struct ifreq *ifr, struct ethtool_link_usettings **ret) {
         struct ethtool_link_usettings *e;
         struct ethtool_cmd ecmd = {
                 .cmd = ETHTOOL_GSET,
         };
         int r;
 
+        assert(fd >= 0);
+        assert(ifr);
+        assert(ret);
+
         ifr->ifr_data = (void *) &ecmd;
 
         r = ioctl(fd, SIOCETHTOOL, ifr);
@@ -676,7 +742,7 @@ static int get_gset(int fd, struct ifreq *ifr, struct ethtool_link_usettings **u
                 .link_modes.lp_advertising[0] = ecmd.lp_advertising,
         };
 
-        *u = e;
+        *ret = e;
 
         return 0;
 }
@@ -689,6 +755,10 @@ static int set_slinksettings(int fd, struct ifreq *ifr, const struct ethtool_lin
         unsigned offset;
         int r;
 
+        assert(fd >= 0);
+        assert(ifr);
+        assert(u);
+
         if (u->base.cmd != ETHTOOL_GLINKSETTINGS || u->base.link_mode_masks_nwords <= 0)
                 return -EINVAL;
 
@@ -718,6 +788,10 @@ static int set_sset(int fd, struct ifreq *ifr, const struct ethtool_link_usettin
         };
         int r;
 
+        assert(fd >= 0);
+        assert(ifr);
+        assert(u);
+
         if (u->base.cmd != ETHTOOL_GSET || u->base.link_mode_masks_nwords <= 0)
                 return -EINVAL;
 
@@ -758,10 +832,13 @@ int ethtool_set_glinksettings(
                 uint64_t speed,
                 Duplex duplex,
                 NetDevPort port) {
+
         _cleanup_free_ struct ethtool_link_usettings *u = NULL;
         struct ifreq ifr = {};
         int r;
 
+        assert(fd);
+        assert(ifname);
         assert(advertise);
 
         if (autonegotiation != AUTONEG_DISABLE && memeqzero(advertise, sizeof(uint32_t) * N_ADVERTISE)) {
@@ -815,15 +892,18 @@ int ethtool_set_glinksettings(
 
 int ethtool_set_channels(int *fd, const char *ifname, const netdev_channels *channels) {
         struct ethtool_channels ecmd = {
-                .cmd = ETHTOOL_GCHANNELS
+                .cmd = ETHTOOL_GCHANNELS,
         };
         struct ifreq ifr = {
-                .ifr_data = (void*) &ecmd
+                .ifr_data = (void*) &ecmd,
         };
-
         bool need_update = false;
         int r;
 
+        assert(fd);
+        assert(ifname);
+        assert(channels);
+
         if (*fd < 0) {
                 r = ethtool_connect_or_warn(fd, true);
                 if (r < 0)
@@ -869,15 +949,17 @@ int ethtool_set_channels(int *fd, const char *ifname, const netdev_channels *cha
 
 int ethtool_set_flow_control(int *fd, const char *ifname, int rx, int tx, int autoneg) {
         struct ethtool_pauseparam ecmd = {
-                .cmd = ETHTOOL_GPAUSEPARAM
+                .cmd = ETHTOOL_GPAUSEPARAM,
         };
         struct ifreq ifr = {
-                .ifr_data = (void*) &ecmd
+                .ifr_data = (void*) &ecmd,
         };
-
         bool need_update = false;
         int r;
 
+        assert(fd);
+        assert(ifname);
+
         if (*fd < 0) {
                 r = ethtool_connect_or_warn(fd, true);
                 if (r < 0)
index 9e3f1ed51ae106a1c77d5ac1826972e4f6091a12..f94b3e15bf889cf4d7cbb7ae5f3cd7430b443562 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <macro.h>
index b7303f0aef6f563a8f8f255f8632ed6e6b82262b..bdea60ca02c3e91dc17f98c4b431f22e17e8cb7c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <dirent.h>
 #include <errno.h>
index 65556249c1a75c537faaea00693fe8e3ab39225a..df6214e4c3f9d59b7f04010f0b2793a3459f5287 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index e2b6c679535f1e3e02362d4b0af65dd384a74878..b71dd7afd52d7e648b594f2c1e5ce4dcdd95b2f5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <signal.h>
 #include <stdlib.h>
index 7ac99a481083b9caaedebc6addb6e4255a708dac..05707bf722dd32f9530b331c338d1883b2dd0ab5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index dfe8242fc4cda35a549cb1ebc8e32d4c0d9bd5c5..679e4aad2262e719f4c8dda83932bb3a36788f34 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index ceabb82311ecb4bf71b244b749cb3a70e123ad33..39d15ee4aaf076b14312221a054deb8b90d535ba 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 49ab29720b1a33cee7ea349ef5d506e22ba4d4fe..d03b0548ec9265df6dfbfa999c4049e88876a943 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/stat.h>
 
index 8f88955d8102b7ea8d5ae637f1b058044696dbbc..03b4a164174b546a7b8812a13157500997122df5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdio.h>
index 4d4d615bb7890303b9579c96e19d65e041bc1810..974803903d9c734d0c77a57ddede53fb02ac3965 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 /* Temporary work-around for broken glibc vs. linux kernel header definitions
  * This is already fixed upstream, remove this when distributions have updated.
@@ -81,12 +81,8 @@ static int entry_fill_basics(
 int fw_add_masquerade(
                 bool add,
                 int af,
-                int protocol,
                 const union in_addr_union *source,
-                unsigned source_prefixlen,
-                const char *out_interface,
-                const union in_addr_union *destination,
-                unsigned destination_prefixlen) {
+                unsigned source_prefixlen) {
 
         static const xt_chainlabel chain = "POSTROUTING";
         _cleanup_(iptc_freep) struct xtc_handle *h = NULL;
@@ -94,14 +90,14 @@ int fw_add_masquerade(
         struct ipt_entry_target *t;
         size_t sz;
         struct nf_nat_ipv4_multi_range_compat *mr;
-        int r;
+        int r, protocol = 0;
+        const char *out_interface = NULL;
+        const union in_addr_union *destination = NULL;
+        unsigned destination_prefixlen = 0;
 
         if (af != AF_INET)
                 return -EOPNOTSUPP;
 
-        if (!IN_SET(protocol, 0, IPPROTO_TCP, IPPROTO_UDP))
-                return -EOPNOTSUPP;
-
         h = iptc_init("nat");
         if (!h)
                 return -errno;
@@ -158,11 +154,6 @@ int fw_add_local_dnat(
                 bool add,
                 int af,
                 int protocol,
-                const char *in_interface,
-                const union in_addr_union *source,
-                unsigned source_prefixlen,
-                const union in_addr_union *destination,
-                unsigned destination_prefixlen,
                 uint16_t local_port,
                 const union in_addr_union *remote,
                 uint16_t remote_port,
@@ -177,6 +168,11 @@ int fw_add_local_dnat(
         struct nf_nat_ipv4_multi_range_compat *mr;
         size_t sz, msz;
         int r;
+        const char *in_interface = NULL;
+        const union in_addr_union *source = NULL;
+        unsigned source_prefixlen = 0;
+        const union in_addr_union *destination = NULL;
+        unsigned destination_prefixlen = 0;
 
         assert(add || !previous_remote);
 
index 4fc71dade2d499c0cb977e6d277ce0ecd83b6e7b..f7191ba006cc5f68d77881c5c57a2293c77071e4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
 int fw_add_masquerade(
                 bool add,
                 int af,
-                int protocol,
                 const union in_addr_union *source,
-                unsigned source_prefixlen,
-                const char *out_interface,
-                const union in_addr_union *destination,
-                unsigned destination_prefixlen);
+                unsigned source_prefixlen);
 
 int fw_add_local_dnat(
                 bool add,
                 int af,
                 int protocol,
-                const char *in_interface,
-                const union in_addr_union *source,
-                unsigned source_prefixlen,
-                const union in_addr_union *destination,
-                unsigned destination_prefixlen,
                 uint16_t local_port,
                 const union in_addr_union *remote,
                 uint16_t remote_port,
@@ -37,12 +28,8 @@ int fw_add_local_dnat(
 static inline int fw_add_masquerade(
                 bool add,
                 int af,
-                int protocol,
                 const union in_addr_union *source,
-                unsigned source_prefixlen,
-                const char *out_interface,
-                const union in_addr_union *destination,
-                unsigned destination_prefixlen) {
+                unsigned source_prefixlen) {
         return -EOPNOTSUPP;
 }
 
@@ -50,11 +37,6 @@ static inline int fw_add_local_dnat(
                 bool add,
                 int af,
                 int protocol,
-                const char *in_interface,
-                const union in_addr_union *source,
-                unsigned source_prefixlen,
-                const union in_addr_union *destination,
-                unsigned destination_prefixlen,
                 uint16_t local_port,
                 const union in_addr_union *remote,
                 uint16_t remote_port,
index 7e876295ff16d296908b9c85ade9d2e73039adcf..a13a198b7a780f0b9b4164704cf7c47dad6036b8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <ctype.h>
 #include <net/if.h>
@@ -66,6 +66,7 @@ typedef struct TableData {
 
         size_t minimum_width;       /* minimum width for the column */
         size_t maximum_width;       /* maximum width for the column */
+        size_t formatted_for_width; /* the width we tried to format for */
         unsigned weight;            /* the horizontal weight for this column, in case the table is expanded/compressed */
         unsigned ellipsize_percent; /* 0 … 100, where to place the ellipsis when compression is needed */
         unsigned align_percent;     /* 0 … 100, where to pad with spaces when expanding is needed. 0: left-aligned, 100: right-aligned */
@@ -164,7 +165,6 @@ Table *table_new_raw(size_t n_columns) {
 Table *table_new_internal(const char *first_header, ...) {
         _cleanup_(table_unrefp) Table *t = NULL;
         size_t n_columns = 1;
-        const char *h;
         va_list ap;
         int r;
 
@@ -172,8 +172,7 @@ Table *table_new_internal(const char *first_header, ...) {
 
         va_start(ap, first_header);
         for (;;) {
-                h = va_arg(ap, const char*);
-                if (!h)
+                if (!va_arg(ap, const char*))
                         break;
 
                 n_columns++;
@@ -185,7 +184,7 @@ Table *table_new_internal(const char *first_header, ...) {
                 return NULL;
 
         va_start(ap, first_header);
-        for (h = first_header; h; h = va_arg(ap, const char*)) {
+        for (const char *h = first_header; h; h = va_arg(ap, const char*)) {
                 TableCell *cell;
 
                 r = table_add_cell(t, &cell, TABLE_STRING, h);
@@ -213,7 +212,7 @@ static TableData *table_data_free(TableData *d) {
         free(d->formatted);
         free(d->url);
 
-        if (d->type == TABLE_STRV)
+        if (IN_SET(d->type, TABLE_STRV, TABLE_STRV_WRAPPED))
                 strv_free(d->strv);
 
         return mfree(d);
@@ -223,12 +222,10 @@ DEFINE_PRIVATE_TRIVIAL_REF_UNREF_FUNC(TableData, table_data, table_data_free);
 DEFINE_TRIVIAL_CLEANUP_FUNC(TableData*, table_data_unref);
 
 Table *table_unref(Table *t) {
-        size_t i;
-
         if (!t)
                 return NULL;
 
-        for (i = 0; i < t->n_cells; i++)
+        for (size_t i = 0; i < t->n_cells; i++)
                 table_data_unref(t->data[i]);
 
         free(t->data);
@@ -252,6 +249,7 @@ static size_t table_data_size(TableDataType type, const void *data) {
                 return strlen(data) + 1;
 
         case TABLE_STRV:
+        case TABLE_STRV_WRAPPED:
                 return sizeof(char **);
 
         case TABLE_BOOLEAN:
@@ -376,7 +374,7 @@ static TableData *table_data_new(
         d->align_percent = align_percent;
         d->ellipsize_percent = ellipsize_percent;
 
-        if (type == TABLE_STRV) {
+        if (IN_SET(type, TABLE_STRV, TABLE_STRV_WRAPPED)) {
                 d->strv = strv_copy(data);
                 if (!d->strv)
                         return NULL;
@@ -817,6 +815,7 @@ int table_add_many_internal(Table *t, TableDataType first_type, ...) {
                         break;
 
                 case TABLE_STRV:
+                case TABLE_STRV_WRAPPED:
                         data = va_arg(ap, char * const *);
                         break;
 
@@ -1047,11 +1046,9 @@ int table_set_empty_string(Table *t, const char *empty) {
 }
 
 int table_set_display_all(Table *t) {
-        size_t allocated;
-
         assert(t);
 
-        allocated = t->n_display_map;
+        size_t allocated = t->n_display_map;
 
         if (!GREEDY_REALLOC(t->display_map, allocated, MAX(t->n_columns, allocated)))
                 return -ENOMEM;
@@ -1124,7 +1121,6 @@ int table_set_sort(Table *t, size_t first_column, ...) {
 }
 
 int table_hide_column_from_display(Table *t, size_t column) {
-        size_t allocated, cur = 0;
         int r;
 
         assert(t);
@@ -1137,7 +1133,7 @@ int table_hide_column_from_display(Table *t, size_t column) {
                         return r;
         }
 
-        allocated = t->n_display_map;
+        size_t allocated = t->n_display_map, cur = 0;
 
         for (size_t i = 0; i < allocated; i++) {
                 if (t->display_map[i] == column)
@@ -1169,6 +1165,7 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t
                         return path_compare(a->string, b->string);
 
                 case TABLE_STRV:
+                case TABLE_STRV_WRAPPED:
                         return strv_compare(a->strv, b->strv);
 
                 case TABLE_BOOLEAN:
@@ -1247,7 +1244,6 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t
 }
 
 static int table_data_compare(const size_t *a, const size_t *b, Table *t) {
-        size_t i;
         int r;
 
         assert(t);
@@ -1262,7 +1258,7 @@ static int table_data_compare(const size_t *a, const size_t *b, Table *t) {
                 return 1;
 
         /* Order other lines by the sorting map */
-        for (i = 0; i < t->n_sort_map; i++) {
+        for (size_t i = 0; i < t->n_sort_map; i++) {
                 TableData *d, *dd;
 
                 d = t->data[*a + t->sort_map[i]];
@@ -1277,10 +1273,46 @@ static int table_data_compare(const size_t *a, const size_t *b, Table *t) {
         return CMP(*a, *b);
 }
 
-static const char *table_data_format(Table *t, TableData *d, bool avoid_uppercasing) {
+static char* format_strv_width(char **strv, size_t column_width) {
+        _cleanup_fclose_ FILE *f = NULL;
+        size_t sz = 0;
+        _cleanup_free_ char *buf = NULL;
+
+        f = open_memstream_unlocked(&buf, &sz);
+        if (!f)
+                return NULL;
+
+        size_t position = 0;
+        char **p;
+        STRV_FOREACH(p, strv) {
+                size_t our_len = utf8_console_width(*p); /* This returns -1 on invalid utf-8 (which shouldn't happen).
+                                                          * If that happens, we'll just print one item per line. */
+
+                if (position == 0) {
+                        fputs(*p, f);
+                        position = our_len;
+                } else if (size_add(size_add(position, 1), our_len) <= column_width) {
+                        fprintf(f, " %s", *p);
+                        position = size_add(size_add(position, 1), our_len);
+                } else {
+                        fprintf(f, "\n%s", *p);
+                        position = our_len;
+                }
+        }
+
+        if (fflush_and_check(f) < 0)
+                return NULL;
+
+        f = safe_fclose(f);
+        return TAKE_PTR(buf);
+}
+
+static const char *table_data_format(Table *t, TableData *d, bool avoid_uppercasing, size_t column_width, bool *have_soft) {
         assert(d);
 
-        if (d->formatted)
+        if (d->formatted &&
+            /* Only TABLE_STRV_WRAPPED adjust based on column_width so far… */
+            (d->type != TABLE_STRV_WRAPPED || d->formatted_for_width == column_width))
                 return d->formatted;
 
         switch (d->type) {
@@ -1290,13 +1322,12 @@ static const char *table_data_format(Table *t, TableData *d, bool avoid_uppercas
         case TABLE_STRING:
         case TABLE_PATH:
                 if (d->uppercase && !avoid_uppercasing) {
-                        char *p, *q;
-
                         d->formatted = new(char, strlen(d->string) + 1);
                         if (!d->formatted)
                                 return NULL;
 
-                        for (p = d->string, q = d->formatted; *p; p++, q++)
+                        char *q = d->formatted;
+                        for (char *p = d->string; *p; p++, q++)
                                 *q = (char) toupper((unsigned char) *p);
                         *q = 0;
 
@@ -1305,17 +1336,28 @@ static const char *table_data_format(Table *t, TableData *d, bool avoid_uppercas
 
                 return d->string;
 
-        case TABLE_STRV: {
-                char *p;
+        case TABLE_STRV:
+                if (strv_isempty(d->strv))
+                        return strempty(t->empty_string);
+
+                d->formatted = strv_join(d->strv, "\n");
+                if (!d->formatted)
+                        return NULL;
+                break;
 
+        case TABLE_STRV_WRAPPED: {
                 if (strv_isempty(d->strv))
                         return strempty(t->empty_string);
 
-                p = strv_join(d->strv, "\n");
-                if (!p)
+                char *buf = format_strv_width(d->strv, column_width);
+                if (!buf)
                         return NULL;
 
-                d->formatted = p;
+                free_and_replace(d->formatted, buf);
+                d->formatted_for_width = column_width;
+                if (have_soft)
+                        *have_soft = true;
+
                 break;
         }
 
@@ -1632,16 +1674,19 @@ static int console_width_height(
 static int table_data_requested_width_height(
                 Table *table,
                 TableData *d,
+                size_t available_width,
                 size_t *ret_width,
-                size_t *ret_height) {
+                size_t *ret_height,
+                bool *have_soft) {
 
         _cleanup_free_ char *truncated = NULL;
         bool truncation_applied = false;
         size_t width, height;
         const char *t;
         int r;
+        bool soft = false;
 
-        t = table_data_format(table, d, false);
+        t = table_data_format(table, d, false, available_width, &soft);
         if (!t)
                 return -ENOMEM;
 
@@ -1669,6 +1714,8 @@ static int table_data_requested_width_height(
                 *ret_width = width;
         if (ret_height)
                 *ret_height = height;
+        if (have_soft && soft)
+                *have_soft = true;
 
         return truncation_applied;
 }
@@ -1678,7 +1725,6 @@ static char *align_string_mem(const char *str, const char *url, size_t new_lengt
         _cleanup_free_ char *clickable = NULL;
         const char *p;
         char *ret;
-        size_t i;
         int r;
 
         /* As with ellipsize_mem(), 'old_length' is a byte size while 'new_length' is a width in character cells */
@@ -1723,10 +1769,10 @@ static char *align_string_mem(const char *str, const char *url, size_t new_lengt
         if (!ret)
                 return NULL;
 
-        for (i = 0; i < lspace; i++)
+        for (size_t i = 0; i < lspace; i++)
                 ret[i] = ' ';
         memcpy(ret + lspace, clickable ?: str, clickable_length);
-        for (i = lspace + clickable_length; i < space + clickable_length; i++)
+        for (size_t i = lspace + clickable_length; i < space + clickable_length; i++)
                 ret[i] = ' ';
 
         ret[space + clickable_length] = 0;
@@ -1740,7 +1786,7 @@ static bool table_data_isempty(TableData *d) {
                 return true;
 
         /* Let's also consider an empty strv as truly empty. */
-        if (d->type == TABLE_STRV)
+        if (IN_SET(d->type, TABLE_STRV, TABLE_STRV_WRAPPED))
                 return strv_isempty(d->strv);
 
         /* Note that an empty string we do not consider empty here! */
@@ -1771,8 +1817,8 @@ static const char* table_data_rgap_color(TableData *d) {
 
 int table_print(Table *t, FILE *f) {
         size_t n_rows, *minimum_width, *maximum_width, display_columns, *requested_width,
-                i, j, table_minimum_width, table_maximum_width, table_requested_width, table_effective_width,
-                *width;
+                table_minimum_width, table_maximum_width, table_requested_width, table_effective_width,
+                *width = NULL;
         _cleanup_free_ size_t *sorted = NULL;
         uint64_t *column_weight, weight_sum;
         int r;
@@ -1795,7 +1841,7 @@ int table_print(Table *t, FILE *f) {
                 if (!sorted)
                         return -ENOMEM;
 
-                for (i = 0; i < n_rows; i++)
+                for (size_t i = 0; i < n_rows; i++)
                         sorted[i] = i * t->n_columns;
 
                 typesafe_qsort_r(sorted, n_rows, table_data_compare, t);
@@ -1811,205 +1857,225 @@ int table_print(Table *t, FILE *f) {
         minimum_width = newa(size_t, display_columns);
         maximum_width = newa(size_t, display_columns);
         requested_width = newa(size_t, display_columns);
-        width = newa(size_t, display_columns);
         column_weight = newa0(uint64_t, display_columns);
 
-        for (j = 0; j < display_columns; j++) {
+        for (size_t j = 0; j < display_columns; j++) {
                 minimum_width[j] = 1;
                 maximum_width[j] = (size_t) -1;
-                requested_width[j] = (size_t) -1;
         }
 
-        /* First pass: determine column sizes */
-        for (i = t->header ? 0 : 1; i < n_rows; i++) {
-                TableData **row;
+        for (unsigned pass = 0; pass < 2; pass++) {
+                /* First pass: determine column sizes */
 
-                /* Note that we don't care about ordering at this time, as we just want to determine column sizes,
-                 * hence we don't care for sorted[] during the first pass. */
-                row = t->data + i * t->n_columns;
+                for (size_t j = 0; j < display_columns; j++)
+                        requested_width[j] = (size_t) -1;
 
-                for (j = 0; j < display_columns; j++) {
-                        TableData *d;
-                        size_t req_width, req_height;
+                bool any_soft = false;
 
-                        assert_se(d = row[t->display_map ? t->display_map[j] : j]);
+                for (size_t i = t->header ? 0 : 1; i < n_rows; i++) {
+                        TableData **row;
 
-                        r = table_data_requested_width_height(t, d, &req_width, &req_height);
-                        if (r < 0)
-                                return r;
-                        if (r > 0) { /* Truncated because too many lines? */
-                                _cleanup_free_ char *last = NULL;
-                                const char *field;
+                        /* Note that we don't care about ordering at this time, as we just want to determine column sizes,
+                         * hence we don't care for sorted[] during the first pass. */
+                        row = t->data + i * t->n_columns;
 
-                                /* If we are going to show only the first few lines of a cell that has
-                                 * multiple make sure that we have enough space horizontally to show an
-                                 * ellipsis. Hence, let's figure out the last line, and account for its
-                                 * length plus ellipsis. */
+                        for (size_t j = 0; j < display_columns; j++) {
+                                TableData *d;
+                                size_t req_width, req_height;
 
-                                field = table_data_format(t, d, false);
-                                if (!field)
-                                        return -ENOMEM;
+                                assert_se(d = row[t->display_map ? t->display_map[j] : j]);
 
-                                assert_se(t->cell_height_max > 0);
-                                r = string_extract_line(field, t->cell_height_max-1, &last);
+                                r = table_data_requested_width_height(t, d,
+                                                                      width ? width[j] : SIZE_MAX,
+                                                                      &req_width, &req_height, &any_soft);
                                 if (r < 0)
                                         return r;
+                                if (r > 0) { /* Truncated because too many lines? */
+                                        _cleanup_free_ char *last = NULL;
+                                        const char *field;
+
+                                        /* If we are going to show only the first few lines of a cell that has
+                                         * multiple make sure that we have enough space horizontally to show an
+                                         * ellipsis. Hence, let's figure out the last line, and account for its
+                                         * length plus ellipsis. */
+
+                                        field = table_data_format(t, d, false,
+                                                                  width ? width[j] : SIZE_MAX,
+                                                                  &any_soft);
+                                        if (!field)
+                                                return -ENOMEM;
 
-                                req_width = MAX(req_width,
-                                                utf8_console_width(last) +
-                                                utf8_console_width(special_glyph(SPECIAL_GLYPH_ELLIPSIS)));
-                        }
+                                        assert_se(t->cell_height_max > 0);
+                                        r = string_extract_line(field, t->cell_height_max-1, &last);
+                                        if (r < 0)
+                                                return r;
 
-                        /* Determine the biggest width that any cell in this column would like to have */
-                        if (requested_width[j] == (size_t) -1 ||
-                            requested_width[j] < req_width)
-                                requested_width[j] = req_width;
+                                        req_width = MAX(req_width,
+                                                        utf8_console_width(last) +
+                                                        utf8_console_width(special_glyph(SPECIAL_GLYPH_ELLIPSIS)));
+                                }
 
-                        /* Determine the minimum width any cell in this column needs */
-                        if (minimum_width[j] < d->minimum_width)
-                                minimum_width[j] = d->minimum_width;
+                                /* Determine the biggest width that any cell in this column would like to have */
+                                if (requested_width[j] == (size_t) -1 ||
+                                    requested_width[j] < req_width)
+                                        requested_width[j] = req_width;
 
-                        /* Determine the maximum width any cell in this column needs */
-                        if (d->maximum_width != (size_t) -1 &&
-                            (maximum_width[j] == (size_t) -1 ||
-                             maximum_width[j] > d->maximum_width))
-                                maximum_width[j] = d->maximum_width;
+                                /* Determine the minimum width any cell in this column needs */
+                                if (minimum_width[j] < d->minimum_width)
+                                        minimum_width[j] = d->minimum_width;
 
-                        /* Determine the full columns weight */
-                        column_weight[j] += d->weight;
+                                /* Determine the maximum width any cell in this column needs */
+                                if (d->maximum_width != (size_t) -1 &&
+                                    (maximum_width[j] == (size_t) -1 ||
+                                     maximum_width[j] > d->maximum_width))
+                                        maximum_width[j] = d->maximum_width;
+
+                                /* Determine the full columns weight */
+                                column_weight[j] += d->weight;
+                        }
                 }
-        }
 
-        /* One space between each column */
-        table_requested_width = table_minimum_width = table_maximum_width = display_columns - 1;
+                /* One space between each column */
+                table_requested_width = table_minimum_width = table_maximum_width = display_columns - 1;
 
-        /* Calculate the total weight for all columns, plus the minimum, maximum and requested width for the table. */
-        weight_sum = 0;
-        for (j = 0; j < display_columns; j++) {
-                weight_sum += column_weight[j];
+                /* Calculate the total weight for all columns, plus the minimum, maximum and requested width for the table. */
+                weight_sum = 0;
+                for (size_t j = 0; j < display_columns; j++) {
+                        weight_sum += column_weight[j];
 
-                table_minimum_width += minimum_width[j];
+                        table_minimum_width += minimum_width[j];
+
+                        if (maximum_width[j] == (size_t) -1)
+                                table_maximum_width = (size_t) -1;
+                        else
+                                table_maximum_width += maximum_width[j];
 
-                if (maximum_width[j] == (size_t) -1)
-                        table_maximum_width = (size_t) -1;
+                        table_requested_width += requested_width[j];
+                }
+
+                /* Calculate effective table width */
+                if (t->width != 0 && t->width != (size_t) -1)
+                        table_effective_width = t->width;
+                else if (t->width == 0 ||
+                         ((pass > 0 || !any_soft) && (pager_have() || !isatty(STDOUT_FILENO))))
+                        table_effective_width = table_requested_width;
                 else
-                        table_maximum_width += maximum_width[j];
+                        table_effective_width = MIN(table_requested_width, columns());
 
-                table_requested_width += requested_width[j];
-        }
+                if (table_maximum_width != (size_t) -1 && table_effective_width > table_maximum_width)
+                        table_effective_width = table_maximum_width;
 
-        /* Calculate effective table width */
-        if (t->width != 0 && t->width != (size_t) -1)
-                table_effective_width = t->width;
-        else if (t->width == 0 || pager_have() || !isatty(STDOUT_FILENO))
-                table_effective_width = table_requested_width;
-        else
-                table_effective_width = MIN(table_requested_width, columns());
+                if (table_effective_width < table_minimum_width)
+                        table_effective_width = table_minimum_width;
 
-        if (table_maximum_width != (size_t) -1 && table_effective_width > table_maximum_width)
-                table_effective_width = table_maximum_width;
+                if (!width)
+                        width = newa(size_t, display_columns);
 
-        if (table_effective_width < table_minimum_width)
-                table_effective_width = table_minimum_width;
+                if (table_effective_width >= table_requested_width) {
+                        size_t extra;
 
-        if (table_effective_width >= table_requested_width) {
-                size_t extra;
+                        /* We have extra room, let's distribute it among columns according to their weights. We first provide
+                         * each column with what it asked for and the distribute the rest.  */
 
-                /* We have extra room, let's distribute it among columns according to their weights. We first provide
-                 * each column with what it asked for and the distribute the rest.  */
+                        extra = table_effective_width - table_requested_width;
 
-                extra = table_effective_width - table_requested_width;
+                        for (size_t j = 0; j < display_columns; j++) {
+                                size_t delta;
 
-                for (j = 0; j < display_columns; j++) {
-                        size_t delta;
+                                if (weight_sum == 0)
+                                        width[j] = requested_width[j] + extra / (display_columns - j); /* Avoid division by zero */
+                                else
+                                        width[j] = requested_width[j] + (extra * column_weight[j]) / weight_sum;
 
-                        if (weight_sum == 0)
-                                width[j] = requested_width[j] + extra / (display_columns - j); /* Avoid division by zero */
-                        else
-                                width[j] = requested_width[j] + (extra * column_weight[j]) / weight_sum;
+                                if (maximum_width[j] != (size_t) -1 && width[j] > maximum_width[j])
+                                        width[j] = maximum_width[j];
 
-                        if (maximum_width[j] != (size_t) -1 && width[j] > maximum_width[j])
-                                width[j] = maximum_width[j];
+                                if (width[j] < minimum_width[j])
+                                        width[j] = minimum_width[j];
 
-                        if (width[j] < minimum_width[j])
-                                width[j] = minimum_width[j];
+                                assert(width[j] >= requested_width[j]);
+                                delta = width[j] - requested_width[j];
 
-                        assert(width[j] >= requested_width[j]);
-                        delta = width[j] - requested_width[j];
+                                /* Subtract what we just added from the rest */
+                                if (extra > delta)
+                                        extra -= delta;
+                                else
+                                        extra = 0;
 
-                        /* Subtract what we just added from the rest */
-                        if (extra > delta)
-                                extra -= delta;
-                        else
-                                extra = 0;
+                                assert(weight_sum >= column_weight[j]);
+                                weight_sum -= column_weight[j];
+                        }
 
-                        assert(weight_sum >= column_weight[j]);
-                        weight_sum -= column_weight[j];
-                }
+                        break; /* Every column should be happy, no need to repeat calculations. */
+                } else {
+                        /* We need to compress the table, columns can't get what they asked for. We first provide each column
+                         * with the minimum they need, and then distribute anything left. */
+                        bool finalize = false;
+                        size_t extra;
 
-        } else {
-                /* We need to compress the table, columns can't get what they asked for. We first provide each column
-                 * with the minimum they need, and then distribute anything left. */
-                bool finalize = false;
-                size_t extra;
+                        extra = table_effective_width - table_minimum_width;
 
-                extra = table_effective_width - table_minimum_width;
+                        for (size_t j = 0; j < display_columns; j++)
+                                width[j] = (size_t) -1;
 
-                for (j = 0; j < display_columns; j++)
-                        width[j] = (size_t) -1;
+                        for (;;) {
+                                bool restart = false;
 
-                for (;;) {
-                        bool restart = false;
+                                for (size_t j = 0; j < display_columns; j++) {
+                                        size_t delta, w;
 
-                        for (j = 0; j < display_columns; j++) {
-                                size_t delta, w;
+                                        /* Did this column already get something assigned? If so, let's skip to the next */
+                                        if (width[j] != (size_t) -1)
+                                                continue;
 
-                                /* Did this column already get something assigned? If so, let's skip to the next */
-                                if (width[j] != (size_t) -1)
-                                        continue;
+                                        if (weight_sum == 0)
+                                                w = minimum_width[j] + extra / (display_columns - j); /* avoid division by zero */
+                                        else
+                                                w = minimum_width[j] + (extra * column_weight[j]) / weight_sum;
 
-                                if (weight_sum == 0)
-                                        w = minimum_width[j] + extra / (display_columns - j); /* avoid division by zero */
-                                else
-                                        w = minimum_width[j] + (extra * column_weight[j]) / weight_sum;
+                                        if (w >= requested_width[j]) {
+                                                /* Never give more than requested. If we hit a column like this, there's more
+                                                 * space to allocate to other columns which means we need to restart the
+                                                 * iteration. However, if we hit a column like this, let's assign it the space
+                                                 * it wanted for good early.*/
 
-                                if (w >= requested_width[j]) {
-                                        /* Never give more than requested. If we hit a column like this, there's more
-                                         * space to allocate to other columns which means we need to restart the
-                                         * iteration. However, if we hit a column like this, let's assign it the space
-                                         * it wanted for good early.*/
+                                                w = requested_width[j];
+                                                restart = true;
 
-                                        w = requested_width[j];
-                                        restart = true;
+                                        } else if (!finalize)
+                                                continue;
 
-                                } else if (!finalize)
-                                        continue;
+                                        width[j] = w;
 
-                                width[j] = w;
+                                        assert(w >= minimum_width[j]);
+                                        delta = w - minimum_width[j];
 
-                                assert(w >= minimum_width[j]);
-                                delta = w - minimum_width[j];
+                                        assert(delta <= extra);
+                                        extra -= delta;
 
-                                assert(delta <= extra);
-                                extra -= delta;
+                                        assert(weight_sum >= column_weight[j]);
+                                        weight_sum -= column_weight[j];
 
-                                assert(weight_sum >= column_weight[j]);
-                                weight_sum -= column_weight[j];
+                                        if (restart && !finalize)
+                                                break;
+                                }
 
-                                if (restart && !finalize)
+                                if (finalize)
                                         break;
+
+                                if (!restart)
+                                        finalize = true;
                         }
 
-                        if (finalize)
+                        if (!any_soft) /* Some columns got less than requested. If some cells were "soft",
+                                        * let's try to reformat them with the new widths. Otherwise, let's
+                                        * move on. */
                                 break;
-
-                        if (!restart)
-                                finalize = true;
                 }
         }
 
         /* Second pass: show output */
-        for (i = t->header ? 0 : 1; i < n_rows; i++) {
+        for (size_t i = t->header ? 0 : 1; i < n_rows; i++) {
                 size_t n_subline = 0;
                 bool more_sublines;
                 TableData **row;
@@ -2023,7 +2089,7 @@ int table_print(Table *t, FILE *f) {
                         const char *gap_color = NULL;
                         more_sublines = false;
 
-                        for (j = 0; j < display_columns; j++) {
+                        for (size_t j = 0; j < display_columns; j++) {
                                 _cleanup_free_ char *buffer = NULL, *extracted = NULL;
                                 bool lines_truncated = false;
                                 const char *field, *color = NULL;
@@ -2032,7 +2098,7 @@ int table_print(Table *t, FILE *f) {
 
                                 assert_se(d = row[t->display_map ? t->display_map[j] : j]);
 
-                                field = table_data_format(t, d, false);
+                                field = table_data_format(t, d, false, width[j], NULL);
                                 if (!field)
                                         return -ENOMEM;
 
@@ -2247,6 +2313,7 @@ static int table_data_to_json(TableData *d, JsonVariant **ret) {
                 return json_variant_new_string(ret, d->string);
 
         case TABLE_STRV:
+        case TABLE_STRV_WRAPPED:
                 return json_variant_new_array_strv(ret, d->strv);
 
         case TABLE_BOOLEAN:
@@ -2332,17 +2399,15 @@ static int table_data_to_json(TableData *d, JsonVariant **ret) {
 }
 
 static char* string_to_json_field_name(const char *f) {
-        char *c, *x;
-
         /* Tries to make a string more suitable as JSON field name. There are no strict rules defined what a
          * field name can be hence this is a bit vague and black magic. Right now we only convert spaces to
          * underscores and leave everything as is. */
 
-        c = strdup(f);
+        char *c = strdup(f);
         if (!c)
                 return NULL;
 
-        for (x = c; *x; x++)
+        for (char *x = c; *x; x++)
                 if (isspace(*x))
                         *x = '_';
 
@@ -2352,7 +2417,7 @@ static char* string_to_json_field_name(const char *f) {
 int table_to_json(Table *t, JsonVariant **ret) {
         JsonVariant **rows = NULL, **elements = NULL;
         _cleanup_free_ size_t *sorted = NULL;
-        size_t n_rows, i, j, display_columns;
+        size_t n_rows, display_columns;
         int r;
 
         assert(t);
@@ -2372,7 +2437,7 @@ int table_to_json(Table *t, JsonVariant **ret) {
                         goto finish;
                 }
 
-                for (i = 0; i < n_rows; i++)
+                for (size_t i = 0; i < n_rows; i++)
                         sorted[i] = i * t->n_columns;
 
                 typesafe_qsort_r(sorted, n_rows, table_data_compare, t);
@@ -2390,7 +2455,7 @@ int table_to_json(Table *t, JsonVariant **ret) {
                 goto finish;
         }
 
-        for (j = 0; j < display_columns; j++) {
+        for (size_t j = 0; j < display_columns; j++) {
                 _cleanup_free_ char *mangled = NULL;
                 const char *formatted;
                 TableData *d;
@@ -2398,7 +2463,7 @@ int table_to_json(Table *t, JsonVariant **ret) {
                 assert_se(d = t->data[t->display_map ? t->display_map[j] : j]);
 
                 /* Field names must be strings, hence format whatever we got here as a string first */
-                formatted = table_data_format(t, d, true);
+                formatted = table_data_format(t, d, true, SIZE_MAX, NULL);
                 if (!formatted) {
                         r = -ENOMEM;
                         goto finish;
@@ -2422,7 +2487,7 @@ int table_to_json(Table *t, JsonVariant **ret) {
                 goto finish;
         }
 
-        for (i = 1; i < n_rows; i++) {
+        for (size_t i = 1; i < n_rows; i++) {
                 TableData **row;
 
                 if (sorted)
@@ -2430,7 +2495,7 @@ int table_to_json(Table *t, JsonVariant **ret) {
                 else
                         row = t->data + i * t->n_columns;
 
-                for (j = 0; j < display_columns; j++) {
+                for (size_t j = 0; j < display_columns; j++) {
                         TableData *d;
                         size_t k;
 
index 1851f1d14a22a56e01427763c3926255ead3072c..965549b60a4def2da03ab42af4208fdf158e0a2e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
@@ -12,6 +12,7 @@ typedef enum TableDataType {
         TABLE_EMPTY,
         TABLE_STRING,
         TABLE_STRV,
+        TABLE_STRV_WRAPPED,
         TABLE_PATH,
         TABLE_BOOLEAN,
         TABLE_TIMESTAMP,
index 78ec18dd0737b495a84f3e70b632191c4904e104..855137c99adba75697db7ab3e240dd6b9a07de5a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /* exit codes as defined in fsck(8) */
index ca88813602304e316e8d1c37fb1eb74ff094154b..292b97cd6929b506ecef5f30e5ceeb80cc0a3dba 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdio.h>
index a73575e95c88b095873f4461de3dab4f4560329d..1a602cb56b292fb22945c72dce6e5dadfbcfee77 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index d61b367d33709187338a3e54f377b40a6fb3393a..4d49b7d52b7745ebd85043914654a1d112115177 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <unistd.h>
index 579e291fe8ab3d070a6bc3bce15b0f5f2a33fb93..ff6072f53d8f4b376bc0ba9abeecae2df86a5259 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdio.h>
index fad01e208bedddf393db19ae3d5dfb1eeba9e9a6..36ef9c83c7f2bfa2cbe8761776e04f06f5604f7c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "geneve-util.h"
 #include "string-table.h"
index 63c03ae02abf1263518c58d5704dfeb6f871c47a..3865f805a433b5a88322e1ab71621dfa3dec62d1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <linux/if_link.h>
index 53a3f4bfe62b3670458464da3d529cb39778af51..15ea2f0a1f1af01660cc1a0efa2e7049a06a30af 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "gpt.h"
 #include "string-util.h"
@@ -14,6 +14,10 @@ const GptPartitionType gpt_partition_type_table[] = {
         { GPT_ROOT_ARM_64_VERITY,    "root-arm64-verity"     },
         { GPT_ROOT_IA64,             "root-ia64"             },
         { GPT_ROOT_IA64_VERITY,      "root-ia64-verity"      },
+        { GPT_ROOT_RISCV32,          "root-riscv32"          },
+        { GPT_ROOT_RISCV32_VERITY,   "root-riscv32-verity"   },
+        { GPT_ROOT_RISCV64,          "root-riscv64"          },
+        { GPT_ROOT_RISCV64_VERITY,   "root-riscv64-verity"   },
 #ifdef GPT_ROOT_NATIVE
         { GPT_ROOT_NATIVE,           "root"                  },
         { GPT_ROOT_NATIVE_VERITY,    "root-verity"           },
@@ -32,6 +36,10 @@ const GptPartitionType gpt_partition_type_table[] = {
         { GPT_USR_ARM_64_VERITY,     "usr-arm64-verity"      },
         { GPT_USR_IA64,              "usr-ia64"              },
         { GPT_USR_IA64_VERITY,       "usr-ia64-verity"       },
+        { GPT_USR_RISCV32,           "usr-riscv32"           },
+        { GPT_USR_RISCV32_VERITY,    "usr-riscv32-verity"    },
+        { GPT_USR_RISCV64,           "usr-riscv64"           },
+        { GPT_USR_RISCV64_VERITY,    "usr-riscv64-verity"    },
 #ifdef GPT_USR_NATIVE
         { GPT_USR_NATIVE,            "usr"                   },
         { GPT_USR_NATIVE_VERITY,     "usr-verity"            },
index b162eb9d0dc067950913d21116621950aced56b8..241ff035c648fbd87c63e5f17d7334c0fa93351e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <endian.h>
 #define GPT_ROOT_ARM      SD_ID128_MAKE(69,da,d7,10,2c,e4,4e,3c,b1,6c,21,a1,d4,9a,be,d3)
 #define GPT_ROOT_ARM_64   SD_ID128_MAKE(b9,21,b0,45,1d,f0,41,c3,af,44,4c,6f,28,0d,3f,ae)
 #define GPT_ROOT_IA64     SD_ID128_MAKE(99,3d,8d,3d,f8,0e,42,25,85,5a,9d,af,8e,d7,ea,97)
+#define GPT_ROOT_RISCV32  SD_ID128_MAKE(60,d5,a7,fe,8e,7d,43,5c,b7,14,3d,d8,16,21,44,e1)
+#define GPT_ROOT_RISCV64  SD_ID128_MAKE(72,ec,70,a6,cf,74,40,e6,bd,49,4b,da,08,e8,f2,24)
 #define GPT_USR_X86       SD_ID128_MAKE(75,25,0d,76,8c,c6,45,8e,bd,66,bd,47,cc,81,a8,12)
 #define GPT_USR_X86_64    SD_ID128_MAKE(84,84,68,0c,95,21,48,c6,9c,11,b0,72,06,56,f6,9e)
 #define GPT_USR_ARM       SD_ID128_MAKE(7d,03,59,a3,02,b3,4f,0a,86,5c,65,44,03,e7,06,25)
 #define GPT_USR_ARM_64    SD_ID128_MAKE(b0,e0,10,50,ee,5f,43,90,94,9a,91,01,b1,71,04,e9)
 #define GPT_USR_IA64      SD_ID128_MAKE(43,01,d2,a6,4e,3b,4b,2a,bb,94,9e,0b,2c,42,25,ea)
+#define GPT_USR_RISCV32   SD_ID128_MAKE(b9,33,fb,22,5c,3f,4f,91,af,90,e2,bb,0f,a5,07,02)
+#define GPT_USR_RISCV64   SD_ID128_MAKE(be,ae,c3,4b,84,42,43,9b,a4,0b,98,43,81,ed,09,7d)
 #define GPT_ESP           SD_ID128_MAKE(c1,2a,73,28,f8,1f,11,d2,ba,4b,00,a0,c9,3e,c9,3b)
 #define GPT_XBOOTLDR      SD_ID128_MAKE(bc,13,c2,ff,59,e6,42,62,a3,52,b2,75,fd,6f,71,72)
 #define GPT_SWAP          SD_ID128_MAKE(06,57,fd,6d,a4,ab,43,c4,84,e5,09,33,c8,4b,4f,4f)
 #define GPT_ROOT_ARM_VERITY    SD_ID128_MAKE(73,86,cd,f2,20,3c,47,a9,a4,98,f2,ec,ce,45,a2,d6)
 #define GPT_ROOT_ARM_64_VERITY SD_ID128_MAKE(df,33,00,ce,d6,9f,4c,92,97,8c,9b,fb,0f,38,d8,20)
 #define GPT_ROOT_IA64_VERITY   SD_ID128_MAKE(86,ed,10,d5,b6,07,45,bb,89,57,d3,50,f2,3d,05,71)
+#define GPT_ROOT_RISCV32_VERITY SD_ID128_MAKE(ae,02,53,be,11,67,40,07,ac,68,43,92,6c,14,c5,de)
+#define GPT_ROOT_RISCV64_VERITY SD_ID128_MAKE(b6,ed,55,82,44,0b,42,09,b8,da,5f,f7,c4,19,ea,3d)
 #define GPT_USR_X86_VERITY     SD_ID128_MAKE(8f,46,1b,0d,14,ee,4e,81,9a,a9,04,9b,6f,b9,7a,bd)
 #define GPT_USR_X86_64_VERITY  SD_ID128_MAKE(77,ff,5f,63,e7,b6,46,33,ac,f4,15,65,b8,64,c0,e6)
 #define GPT_USR_ARM_VERITY     SD_ID128_MAKE(c2,15,d7,51,7b,cd,46,49,be,90,66,27,49,0a,4c,05)
 #define GPT_USR_ARM_64_VERITY  SD_ID128_MAKE(6e,11,a4,e7,fb,ca,4d,ed,b9,e9,e1,a5,12,bb,66,4e)
 #define GPT_USR_IA64_VERITY    SD_ID128_MAKE(6a,49,1e,03,3b,e7,45,45,8e,38,83,32,0e,0e,a8,80)
+#define GPT_USR_RISCV32_VERITY SD_ID128_MAKE(cb,1e,e4,e3,8c,d0,41,36,a0,a4,aa,61,a3,2e,87,30)
+#define GPT_USR_RISCV64_VERITY SD_ID128_MAKE(8f,10,56,be,9b,05,47,c4,81,d6,be,53,12,8e,5b,54)
 
 #if defined(__x86_64__)
 #  define GPT_ROOT_NATIVE GPT_ROOT_X86_64
 #  define GPT_USR_NATIVE_VERITY GPT_USR_ARM_VERITY
 #endif
 
+#if defined(__riscv)
+#if (__riscv_xlen == 32)
+#  define GPT_ROOT_NATIVE GPT_ROOT_RISCV32
+#  define GPT_ROOT_NATIVE_VERITY GPT_ROOT_RISCV32_VERITY
+#  define GPT_USR_NATIVE GPT_USR_RISCV32
+#  define GPT_USR_NATIVE_VERITY GPT_USR_RISCV32_VERITY
+#elif (__riscv_xlen == 64)
+#  define GPT_ROOT_NATIVE GPT_ROOT_RISCV64
+#  define GPT_ROOT_NATIVE_VERITY GPT_ROOT_RISCV64_VERITY
+#  define GPT_USR_NATIVE GPT_USR_RISCV64
+#  define GPT_USR_NATIVE_VERITY GPT_USR_RISCV64_VERITY
+#endif
+#endif
+
 #define GPT_FLAG_REQUIRED_PARTITION (1ULL << 0)
 #define GPT_FLAG_NO_BLOCK_IO_PROTOCOL (1ULL << 1)
 #define GPT_FLAG_LEGACY_BIOS_BOOTABLE (1ULL << 2)
index d999ff95f821fa4d4f51af4ac5a58c2f4dc3f0a8..da3ed0a8503b6d57ffd875ca6a664b19f5dbd793 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "group-record.h"
 #include "strv.h"
index 85c91eb1f58e50b979f178491574d74f72809981..f81020437c9047857a5e2b432283ef9910f77deb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "json.h"
index 6237424e8243aec252eb4f33e973b22e32b6e08c..f232767adf529aa02aa4bfb89322ea80232783b6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 
index 247558231c9a26c1eaeb382d0df03236817ebb65..d69cb9b5514431a437a0b9dde3d6747d75dbdbaa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #pragma once
 
index 75d815df38d1718c2a6c720c79f75f10e473bbe1..83c4b3c530f85eaaff129d95231d536c164aaf11 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if HAVE_LIBIDN2
 #  include <idn2.h>
index d958559ec93bee26ec85355efeeb205a1aa1b527..4698eed3b8003ca4e0fe16ab8a013874796f70c1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #if HAVE_LIBIDN2
index 0d4ce3cafcb9b7c6bc75bbdd54386b86d66c760e..e37c9ad2262cd2348fb2ad421e2ad1d133d5cbfc 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
index 8f20741c33e32942b2bb481ce1345a584fc32d3e..922db786e6820b17b766c6eda2573385309aedc2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 0a57c0899090fd6d1ada682e95a48e2b329e43c1..298c066dffd857c9a1a77150346469a37228c7dd 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index d85aa565cc1e5bd089f28a158b22eaf9507c187f..8d017f61d1efcd3bf827316935a26f99c8a75f2c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 1d7ff81df1f2131c6929016249fd75a50939b3d5..1bf5b8edd7f04445802614223e402ef96e7cfd6c 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2+ */
 /*
  * initreq.h   Interface to talk to init through /dev/initctl.
  *
index 9267d52b96e993f0a9501808a35a3fbf58ec07db..6bc3f15def54810c0f2a9fd61d7cc350181548be 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdio.h>
@@ -104,43 +104,18 @@ static int specifier_last_component(char specifier, const void *data, const void
 }
 
 int install_full_printf(const UnitFileInstallInfo *i, const char *format, char **ret) {
-        /* This is similar to unit_full_printf() but does not support
-         * anything path-related.
-         *
-         * %n: the full id of the unit                 (foo@bar.waldo)
-         * %N: the id of the unit without the suffix   (foo@bar)
-         * %p: the prefix                              (foo)
-         * %i: the instance                            (bar)
-
-         * %U the UID of the running user
-         * %u the username of running user
-         * %m the machine ID of the running system
-         * %H the hostname of the running system
-         * %b the boot ID of the running system
-         * %v `uname -r` of the running system
-         */
+        /* This is similar to unit_name_printf() */
 
         const Specifier table[] = {
+                { 'i', specifier_instance,            NULL },
+                { 'j', specifier_last_component,      NULL },
                 { 'n', specifier_name,                NULL },
                 { 'N', specifier_prefix_and_instance, NULL },
                 { 'p', specifier_prefix,              NULL },
-                { 'i', specifier_instance,            NULL },
-                { 'j', specifier_last_component,      NULL },
 
-                { 'g', specifier_group_name,          NULL },
-                { 'G', specifier_group_id,            NULL },
-                { 'U', specifier_user_id,             NULL },
-                { 'u', specifier_user_name,           NULL },
-
-                { 'm', specifier_machine_id,          NULL },
-                { 'b', specifier_boot_id,             NULL },
-                { 'H', specifier_host_name,           NULL },
-                { 'v', specifier_kernel_release,      NULL },
-                { 'a', specifier_architecture,        NULL },
-                { 'o', specifier_os_id,               NULL },
-                { 'w', specifier_os_version_id,       NULL },
-                { 'B', specifier_os_build_id,         NULL },
-                { 'W', specifier_os_variant_id,       NULL },
+                COMMON_SYSTEM_SPECIFIERS,
+
+                COMMON_CREDS_SPECIFIERS,
                 {}
         };
 
index fa8ea7ef81daa92946faf51601f84e934202019c..34e129413e5706757d5e6d50256bfe8eb5bea471 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "install.h"
index cd14b2c4beb40dca02b830b503e5d1110f0609c9..302497a965b1271f8c10434ab9a7ea1e4f89691c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 23ac9953328ff523918dba3f0c2be9e1b49dbf7f..84bf1f59d228b8c38fed343e4c034cfe69a41d7e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef enum UnitFilePresetMode UnitFilePresetMode;
index aa675ea10b25a5cc9cf1476b1952e269243c12fd..0623d5e9be847c7b0e28488879504b6e5933c8e9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <netinet/in.h>
index 5c94969695f7677bb495cd8a7da4336309716cfe..abe3f5fc284621f49fb88a8874125843ec09c296 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 const char *ip_protocol_to_name(int id);
index da6be767892c3c355fabd975a9d2ab2486c26cde..1f2e2ffe7b50603cb58d5e94f8b4ba5ade671fd1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/if.h>
 
index dda659d42ddeac5eebb12998775a9a60d71e33da..90f755b4724724e27af9d2210c8f7939fbe159a9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <netinet/in.h>
index 7c4fc7021dece6a8401bece2a3c1b30603553acc..e95b638f4db45a1e2412a203c9f77063730fe0b5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <unistd.h>
index 783edff5d3235900132f0f4c451c55526c149d61..e0073fcea822e33a8c10524ba183f2307ab37075 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #pragma once
 
index 4d0edbb7d0258b4839c65e8128211b07ae814936..29659aa6b75d709ff353f341d3b8063dd009df3b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "acl-util.h"
 #include "fs-util.h"
index 34ad1bfc8e6dafd7504c6ad7695dfe494f9bbf6f..db7000ffefee6414c7b2b8dd7073876d0790a7bc 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index fabff0c860e4e7216428be4b5f1e56c45195b05a..63afd22417e11bfea95ab34e96ea9cbb1dbb6a33 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #pragma once
 
index e938e59ab605ba0d99b8982b4934ff9a8fc56a8c..28fe482749d10c82bd8dca97b4d01fb30227b9b4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <locale.h>
@@ -3195,7 +3195,7 @@ int json_parse_file_at(FILE *f, int dir_fd, const char *path, JsonParseFlags fla
         if (f)
                 r = read_full_stream(f, &text, NULL);
         else if (path)
-                r = read_full_file_full(dir_fd, path, 0, &text, NULL);
+                r = read_full_file_full(dir_fd, path, UINT64_MAX, SIZE_MAX, 0, NULL, &text, NULL);
         else
                 return -EINVAL;
         if (r < 0)
@@ -3892,7 +3892,7 @@ int json_dispatch(JsonVariant *v, const JsonDispatch table[], JsonDispatchCallba
                 assert_se(value = json_variant_by_index(v, i+1));
 
                 for (p = table; p->name; p++)
-                        if (p->name == (const char*) -1 ||
+                        if (p->name == POINTER_MAX ||
                             streq_ptr(json_variant_string(key), p->name))
                                 break;
 
index 1d6fec67b69a36400e504fcc4b8f3e2b2e639e81..0809f3187e38f5e6202fc82d41382b1767f78859 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <fcntl.h>
index 8a46ace205a921c279df611e92c03172581511ea..5b315413aab430a491ae327d32dbff5fa9ea9b33 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if HAVE_CRYPT_H
 /* libxcrypt is a replacement for glibc's libcrypt, and libcrypt might be
index 924a35d3e1ca3472a1d4326d75f8df95d6791271..5b9b94562938cfed967a43d72940f65d6d0b5db2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 7c3b855df52056e1b1bb15f2dba7ad39b16bb930..db9728c332a86d1a8131974852362d80eba5a040 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdio.h>
index 261546c667d13623d13edd8fcd2f24771c92e7c6..63f32e3b1386fc6381993195f33772f9b70eaf7e 100644 (file)
@@ -82,7 +82,7 @@ struct args_ismountpoint {
 /*
  * All the ioctls use this structure.
  * When sending a path size must account for the total length
- * of the chunk of memory otherwise is is the size of the
+ * of the chunk of memory otherwise it is the size of the
  * structure.
  */
 
index 359fc3703cb4afb2f6df2f0c0297d450c384bb98..e6ceac3f7d624ec45f4828e76a77cce43cc3aa9b 100644 (file)
@@ -14,6 +14,7 @@
 /* Extended instruction set based on top of classic BPF */
 
 /* instruction classes */
+#define BPF_JMP32      0x06    /* jmp mode in word width */
 #define BPF_ALU64      0x07    /* alu mode in double word width */
 
 /* ld/ldx fields */
@@ -80,6 +81,12 @@ struct bpf_cgroup_storage_key {
        __u32   attach_type;            /* program attach type */
 };
 
+union bpf_iter_link_info {
+       struct {
+               __u32   map_fd;
+       } map;
+};
+
 /* BPF syscall commands, see bpf(2) man-page for details. */
 enum bpf_cmd {
        BPF_MAP_CREATE,
@@ -104,6 +111,20 @@ enum bpf_cmd {
        BPF_BTF_GET_FD_BY_ID,
        BPF_TASK_FD_QUERY,
        BPF_MAP_LOOKUP_AND_DELETE_ELEM,
+       BPF_MAP_FREEZE,
+       BPF_BTF_GET_NEXT_ID,
+       BPF_MAP_LOOKUP_BATCH,
+       BPF_MAP_LOOKUP_AND_DELETE_BATCH,
+       BPF_MAP_UPDATE_BATCH,
+       BPF_MAP_DELETE_BATCH,
+       BPF_LINK_CREATE,
+       BPF_LINK_UPDATE,
+       BPF_LINK_GET_FD_BY_ID,
+       BPF_LINK_GET_NEXT_ID,
+       BPF_ENABLE_STATS,
+       BPF_ITER_CREATE,
+       BPF_LINK_DETACH,
+       BPF_PROG_BIND_MAP,
 };
 
 enum bpf_map_type {
@@ -131,6 +152,11 @@ enum bpf_map_type {
        BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE,
        BPF_MAP_TYPE_QUEUE,
        BPF_MAP_TYPE_STACK,
+       BPF_MAP_TYPE_SK_STORAGE,
+       BPF_MAP_TYPE_DEVMAP_HASH,
+       BPF_MAP_TYPE_STRUCT_OPS,
+       BPF_MAP_TYPE_RINGBUF,
+       BPF_MAP_TYPE_INODE_STORAGE,
 };
 
 /* Note that tracing related programs such as
@@ -165,6 +191,14 @@ enum bpf_prog_type {
        BPF_PROG_TYPE_LIRC_MODE2,
        BPF_PROG_TYPE_SK_REUSEPORT,
        BPF_PROG_TYPE_FLOW_DISSECTOR,
+       BPF_PROG_TYPE_CGROUP_SYSCTL,
+       BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE,
+       BPF_PROG_TYPE_CGROUP_SOCKOPT,
+       BPF_PROG_TYPE_TRACING,
+       BPF_PROG_TYPE_STRUCT_OPS,
+       BPF_PROG_TYPE_EXT,
+       BPF_PROG_TYPE_LSM,
+       BPF_PROG_TYPE_SK_LOOKUP,
 };
 
 enum bpf_attach_type {
@@ -186,11 +220,43 @@ enum bpf_attach_type {
        BPF_CGROUP_UDP6_SENDMSG,
        BPF_LIRC_MODE2,
        BPF_FLOW_DISSECTOR,
+       BPF_CGROUP_SYSCTL,
+       BPF_CGROUP_UDP4_RECVMSG,
+       BPF_CGROUP_UDP6_RECVMSG,
+       BPF_CGROUP_GETSOCKOPT,
+       BPF_CGROUP_SETSOCKOPT,
+       BPF_TRACE_RAW_TP,
+       BPF_TRACE_FENTRY,
+       BPF_TRACE_FEXIT,
+       BPF_MODIFY_RETURN,
+       BPF_LSM_MAC,
+       BPF_TRACE_ITER,
+       BPF_CGROUP_INET4_GETPEERNAME,
+       BPF_CGROUP_INET6_GETPEERNAME,
+       BPF_CGROUP_INET4_GETSOCKNAME,
+       BPF_CGROUP_INET6_GETSOCKNAME,
+       BPF_XDP_DEVMAP,
+       BPF_CGROUP_INET_SOCK_RELEASE,
+       BPF_XDP_CPUMAP,
+       BPF_SK_LOOKUP,
+       BPF_XDP,
        __MAX_BPF_ATTACH_TYPE
 };
 
 #define MAX_BPF_ATTACH_TYPE __MAX_BPF_ATTACH_TYPE
 
+enum bpf_link_type {
+       BPF_LINK_TYPE_UNSPEC = 0,
+       BPF_LINK_TYPE_RAW_TRACEPOINT = 1,
+       BPF_LINK_TYPE_TRACING = 2,
+       BPF_LINK_TYPE_CGROUP = 3,
+       BPF_LINK_TYPE_ITER = 4,
+       BPF_LINK_TYPE_NETNS = 5,
+       BPF_LINK_TYPE_XDP = 6,
+
+       MAX_BPF_LINK_TYPE,
+};
+
 /* cgroup-bpf attach flags used in BPF_PROG_ATTACH command
  *
  * NONE(default): No further bpf programs allowed in the subtree.
@@ -214,6 +280,11 @@ enum bpf_attach_type {
  * When children program makes decision (like picking TCP CA or sock bind)
  * parent program has a chance to override it.
  *
+ * With BPF_F_ALLOW_MULTI a new program is added to the end of the list of
+ * programs for a cgroup. Though it's possible to replace an old program at
+ * any position by also specifying BPF_F_REPLACE flag and position itself in
+ * replace_bpf_fd attribute. Old program at this position will be released.
+ *
  * A cgroup with MULTI or OVERRIDE flag allows any attach flags in sub-cgroups.
  * A cgroup with NONE doesn't allow any programs in sub-cgroups.
  * Ex1:
@@ -232,6 +303,7 @@ enum bpf_attach_type {
  */
 #define BPF_F_ALLOW_OVERRIDE   (1U << 0)
 #define BPF_F_ALLOW_MULTI      (1U << 1)
+#define BPF_F_REPLACE          (1U << 2)
 
 /* If BPF_F_STRICT_ALIGNMENT is used in BPF_PROG_LOAD command, the
  * verifier will perform strict alignment checking as if the kernel
@@ -254,8 +326,66 @@ enum bpf_attach_type {
  */
 #define BPF_F_ANY_ALIGNMENT    (1U << 1)
 
-/* when bpf_ldimm64->src_reg == BPF_PSEUDO_MAP_FD, bpf_ldimm64->imm == fd */
+/* BPF_F_TEST_RND_HI32 is used in BPF_PROG_LOAD command for testing purpose.
+ * Verifier does sub-register def/use analysis and identifies instructions whose
+ * def only matters for low 32-bit, high 32-bit is never referenced later
+ * through implicit zero extension. Therefore verifier notifies JIT back-ends
+ * that it is safe to ignore clearing high 32-bit for these instructions. This
+ * saves some back-ends a lot of code-gen. However such optimization is not
+ * necessary on some arches, for example x86_64, arm64 etc, whose JIT back-ends
+ * hence hasn't used verifier's analysis result. But, we really want to have a
+ * way to be able to verify the correctness of the described optimization on
+ * x86_64 on which testsuites are frequently exercised.
+ *
+ * So, this flag is introduced. Once it is set, verifier will randomize high
+ * 32-bit for those instructions who has been identified as safe to ignore them.
+ * Then, if verifier is not doing correct analysis, such randomization will
+ * regress tests to expose bugs.
+ */
+#define BPF_F_TEST_RND_HI32    (1U << 2)
+
+/* The verifier internal test flag. Behavior is undefined */
+#define BPF_F_TEST_STATE_FREQ  (1U << 3)
+
+/* If BPF_F_SLEEPABLE is used in BPF_PROG_LOAD command, the verifier will
+ * restrict map and helper usage for such programs. Sleepable BPF programs can
+ * only be attached to hooks where kernel execution context allows sleeping.
+ * Such programs are allowed to use helpers that may sleep like
+ * bpf_copy_from_user().
+ */
+#define BPF_F_SLEEPABLE                (1U << 4)
+
+/* When BPF ldimm64's insn[0].src_reg != 0 then this can have
+ * the following extensions:
+ *
+ * insn[0].src_reg:  BPF_PSEUDO_MAP_FD
+ * insn[0].imm:      map fd
+ * insn[1].imm:      0
+ * insn[0].off:      0
+ * insn[1].off:      0
+ * ldimm64 rewrite:  address of map
+ * verifier type:    CONST_PTR_TO_MAP
+ */
 #define BPF_PSEUDO_MAP_FD      1
+/* insn[0].src_reg:  BPF_PSEUDO_MAP_VALUE
+ * insn[0].imm:      map fd
+ * insn[1].imm:      offset into value
+ * insn[0].off:      0
+ * insn[1].off:      0
+ * ldimm64 rewrite:  address of map[0]+offset
+ * verifier type:    PTR_TO_MAP_VALUE
+ */
+#define BPF_PSEUDO_MAP_VALUE   2
+/* insn[0].src_reg:  BPF_PSEUDO_BTF_ID
+ * insn[0].imm:      kernel btd id of VAR
+ * insn[1].imm:      0
+ * insn[0].off:      0
+ * insn[1].off:      0
+ * ldimm64 rewrite:  address of the kernel variable
+ * verifier type:    PTR_TO_BTF_ID or PTR_TO_MEM, depending on whether the var
+ *                   is struct/union.
+ */
+#define BPF_PSEUDO_BTF_ID      3
 
 /* when bpf_call->src_reg == BPF_PSEUDO_CALL, bpf_call->imm == pc-relative
  * offset to another bpf function
@@ -263,37 +393,72 @@ enum bpf_attach_type {
 #define BPF_PSEUDO_CALL                1
 
 /* flags for BPF_MAP_UPDATE_ELEM command */
-#define BPF_ANY                0 /* create new element or update existing */
-#define BPF_NOEXIST    1 /* create new element if it didn't exist */
-#define BPF_EXIST      2 /* update existing element */
+enum {
+       BPF_ANY         = 0, /* create new element or update existing */
+       BPF_NOEXIST     = 1, /* create new element if it didn't exist */
+       BPF_EXIST       = 2, /* update existing element */
+       BPF_F_LOCK      = 4, /* spin_lock-ed map_lookup/map_update */
+};
 
 /* flags for BPF_MAP_CREATE command */
-#define BPF_F_NO_PREALLOC      (1U << 0)
+enum {
+       BPF_F_NO_PREALLOC       = (1U << 0),
 /* Instead of having one common LRU list in the
  * BPF_MAP_TYPE_LRU_[PERCPU_]HASH map, use a percpu LRU list
  * which can scale and perform better.
  * Note, the LRU nodes (including free nodes) cannot be moved
  * across different LRU lists.
  */
-#define BPF_F_NO_COMMON_LRU    (1U << 1)
+       BPF_F_NO_COMMON_LRU     = (1U << 1),
 /* Specify numa node during map creation */
-#define BPF_F_NUMA_NODE                (1U << 2)
-
-#define BPF_OBJ_NAME_LEN 16U
+       BPF_F_NUMA_NODE         = (1U << 2),
 
-/* Flags for accessing BPF object */
-#define BPF_F_RDONLY           (1U << 3)
-#define BPF_F_WRONLY           (1U << 4)
+/* Flags for accessing BPF object from syscall side. */
+       BPF_F_RDONLY            = (1U << 3),
+       BPF_F_WRONLY            = (1U << 4),
 
 /* Flag for stack_map, store build_id+offset instead of pointer */
-#define BPF_F_STACK_BUILD_ID   (1U << 5)
+       BPF_F_STACK_BUILD_ID    = (1U << 5),
 
 /* Zero-initialize hash function seed. This should only be used for testing. */
-#define BPF_F_ZERO_SEED                (1U << 6)
+       BPF_F_ZERO_SEED         = (1U << 6),
+
+/* Flags for accessing BPF object from program side. */
+       BPF_F_RDONLY_PROG       = (1U << 7),
+       BPF_F_WRONLY_PROG       = (1U << 8),
+
+/* Clone map from listener for newly accepted socket */
+       BPF_F_CLONE             = (1U << 9),
+
+/* Enable memory-mapping BPF map */
+       BPF_F_MMAPABLE          = (1U << 10),
+
+/* Share perf_event among processes */
+       BPF_F_PRESERVE_ELEMS    = (1U << 11),
 
-/* flags for BPF_PROG_QUERY */
+/* Create a map that is suitable to be an inner map with dynamic max entries */
+       BPF_F_INNER_MAP         = (1U << 12),
+};
+
+/* Flags for BPF_PROG_QUERY. */
+
+/* Query effective (directly attached + inherited from ancestor cgroups)
+ * programs that will be executed for events within a cgroup.
+ * attach_flags with this flag are returned only for directly attached programs.
+ */
 #define BPF_F_QUERY_EFFECTIVE  (1U << 0)
 
+/* Flags for BPF_PROG_TEST_RUN */
+
+/* If set, run the test on the cpu specified by bpf_attr.test.cpu */
+#define BPF_F_TEST_RUN_ON_CPU  (1U << 0)
+
+/* type for BPF_ENABLE_STATS */
+enum bpf_stats_type {
+       /* enabled run_time_ns and run_cnt */
+       BPF_STATS_RUN_TIME = 0,
+};
+
 enum bpf_stack_build_id_status {
        /* user space need an empty entry to identify end of a trace */
        BPF_STACK_BUILD_ID_EMPTY = 0,
@@ -313,6 +478,8 @@ struct bpf_stack_build_id {
        };
 };
 
+#define BPF_OBJ_NAME_LEN 16U
+
 union bpf_attr {
        struct { /* anonymous struct used by BPF_MAP_CREATE command */
                __u32   map_type;       /* one of enum bpf_map_type */
@@ -331,6 +498,10 @@ union bpf_attr {
                __u32   btf_fd;         /* fd pointing to a BTF type data */
                __u32   btf_key_type_id;        /* BTF type_id of the key */
                __u32   btf_value_type_id;      /* BTF type_id of the value */
+               __u32   btf_vmlinux_value_type_id;/* BTF type_id of a kernel-
+                                                  * struct stored as the
+                                                  * map value
+                                                  */
        };
 
        struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
@@ -343,6 +514,23 @@ union bpf_attr {
                __u64           flags;
        };
 
+       struct { /* struct used by BPF_MAP_*_BATCH commands */
+               __aligned_u64   in_batch;       /* start batch,
+                                                * NULL to start from beginning
+                                                */
+               __aligned_u64   out_batch;      /* output: next start batch */
+               __aligned_u64   keys;
+               __aligned_u64   values;
+               __u32           count;          /* input/output:
+                                                * input: # of key/value
+                                                * elements
+                                                * output: # of filled elements
+                                                */
+               __u32           map_fd;
+               __u64           elem_flags;
+               __u64           flags;
+       } batch;
+
        struct { /* anonymous struct used by BPF_PROG_LOAD command */
                __u32           prog_type;      /* one of enum bpf_prog_type */
                __u32           insn_cnt;
@@ -367,6 +555,8 @@ union bpf_attr {
                __u32           line_info_rec_size;     /* userspace bpf_line_info size */
                __aligned_u64   line_info;      /* line info */
                __u32           line_info_cnt;  /* number of bpf_line_info records */
+               __u32           attach_btf_id;  /* in-kernel BTF type id to attach to */
+               __u32           attach_prog_fd; /* 0 to attach to vmlinux */
        };
 
        struct { /* anonymous struct used by BPF_OBJ_* commands */
@@ -380,6 +570,10 @@ union bpf_attr {
                __u32           attach_bpf_fd;  /* eBPF program to attach */
                __u32           attach_type;
                __u32           attach_flags;
+               __u32           replace_bpf_fd; /* previously attached eBPF
+                                                * program to replace if
+                                                * BPF_F_REPLACE is used
+                                                */
        };
 
        struct { /* anonymous struct used by BPF_PROG_TEST_RUN command */
@@ -394,6 +588,15 @@ union bpf_attr {
                __aligned_u64   data_out;
                __u32           repeat;
                __u32           duration;
+               __u32           ctx_size_in;    /* input: len of ctx_in */
+               __u32           ctx_size_out;   /* input/output: len of ctx_out
+                                                *   returns ENOSPC if ctx_out
+                                                *   is too small.
+                                                */
+               __aligned_u64   ctx_in;
+               __aligned_u64   ctx_out;
+               __u32           flags;
+               __u32           cpu;
        } test;
 
        struct { /* anonymous struct used by BPF_*_GET_*_ID */
@@ -402,6 +605,7 @@ union bpf_attr {
                        __u32           prog_id;
                        __u32           map_id;
                        __u32           btf_id;
+                       __u32           link_id;
                };
                __u32           next_id;
                __u32           open_flags;
@@ -422,7 +626,7 @@ union bpf_attr {
                __u32           prog_cnt;
        } query;
 
-       struct {
+       struct { /* anonymous struct used by BPF_RAW_TRACEPOINT_OPEN command */
                __u64 name;
                __u32 prog_fd;
        } raw_tracepoint;
@@ -450,6 +654,53 @@ union bpf_attr {
                __u64           probe_offset;   /* output: probe_offset */
                __u64           probe_addr;     /* output: probe_addr */
        } task_fd_query;
+
+       struct { /* struct used by BPF_LINK_CREATE command */
+               __u32           prog_fd;        /* eBPF program to attach */
+               union {
+                       __u32           target_fd;      /* object to attach to */
+                       __u32           target_ifindex; /* target ifindex */
+               };
+               __u32           attach_type;    /* attach type */
+               __u32           flags;          /* extra flags */
+               union {
+                       __u32           target_btf_id;  /* btf_id of target to attach to */
+                       struct {
+                               __aligned_u64   iter_info;      /* extra bpf_iter_link_info */
+                               __u32           iter_info_len;  /* iter_info length */
+                       };
+               };
+       } link_create;
+
+       struct { /* struct used by BPF_LINK_UPDATE command */
+               __u32           link_fd;        /* link fd */
+               /* new program fd to update link with */
+               __u32           new_prog_fd;
+               __u32           flags;          /* extra flags */
+               /* expected link's program fd; is specified only if
+                * BPF_F_REPLACE flag is set in flags */
+               __u32           old_prog_fd;
+       } link_update;
+
+       struct {
+               __u32           link_fd;
+       } link_detach;
+
+       struct { /* struct used by BPF_ENABLE_STATS command */
+               __u32           type;
+       } enable_stats;
+
+       struct { /* struct used by BPF_ITER_CREATE command */
+               __u32           link_fd;
+               __u32           flags;
+       } iter_create;
+
+       struct { /* struct used by BPF_PROG_BIND_MAP command */
+               __u32           prog_fd;
+               __u32           map_fd;
+               __u32           flags;          /* extra flags */
+       } prog_bind_map;
+
 } __attribute__((aligned(8)));
 
 /* The description below is an attempt at providing documentation to eBPF
@@ -476,7 +727,7 @@ union bpf_attr {
  *             Map value associated to *key*, or **NULL** if no entry was
  *             found.
  *
- * int bpf_map_update_elem(struct bpf_map *map, const void *key, const void *value, u64 flags)
+ * long bpf_map_update_elem(struct bpf_map *map, const void *key, const void *value, u64 flags)
  *     Description
  *             Add or update the value of the entry associated to *key* in
  *             *map* with *value*. *flags* is one of:
@@ -494,36 +745,31 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_map_delete_elem(struct bpf_map *map, const void *key)
+ * long bpf_map_delete_elem(struct bpf_map *map, const void *key)
  *     Description
  *             Delete entry with *key* from *map*.
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_map_push_elem(struct bpf_map *map, const void *value, u64 flags)
- *     Description
- *             Push an element *value* in *map*. *flags* is one of:
- *
- *             **BPF_EXIST**
- *             If the queue/stack is full, the oldest element is removed to
- *             make room for this.
- *     Return
- *             0 on success, or a negative error in case of failure.
- *
- * int bpf_probe_read(void *dst, u32 size, const void *src)
+ * long bpf_probe_read(void *dst, u32 size, const void *unsafe_ptr)
  *     Description
  *             For tracing programs, safely attempt to read *size* bytes from
- *             address *src* and store the data in *dst*.
+ *             kernel space address *unsafe_ptr* and store the data in *dst*.
+ *
+ *             Generally, use **bpf_probe_read_user**\ () or
+ *             **bpf_probe_read_kernel**\ () instead.
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
  * u64 bpf_ktime_get_ns(void)
  *     Description
  *             Return the time elapsed since system boot, in nanoseconds.
+ *             Does not include time the system was suspended.
+ *             See: **clock_gettime**\ (**CLOCK_MONOTONIC**)
  *     Return
  *             Current *ktime*.
  *
- * int bpf_trace_printk(const char *fmt, u32 fmt_size, ...)
+ * long bpf_trace_printk(const char *fmt, u32 fmt_size, ...)
  *     Description
  *             This helper is a "printk()-like" facility for debugging. It
  *             prints a message defined by format *fmt* (of size *fmt_size*)
@@ -533,6 +779,8 @@ union bpf_attr {
  *             limited to five).
  *
  *             Each time the helper is called, it appends a line to the trace.
+ *             Lines are discarded while *\/sys/kernel/debug/tracing/trace* is
+ *             open, use *\/sys/kernel/debug/tracing/trace_pipe* to avoid this.
  *             The format of the trace is customizable, and the exact output
  *             one will get depends on the options set in
  *             *\/sys/kernel/debug/tracing/trace_options* (see also the
@@ -571,7 +819,7 @@ union bpf_attr {
  *
  *             Also, note that **bpf_trace_printk**\ () is slow, and should
  *             only be used for debugging purposes. For this reason, a notice
- *             bloc (spanning several lines) is printed to kernel logs and
+ *             block (spanning several lines) is printed to kernel logs and
  *             states that the helper should not be used "for production use"
  *             the first time this helper is used (or more precisely, when
  *             **trace_printk**\ () buffers are allocated). For passing values
@@ -601,7 +849,7 @@ union bpf_attr {
  *     Return
  *             The SMP id of the processor running the program.
  *
- * int bpf_skb_store_bytes(struct sk_buff *skb, u32 offset, const void *from, u32 len, u64 flags)
+ * long bpf_skb_store_bytes(struct sk_buff *skb, u32 offset, const void *from, u32 len, u64 flags)
  *     Description
  *             Store *len* bytes from address *from* into the packet
  *             associated to *skb*, at *offset*. *flags* are a combination of
@@ -610,7 +858,7 @@ union bpf_attr {
  *             **BPF_F_INVALIDATE_HASH** (set *skb*\ **->hash**, *skb*\
  *             **->swhash** and *skb*\ **->l4hash** to 0).
  *
- *             A call to this helper is susceptible to change the underlaying
+ *             A call to this helper is susceptible to change the underlying
  *             packet buffer. Therefore, at load time, all checks on pointers
  *             previously done by the verifier are invalidated and must be
  *             performed again, if the helper is used in combination with
@@ -618,7 +866,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_l3_csum_replace(struct sk_buff *skb, u32 offset, u64 from, u64 to, u64 size)
+ * long bpf_l3_csum_replace(struct sk_buff *skb, u32 offset, u64 from, u64 to, u64 size)
  *     Description
  *             Recompute the layer 3 (e.g. IP) checksum for the packet
  *             associated to *skb*. Computation is incremental, so the helper
@@ -635,7 +883,7 @@ union bpf_attr {
  *             flexibility and can handle sizes larger than 2 or 4 for the
  *             checksum to update.
  *
- *             A call to this helper is susceptible to change the underlaying
+ *             A call to this helper is susceptible to change the underlying
  *             packet buffer. Therefore, at load time, all checks on pointers
  *             previously done by the verifier are invalidated and must be
  *             performed again, if the helper is used in combination with
@@ -643,7 +891,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_l4_csum_replace(struct sk_buff *skb, u32 offset, u64 from, u64 to, u64 flags)
+ * long bpf_l4_csum_replace(struct sk_buff *skb, u32 offset, u64 from, u64 to, u64 flags)
  *     Description
  *             Recompute the layer 4 (e.g. TCP, UDP or ICMP) checksum for the
  *             packet associated to *skb*. Computation is incremental, so the
@@ -667,7 +915,7 @@ union bpf_attr {
  *             flexibility and can handle sizes larger than 2 or 4 for the
  *             checksum to update.
  *
- *             A call to this helper is susceptible to change the underlaying
+ *             A call to this helper is susceptible to change the underlying
  *             packet buffer. Therefore, at load time, all checks on pointers
  *             previously done by the verifier are invalidated and must be
  *             performed again, if the helper is used in combination with
@@ -675,7 +923,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_tail_call(void *ctx, struct bpf_map *prog_array_map, u32 index)
+ * long bpf_tail_call(void *ctx, struct bpf_map *prog_array_map, u32 index)
  *     Description
  *             This special helper is used to trigger a "tail call", or in
  *             other words, to jump into another eBPF program. The same stack
@@ -706,7 +954,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_clone_redirect(struct sk_buff *skb, u32 ifindex, u64 flags)
+ * long bpf_clone_redirect(struct sk_buff *skb, u32 ifindex, u64 flags)
  *     Description
  *             Clone and redirect the packet associated to *skb* to another
  *             net device of index *ifindex*. Both ingress and egress
@@ -722,7 +970,7 @@ union bpf_attr {
  *             efficient, but it is handled through an action code where the
  *             redirection happens only after the eBPF program has returned.
  *
- *             A call to this helper is susceptible to change the underlaying
+ *             A call to this helper is susceptible to change the underlying
  *             packet buffer. Therefore, at load time, all checks on pointers
  *             previously done by the verifier are invalidated and must be
  *             performed again, if the helper is used in combination with
@@ -742,7 +990,7 @@ union bpf_attr {
  *             A 64-bit integer containing the current GID and UID, and
  *             created as such: *current_gid* **<< 32 \|** *current_uid*.
  *
- * int bpf_get_current_comm(char *buf, u32 size_of_buf)
+ * long bpf_get_current_comm(void *buf, u32 size_of_buf)
  *     Description
  *             Copy the **comm** attribute of the current task into *buf* of
  *             *size_of_buf*. The **comm** attribute contains the name of
@@ -764,7 +1012,7 @@ union bpf_attr {
  *             based on a user-provided identifier for all traffic coming from
  *             the tasks belonging to the related cgroup. See also the related
  *             kernel documentation, available from the Linux sources in file
- *             *Documentation/cgroup-v1/net_cls.txt*.
+ *             *Documentation/admin-guide/cgroup-v1/net_cls.rst*.
  *
  *             The Linux kernel has two versions for cgroups: there are
  *             cgroups v1 and cgroups v2. Both are available to users, who can
@@ -779,7 +1027,7 @@ union bpf_attr {
  *     Return
  *             The classid, or 0 for the default unconfigured classid.
  *
- * int bpf_skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci)
+ * long bpf_skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci)
  *     Description
  *             Push a *vlan_tci* (VLAN tag control information) of protocol
  *             *vlan_proto* to the packet associated to *skb*, then update
@@ -787,7 +1035,7 @@ union bpf_attr {
  *             **ETH_P_8021Q** and **ETH_P_8021AD**, it is considered to
  *             be **ETH_P_8021Q**.
  *
- *             A call to this helper is susceptible to change the underlaying
+ *             A call to this helper is susceptible to change the underlying
  *             packet buffer. Therefore, at load time, all checks on pointers
  *             previously done by the verifier are invalidated and must be
  *             performed again, if the helper is used in combination with
@@ -795,11 +1043,11 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_skb_vlan_pop(struct sk_buff *skb)
+ * long bpf_skb_vlan_pop(struct sk_buff *skb)
  *     Description
  *             Pop a VLAN header from the packet associated to *skb*.
  *
- *             A call to this helper is susceptible to change the underlaying
+ *             A call to this helper is susceptible to change the underlying
  *             packet buffer. Therefore, at load time, all checks on pointers
  *             previously done by the verifier are invalidated and must be
  *             performed again, if the helper is used in combination with
@@ -807,7 +1055,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_skb_get_tunnel_key(struct sk_buff *skb, struct bpf_tunnel_key *key, u32 size, u64 flags)
+ * long bpf_skb_get_tunnel_key(struct sk_buff *skb, struct bpf_tunnel_key *key, u32 size, u64 flags)
  *     Description
  *             Get tunnel metadata. This helper takes a pointer *key* to an
  *             empty **struct bpf_tunnel_key** of **size**, that will be
@@ -837,14 +1085,14 @@ union bpf_attr {
  *
  *                     int ret;
  *                     struct bpf_tunnel_key key = {};
- *                     
+ *
  *                     ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0);
  *                     if (ret < 0)
  *                             return TC_ACT_SHOT;     // drop packet
- *                     
+ *
  *                     if (key.remote_ipv4 != 0x0a000001)
  *                             return TC_ACT_SHOT;     // drop packet
- *                     
+ *
  *                     return TC_ACT_OK;               // accept packet
  *
  *             This interface can also be used with all encapsulation devices
@@ -858,7 +1106,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_skb_set_tunnel_key(struct sk_buff *skb, struct bpf_tunnel_key *key, u32 size, u64 flags)
+ * long bpf_skb_set_tunnel_key(struct sk_buff *skb, struct bpf_tunnel_key *key, u32 size, u64 flags)
  *     Description
  *             Populate tunnel metadata for packet associated to *skb.* The
  *             tunnel metadata is set to the contents of *key*, of *size*. The
@@ -924,7 +1172,7 @@ union bpf_attr {
  *             The value of the perf event counter read from the map, or a
  *             negative error code in case of failure.
  *
- * int bpf_redirect(u32 ifindex, u64 flags)
+ * long bpf_redirect(u32 ifindex, u64 flags)
  *     Description
  *             Redirect the packet to another net device of index *ifindex*.
  *             This helper is somewhat similar to **bpf_clone_redirect**\
@@ -938,9 +1186,9 @@ union bpf_attr {
  *             supports redirection to the egress interface, and accepts no
  *             flag at all.
  *
- *             The same effect can be attained with the more generic
- *             **bpf_redirect_map**\ (), which requires specific maps to be
- *             used but offers better performance.
+ *             The same effect can also be attained with the more generic
+ *             **bpf_redirect_map**\ (), which uses a BPF map to store the
+ *             redirect target instead of providing it directly to the helper.
  *     Return
  *             For XDP, the helper returns **XDP_REDIRECT** on success or
  *             **XDP_ABORTED** on error. For other program types, the values
@@ -971,7 +1219,7 @@ union bpf_attr {
  *             The realm of the route for the packet associated to *skb*, or 0
  *             if none was found.
  *
- * int bpf_perf_event_output(struct pt_reg *ctx, struct bpf_map *map, u64 flags, void *data, u64 size)
+ * long bpf_perf_event_output(void *ctx, struct bpf_map *map, u64 flags, void *data, u64 size)
  *     Description
  *             Write raw *data* blob into a special BPF perf event held by
  *             *map* of type **BPF_MAP_TYPE_PERF_EVENT_ARRAY**. This perf
@@ -1016,7 +1264,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_skb_load_bytes(const struct sk_buff *skb, u32 offset, void *to, u32 len)
+ * long bpf_skb_load_bytes(const void *skb, u32 offset, void *to, u32 len)
  *     Description
  *             This helper was provided as an easy way to load data from a
  *             packet. It can be used to load *len* bytes from *offset* from
@@ -1033,7 +1281,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_get_stackid(struct pt_reg *ctx, struct bpf_map *map, u64 flags)
+ * long bpf_get_stackid(void *ctx, struct bpf_map *map, u64 flags)
  *     Description
  *             Walk a user or a kernel stack and return its id. To achieve
  *             this, the helper needs *ctx*, which is a pointer to the context
@@ -1102,7 +1350,7 @@ union bpf_attr {
  *             The checksum result, or a negative error code in case of
  *             failure.
  *
- * int bpf_skb_get_tunnel_opt(struct sk_buff *skb, u8 *opt, u32 size)
+ * long bpf_skb_get_tunnel_opt(struct sk_buff *skb, void *opt, u32 size)
  *     Description
  *             Retrieve tunnel options metadata for the packet associated to
  *             *skb*, and store the raw tunnel option data to the buffer *opt*
@@ -1120,7 +1368,7 @@ union bpf_attr {
  *     Return
  *             The size of the option data retrieved.
  *
- * int bpf_skb_set_tunnel_opt(struct sk_buff *skb, u8 *opt, u32 size)
+ * long bpf_skb_set_tunnel_opt(struct sk_buff *skb, void *opt, u32 size)
  *     Description
  *             Set tunnel options metadata for the packet associated to *skb*
  *             to the option data contained in the raw buffer *opt* of *size*.
@@ -1130,7 +1378,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_skb_change_proto(struct sk_buff *skb, __be16 proto, u64 flags)
+ * long bpf_skb_change_proto(struct sk_buff *skb, __be16 proto, u64 flags)
  *     Description
  *             Change the protocol of the *skb* to *proto*. Currently
  *             supported are transition from IPv4 to IPv6, and from IPv6 to
@@ -1149,7 +1397,7 @@ union bpf_attr {
  *             All values for *flags* are reserved for future usage, and must
  *             be left at zero.
  *
- *             A call to this helper is susceptible to change the underlaying
+ *             A call to this helper is susceptible to change the underlying
  *             packet buffer. Therefore, at load time, all checks on pointers
  *             previously done by the verifier are invalidated and must be
  *             performed again, if the helper is used in combination with
@@ -1157,7 +1405,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_skb_change_type(struct sk_buff *skb, u32 type)
+ * long bpf_skb_change_type(struct sk_buff *skb, u32 type)
  *     Description
  *             Change the packet type for the packet associated to *skb*. This
  *             comes down to setting *skb*\ **->pkt_type** to *type*, except
@@ -1184,7 +1432,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_skb_under_cgroup(struct sk_buff *skb, struct bpf_map *map, u32 index)
+ * long bpf_skb_under_cgroup(struct sk_buff *skb, struct bpf_map *map, u32 index)
  *     Description
  *             Check whether *skb* is a descendant of the cgroup2 held by
  *             *map* of type **BPF_MAP_TYPE_CGROUP_ARRAY**, at *index*.
@@ -1215,7 +1463,7 @@ union bpf_attr {
  *     Return
  *             A pointer to the current task struct.
  *
- * int bpf_probe_write_user(void *dst, const void *src, u32 len)
+ * long bpf_probe_write_user(void *dst, const void *src, u32 len)
  *     Description
  *             Attempt in a safe way to write *len* bytes from the buffer
  *             *src* to *dst* in memory. It only works for threads that are in
@@ -1234,7 +1482,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_current_task_under_cgroup(struct bpf_map *map, u32 index)
+ * long bpf_current_task_under_cgroup(struct bpf_map *map, u32 index)
  *     Description
  *             Check whether the probe is being run is the context of a given
  *             subset of the cgroup2 hierarchy. The cgroup2 to test is held by
@@ -1242,11 +1490,11 @@ union bpf_attr {
  *     Return
  *             The return value depends on the result of the test, and can be:
  *
- *             * 0, if the *skb* task belongs to the cgroup2.
- *             * 1, if the *skb* task does not belong to the cgroup2.
+ *             * 0, if current task belongs to the cgroup2.
+ *             * 1, if current task does not belong to the cgroup2.
  *             * A negative error code, if an error occurred.
  *
- * int bpf_skb_change_tail(struct sk_buff *skb, u32 len, u64 flags)
+ * long bpf_skb_change_tail(struct sk_buff *skb, u32 len, u64 flags)
  *     Description
  *             Resize (trim or grow) the packet associated to *skb* to the
  *             new *len*. The *flags* are reserved for future usage, and must
@@ -1262,7 +1510,7 @@ union bpf_attr {
  *             implicitly linearizes, unclones and drops offloads from the
  *             *skb*.
  *
- *             A call to this helper is susceptible to change the underlaying
+ *             A call to this helper is susceptible to change the underlying
  *             packet buffer. Therefore, at load time, all checks on pointers
  *             previously done by the verifier are invalidated and must be
  *             performed again, if the helper is used in combination with
@@ -1270,7 +1518,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_skb_pull_data(struct sk_buff *skb, u32 len)
+ * long bpf_skb_pull_data(struct sk_buff *skb, u32 len)
  *     Description
  *             Pull in non-linear data in case the *skb* is non-linear and not
  *             all of *len* are part of the linear section. Make *len* bytes
@@ -1298,7 +1546,7 @@ union bpf_attr {
  *             **bpf_skb_pull_data()** to effectively unclone the *skb* from
  *             the very beginning in case it is indeed cloned.
  *
- *             A call to this helper is susceptible to change the underlaying
+ *             A call to this helper is susceptible to change the underlying
  *             packet buffer. Therefore, at load time, all checks on pointers
  *             previously done by the verifier are invalidated and must be
  *             performed again, if the helper is used in combination with
@@ -1326,7 +1574,7 @@ union bpf_attr {
  *             recalculation the next time the kernel tries to access this
  *             hash or when the **bpf_get_hash_recalc**\ () helper is called.
  *
- * int bpf_get_numa_node_id(void)
+ * long bpf_get_numa_node_id(void)
  *     Description
  *             Return the id of the current NUMA node. The primary use case
  *             for this helper is the selection of sockets for the local NUMA
@@ -1337,7 +1585,7 @@ union bpf_attr {
  *     Return
  *             The id of current NUMA node.
  *
- * int bpf_skb_change_head(struct sk_buff *skb, u32 len, u64 flags)
+ * long bpf_skb_change_head(struct sk_buff *skb, u32 len, u64 flags)
  *     Description
  *             Grows headroom of packet associated to *skb* and adjusts the
  *             offset of the MAC header accordingly, adding *len* bytes of
@@ -1350,7 +1598,7 @@ union bpf_attr {
  *             All values for *flags* are reserved for future usage, and must
  *             be left at zero.
  *
- *             A call to this helper is susceptible to change the underlaying
+ *             A call to this helper is susceptible to change the underlying
  *             packet buffer. Therefore, at load time, all checks on pointers
  *             previously done by the verifier are invalidated and must be
  *             performed again, if the helper is used in combination with
@@ -1358,14 +1606,14 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_xdp_adjust_head(struct xdp_buff *xdp_md, int delta)
+ * long bpf_xdp_adjust_head(struct xdp_buff *xdp_md, int delta)
  *     Description
  *             Adjust (move) *xdp_md*\ **->data** by *delta* bytes. Note that
  *             it is possible to use a negative value for *delta*. This helper
  *             can be used to prepare the packet for pushing or popping
  *             headers.
  *
- *             A call to this helper is susceptible to change the underlaying
+ *             A call to this helper is susceptible to change the underlying
  *             packet buffer. Therefore, at load time, all checks on pointers
  *             previously done by the verifier are invalidated and must be
  *             performed again, if the helper is used in combination with
@@ -1373,45 +1621,14 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_probe_read_str(void *dst, int size, const void *unsafe_ptr)
+ * long bpf_probe_read_str(void *dst, u32 size, const void *unsafe_ptr)
  *     Description
- *             Copy a NUL terminated string from an unsafe address
- *             *unsafe_ptr* to *dst*. The *size* should include the
- *             terminating NUL byte. In case the string length is smaller than
- *             *size*, the target is not padded with further NUL bytes. If the
- *             string length is larger than *size*, just *size*-1 bytes are
- *             copied and the last byte is set to NUL.
- *
- *             On success, the length of the copied string is returned. This
- *             makes this helper useful in tracing programs for reading
- *             strings, and more importantly to get its length at runtime. See
- *             the following snippet:
- *
- *             ::
+ *             Copy a NUL terminated string from an unsafe kernel address
+ *             *unsafe_ptr* to *dst*. See **bpf_probe_read_kernel_str**\ () for
+ *             more details.
  *
- *                     SEC("kprobe/sys_open")
- *                     void bpf_sys_open(struct pt_regs *ctx)
- *                     {
- *                             char buf[PATHLEN]; // PATHLEN is defined to 256
- *                             int res = bpf_probe_read_str(buf, sizeof(buf),
- *                                                          ctx->di);
- *
- *                             // Consume buf, for example push it to
- *                             // userspace via bpf_perf_event_output(); we
- *                             // can use res (the string length) as event
- *                             // size, after checking its boundaries.
- *                     }
- *
- *             In comparison, using **bpf_probe_read()** helper here instead
- *             to read the string would require to estimate the length at
- *             compile time, and would often result in copying more memory
- *             than necessary.
- *
- *             Another useful use case is when parsing individual process
- *             arguments or individual environment variables navigating
- *             *current*\ **->mm->arg_start** and *current*\
- *             **->mm->env_start**: using this helper and the return value,
- *             one can quickly iterate at the right offset of the memory area.
+ *             Generally, use **bpf_probe_read_user_str**\ () or
+ *             **bpf_probe_read_kernel_str**\ () instead.
  *     Return
  *             On success, the strictly positive length of the string,
  *             including the trailing NUL character. On error, a negative
@@ -1424,8 +1641,8 @@ union bpf_attr {
  *             If no cookie has been set yet, generate a new cookie. Once
  *             generated, the socket cookie remains stable for the life of the
  *             socket. This helper can be useful for monitoring per socket
- *             networking traffic statistics as it provides a unique socket
- *             identifier per namespace.
+ *             networking traffic statistics as it provides a global socket
+ *             identifier that can be assumed unique.
  *     Return
  *             A 8-byte long non-decreasing number on success, or 0 if the
  *             socket field is missing inside *skb*.
@@ -1433,14 +1650,14 @@ union bpf_attr {
  * u64 bpf_get_socket_cookie(struct bpf_sock_addr *ctx)
  *     Description
  *             Equivalent to bpf_get_socket_cookie() helper that accepts
- *             *skb*, but gets socket from **struct bpf_sock_addr** contex.
+ *             *skb*, but gets socket from **struct bpf_sock_addr** context.
  *     Return
  *             A 8-byte long non-decreasing number.
  *
  * u64 bpf_get_socket_cookie(struct bpf_sock_ops *ctx)
  *     Description
- *             Equivalent to bpf_get_socket_cookie() helper that accepts
- *             *skb*, but gets socket from **struct bpf_sock_ops** contex.
+ *             Equivalent to **bpf_get_socket_cookie**\ () helper that accepts
+ *             *skb*, but gets socket from **struct bpf_sock_ops** context.
  *     Return
  *             A 8-byte long non-decreasing number.
  *
@@ -1452,14 +1669,14 @@ union bpf_attr {
  *             is returned (note that **overflowuid** might also be the actual
  *             UID value for the socket).
  *
- * u32 bpf_set_hash(struct sk_buff *skb, u32 hash)
+ * long bpf_set_hash(struct sk_buff *skb, u32 hash)
  *     Description
  *             Set the full hash for *skb* (set the field *skb*\ **->hash**)
  *             to value *hash*.
  *     Return
  *             0
  *
- * int bpf_setsockopt(struct bpf_sock_ops *bpf_socket, int level, int optname, char *optval, int optlen)
+ * long bpf_setsockopt(void *bpf_socket, int level, int optname, void *optval, int optlen)
  *     Description
  *             Emulate a call to **setsockopt()** on the socket associated to
  *             *bpf_socket*, which must be a full socket. The *level* at
@@ -1467,34 +1684,68 @@ union bpf_attr {
  *             must be specified, see **setsockopt(2)** for more information.
  *             The option value of length *optlen* is pointed by *optval*.
  *
+ *             *bpf_socket* should be one of the following:
+ *
+ *             * **struct bpf_sock_ops** for **BPF_PROG_TYPE_SOCK_OPS**.
+ *             * **struct bpf_sock_addr** for **BPF_CGROUP_INET4_CONNECT**
+ *               and **BPF_CGROUP_INET6_CONNECT**.
+ *
  *             This helper actually implements a subset of **setsockopt()**.
  *             It supports the following *level*\ s:
  *
  *             * **SOL_SOCKET**, which supports the following *optname*\ s:
  *               **SO_RCVBUF**, **SO_SNDBUF**, **SO_MAX_PACING_RATE**,
- *               **SO_PRIORITY**, **SO_RCVLOWAT**, **SO_MARK**.
+ *               **SO_PRIORITY**, **SO_RCVLOWAT**, **SO_MARK**,
+ *               **SO_BINDTODEVICE**, **SO_KEEPALIVE**.
  *             * **IPPROTO_TCP**, which supports the following *optname*\ s:
  *               **TCP_CONGESTION**, **TCP_BPF_IW**,
- *               **TCP_BPF_SNDCWND_CLAMP**.
+ *               **TCP_BPF_SNDCWND_CLAMP**, **TCP_SAVE_SYN**,
+ *               **TCP_KEEPIDLE**, **TCP_KEEPINTVL**, **TCP_KEEPCNT**,
+ *               **TCP_SYNCNT**, **TCP_USER_TIMEOUT**, **TCP_NOTSENT_LOWAT**.
  *             * **IPPROTO_IP**, which supports *optname* **IP_TOS**.
  *             * **IPPROTO_IPV6**, which supports *optname* **IPV6_TCLASS**.
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_skb_adjust_room(struct sk_buff *skb, s32 len_diff, u32 mode, u64 flags)
+ * long bpf_skb_adjust_room(struct sk_buff *skb, s32 len_diff, u32 mode, u64 flags)
  *     Description
  *             Grow or shrink the room for data in the packet associated to
  *             *skb* by *len_diff*, and according to the selected *mode*.
  *
- *             There is a single supported mode at this time:
+ *             By default, the helper will reset any offloaded checksum
+ *             indicator of the skb to CHECKSUM_NONE. This can be avoided
+ *             by the following flag:
+ *
+ *             * **BPF_F_ADJ_ROOM_NO_CSUM_RESET**: Do not reset offloaded
+ *               checksum data of the skb to CHECKSUM_NONE.
+ *
+ *             There are two supported modes at this time:
+ *
+ *             * **BPF_ADJ_ROOM_MAC**: Adjust room at the mac layer
+ *               (room space is added or removed below the layer 2 header).
  *
  *             * **BPF_ADJ_ROOM_NET**: Adjust room at the network layer
  *               (room space is added or removed below the layer 3 header).
  *
- *             All values for *flags* are reserved for future usage, and must
- *             be left at zero.
+ *             The following flags are supported at this time:
+ *
+ *             * **BPF_F_ADJ_ROOM_FIXED_GSO**: Do not adjust gso_size.
+ *               Adjusting mss in this way is not allowed for datagrams.
+ *
+ *             * **BPF_F_ADJ_ROOM_ENCAP_L3_IPV4**,
+ *               **BPF_F_ADJ_ROOM_ENCAP_L3_IPV6**:
+ *               Any new space is reserved to hold a tunnel header.
+ *               Configure skb offsets and other fields accordingly.
  *
- *             A call to this helper is susceptible to change the underlaying
+ *             * **BPF_F_ADJ_ROOM_ENCAP_L4_GRE**,
+ *               **BPF_F_ADJ_ROOM_ENCAP_L4_UDP**:
+ *               Use with ENCAP_L3 flags to further specify the tunnel type.
+ *
+ *             * **BPF_F_ADJ_ROOM_ENCAP_L2**\ (*len*):
+ *               Use with ENCAP_L3/L4 flags to further specify the tunnel
+ *               type; *len* is the length of the inner MAC header.
+ *
+ *             A call to this helper is susceptible to change the underlying
  *             packet buffer. Therefore, at load time, all checks on pointers
  *             previously done by the verifier are invalidated and must be
  *             performed again, if the helper is used in combination with
@@ -1502,7 +1753,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_redirect_map(struct bpf_map *map, u32 key, u64 flags)
+ * long bpf_redirect_map(struct bpf_map *map, u32 key, u64 flags)
  *     Description
  *             Redirect the packet to the endpoint referenced by *map* at
  *             index *key*. Depending on its type, this *map* can contain
@@ -1511,18 +1762,19 @@ union bpf_attr {
  *             but this is only implemented for native XDP (with driver
  *             support) as of this writing).
  *
- *             All values for *flags* are reserved for future usage, and must
- *             be left at zero.
+ *             The lower two bits of *flags* are used as the return code if
+ *             the map lookup fails. This is so that the return value can be
+ *             one of the XDP program return codes up to **XDP_TX**, as chosen
+ *             by the caller. Any higher bits in the *flags* argument must be
+ *             unset.
  *
- *             When used to redirect packets to net devices, this helper
- *             provides a high performance increase over **bpf_redirect**\ ().
- *             This is due to various implementation details of the underlying
- *             mechanisms, one of which is the fact that **bpf_redirect_map**\
- *             () tries to send packet as a "bulk" to the device.
+ *             See also **bpf_redirect**\ (), which only supports redirecting
+ *             to an ifindex, but doesn't require a map to do so.
  *     Return
- *             **XDP_REDIRECT** on success, or **XDP_ABORTED** on error.
+ *             **XDP_REDIRECT** on success, or the value of the two lower bits
+ *             of the *flags* argument on error.
  *
- * int bpf_sk_redirect_map(struct bpf_map *map, u32 key, u64 flags)
+ * long bpf_sk_redirect_map(struct sk_buff *skb, struct bpf_map *map, u32 key, u64 flags)
  *     Description
  *             Redirect the packet to the socket referenced by *map* (of type
  *             **BPF_MAP_TYPE_SOCKMAP**) at index *key*. Both ingress and
@@ -1533,7 +1785,7 @@ union bpf_attr {
  *     Return
  *             **SK_PASS** on success, or **SK_DROP** on error.
  *
- * int bpf_sock_map_update(struct bpf_sock_ops *skops, struct bpf_map *map, void *key, u64 flags)
+ * long bpf_sock_map_update(struct bpf_sock_ops *skops, struct bpf_map *map, void *key, u64 flags)
  *     Description
  *             Add an entry to, or update a *map* referencing sockets. The
  *             *skops* is used as a new value for the entry associated to
@@ -1552,7 +1804,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_xdp_adjust_meta(struct xdp_buff *xdp_md, int delta)
+ * long bpf_xdp_adjust_meta(struct xdp_buff *xdp_md, int delta)
  *     Description
  *             Adjust the address pointed by *xdp_md*\ **->data_meta** by
  *             *delta* (which can be positive or negative). Note that this
@@ -1573,7 +1825,7 @@ union bpf_attr {
  *             more flexibility as the user is free to store whatever meta
  *             data they need.
  *
- *             A call to this helper is susceptible to change the underlaying
+ *             A call to this helper is susceptible to change the underlying
  *             packet buffer. Therefore, at load time, all checks on pointers
  *             previously done by the verifier are invalidated and must be
  *             performed again, if the helper is used in combination with
@@ -1581,7 +1833,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_perf_event_read_value(struct bpf_map *map, u64 flags, struct bpf_perf_event_value *buf, u32 buf_size)
+ * long bpf_perf_event_read_value(struct bpf_map *map, u64 flags, struct bpf_perf_event_value *buf, u32 buf_size)
  *     Description
  *             Read the value of a perf event counter, and store it into *buf*
  *             of size *buf_size*. This helper relies on a *map* of type
@@ -1625,13 +1877,13 @@ union bpf_attr {
  *             the time running for event since last normalization. The
  *             enabled and running times are accumulated since the perf event
  *             open. To achieve scaling factor between two invocations of an
- *             eBPF program, users can can use CPU id as the key (which is
+ *             eBPF program, users can use CPU id as the key (which is
  *             typical for perf array usage model) to remember the previous
  *             value and do the calculation inside the eBPF program.
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_perf_prog_read_value(struct bpf_perf_event_data *ctx, struct bpf_perf_event_value *buf, u32 buf_size)
+ * long bpf_perf_prog_read_value(struct bpf_perf_event_data *ctx, struct bpf_perf_event_value *buf, u32 buf_size)
  *     Description
  *             For en eBPF program attached to a perf event, retrieve the
  *             value of the event counter associated to *ctx* and store it in
@@ -1642,7 +1894,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_getsockopt(struct bpf_sock_ops *bpf_socket, int level, int optname, char *optval, int optlen)
+ * long bpf_getsockopt(void *bpf_socket, int level, int optname, void *optval, int optlen)
  *     Description
  *             Emulate a call to **getsockopt()** on the socket associated to
  *             *bpf_socket*, which must be a full socket. The *level* at
@@ -1651,6 +1903,12 @@ union bpf_attr {
  *             The retrieved value is stored in the structure pointed by
  *             *opval* and of length *optlen*.
  *
+ *             *bpf_socket* should be one of the following:
+ *
+ *             * **struct bpf_sock_ops** for **BPF_PROG_TYPE_SOCK_OPS**.
+ *             * **struct bpf_sock_addr** for **BPF_CGROUP_INET4_CONNECT**
+ *               and **BPF_CGROUP_INET6_CONNECT**.
+ *
  *             This helper actually implements a subset of **getsockopt()**.
  *             It supports the following *level*\ s:
  *
@@ -1661,14 +1919,14 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_override_return(struct pt_reg *regs, u64 rc)
+ * long bpf_override_return(struct pt_regs *regs, u64 rc)
  *     Description
  *             Used for error injection, this helper uses kprobes to override
  *             the return value of the probed function, and to set it to *rc*.
  *             The first argument is the context *regs* on which the kprobe
  *             works.
  *
- *             This helper works by setting setting the PC (program counter)
+ *             This helper works by setting the PC (program counter)
  *             to an override function which is run in place of the original
  *             probed function. This means the probed function is not run at
  *             all. The replacement function just returns with the required
@@ -1686,7 +1944,7 @@ union bpf_attr {
  *     Return
  *             0
  *
- * int bpf_sock_ops_cb_flags_set(struct bpf_sock_ops *bpf_sock, int argval)
+ * long bpf_sock_ops_cb_flags_set(struct bpf_sock_ops *bpf_sock, int argval)
  *     Description
  *             Attempt to set the value of the **bpf_sock_ops_cb_flags** field
  *             for the full TCP socket associated to *bpf_sock_ops* to
@@ -1702,11 +1960,19 @@ union bpf_attr {
  *             error if an eBPF program tries to set a callback that is not
  *             supported in the current kernel.
  *
- *             The supported callback values that *argval* can combine are:
+ *             *argval* is a flag array which can combine these flags:
  *
  *             * **BPF_SOCK_OPS_RTO_CB_FLAG** (retransmission time out)
  *             * **BPF_SOCK_OPS_RETRANS_CB_FLAG** (retransmission)
  *             * **BPF_SOCK_OPS_STATE_CB_FLAG** (TCP state change)
+ *             * **BPF_SOCK_OPS_RTT_CB_FLAG** (every RTT)
+ *
+ *             Therefore, this function can be used to clear a callback flag by
+ *             setting the appropriate bit to zero. e.g. to disable the RTO
+ *             callback:
+ *
+ *             **bpf_sock_ops_cb_flags_set(bpf_sock,**
+ *                     **bpf_sock->bpf_sock_ops_cb_flags & ~BPF_SOCK_OPS_RTO_CB_FLAG)**
  *
  *             Here are some examples of where one could call such eBPF
  *             program:
@@ -1722,7 +1988,7 @@ union bpf_attr {
  *             be set is returned (which comes down to 0 if all bits were set
  *             as required).
  *
- * int bpf_msg_redirect_map(struct sk_msg_buff *msg, struct bpf_map *map, u32 key, u64 flags)
+ * long bpf_msg_redirect_map(struct sk_msg_buff *msg, struct bpf_map *map, u32 key, u64 flags)
  *     Description
  *             This helper is used in programs implementing policies at the
  *             socket level. If the message *msg* is allowed to pass (i.e. if
@@ -1736,7 +2002,7 @@ union bpf_attr {
  *     Return
  *             **SK_PASS** on success, or **SK_DROP** on error.
  *
- * int bpf_msg_apply_bytes(struct sk_msg_buff *msg, u32 bytes)
+ * long bpf_msg_apply_bytes(struct sk_msg_buff *msg, u32 bytes)
  *     Description
  *             For socket policies, apply the verdict of the eBPF program to
  *             the next *bytes* (number of bytes) of message *msg*.
@@ -1770,7 +2036,7 @@ union bpf_attr {
  *     Return
  *             0
  *
- * int bpf_msg_cork_bytes(struct sk_msg_buff *msg, u32 bytes)
+ * long bpf_msg_cork_bytes(struct sk_msg_buff *msg, u32 bytes)
  *     Description
  *             For socket policies, prevent the execution of the verdict eBPF
  *             program for message *msg* until *bytes* (byte number) have been
@@ -1788,7 +2054,7 @@ union bpf_attr {
  *     Return
  *             0
  *
- * int bpf_msg_pull_data(struct sk_msg_buff *msg, u32 start, u32 end, u64 flags)
+ * long bpf_msg_pull_data(struct sk_msg_buff *msg, u32 start, u32 end, u64 flags)
  *     Description
  *             For socket policies, pull in non-linear data from user space
  *             for *msg* and set pointers *msg*\ **->data** and *msg*\
@@ -1808,7 +2074,7 @@ union bpf_attr {
  *             copied if necessary (i.e. if data was not linear and if start
  *             and end pointers do not point to the same chunk).
  *
- *             A call to this helper is susceptible to change the underlaying
+ *             A call to this helper is susceptible to change the underlying
  *             packet buffer. Therefore, at load time, all checks on pointers
  *             previously done by the verifier are invalidated and must be
  *             performed again, if the helper is used in combination with
@@ -1819,7 +2085,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_bind(struct bpf_sock_addr *ctx, struct sockaddr *addr, int addr_len)
+ * long bpf_bind(struct bpf_sock_addr *ctx, struct sockaddr *addr, int addr_len)
  *     Description
  *             Bind the socket associated to *ctx* to the address pointed by
  *             *addr*, of length *addr_len*. This allows for making outgoing
@@ -1829,20 +2095,21 @@ union bpf_attr {
  *
  *             This helper works for IPv4 and IPv6, TCP and UDP sockets. The
  *             domain (*addr*\ **->sa_family**) must be **AF_INET** (or
- *             **AF_INET6**). Looking for a free port to bind to can be
- *             expensive, therefore binding to port is not permitted by the
- *             helper: *addr*\ **->sin_port** (or **sin6_port**, respectively)
- *             must be set to zero.
+ *             **AF_INET6**). It's advised to pass zero port (**sin_port**
+ *             or **sin6_port**) which triggers IP_BIND_ADDRESS_NO_PORT-like
+ *             behavior and lets the kernel efficiently pick up an unused
+ *             port as long as 4-tuple is unique. Passing non-zero port might
+ *             lead to degraded performance.
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_xdp_adjust_tail(struct xdp_buff *xdp_md, int delta)
+ * long bpf_xdp_adjust_tail(struct xdp_buff *xdp_md, int delta)
  *     Description
  *             Adjust (move) *xdp_md*\ **->data_end** by *delta* bytes. It is
- *             only possible to shrink the packet as of this writing,
- *             therefore *delta* must be a negative integer.
+ *             possible to both shrink and grow the packet tail.
+ *             Shrink done via *delta* being a negative integer.
  *
- *             A call to this helper is susceptible to change the underlaying
+ *             A call to this helper is susceptible to change the underlying
  *             packet buffer. Therefore, at load time, all checks on pointers
  *             previously done by the verifier are invalidated and must be
  *             performed again, if the helper is used in combination with
@@ -1850,7 +2117,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_skb_get_xfrm_state(struct sk_buff *skb, u32 index, struct bpf_xfrm_state *xfrm_state, u32 size, u64 flags)
+ * long bpf_skb_get_xfrm_state(struct sk_buff *skb, u32 index, struct bpf_xfrm_state *xfrm_state, u32 size, u64 flags)
  *     Description
  *             Retrieve the XFRM state (IP transform framework, see also
  *             **ip-xfrm(8)**) at *index* in XFRM "security path" for *skb*.
@@ -1866,7 +2133,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_get_stack(struct pt_regs *regs, void *buf, u32 size, u64 flags)
+ * long bpf_get_stack(void *ctx, void *buf, u32 size, u64 flags)
  *     Description
  *             Return a user or a kernel stack in bpf program provided buffer.
  *             To achieve this, the helper needs *ctx*, which is a pointer
@@ -1899,7 +2166,7 @@ union bpf_attr {
  *             A non-negative value equal to or less than *size* on success,
  *             or a negative error in case of failure.
  *
- * int bpf_skb_load_bytes_relative(const struct sk_buff *skb, u32 offset, void *to, u32 len, u32 start_header)
+ * long bpf_skb_load_bytes_relative(const void *skb, u32 offset, void *to, u32 len, u32 start_header)
  *     Description
  *             This helper is similar to **bpf_skb_load_bytes**\ () in that
  *             it provides an easy way to load *len* bytes from *offset*
@@ -1921,7 +2188,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_fib_lookup(void *ctx, struct bpf_fib_lookup *params, int plen, u32 flags)
+ * long bpf_fib_lookup(void *ctx, struct bpf_fib_lookup *params, int plen, u32 flags)
  *     Description
  *             Do FIB lookup in kernel tables using parameters in *params*.
  *             If lookup is successful and result shows packet is to be
@@ -1952,7 +2219,7 @@ union bpf_attr {
  *             * > 0 one of **BPF_FIB_LKUP_RET_** codes explaining why the
  *               packet is not forwarded or needs assist from full stack
  *
- * int bpf_sock_hash_update(struct bpf_sock_ops_kern *skops, struct bpf_map *map, void *key, u64 flags)
+ * long bpf_sock_hash_update(struct bpf_sock_ops *skops, struct bpf_map *map, void *key, u64 flags)
  *     Description
  *             Add an entry to, or update a sockhash *map* referencing sockets.
  *             The *skops* is used as a new value for the entry associated to
@@ -1971,7 +2238,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_msg_redirect_hash(struct sk_msg_buff *msg, struct bpf_map *map, void *key, u64 flags)
+ * long bpf_msg_redirect_hash(struct sk_msg_buff *msg, struct bpf_map *map, void *key, u64 flags)
  *     Description
  *             This helper is used in programs implementing policies at the
  *             socket level. If the message *msg* is allowed to pass (i.e. if
@@ -1985,11 +2252,11 @@ union bpf_attr {
  *     Return
  *             **SK_PASS** on success, or **SK_DROP** on error.
  *
- * int bpf_sk_redirect_hash(struct sk_buff *skb, struct bpf_map *map, void *key, u64 flags)
+ * long bpf_sk_redirect_hash(struct sk_buff *skb, struct bpf_map *map, void *key, u64 flags)
  *     Description
  *             This helper is used in programs implementing policies at the
  *             skb socket level. If the sk_buff *skb* is allowed to pass (i.e.
- *             if the verdeict eBPF program returns **SK_PASS**), redirect it
+ *             if the verdict eBPF program returns **SK_PASS**), redirect it
  *             to the socket referenced by *map* (of type
  *             **BPF_MAP_TYPE_SOCKHASH**) using hash *key*. Both ingress and
  *             egress interfaces can be used for redirection. The
@@ -1999,7 +2266,7 @@ union bpf_attr {
  *     Return
  *             **SK_PASS** on success, or **SK_DROP** on error.
  *
- * int bpf_lwt_push_encap(struct sk_buff *skb, u32 type, void *hdr, u32 len)
+ * long bpf_lwt_push_encap(struct sk_buff *skb, u32 type, void *hdr, u32 len)
  *     Description
  *             Encapsulate the packet associated to *skb* within a Layer 3
  *             protocol header. This header is provided in the buffer at
@@ -2014,8 +2281,21 @@ union bpf_attr {
  *                     Only works if *skb* contains an IPv6 packet. Insert a
  *                     Segment Routing Header (**struct ipv6_sr_hdr**) inside
  *                     the IPv6 header.
- *
- *             A call to this helper is susceptible to change the underlaying
+ *             **BPF_LWT_ENCAP_IP**
+ *                     IP encapsulation (GRE/GUE/IPIP/etc). The outer header
+ *                     must be IPv4 or IPv6, followed by zero or more
+ *                     additional headers, up to **LWT_BPF_MAX_HEADROOM**
+ *                     total bytes in all prepended headers. Please note that
+ *                     if **skb_is_gso**\ (*skb*) is true, no more than two
+ *                     headers can be prepended, and the inner header, if
+ *                     present, should be either GRE or UDP/GUE.
+ *
+ *             **BPF_LWT_ENCAP_SEG6**\ \* types can be called by BPF programs
+ *             of type **BPF_PROG_TYPE_LWT_IN**; **BPF_LWT_ENCAP_IP** type can
+ *             be called by bpf programs of types **BPF_PROG_TYPE_LWT_IN** and
+ *             **BPF_PROG_TYPE_LWT_XMIT**.
+ *
+ *             A call to this helper is susceptible to change the underlying
  *             packet buffer. Therefore, at load time, all checks on pointers
  *             previously done by the verifier are invalidated and must be
  *             performed again, if the helper is used in combination with
@@ -2023,14 +2303,14 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_lwt_seg6_store_bytes(struct sk_buff *skb, u32 offset, const void *from, u32 len)
+ * long bpf_lwt_seg6_store_bytes(struct sk_buff *skb, u32 offset, const void *from, u32 len)
  *     Description
  *             Store *len* bytes from address *from* into the packet
  *             associated to *skb*, at *offset*. Only the flags, tag and TLVs
  *             inside the outermost IPv6 Segment Routing Header can be
  *             modified through this helper.
  *
- *             A call to this helper is susceptible to change the underlaying
+ *             A call to this helper is susceptible to change the underlying
  *             packet buffer. Therefore, at load time, all checks on pointers
  *             previously done by the verifier are invalidated and must be
  *             performed again, if the helper is used in combination with
@@ -2038,7 +2318,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_lwt_seg6_adjust_srh(struct sk_buff *skb, u32 offset, s32 delta)
+ * long bpf_lwt_seg6_adjust_srh(struct sk_buff *skb, u32 offset, s32 delta)
  *     Description
  *             Adjust the size allocated to TLVs in the outermost IPv6
  *             Segment Routing Header contained in the packet associated to
@@ -2046,7 +2326,7 @@ union bpf_attr {
  *             after the segments are accepted. *delta* can be as well
  *             positive (growing) as negative (shrinking).
  *
- *             A call to this helper is susceptible to change the underlaying
+ *             A call to this helper is susceptible to change the underlying
  *             packet buffer. Therefore, at load time, all checks on pointers
  *             previously done by the verifier are invalidated and must be
  *             performed again, if the helper is used in combination with
@@ -2054,7 +2334,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_lwt_seg6_action(struct sk_buff *skb, u32 action, void *param, u32 param_len)
+ * long bpf_lwt_seg6_action(struct sk_buff *skb, u32 action, void *param, u32 param_len)
  *     Description
  *             Apply an IPv6 Segment Routing action of type *action* to the
  *             packet associated to *skb*. Each action takes a parameter
@@ -2069,13 +2349,13 @@ union bpf_attr {
  *                     Type of *param*: **int**.
  *             **SEG6_LOCAL_ACTION_END_B6**
  *                     End.B6 action: Endpoint bound to an SRv6 policy.
- *                     Type of param: **struct ipv6_sr_hdr**.
+ *                     Type of *param*: **struct ipv6_sr_hdr**.
  *             **SEG6_LOCAL_ACTION_END_B6_ENCAP**
  *                     End.B6.Encap action: Endpoint bound to an SRv6
  *                     encapsulation policy.
- *                     Type of param: **struct ipv6_sr_hdr**.
+ *                     Type of *param*: **struct ipv6_sr_hdr**.
  *
- *             A call to this helper is susceptible to change the underlaying
+ *             A call to this helper is susceptible to change the underlying
  *             packet buffer. Therefore, at load time, all checks on pointers
  *             previously done by the verifier are invalidated and must be
  *             performed again, if the helper is used in combination with
@@ -2083,52 +2363,52 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_rc_keydown(void *ctx, u32 protocol, u64 scancode, u32 toggle)
+ * long bpf_rc_repeat(void *ctx)
  *     Description
  *             This helper is used in programs implementing IR decoding, to
- *             report a successfully decoded key press with *scancode*,
- *             *toggle* value in the given *protocol*. The scancode will be
- *             translated to a keycode using the rc keymap, and reported as
- *             an input key down event. After a period a key up event is
- *             generated. This period can be extended by calling either
- *             **bpf_rc_keydown**\ () again with the same values, or calling
- *             **bpf_rc_repeat**\ ().
+ *             report a successfully decoded repeat key message. This delays
+ *             the generation of a key up event for previously generated
+ *             key down event.
  *
- *             Some protocols include a toggle bit, in case the button was
- *             released and pressed again between consecutive scancodes.
+ *             Some IR protocols like NEC have a special IR message for
+ *             repeating last button, for when a button is held down.
  *
  *             The *ctx* should point to the lirc sample as passed into
  *             the program.
  *
- *             The *protocol* is the decoded protocol number (see
- *             **enum rc_proto** for some predefined values).
- *
  *             This helper is only available is the kernel was compiled with
  *             the **CONFIG_BPF_LIRC_MODE2** configuration option set to
  *             "**y**".
  *     Return
  *             0
  *
- * int bpf_rc_repeat(void *ctx)
+ * long bpf_rc_keydown(void *ctx, u32 protocol, u64 scancode, u32 toggle)
  *     Description
  *             This helper is used in programs implementing IR decoding, to
- *             report a successfully decoded repeat key message. This delays
- *             the generation of a key up event for previously generated
- *             key down event.
+ *             report a successfully decoded key press with *scancode*,
+ *             *toggle* value in the given *protocol*. The scancode will be
+ *             translated to a keycode using the rc keymap, and reported as
+ *             an input key down event. After a period a key up event is
+ *             generated. This period can be extended by calling either
+ *             **bpf_rc_keydown**\ () again with the same values, or calling
+ *             **bpf_rc_repeat**\ ().
  *
- *             Some IR protocols like NEC have a special IR message for
- *             repeating last button, for when a button is held down.
+ *             Some protocols include a toggle bit, in case the button was
+ *             released and pressed again between consecutive scancodes.
  *
  *             The *ctx* should point to the lirc sample as passed into
  *             the program.
  *
+ *             The *protocol* is the decoded protocol number (see
+ *             **enum rc_proto** for some predefined values).
+ *
  *             This helper is only available is the kernel was compiled with
  *             the **CONFIG_BPF_LIRC_MODE2** configuration option set to
  *             "**y**".
  *     Return
  *             0
  *
- * uint64_t bpf_skb_cgroup_id(struct sk_buff *skb)
+ * u64 bpf_skb_cgroup_id(struct sk_buff *skb)
  *     Description
  *             Return the cgroup v2 id of the socket associated with the *skb*.
  *             This is roughly similar to the **bpf_get_cgroup_classid**\ ()
@@ -2144,30 +2424,12 @@ union bpf_attr {
  *     Return
  *             The id is returned or 0 in case the id could not be retrieved.
  *
- * u64 bpf_skb_ancestor_cgroup_id(struct sk_buff *skb, int ancestor_level)
- *     Description
- *             Return id of cgroup v2 that is ancestor of cgroup associated
- *             with the *skb* at the *ancestor_level*.  The root cgroup is at
- *             *ancestor_level* zero and each step down the hierarchy
- *             increments the level. If *ancestor_level* == level of cgroup
- *             associated with *skb*, then return value will be same as that
- *             of **bpf_skb_cgroup_id**\ ().
- *
- *             The helper is useful to implement policies based on cgroups
- *             that are upper in hierarchy than immediate cgroup associated
- *             with *skb*.
- *
- *             The format of returned id and helper limitations are same as in
- *             **bpf_skb_cgroup_id**\ ().
- *     Return
- *             The id is returned or 0 in case the id could not be retrieved.
- *
  * u64 bpf_get_current_cgroup_id(void)
  *     Return
  *             A 64-bit integer containing the current cgroup id based
  *             on the cgroup within which the current task is running.
  *
- * voidget_local_storage(void *map, u64 flags)
+ * void *bpf_get_local_storage(void *map, u64 flags)
  *     Description
  *             Get the pointer to the local storage area.
  *             The type and the size of the local storage is defined
@@ -2185,7 +2447,7 @@ union bpf_attr {
  *     Return
  *             A pointer to the local storage area.
  *
- * int bpf_sk_select_reuseport(struct sk_reuseport_md *reuse, struct bpf_map *map, void *key, u64 flags)
+ * long bpf_sk_select_reuseport(struct sk_reuseport_md *reuse, struct bpf_map *map, void *key, u64 flags)
  *     Description
  *             Select a **SO_REUSEPORT** socket from a
  *             **BPF_MAP_TYPE_REUSEPORT_ARRAY** *map*.
@@ -2194,6 +2456,24 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
+ * u64 bpf_skb_ancestor_cgroup_id(struct sk_buff *skb, int ancestor_level)
+ *     Description
+ *             Return id of cgroup v2 that is ancestor of cgroup associated
+ *             with the *skb* at the *ancestor_level*.  The root cgroup is at
+ *             *ancestor_level* zero and each step down the hierarchy
+ *             increments the level. If *ancestor_level* == level of cgroup
+ *             associated with *skb*, then return value will be same as that
+ *             of **bpf_skb_cgroup_id**\ ().
+ *
+ *             The helper is useful to implement policies based on cgroups
+ *             that are upper in hierarchy than immediate cgroup associated
+ *             with *skb*.
+ *
+ *             The format of returned id and helper limitations are same as in
+ *             **bpf_skb_cgroup_id**\ ().
+ *     Return
+ *             The id is returned or 0 in case the id could not be retrieved.
+ *
  * struct bpf_sock *bpf_sk_lookup_tcp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)
  *     Description
  *             Look for TCP socket matching *tuple*, optionally in a child
@@ -2212,7 +2492,7 @@ union bpf_attr {
  *                     Look for an IPv6 socket.
  *
  *             If the *netns* is a negative signed 32-bit integer, then the
- *             socket lookup table in the netns associated with the *ctx* will
+ *             socket lookup table in the netns associated with the *ctx*
  *             will be used. For the TC hooks, this is the netns of the device
  *             in the skb. For socket hooks, this is the netns of the socket.
  *             If *netns* is any other signed 32-bit value greater than or
@@ -2228,7 +2508,8 @@ union bpf_attr {
  *     Return
  *             Pointer to **struct bpf_sock**, or **NULL** in case of failure.
  *             For sockets with reuseport option, the **struct bpf_sock**
- *             result is from **reuse->socks**\ [] using the hash of the tuple.
+ *             result is from *reuse*\ **->socks**\ [] using the hash of the
+ *             tuple.
  *
  * struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)
  *     Description
@@ -2248,7 +2529,7 @@ union bpf_attr {
  *                     Look for an IPv6 socket.
  *
  *             If the *netns* is a negative signed 32-bit integer, then the
- *             socket lookup table in the netns associated with the *ctx* will
+ *             socket lookup table in the netns associated with the *ctx*
  *             will be used. For the TC hooks, this is the netns of the device
  *             in the skb. For socket hooks, this is the netns of the socket.
  *             If *netns* is any other signed 32-bit value greater than or
@@ -2264,9 +2545,10 @@ union bpf_attr {
  *     Return
  *             Pointer to **struct bpf_sock**, or **NULL** in case of failure.
  *             For sockets with reuseport option, the **struct bpf_sock**
- *             result is from **reuse->socks**\ [] using the hash of the tuple.
+ *             result is from *reuse*\ **->socks**\ [] using the hash of the
+ *             tuple.
  *
- * int bpf_sk_release(struct bpf_sock *sock)
+ * long bpf_sk_release(void *sock)
  *     Description
  *             Release the reference held by *sock*. *sock* must be a
  *             non-**NULL** pointer that was returned from
@@ -2274,19 +2556,29 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_map_pop_elem(struct bpf_map *map, void *value)
+ * long bpf_map_push_elem(struct bpf_map *map, const void *value, u64 flags)
+ *     Description
+ *             Push an element *value* in *map*. *flags* is one of:
+ *
+ *             **BPF_EXIST**
+ *                     If the queue/stack is full, the oldest element is
+ *                     removed to make room for this.
+ *     Return
+ *             0 on success, or a negative error in case of failure.
+ *
+ * long bpf_map_pop_elem(struct bpf_map *map, void *value)
  *     Description
  *             Pop an element from *map*.
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_map_peek_elem(struct bpf_map *map, void *value)
+ * long bpf_map_peek_elem(struct bpf_map *map, void *value)
  *     Description
  *             Get an element from *map* without removing it.
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_msg_push_data(struct sk_buff *skb, u32 start, u32 len, u64 flags)
+ * long bpf_msg_push_data(struct sk_msg_buff *msg, u32 start, u32 len, u64 flags)
  *     Description
  *             For socket policies, insert *len* bytes into *msg* at offset
  *             *start*.
@@ -2302,9 +2594,9 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_msg_pop_data(struct sk_msg_buff *msg, u32 start, u32 pop, u64 flags)
+ * long bpf_msg_pop_data(struct sk_msg_buff *msg, u32 start, u32 len, u64 flags)
  *     Description
- *             Will remove *pop* bytes from a *msg* starting at byte *start*.
+ *             Will remove *len* bytes from a *msg* starting at byte *start*.
  *             This may result in **ENOMEM** errors under certain situations if
  *             an allocation and copy are required due to a full ring buffer.
  *             However, the helper will try to avoid doing the allocation
@@ -2314,7 +2606,7 @@ union bpf_attr {
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
- * int bpf_rc_pointer_rel(void *ctx, s32 rel_x, s32 rel_y)
+ * long bpf_rc_pointer_rel(void *ctx, s32 rel_x, s32 rel_y)
  *     Description
  *             This helper is used in programs implementing IR decoding, to
  *             report a successfully decoded pointer movement.
@@ -2327,70 +2619,1193 @@ union bpf_attr {
  *             "**y**".
  *     Return
  *             0
- */
-#define __BPF_FUNC_MAPPER(FN)          \
-       FN(unspec),                     \
-       FN(map_lookup_elem),            \
-       FN(map_update_elem),            \
-       FN(map_delete_elem),            \
-       FN(probe_read),                 \
-       FN(ktime_get_ns),               \
-       FN(trace_printk),               \
-       FN(get_prandom_u32),            \
-       FN(get_smp_processor_id),       \
-       FN(skb_store_bytes),            \
-       FN(l3_csum_replace),            \
-       FN(l4_csum_replace),            \
-       FN(tail_call),                  \
-       FN(clone_redirect),             \
-       FN(get_current_pid_tgid),       \
-       FN(get_current_uid_gid),        \
-       FN(get_current_comm),           \
-       FN(get_cgroup_classid),         \
-       FN(skb_vlan_push),              \
-       FN(skb_vlan_pop),               \
-       FN(skb_get_tunnel_key),         \
-       FN(skb_set_tunnel_key),         \
-       FN(perf_event_read),            \
-       FN(redirect),                   \
-       FN(get_route_realm),            \
-       FN(perf_event_output),          \
-       FN(skb_load_bytes),             \
-       FN(get_stackid),                \
-       FN(csum_diff),                  \
-       FN(skb_get_tunnel_opt),         \
-       FN(skb_set_tunnel_opt),         \
-       FN(skb_change_proto),           \
-       FN(skb_change_type),            \
-       FN(skb_under_cgroup),           \
-       FN(get_hash_recalc),            \
-       FN(get_current_task),           \
-       FN(probe_write_user),           \
-       FN(current_task_under_cgroup),  \
-       FN(skb_change_tail),            \
-       FN(skb_pull_data),              \
-       FN(csum_update),                \
-       FN(set_hash_invalid),           \
-       FN(get_numa_node_id),           \
-       FN(skb_change_head),            \
-       FN(xdp_adjust_head),            \
-       FN(probe_read_str),             \
-       FN(get_socket_cookie),          \
-       FN(get_socket_uid),             \
-       FN(set_hash),                   \
-       FN(setsockopt),                 \
-       FN(skb_adjust_room),            \
-       FN(redirect_map),               \
-       FN(sk_redirect_map),            \
-       FN(sock_map_update),            \
-       FN(xdp_adjust_meta),            \
-       FN(perf_event_read_value),      \
-       FN(perf_prog_read_value),       \
-       FN(getsockopt),                 \
-       FN(override_return),            \
-       FN(sock_ops_cb_flags_set),      \
-       FN(msg_redirect_map),           \
-       FN(msg_apply_bytes),            \
+ *
+ * long bpf_spin_lock(struct bpf_spin_lock *lock)
+ *     Description
+ *             Acquire a spinlock represented by the pointer *lock*, which is
+ *             stored as part of a value of a map. Taking the lock allows to
+ *             safely update the rest of the fields in that value. The
+ *             spinlock can (and must) later be released with a call to
+ *             **bpf_spin_unlock**\ (\ *lock*\ ).
+ *
+ *             Spinlocks in BPF programs come with a number of restrictions
+ *             and constraints:
+ *
+ *             * **bpf_spin_lock** objects are only allowed inside maps of
+ *               types **BPF_MAP_TYPE_HASH** and **BPF_MAP_TYPE_ARRAY** (this
+ *               list could be extended in the future).
+ *             * BTF description of the map is mandatory.
+ *             * The BPF program can take ONE lock at a time, since taking two
+ *               or more could cause dead locks.
+ *             * Only one **struct bpf_spin_lock** is allowed per map element.
+ *             * When the lock is taken, calls (either BPF to BPF or helpers)
+ *               are not allowed.
+ *             * The **BPF_LD_ABS** and **BPF_LD_IND** instructions are not
+ *               allowed inside a spinlock-ed region.
+ *             * The BPF program MUST call **bpf_spin_unlock**\ () to release
+ *               the lock, on all execution paths, before it returns.
+ *             * The BPF program can access **struct bpf_spin_lock** only via
+ *               the **bpf_spin_lock**\ () and **bpf_spin_unlock**\ ()
+ *               helpers. Loading or storing data into the **struct
+ *               bpf_spin_lock** *lock*\ **;** field of a map is not allowed.
+ *             * To use the **bpf_spin_lock**\ () helper, the BTF description
+ *               of the map value must be a struct and have **struct
+ *               bpf_spin_lock** *anyname*\ **;** field at the top level.
+ *               Nested lock inside another struct is not allowed.
+ *             * The **struct bpf_spin_lock** *lock* field in a map value must
+ *               be aligned on a multiple of 4 bytes in that value.
+ *             * Syscall with command **BPF_MAP_LOOKUP_ELEM** does not copy
+ *               the **bpf_spin_lock** field to user space.
+ *             * Syscall with command **BPF_MAP_UPDATE_ELEM**, or update from
+ *               a BPF program, do not update the **bpf_spin_lock** field.
+ *             * **bpf_spin_lock** cannot be on the stack or inside a
+ *               networking packet (it can only be inside of a map values).
+ *             * **bpf_spin_lock** is available to root only.
+ *             * Tracing programs and socket filter programs cannot use
+ *               **bpf_spin_lock**\ () due to insufficient preemption checks
+ *               (but this may change in the future).
+ *             * **bpf_spin_lock** is not allowed in inner maps of map-in-map.
+ *     Return
+ *             0
+ *
+ * long bpf_spin_unlock(struct bpf_spin_lock *lock)
+ *     Description
+ *             Release the *lock* previously locked by a call to
+ *             **bpf_spin_lock**\ (\ *lock*\ ).
+ *     Return
+ *             0
+ *
+ * struct bpf_sock *bpf_sk_fullsock(struct bpf_sock *sk)
+ *     Description
+ *             This helper gets a **struct bpf_sock** pointer such
+ *             that all the fields in this **bpf_sock** can be accessed.
+ *     Return
+ *             A **struct bpf_sock** pointer on success, or **NULL** in
+ *             case of failure.
+ *
+ * struct bpf_tcp_sock *bpf_tcp_sock(struct bpf_sock *sk)
+ *     Description
+ *             This helper gets a **struct bpf_tcp_sock** pointer from a
+ *             **struct bpf_sock** pointer.
+ *     Return
+ *             A **struct bpf_tcp_sock** pointer on success, or **NULL** in
+ *             case of failure.
+ *
+ * long bpf_skb_ecn_set_ce(struct sk_buff *skb)
+ *     Description
+ *             Set ECN (Explicit Congestion Notification) field of IP header
+ *             to **CE** (Congestion Encountered) if current value is **ECT**
+ *             (ECN Capable Transport). Otherwise, do nothing. Works with IPv6
+ *             and IPv4.
+ *     Return
+ *             1 if the **CE** flag is set (either by the current helper call
+ *             or because it was already present), 0 if it is not set.
+ *
+ * struct bpf_sock *bpf_get_listener_sock(struct bpf_sock *sk)
+ *     Description
+ *             Return a **struct bpf_sock** pointer in **TCP_LISTEN** state.
+ *             **bpf_sk_release**\ () is unnecessary and not allowed.
+ *     Return
+ *             A **struct bpf_sock** pointer on success, or **NULL** in
+ *             case of failure.
+ *
+ * struct bpf_sock *bpf_skc_lookup_tcp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)
+ *     Description
+ *             Look for TCP socket matching *tuple*, optionally in a child
+ *             network namespace *netns*. The return value must be checked,
+ *             and if non-**NULL**, released via **bpf_sk_release**\ ().
+ *
+ *             This function is identical to **bpf_sk_lookup_tcp**\ (), except
+ *             that it also returns timewait or request sockets. Use
+ *             **bpf_sk_fullsock**\ () or **bpf_tcp_sock**\ () to access the
+ *             full structure.
+ *
+ *             This helper is available only if the kernel was compiled with
+ *             **CONFIG_NET** configuration option.
+ *     Return
+ *             Pointer to **struct bpf_sock**, or **NULL** in case of failure.
+ *             For sockets with reuseport option, the **struct bpf_sock**
+ *             result is from *reuse*\ **->socks**\ [] using the hash of the
+ *             tuple.
+ *
+ * long bpf_tcp_check_syncookie(void *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len)
+ *     Description
+ *             Check whether *iph* and *th* contain a valid SYN cookie ACK for
+ *             the listening socket in *sk*.
+ *
+ *             *iph* points to the start of the IPv4 or IPv6 header, while
+ *             *iph_len* contains **sizeof**\ (**struct iphdr**) or
+ *             **sizeof**\ (**struct ip6hdr**).
+ *
+ *             *th* points to the start of the TCP header, while *th_len*
+ *             contains **sizeof**\ (**struct tcphdr**).
+ *     Return
+ *             0 if *iph* and *th* are a valid SYN cookie ACK, or a negative
+ *             error otherwise.
+ *
+ * long bpf_sysctl_get_name(struct bpf_sysctl *ctx, char *buf, size_t buf_len, u64 flags)
+ *     Description
+ *             Get name of sysctl in /proc/sys/ and copy it into provided by
+ *             program buffer *buf* of size *buf_len*.
+ *
+ *             The buffer is always NUL terminated, unless it's zero-sized.
+ *
+ *             If *flags* is zero, full name (e.g. "net/ipv4/tcp_mem") is
+ *             copied. Use **BPF_F_SYSCTL_BASE_NAME** flag to copy base name
+ *             only (e.g. "tcp_mem").
+ *     Return
+ *             Number of character copied (not including the trailing NUL).
+ *
+ *             **-E2BIG** if the buffer wasn't big enough (*buf* will contain
+ *             truncated name in this case).
+ *
+ * long bpf_sysctl_get_current_value(struct bpf_sysctl *ctx, char *buf, size_t buf_len)
+ *     Description
+ *             Get current value of sysctl as it is presented in /proc/sys
+ *             (incl. newline, etc), and copy it as a string into provided
+ *             by program buffer *buf* of size *buf_len*.
+ *
+ *             The whole value is copied, no matter what file position user
+ *             space issued e.g. sys_read at.
+ *
+ *             The buffer is always NUL terminated, unless it's zero-sized.
+ *     Return
+ *             Number of character copied (not including the trailing NUL).
+ *
+ *             **-E2BIG** if the buffer wasn't big enough (*buf* will contain
+ *             truncated name in this case).
+ *
+ *             **-EINVAL** if current value was unavailable, e.g. because
+ *             sysctl is uninitialized and read returns -EIO for it.
+ *
+ * long bpf_sysctl_get_new_value(struct bpf_sysctl *ctx, char *buf, size_t buf_len)
+ *     Description
+ *             Get new value being written by user space to sysctl (before
+ *             the actual write happens) and copy it as a string into
+ *             provided by program buffer *buf* of size *buf_len*.
+ *
+ *             User space may write new value at file position > 0.
+ *
+ *             The buffer is always NUL terminated, unless it's zero-sized.
+ *     Return
+ *             Number of character copied (not including the trailing NUL).
+ *
+ *             **-E2BIG** if the buffer wasn't big enough (*buf* will contain
+ *             truncated name in this case).
+ *
+ *             **-EINVAL** if sysctl is being read.
+ *
+ * long bpf_sysctl_set_new_value(struct bpf_sysctl *ctx, const char *buf, size_t buf_len)
+ *     Description
+ *             Override new value being written by user space to sysctl with
+ *             value provided by program in buffer *buf* of size *buf_len*.
+ *
+ *             *buf* should contain a string in same form as provided by user
+ *             space on sysctl write.
+ *
+ *             User space may write new value at file position > 0. To override
+ *             the whole sysctl value file position should be set to zero.
+ *     Return
+ *             0 on success.
+ *
+ *             **-E2BIG** if the *buf_len* is too big.
+ *
+ *             **-EINVAL** if sysctl is being read.
+ *
+ * long bpf_strtol(const char *buf, size_t buf_len, u64 flags, long *res)
+ *     Description
+ *             Convert the initial part of the string from buffer *buf* of
+ *             size *buf_len* to a long integer according to the given base
+ *             and save the result in *res*.
+ *
+ *             The string may begin with an arbitrary amount of white space
+ *             (as determined by **isspace**\ (3)) followed by a single
+ *             optional '**-**' sign.
+ *
+ *             Five least significant bits of *flags* encode base, other bits
+ *             are currently unused.
+ *
+ *             Base must be either 8, 10, 16 or 0 to detect it automatically
+ *             similar to user space **strtol**\ (3).
+ *     Return
+ *             Number of characters consumed on success. Must be positive but
+ *             no more than *buf_len*.
+ *
+ *             **-EINVAL** if no valid digits were found or unsupported base
+ *             was provided.
+ *
+ *             **-ERANGE** if resulting value was out of range.
+ *
+ * long bpf_strtoul(const char *buf, size_t buf_len, u64 flags, unsigned long *res)
+ *     Description
+ *             Convert the initial part of the string from buffer *buf* of
+ *             size *buf_len* to an unsigned long integer according to the
+ *             given base and save the result in *res*.
+ *
+ *             The string may begin with an arbitrary amount of white space
+ *             (as determined by **isspace**\ (3)).
+ *
+ *             Five least significant bits of *flags* encode base, other bits
+ *             are currently unused.
+ *
+ *             Base must be either 8, 10, 16 or 0 to detect it automatically
+ *             similar to user space **strtoul**\ (3).
+ *     Return
+ *             Number of characters consumed on success. Must be positive but
+ *             no more than *buf_len*.
+ *
+ *             **-EINVAL** if no valid digits were found or unsupported base
+ *             was provided.
+ *
+ *             **-ERANGE** if resulting value was out of range.
+ *
+ * void *bpf_sk_storage_get(struct bpf_map *map, void *sk, void *value, u64 flags)
+ *     Description
+ *             Get a bpf-local-storage from a *sk*.
+ *
+ *             Logically, it could be thought of getting the value from
+ *             a *map* with *sk* as the **key**.  From this
+ *             perspective,  the usage is not much different from
+ *             **bpf_map_lookup_elem**\ (*map*, **&**\ *sk*) except this
+ *             helper enforces the key must be a full socket and the map must
+ *             be a **BPF_MAP_TYPE_SK_STORAGE** also.
+ *
+ *             Underneath, the value is stored locally at *sk* instead of
+ *             the *map*.  The *map* is used as the bpf-local-storage
+ *             "type". The bpf-local-storage "type" (i.e. the *map*) is
+ *             searched against all bpf-local-storages residing at *sk*.
+ *
+ *             *sk* is a kernel **struct sock** pointer for LSM program.
+ *             *sk* is a **struct bpf_sock** pointer for other program types.
+ *
+ *             An optional *flags* (**BPF_SK_STORAGE_GET_F_CREATE**) can be
+ *             used such that a new bpf-local-storage will be
+ *             created if one does not exist.  *value* can be used
+ *             together with **BPF_SK_STORAGE_GET_F_CREATE** to specify
+ *             the initial value of a bpf-local-storage.  If *value* is
+ *             **NULL**, the new bpf-local-storage will be zero initialized.
+ *     Return
+ *             A bpf-local-storage pointer is returned on success.
+ *
+ *             **NULL** if not found or there was an error in adding
+ *             a new bpf-local-storage.
+ *
+ * long bpf_sk_storage_delete(struct bpf_map *map, void *sk)
+ *     Description
+ *             Delete a bpf-local-storage from a *sk*.
+ *     Return
+ *             0 on success.
+ *
+ *             **-ENOENT** if the bpf-local-storage cannot be found.
+ *             **-EINVAL** if sk is not a fullsock (e.g. a request_sock).
+ *
+ * long bpf_send_signal(u32 sig)
+ *     Description
+ *             Send signal *sig* to the process of the current task.
+ *             The signal may be delivered to any of this process's threads.
+ *     Return
+ *             0 on success or successfully queued.
+ *
+ *             **-EBUSY** if work queue under nmi is full.
+ *
+ *             **-EINVAL** if *sig* is invalid.
+ *
+ *             **-EPERM** if no permission to send the *sig*.
+ *
+ *             **-EAGAIN** if bpf program can try again.
+ *
+ * s64 bpf_tcp_gen_syncookie(void *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len)
+ *     Description
+ *             Try to issue a SYN cookie for the packet with corresponding
+ *             IP/TCP headers, *iph* and *th*, on the listening socket in *sk*.
+ *
+ *             *iph* points to the start of the IPv4 or IPv6 header, while
+ *             *iph_len* contains **sizeof**\ (**struct iphdr**) or
+ *             **sizeof**\ (**struct ip6hdr**).
+ *
+ *             *th* points to the start of the TCP header, while *th_len*
+ *             contains the length of the TCP header.
+ *     Return
+ *             On success, lower 32 bits hold the generated SYN cookie in
+ *             followed by 16 bits which hold the MSS value for that cookie,
+ *             and the top 16 bits are unused.
+ *
+ *             On failure, the returned value is one of the following:
+ *
+ *             **-EINVAL** SYN cookie cannot be issued due to error
+ *
+ *             **-ENOENT** SYN cookie should not be issued (no SYN flood)
+ *
+ *             **-EOPNOTSUPP** kernel configuration does not enable SYN cookies
+ *
+ *             **-EPROTONOSUPPORT** IP packet version is not 4 or 6
+ *
+ * long bpf_skb_output(void *ctx, struct bpf_map *map, u64 flags, void *data, u64 size)
+ *     Description
+ *             Write raw *data* blob into a special BPF perf event held by
+ *             *map* of type **BPF_MAP_TYPE_PERF_EVENT_ARRAY**. This perf
+ *             event must have the following attributes: **PERF_SAMPLE_RAW**
+ *             as **sample_type**, **PERF_TYPE_SOFTWARE** as **type**, and
+ *             **PERF_COUNT_SW_BPF_OUTPUT** as **config**.
+ *
+ *             The *flags* are used to indicate the index in *map* for which
+ *             the value must be put, masked with **BPF_F_INDEX_MASK**.
+ *             Alternatively, *flags* can be set to **BPF_F_CURRENT_CPU**
+ *             to indicate that the index of the current CPU core should be
+ *             used.
+ *
+ *             The value to write, of *size*, is passed through eBPF stack and
+ *             pointed by *data*.
+ *
+ *             *ctx* is a pointer to in-kernel struct sk_buff.
+ *
+ *             This helper is similar to **bpf_perf_event_output**\ () but
+ *             restricted to raw_tracepoint bpf programs.
+ *     Return
+ *             0 on success, or a negative error in case of failure.
+ *
+ * long bpf_probe_read_user(void *dst, u32 size, const void *unsafe_ptr)
+ *     Description
+ *             Safely attempt to read *size* bytes from user space address
+ *             *unsafe_ptr* and store the data in *dst*.
+ *     Return
+ *             0 on success, or a negative error in case of failure.
+ *
+ * long bpf_probe_read_kernel(void *dst, u32 size, const void *unsafe_ptr)
+ *     Description
+ *             Safely attempt to read *size* bytes from kernel space address
+ *             *unsafe_ptr* and store the data in *dst*.
+ *     Return
+ *             0 on success, or a negative error in case of failure.
+ *
+ * long bpf_probe_read_user_str(void *dst, u32 size, const void *unsafe_ptr)
+ *     Description
+ *             Copy a NUL terminated string from an unsafe user address
+ *             *unsafe_ptr* to *dst*. The *size* should include the
+ *             terminating NUL byte. In case the string length is smaller than
+ *             *size*, the target is not padded with further NUL bytes. If the
+ *             string length is larger than *size*, just *size*-1 bytes are
+ *             copied and the last byte is set to NUL.
+ *
+ *             On success, the length of the copied string is returned. This
+ *             makes this helper useful in tracing programs for reading
+ *             strings, and more importantly to get its length at runtime. See
+ *             the following snippet:
+ *
+ *             ::
+ *
+ *                     SEC("kprobe/sys_open")
+ *                     void bpf_sys_open(struct pt_regs *ctx)
+ *                     {
+ *                             char buf[PATHLEN]; // PATHLEN is defined to 256
+ *                             int res = bpf_probe_read_user_str(buf, sizeof(buf),
+ *                                                               ctx->di);
+ *
+ *                             // Consume buf, for example push it to
+ *                             // userspace via bpf_perf_event_output(); we
+ *                             // can use res (the string length) as event
+ *                             // size, after checking its boundaries.
+ *                     }
+ *
+ *             In comparison, using **bpf_probe_read_user**\ () helper here
+ *             instead to read the string would require to estimate the length
+ *             at compile time, and would often result in copying more memory
+ *             than necessary.
+ *
+ *             Another useful use case is when parsing individual process
+ *             arguments or individual environment variables navigating
+ *             *current*\ **->mm->arg_start** and *current*\
+ *             **->mm->env_start**: using this helper and the return value,
+ *             one can quickly iterate at the right offset of the memory area.
+ *     Return
+ *             On success, the strictly positive length of the string,
+ *             including the trailing NUL character. On error, a negative
+ *             value.
+ *
+ * long bpf_probe_read_kernel_str(void *dst, u32 size, const void *unsafe_ptr)
+ *     Description
+ *             Copy a NUL terminated string from an unsafe kernel address *unsafe_ptr*
+ *             to *dst*. Same semantics as with **bpf_probe_read_user_str**\ () apply.
+ *     Return
+ *             On success, the strictly positive length of the string, including
+ *             the trailing NUL character. On error, a negative value.
+ *
+ * long bpf_tcp_send_ack(void *tp, u32 rcv_nxt)
+ *     Description
+ *             Send out a tcp-ack. *tp* is the in-kernel struct **tcp_sock**.
+ *             *rcv_nxt* is the ack_seq to be sent out.
+ *     Return
+ *             0 on success, or a negative error in case of failure.
+ *
+ * long bpf_send_signal_thread(u32 sig)
+ *     Description
+ *             Send signal *sig* to the thread corresponding to the current task.
+ *     Return
+ *             0 on success or successfully queued.
+ *
+ *             **-EBUSY** if work queue under nmi is full.
+ *
+ *             **-EINVAL** if *sig* is invalid.
+ *
+ *             **-EPERM** if no permission to send the *sig*.
+ *
+ *             **-EAGAIN** if bpf program can try again.
+ *
+ * u64 bpf_jiffies64(void)
+ *     Description
+ *             Obtain the 64bit jiffies
+ *     Return
+ *             The 64 bit jiffies
+ *
+ * long bpf_read_branch_records(struct bpf_perf_event_data *ctx, void *buf, u32 size, u64 flags)
+ *     Description
+ *             For an eBPF program attached to a perf event, retrieve the
+ *             branch records (**struct perf_branch_entry**) associated to *ctx*
+ *             and store it in the buffer pointed by *buf* up to size
+ *             *size* bytes.
+ *     Return
+ *             On success, number of bytes written to *buf*. On error, a
+ *             negative value.
+ *
+ *             The *flags* can be set to **BPF_F_GET_BRANCH_RECORDS_SIZE** to
+ *             instead return the number of bytes required to store all the
+ *             branch entries. If this flag is set, *buf* may be NULL.
+ *
+ *             **-EINVAL** if arguments invalid or **size** not a multiple
+ *             of **sizeof**\ (**struct perf_branch_entry**\ ).
+ *
+ *             **-ENOENT** if architecture does not support branch records.
+ *
+ * long bpf_get_ns_current_pid_tgid(u64 dev, u64 ino, struct bpf_pidns_info *nsdata, u32 size)
+ *     Description
+ *             Returns 0 on success, values for *pid* and *tgid* as seen from the current
+ *             *namespace* will be returned in *nsdata*.
+ *     Return
+ *             0 on success, or one of the following in case of failure:
+ *
+ *             **-EINVAL** if dev and inum supplied don't match dev_t and inode number
+ *              with nsfs of current task, or if dev conversion to dev_t lost high bits.
+ *
+ *             **-ENOENT** if pidns does not exists for the current task.
+ *
+ * long bpf_xdp_output(void *ctx, struct bpf_map *map, u64 flags, void *data, u64 size)
+ *     Description
+ *             Write raw *data* blob into a special BPF perf event held by
+ *             *map* of type **BPF_MAP_TYPE_PERF_EVENT_ARRAY**. This perf
+ *             event must have the following attributes: **PERF_SAMPLE_RAW**
+ *             as **sample_type**, **PERF_TYPE_SOFTWARE** as **type**, and
+ *             **PERF_COUNT_SW_BPF_OUTPUT** as **config**.
+ *
+ *             The *flags* are used to indicate the index in *map* for which
+ *             the value must be put, masked with **BPF_F_INDEX_MASK**.
+ *             Alternatively, *flags* can be set to **BPF_F_CURRENT_CPU**
+ *             to indicate that the index of the current CPU core should be
+ *             used.
+ *
+ *             The value to write, of *size*, is passed through eBPF stack and
+ *             pointed by *data*.
+ *
+ *             *ctx* is a pointer to in-kernel struct xdp_buff.
+ *
+ *             This helper is similar to **bpf_perf_eventoutput**\ () but
+ *             restricted to raw_tracepoint bpf programs.
+ *     Return
+ *             0 on success, or a negative error in case of failure.
+ *
+ * u64 bpf_get_netns_cookie(void *ctx)
+ *     Description
+ *             Retrieve the cookie (generated by the kernel) of the network
+ *             namespace the input *ctx* is associated with. The network
+ *             namespace cookie remains stable for its lifetime and provides
+ *             a global identifier that can be assumed unique. If *ctx* is
+ *             NULL, then the helper returns the cookie for the initial
+ *             network namespace. The cookie itself is very similar to that
+ *             of **bpf_get_socket_cookie**\ () helper, but for network
+ *             namespaces instead of sockets.
+ *     Return
+ *             A 8-byte long opaque number.
+ *
+ * u64 bpf_get_current_ancestor_cgroup_id(int ancestor_level)
+ *     Description
+ *             Return id of cgroup v2 that is ancestor of the cgroup associated
+ *             with the current task at the *ancestor_level*. The root cgroup
+ *             is at *ancestor_level* zero and each step down the hierarchy
+ *             increments the level. If *ancestor_level* == level of cgroup
+ *             associated with the current task, then return value will be the
+ *             same as that of **bpf_get_current_cgroup_id**\ ().
+ *
+ *             The helper is useful to implement policies based on cgroups
+ *             that are upper in hierarchy than immediate cgroup associated
+ *             with the current task.
+ *
+ *             The format of returned id and helper limitations are same as in
+ *             **bpf_get_current_cgroup_id**\ ().
+ *     Return
+ *             The id is returned or 0 in case the id could not be retrieved.
+ *
+ * long bpf_sk_assign(struct sk_buff *skb, void *sk, u64 flags)
+ *     Description
+ *             Helper is overloaded depending on BPF program type. This
+ *             description applies to **BPF_PROG_TYPE_SCHED_CLS** and
+ *             **BPF_PROG_TYPE_SCHED_ACT** programs.
+ *
+ *             Assign the *sk* to the *skb*. When combined with appropriate
+ *             routing configuration to receive the packet towards the socket,
+ *             will cause *skb* to be delivered to the specified socket.
+ *             Subsequent redirection of *skb* via  **bpf_redirect**\ (),
+ *             **bpf_clone_redirect**\ () or other methods outside of BPF may
+ *             interfere with successful delivery to the socket.
+ *
+ *             This operation is only valid from TC ingress path.
+ *
+ *             The *flags* argument must be zero.
+ *     Return
+ *             0 on success, or a negative error in case of failure:
+ *
+ *             **-EINVAL** if specified *flags* are not supported.
+ *
+ *             **-ENOENT** if the socket is unavailable for assignment.
+ *
+ *             **-ENETUNREACH** if the socket is unreachable (wrong netns).
+ *
+ *             **-EOPNOTSUPP** if the operation is not supported, for example
+ *             a call from outside of TC ingress.
+ *
+ *             **-ESOCKTNOSUPPORT** if the socket type is not supported
+ *             (reuseport).
+ *
+ * long bpf_sk_assign(struct bpf_sk_lookup *ctx, struct bpf_sock *sk, u64 flags)
+ *     Description
+ *             Helper is overloaded depending on BPF program type. This
+ *             description applies to **BPF_PROG_TYPE_SK_LOOKUP** programs.
+ *
+ *             Select the *sk* as a result of a socket lookup.
+ *
+ *             For the operation to succeed passed socket must be compatible
+ *             with the packet description provided by the *ctx* object.
+ *
+ *             L4 protocol (**IPPROTO_TCP** or **IPPROTO_UDP**) must
+ *             be an exact match. While IP family (**AF_INET** or
+ *             **AF_INET6**) must be compatible, that is IPv6 sockets
+ *             that are not v6-only can be selected for IPv4 packets.
+ *
+ *             Only TCP listeners and UDP unconnected sockets can be
+ *             selected. *sk* can also be NULL to reset any previous
+ *             selection.
+ *
+ *             *flags* argument can combination of following values:
+ *
+ *             * **BPF_SK_LOOKUP_F_REPLACE** to override the previous
+ *               socket selection, potentially done by a BPF program
+ *               that ran before us.
+ *
+ *             * **BPF_SK_LOOKUP_F_NO_REUSEPORT** to skip
+ *               load-balancing within reuseport group for the socket
+ *               being selected.
+ *
+ *             On success *ctx->sk* will point to the selected socket.
+ *
+ *     Return
+ *             0 on success, or a negative errno in case of failure.
+ *
+ *             * **-EAFNOSUPPORT** if socket family (*sk->family*) is
+ *               not compatible with packet family (*ctx->family*).
+ *
+ *             * **-EEXIST** if socket has been already selected,
+ *               potentially by another program, and
+ *               **BPF_SK_LOOKUP_F_REPLACE** flag was not specified.
+ *
+ *             * **-EINVAL** if unsupported flags were specified.
+ *
+ *             * **-EPROTOTYPE** if socket L4 protocol
+ *               (*sk->protocol*) doesn't match packet protocol
+ *               (*ctx->protocol*).
+ *
+ *             * **-ESOCKTNOSUPPORT** if socket is not in allowed
+ *               state (TCP listening or UDP unconnected).
+ *
+ * u64 bpf_ktime_get_boot_ns(void)
+ *     Description
+ *             Return the time elapsed since system boot, in nanoseconds.
+ *             Does include the time the system was suspended.
+ *             See: **clock_gettime**\ (**CLOCK_BOOTTIME**)
+ *     Return
+ *             Current *ktime*.
+ *
+ * long bpf_seq_printf(struct seq_file *m, const char *fmt, u32 fmt_size, const void *data, u32 data_len)
+ *     Description
+ *             **bpf_seq_printf**\ () uses seq_file **seq_printf**\ () to print
+ *             out the format string.
+ *             The *m* represents the seq_file. The *fmt* and *fmt_size* are for
+ *             the format string itself. The *data* and *data_len* are format string
+ *             arguments. The *data* are a **u64** array and corresponding format string
+ *             values are stored in the array. For strings and pointers where pointees
+ *             are accessed, only the pointer values are stored in the *data* array.
+ *             The *data_len* is the size of *data* in bytes.
+ *
+ *             Formats **%s**, **%p{i,I}{4,6}** requires to read kernel memory.
+ *             Reading kernel memory may fail due to either invalid address or
+ *             valid address but requiring a major memory fault. If reading kernel memory
+ *             fails, the string for **%s** will be an empty string, and the ip
+ *             address for **%p{i,I}{4,6}** will be 0. Not returning error to
+ *             bpf program is consistent with what **bpf_trace_printk**\ () does for now.
+ *     Return
+ *             0 on success, or a negative error in case of failure:
+ *
+ *             **-EBUSY** if per-CPU memory copy buffer is busy, can try again
+ *             by returning 1 from bpf program.
+ *
+ *             **-EINVAL** if arguments are invalid, or if *fmt* is invalid/unsupported.
+ *
+ *             **-E2BIG** if *fmt* contains too many format specifiers.
+ *
+ *             **-EOVERFLOW** if an overflow happened: The same object will be tried again.
+ *
+ * long bpf_seq_write(struct seq_file *m, const void *data, u32 len)
+ *     Description
+ *             **bpf_seq_write**\ () uses seq_file **seq_write**\ () to write the data.
+ *             The *m* represents the seq_file. The *data* and *len* represent the
+ *             data to write in bytes.
+ *     Return
+ *             0 on success, or a negative error in case of failure:
+ *
+ *             **-EOVERFLOW** if an overflow happened: The same object will be tried again.
+ *
+ * u64 bpf_sk_cgroup_id(void *sk)
+ *     Description
+ *             Return the cgroup v2 id of the socket *sk*.
+ *
+ *             *sk* must be a non-**NULL** pointer to a socket, e.g. one
+ *             returned from **bpf_sk_lookup_xxx**\ (),
+ *             **bpf_sk_fullsock**\ (), etc. The format of returned id is
+ *             same as in **bpf_skb_cgroup_id**\ ().
+ *
+ *             This helper is available only if the kernel was compiled with
+ *             the **CONFIG_SOCK_CGROUP_DATA** configuration option.
+ *     Return
+ *             The id is returned or 0 in case the id could not be retrieved.
+ *
+ * u64 bpf_sk_ancestor_cgroup_id(void *sk, int ancestor_level)
+ *     Description
+ *             Return id of cgroup v2 that is ancestor of cgroup associated
+ *             with the *sk* at the *ancestor_level*.  The root cgroup is at
+ *             *ancestor_level* zero and each step down the hierarchy
+ *             increments the level. If *ancestor_level* == level of cgroup
+ *             associated with *sk*, then return value will be same as that
+ *             of **bpf_sk_cgroup_id**\ ().
+ *
+ *             The helper is useful to implement policies based on cgroups
+ *             that are upper in hierarchy than immediate cgroup associated
+ *             with *sk*.
+ *
+ *             The format of returned id and helper limitations are same as in
+ *             **bpf_sk_cgroup_id**\ ().
+ *     Return
+ *             The id is returned or 0 in case the id could not be retrieved.
+ *
+ * long bpf_ringbuf_output(void *ringbuf, void *data, u64 size, u64 flags)
+ *     Description
+ *             Copy *size* bytes from *data* into a ring buffer *ringbuf*.
+ *             If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification
+ *             of new data availability is sent.
+ *             If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification
+ *             of new data availability is sent unconditionally.
+ *     Return
+ *             0 on success, or a negative error in case of failure.
+ *
+ * void *bpf_ringbuf_reserve(void *ringbuf, u64 size, u64 flags)
+ *     Description
+ *             Reserve *size* bytes of payload in a ring buffer *ringbuf*.
+ *     Return
+ *             Valid pointer with *size* bytes of memory available; NULL,
+ *             otherwise.
+ *
+ * void bpf_ringbuf_submit(void *data, u64 flags)
+ *     Description
+ *             Submit reserved ring buffer sample, pointed to by *data*.
+ *             If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification
+ *             of new data availability is sent.
+ *             If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification
+ *             of new data availability is sent unconditionally.
+ *     Return
+ *             Nothing. Always succeeds.
+ *
+ * void bpf_ringbuf_discard(void *data, u64 flags)
+ *     Description
+ *             Discard reserved ring buffer sample, pointed to by *data*.
+ *             If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification
+ *             of new data availability is sent.
+ *             If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification
+ *             of new data availability is sent unconditionally.
+ *     Return
+ *             Nothing. Always succeeds.
+ *
+ * u64 bpf_ringbuf_query(void *ringbuf, u64 flags)
+ *     Description
+ *             Query various characteristics of provided ring buffer. What
+ *             exactly is queries is determined by *flags*:
+ *
+ *             * **BPF_RB_AVAIL_DATA**: Amount of data not yet consumed.
+ *             * **BPF_RB_RING_SIZE**: The size of ring buffer.
+ *             * **BPF_RB_CONS_POS**: Consumer position (can wrap around).
+ *             * **BPF_RB_PROD_POS**: Producer(s) position (can wrap around).
+ *
+ *             Data returned is just a momentary snapshot of actual values
+ *             and could be inaccurate, so this facility should be used to
+ *             power heuristics and for reporting, not to make 100% correct
+ *             calculation.
+ *     Return
+ *             Requested value, or 0, if *flags* are not recognized.
+ *
+ * long bpf_csum_level(struct sk_buff *skb, u64 level)
+ *     Description
+ *             Change the skbs checksum level by one layer up or down, or
+ *             reset it entirely to none in order to have the stack perform
+ *             checksum validation. The level is applicable to the following
+ *             protocols: TCP, UDP, GRE, SCTP, FCOE. For example, a decap of
+ *             | ETH | IP | UDP | GUE | IP | TCP | into | ETH | IP | TCP |
+ *             through **bpf_skb_adjust_room**\ () helper with passing in
+ *             **BPF_F_ADJ_ROOM_NO_CSUM_RESET** flag would require one call
+ *             to **bpf_csum_level**\ () with **BPF_CSUM_LEVEL_DEC** since
+ *             the UDP header is removed. Similarly, an encap of the latter
+ *             into the former could be accompanied by a helper call to
+ *             **bpf_csum_level**\ () with **BPF_CSUM_LEVEL_INC** if the
+ *             skb is still intended to be processed in higher layers of the
+ *             stack instead of just egressing at tc.
+ *
+ *             There are three supported level settings at this time:
+ *
+ *             * **BPF_CSUM_LEVEL_INC**: Increases skb->csum_level for skbs
+ *               with CHECKSUM_UNNECESSARY.
+ *             * **BPF_CSUM_LEVEL_DEC**: Decreases skb->csum_level for skbs
+ *               with CHECKSUM_UNNECESSARY.
+ *             * **BPF_CSUM_LEVEL_RESET**: Resets skb->csum_level to 0 and
+ *               sets CHECKSUM_NONE to force checksum validation by the stack.
+ *             * **BPF_CSUM_LEVEL_QUERY**: No-op, returns the current
+ *               skb->csum_level.
+ *     Return
+ *             0 on success, or a negative error in case of failure. In the
+ *             case of **BPF_CSUM_LEVEL_QUERY**, the current skb->csum_level
+ *             is returned or the error code -EACCES in case the skb is not
+ *             subject to CHECKSUM_UNNECESSARY.
+ *
+ * struct tcp6_sock *bpf_skc_to_tcp6_sock(void *sk)
+ *     Description
+ *             Dynamically cast a *sk* pointer to a *tcp6_sock* pointer.
+ *     Return
+ *             *sk* if casting is valid, or **NULL** otherwise.
+ *
+ * struct tcp_sock *bpf_skc_to_tcp_sock(void *sk)
+ *     Description
+ *             Dynamically cast a *sk* pointer to a *tcp_sock* pointer.
+ *     Return
+ *             *sk* if casting is valid, or **NULL** otherwise.
+ *
+ * struct tcp_timewait_sock *bpf_skc_to_tcp_timewait_sock(void *sk)
+ *     Description
+ *             Dynamically cast a *sk* pointer to a *tcp_timewait_sock* pointer.
+ *     Return
+ *             *sk* if casting is valid, or **NULL** otherwise.
+ *
+ * struct tcp_request_sock *bpf_skc_to_tcp_request_sock(void *sk)
+ *     Description
+ *             Dynamically cast a *sk* pointer to a *tcp_request_sock* pointer.
+ *     Return
+ *             *sk* if casting is valid, or **NULL** otherwise.
+ *
+ * struct udp6_sock *bpf_skc_to_udp6_sock(void *sk)
+ *     Description
+ *             Dynamically cast a *sk* pointer to a *udp6_sock* pointer.
+ *     Return
+ *             *sk* if casting is valid, or **NULL** otherwise.
+ *
+ * long bpf_get_task_stack(struct task_struct *task, void *buf, u32 size, u64 flags)
+ *     Description
+ *             Return a user or a kernel stack in bpf program provided buffer.
+ *             To achieve this, the helper needs *task*, which is a valid
+ *             pointer to **struct task_struct**. To store the stacktrace, the
+ *             bpf program provides *buf* with a nonnegative *size*.
+ *
+ *             The last argument, *flags*, holds the number of stack frames to
+ *             skip (from 0 to 255), masked with
+ *             **BPF_F_SKIP_FIELD_MASK**. The next bits can be used to set
+ *             the following flags:
+ *
+ *             **BPF_F_USER_STACK**
+ *                     Collect a user space stack instead of a kernel stack.
+ *             **BPF_F_USER_BUILD_ID**
+ *                     Collect buildid+offset instead of ips for user stack,
+ *                     only valid if **BPF_F_USER_STACK** is also specified.
+ *
+ *             **bpf_get_task_stack**\ () can collect up to
+ *             **PERF_MAX_STACK_DEPTH** both kernel and user frames, subject
+ *             to sufficient large buffer size. Note that
+ *             this limit can be controlled with the **sysctl** program, and
+ *             that it should be manually increased in order to profile long
+ *             user stacks (such as stacks for Java programs). To do so, use:
+ *
+ *             ::
+ *
+ *                     # sysctl kernel.perf_event_max_stack=<new value>
+ *     Return
+ *             A non-negative value equal to or less than *size* on success,
+ *             or a negative error in case of failure.
+ *
+ * long bpf_load_hdr_opt(struct bpf_sock_ops *skops, void *searchby_res, u32 len, u64 flags)
+ *     Description
+ *             Load header option.  Support reading a particular TCP header
+ *             option for bpf program (**BPF_PROG_TYPE_SOCK_OPS**).
+ *
+ *             If *flags* is 0, it will search the option from the
+ *             *skops*\ **->skb_data**.  The comment in **struct bpf_sock_ops**
+ *             has details on what skb_data contains under different
+ *             *skops*\ **->op**.
+ *
+ *             The first byte of the *searchby_res* specifies the
+ *             kind that it wants to search.
+ *
+ *             If the searching kind is an experimental kind
+ *             (i.e. 253 or 254 according to RFC6994).  It also
+ *             needs to specify the "magic" which is either
+ *             2 bytes or 4 bytes.  It then also needs to
+ *             specify the size of the magic by using
+ *             the 2nd byte which is "kind-length" of a TCP
+ *             header option and the "kind-length" also
+ *             includes the first 2 bytes "kind" and "kind-length"
+ *             itself as a normal TCP header option also does.
+ *
+ *             For example, to search experimental kind 254 with
+ *             2 byte magic 0xeB9F, the searchby_res should be
+ *             [ 254, 4, 0xeB, 0x9F, 0, 0, .... 0 ].
+ *
+ *             To search for the standard window scale option (3),
+ *             the *searchby_res* should be [ 3, 0, 0, .... 0 ].
+ *             Note, kind-length must be 0 for regular option.
+ *
+ *             Searching for No-Op (0) and End-of-Option-List (1) are
+ *             not supported.
+ *
+ *             *len* must be at least 2 bytes which is the minimal size
+ *             of a header option.
+ *
+ *             Supported flags:
+ *
+ *             * **BPF_LOAD_HDR_OPT_TCP_SYN** to search from the
+ *               saved_syn packet or the just-received syn packet.
+ *
+ *     Return
+ *             > 0 when found, the header option is copied to *searchby_res*.
+ *             The return value is the total length copied. On failure, a
+ *             negative error code is returned:
+ *
+ *             **-EINVAL** if a parameter is invalid.
+ *
+ *             **-ENOMSG** if the option is not found.
+ *
+ *             **-ENOENT** if no syn packet is available when
+ *             **BPF_LOAD_HDR_OPT_TCP_SYN** is used.
+ *
+ *             **-ENOSPC** if there is not enough space.  Only *len* number of
+ *             bytes are copied.
+ *
+ *             **-EFAULT** on failure to parse the header options in the
+ *             packet.
+ *
+ *             **-EPERM** if the helper cannot be used under the current
+ *             *skops*\ **->op**.
+ *
+ * long bpf_store_hdr_opt(struct bpf_sock_ops *skops, const void *from, u32 len, u64 flags)
+ *     Description
+ *             Store header option.  The data will be copied
+ *             from buffer *from* with length *len* to the TCP header.
+ *
+ *             The buffer *from* should have the whole option that
+ *             includes the kind, kind-length, and the actual
+ *             option data.  The *len* must be at least kind-length
+ *             long.  The kind-length does not have to be 4 byte
+ *             aligned.  The kernel will take care of the padding
+ *             and setting the 4 bytes aligned value to th->doff.
+ *
+ *             This helper will check for duplicated option
+ *             by searching the same option in the outgoing skb.
+ *
+ *             This helper can only be called during
+ *             **BPF_SOCK_OPS_WRITE_HDR_OPT_CB**.
+ *
+ *     Return
+ *             0 on success, or negative error in case of failure:
+ *
+ *             **-EINVAL** If param is invalid.
+ *
+ *             **-ENOSPC** if there is not enough space in the header.
+ *             Nothing has been written
+ *
+ *             **-EEXIST** if the option already exists.
+ *
+ *             **-EFAULT** on failrue to parse the existing header options.
+ *
+ *             **-EPERM** if the helper cannot be used under the current
+ *             *skops*\ **->op**.
+ *
+ * long bpf_reserve_hdr_opt(struct bpf_sock_ops *skops, u32 len, u64 flags)
+ *     Description
+ *             Reserve *len* bytes for the bpf header option.  The
+ *             space will be used by **bpf_store_hdr_opt**\ () later in
+ *             **BPF_SOCK_OPS_WRITE_HDR_OPT_CB**.
+ *
+ *             If **bpf_reserve_hdr_opt**\ () is called multiple times,
+ *             the total number of bytes will be reserved.
+ *
+ *             This helper can only be called during
+ *             **BPF_SOCK_OPS_HDR_OPT_LEN_CB**.
+ *
+ *     Return
+ *             0 on success, or negative error in case of failure:
+ *
+ *             **-EINVAL** if a parameter is invalid.
+ *
+ *             **-ENOSPC** if there is not enough space in the header.
+ *
+ *             **-EPERM** if the helper cannot be used under the current
+ *             *skops*\ **->op**.
+ *
+ * void *bpf_inode_storage_get(struct bpf_map *map, void *inode, void *value, u64 flags)
+ *     Description
+ *             Get a bpf_local_storage from an *inode*.
+ *
+ *             Logically, it could be thought of as getting the value from
+ *             a *map* with *inode* as the **key**.  From this
+ *             perspective,  the usage is not much different from
+ *             **bpf_map_lookup_elem**\ (*map*, **&**\ *inode*) except this
+ *             helper enforces the key must be an inode and the map must also
+ *             be a **BPF_MAP_TYPE_INODE_STORAGE**.
+ *
+ *             Underneath, the value is stored locally at *inode* instead of
+ *             the *map*.  The *map* is used as the bpf-local-storage
+ *             "type". The bpf-local-storage "type" (i.e. the *map*) is
+ *             searched against all bpf_local_storage residing at *inode*.
+ *
+ *             An optional *flags* (**BPF_LOCAL_STORAGE_GET_F_CREATE**) can be
+ *             used such that a new bpf_local_storage will be
+ *             created if one does not exist.  *value* can be used
+ *             together with **BPF_LOCAL_STORAGE_GET_F_CREATE** to specify
+ *             the initial value of a bpf_local_storage.  If *value* is
+ *             **NULL**, the new bpf_local_storage will be zero initialized.
+ *     Return
+ *             A bpf_local_storage pointer is returned on success.
+ *
+ *             **NULL** if not found or there was an error in adding
+ *             a new bpf_local_storage.
+ *
+ * int bpf_inode_storage_delete(struct bpf_map *map, void *inode)
+ *     Description
+ *             Delete a bpf_local_storage from an *inode*.
+ *     Return
+ *             0 on success.
+ *
+ *             **-ENOENT** if the bpf_local_storage cannot be found.
+ *
+ * long bpf_d_path(struct path *path, char *buf, u32 sz)
+ *     Description
+ *             Return full path for given **struct path** object, which
+ *             needs to be the kernel BTF *path* object. The path is
+ *             returned in the provided buffer *buf* of size *sz* and
+ *             is zero terminated.
+ *
+ *     Return
+ *             On success, the strictly positive length of the string,
+ *             including the trailing NUL character. On error, a negative
+ *             value.
+ *
+ * long bpf_copy_from_user(void *dst, u32 size, const void *user_ptr)
+ *     Description
+ *             Read *size* bytes from user space address *user_ptr* and store
+ *             the data in *dst*. This is a wrapper of **copy_from_user**\ ().
+ *     Return
+ *             0 on success, or a negative error in case of failure.
+ *
+ * long bpf_snprintf_btf(char *str, u32 str_size, struct btf_ptr *ptr, u32 btf_ptr_size, u64 flags)
+ *     Description
+ *             Use BTF to store a string representation of *ptr*->ptr in *str*,
+ *             using *ptr*->type_id.  This value should specify the type
+ *             that *ptr*->ptr points to. LLVM __builtin_btf_type_id(type, 1)
+ *             can be used to look up vmlinux BTF type ids. Traversing the
+ *             data structure using BTF, the type information and values are
+ *             stored in the first *str_size* - 1 bytes of *str*.  Safe copy of
+ *             the pointer data is carried out to avoid kernel crashes during
+ *             operation.  Smaller types can use string space on the stack;
+ *             larger programs can use map data to store the string
+ *             representation.
+ *
+ *             The string can be subsequently shared with userspace via
+ *             bpf_perf_event_output() or ring buffer interfaces.
+ *             bpf_trace_printk() is to be avoided as it places too small
+ *             a limit on string size to be useful.
+ *
+ *             *flags* is a combination of
+ *
+ *             **BTF_F_COMPACT**
+ *                     no formatting around type information
+ *             **BTF_F_NONAME**
+ *                     no struct/union member names/types
+ *             **BTF_F_PTR_RAW**
+ *                     show raw (unobfuscated) pointer values;
+ *                     equivalent to printk specifier %px.
+ *             **BTF_F_ZERO**
+ *                     show zero-valued struct/union members; they
+ *                     are not displayed by default
+ *
+ *     Return
+ *             The number of bytes that were written (or would have been
+ *             written if output had to be truncated due to string size),
+ *             or a negative error in cases of failure.
+ *
+ * long bpf_seq_printf_btf(struct seq_file *m, struct btf_ptr *ptr, u32 ptr_size, u64 flags)
+ *     Description
+ *             Use BTF to write to seq_write a string representation of
+ *             *ptr*->ptr, using *ptr*->type_id as per bpf_snprintf_btf().
+ *             *flags* are identical to those used for bpf_snprintf_btf.
+ *     Return
+ *             0 on success or a negative error in case of failure.
+ *
+ * u64 bpf_skb_cgroup_classid(struct sk_buff *skb)
+ *     Description
+ *             See **bpf_get_cgroup_classid**\ () for the main description.
+ *             This helper differs from **bpf_get_cgroup_classid**\ () in that
+ *             the cgroup v1 net_cls class is retrieved only from the *skb*'s
+ *             associated socket instead of the current process.
+ *     Return
+ *             The id is returned or 0 in case the id could not be retrieved.
+ *
+ * long bpf_redirect_neigh(u32 ifindex, struct bpf_redir_neigh *params, int plen, u64 flags)
+ *     Description
+ *             Redirect the packet to another net device of index *ifindex*
+ *             and fill in L2 addresses from neighboring subsystem. This helper
+ *             is somewhat similar to **bpf_redirect**\ (), except that it
+ *             populates L2 addresses as well, meaning, internally, the helper
+ *             relies on the neighbor lookup for the L2 address of the nexthop.
+ *
+ *             The helper will perform a FIB lookup based on the skb's
+ *             networking header to get the address of the next hop, unless
+ *             this is supplied by the caller in the *params* argument. The
+ *             *plen* argument indicates the len of *params* and should be set
+ *             to 0 if *params* is NULL.
+ *
+ *             The *flags* argument is reserved and must be 0. The helper is
+ *             currently only supported for tc BPF program types, and enabled
+ *             for IPv4 and IPv6 protocols.
+ *     Return
+ *             The helper returns **TC_ACT_REDIRECT** on success or
+ *             **TC_ACT_SHOT** on error.
+ *
+ * void *bpf_per_cpu_ptr(const void *percpu_ptr, u32 cpu)
+ *     Description
+ *             Take a pointer to a percpu ksym, *percpu_ptr*, and return a
+ *             pointer to the percpu kernel variable on *cpu*. A ksym is an
+ *             extern variable decorated with '__ksym'. For ksym, there is a
+ *             global var (either static or global) defined of the same name
+ *             in the kernel. The ksym is percpu if the global var is percpu.
+ *             The returned pointer points to the global percpu var on *cpu*.
+ *
+ *             bpf_per_cpu_ptr() has the same semantic as per_cpu_ptr() in the
+ *             kernel, except that bpf_per_cpu_ptr() may return NULL. This
+ *             happens if *cpu* is larger than nr_cpu_ids. The caller of
+ *             bpf_per_cpu_ptr() must check the returned value.
+ *     Return
+ *             A pointer pointing to the kernel percpu variable on *cpu*, or
+ *             NULL, if *cpu* is invalid.
+ *
+ * void *bpf_this_cpu_ptr(const void *percpu_ptr)
+ *     Description
+ *             Take a pointer to a percpu ksym, *percpu_ptr*, and return a
+ *             pointer to the percpu kernel variable on this cpu. See the
+ *             description of 'ksym' in **bpf_per_cpu_ptr**\ ().
+ *
+ *             bpf_this_cpu_ptr() has the same semantic as this_cpu_ptr() in
+ *             the kernel. Different from **bpf_per_cpu_ptr**\ (), it would
+ *             never return NULL.
+ *     Return
+ *             A pointer pointing to the kernel percpu variable on this cpu.
+ *
+ * long bpf_redirect_peer(u32 ifindex, u64 flags)
+ *     Description
+ *             Redirect the packet to another net device of index *ifindex*.
+ *             This helper is somewhat similar to **bpf_redirect**\ (), except
+ *             that the redirection happens to the *ifindex*' peer device and
+ *             the netns switch takes place from ingress to ingress without
+ *             going through the CPU's backlog queue.
+ *
+ *             The *flags* argument is reserved and must be 0. The helper is
+ *             currently only supported for tc BPF program types at the ingress
+ *             hook and for veth device types. The peer device must reside in a
+ *             different network namespace.
+ *     Return
+ *             The helper returns **TC_ACT_REDIRECT** on success or
+ *             **TC_ACT_SHOT** on error.
+ */
+#define __BPF_FUNC_MAPPER(FN)          \
+       FN(unspec),                     \
+       FN(map_lookup_elem),            \
+       FN(map_update_elem),            \
+       FN(map_delete_elem),            \
+       FN(probe_read),                 \
+       FN(ktime_get_ns),               \
+       FN(trace_printk),               \
+       FN(get_prandom_u32),            \
+       FN(get_smp_processor_id),       \
+       FN(skb_store_bytes),            \
+       FN(l3_csum_replace),            \
+       FN(l4_csum_replace),            \
+       FN(tail_call),                  \
+       FN(clone_redirect),             \
+       FN(get_current_pid_tgid),       \
+       FN(get_current_uid_gid),        \
+       FN(get_current_comm),           \
+       FN(get_cgroup_classid),         \
+       FN(skb_vlan_push),              \
+       FN(skb_vlan_pop),               \
+       FN(skb_get_tunnel_key),         \
+       FN(skb_set_tunnel_key),         \
+       FN(perf_event_read),            \
+       FN(redirect),                   \
+       FN(get_route_realm),            \
+       FN(perf_event_output),          \
+       FN(skb_load_bytes),             \
+       FN(get_stackid),                \
+       FN(csum_diff),                  \
+       FN(skb_get_tunnel_opt),         \
+       FN(skb_set_tunnel_opt),         \
+       FN(skb_change_proto),           \
+       FN(skb_change_type),            \
+       FN(skb_under_cgroup),           \
+       FN(get_hash_recalc),            \
+       FN(get_current_task),           \
+       FN(probe_write_user),           \
+       FN(current_task_under_cgroup),  \
+       FN(skb_change_tail),            \
+       FN(skb_pull_data),              \
+       FN(csum_update),                \
+       FN(set_hash_invalid),           \
+       FN(get_numa_node_id),           \
+       FN(skb_change_head),            \
+       FN(xdp_adjust_head),            \
+       FN(probe_read_str),             \
+       FN(get_socket_cookie),          \
+       FN(get_socket_uid),             \
+       FN(set_hash),                   \
+       FN(setsockopt),                 \
+       FN(skb_adjust_room),            \
+       FN(redirect_map),               \
+       FN(sk_redirect_map),            \
+       FN(sock_map_update),            \
+       FN(xdp_adjust_meta),            \
+       FN(perf_event_read_value),      \
+       FN(perf_prog_read_value),       \
+       FN(getsockopt),                 \
+       FN(override_return),            \
+       FN(sock_ops_cb_flags_set),      \
+       FN(msg_redirect_map),           \
+       FN(msg_apply_bytes),            \
        FN(msg_cork_bytes),             \
        FN(msg_pull_data),              \
        FN(bind),                       \
@@ -2421,7 +3836,71 @@ union bpf_attr {
        FN(map_peek_elem),              \
        FN(msg_push_data),              \
        FN(msg_pop_data),               \
-       FN(rc_pointer_rel),
+       FN(rc_pointer_rel),             \
+       FN(spin_lock),                  \
+       FN(spin_unlock),                \
+       FN(sk_fullsock),                \
+       FN(tcp_sock),                   \
+       FN(skb_ecn_set_ce),             \
+       FN(get_listener_sock),          \
+       FN(skc_lookup_tcp),             \
+       FN(tcp_check_syncookie),        \
+       FN(sysctl_get_name),            \
+       FN(sysctl_get_current_value),   \
+       FN(sysctl_get_new_value),       \
+       FN(sysctl_set_new_value),       \
+       FN(strtol),                     \
+       FN(strtoul),                    \
+       FN(sk_storage_get),             \
+       FN(sk_storage_delete),          \
+       FN(send_signal),                \
+       FN(tcp_gen_syncookie),          \
+       FN(skb_output),                 \
+       FN(probe_read_user),            \
+       FN(probe_read_kernel),          \
+       FN(probe_read_user_str),        \
+       FN(probe_read_kernel_str),      \
+       FN(tcp_send_ack),               \
+       FN(send_signal_thread),         \
+       FN(jiffies64),                  \
+       FN(read_branch_records),        \
+       FN(get_ns_current_pid_tgid),    \
+       FN(xdp_output),                 \
+       FN(get_netns_cookie),           \
+       FN(get_current_ancestor_cgroup_id),     \
+       FN(sk_assign),                  \
+       FN(ktime_get_boot_ns),          \
+       FN(seq_printf),                 \
+       FN(seq_write),                  \
+       FN(sk_cgroup_id),               \
+       FN(sk_ancestor_cgroup_id),      \
+       FN(ringbuf_output),             \
+       FN(ringbuf_reserve),            \
+       FN(ringbuf_submit),             \
+       FN(ringbuf_discard),            \
+       FN(ringbuf_query),              \
+       FN(csum_level),                 \
+       FN(skc_to_tcp6_sock),           \
+       FN(skc_to_tcp_sock),            \
+       FN(skc_to_tcp_timewait_sock),   \
+       FN(skc_to_tcp_request_sock),    \
+       FN(skc_to_udp6_sock),           \
+       FN(get_task_stack),             \
+       FN(load_hdr_opt),               \
+       FN(store_hdr_opt),              \
+       FN(reserve_hdr_opt),            \
+       FN(inode_storage_get),          \
+       FN(inode_storage_delete),       \
+       FN(d_path),                     \
+       FN(copy_from_user),             \
+       FN(snprintf_btf),               \
+       FN(seq_printf_btf),             \
+       FN(skb_cgroup_classid),         \
+       FN(redirect_neigh),             \
+       FN(bpf_per_cpu_ptr),            \
+       FN(bpf_this_cpu_ptr),           \
+       FN(redirect_peer),              \
+       /* */
 
 /* integer value in 'imm' field of BPF_CALL instruction selects which helper
  * function eBPF program intends to call
@@ -2436,53 +3915,147 @@ enum bpf_func_id {
 /* All flags used by eBPF helper functions, placed here. */
 
 /* BPF_FUNC_skb_store_bytes flags. */
-#define BPF_F_RECOMPUTE_CSUM           (1ULL << 0)
-#define BPF_F_INVALIDATE_HASH          (1ULL << 1)
+enum {
+       BPF_F_RECOMPUTE_CSUM            = (1ULL << 0),
+       BPF_F_INVALIDATE_HASH           = (1ULL << 1),
+};
 
 /* BPF_FUNC_l3_csum_replace and BPF_FUNC_l4_csum_replace flags.
  * First 4 bits are for passing the header field size.
  */
-#define BPF_F_HDR_FIELD_MASK           0xfULL
+enum {
+       BPF_F_HDR_FIELD_MASK            = 0xfULL,
+};
 
 /* BPF_FUNC_l4_csum_replace flags. */
-#define BPF_F_PSEUDO_HDR               (1ULL << 4)
-#define BPF_F_MARK_MANGLED_0           (1ULL << 5)
-#define BPF_F_MARK_ENFORCE             (1ULL << 6)
+enum {
+       BPF_F_PSEUDO_HDR                = (1ULL << 4),
+       BPF_F_MARK_MANGLED_0            = (1ULL << 5),
+       BPF_F_MARK_ENFORCE              = (1ULL << 6),
+};
 
 /* BPF_FUNC_clone_redirect and BPF_FUNC_redirect flags. */
-#define BPF_F_INGRESS                  (1ULL << 0)
+enum {
+       BPF_F_INGRESS                   = (1ULL << 0),
+};
 
 /* BPF_FUNC_skb_set_tunnel_key and BPF_FUNC_skb_get_tunnel_key flags. */
-#define BPF_F_TUNINFO_IPV6             (1ULL << 0)
+enum {
+       BPF_F_TUNINFO_IPV6              = (1ULL << 0),
+};
 
 /* flags for both BPF_FUNC_get_stackid and BPF_FUNC_get_stack. */
-#define BPF_F_SKIP_FIELD_MASK          0xffULL
-#define BPF_F_USER_STACK               (1ULL << 8)
+enum {
+       BPF_F_SKIP_FIELD_MASK           = 0xffULL,
+       BPF_F_USER_STACK                = (1ULL << 8),
 /* flags used by BPF_FUNC_get_stackid only. */
-#define BPF_F_FAST_STACK_CMP           (1ULL << 9)
-#define BPF_F_REUSE_STACKID            (1ULL << 10)
+       BPF_F_FAST_STACK_CMP            = (1ULL << 9),
+       BPF_F_REUSE_STACKID             = (1ULL << 10),
 /* flags used by BPF_FUNC_get_stack only. */
-#define BPF_F_USER_BUILD_ID            (1ULL << 11)
+       BPF_F_USER_BUILD_ID             = (1ULL << 11),
+};
 
 /* BPF_FUNC_skb_set_tunnel_key flags. */
-#define BPF_F_ZERO_CSUM_TX             (1ULL << 1)
-#define BPF_F_DONT_FRAGMENT            (1ULL << 2)
-#define BPF_F_SEQ_NUMBER               (1ULL << 3)
+enum {
+       BPF_F_ZERO_CSUM_TX              = (1ULL << 1),
+       BPF_F_DONT_FRAGMENT             = (1ULL << 2),
+       BPF_F_SEQ_NUMBER                = (1ULL << 3),
+};
 
 /* BPF_FUNC_perf_event_output, BPF_FUNC_perf_event_read and
  * BPF_FUNC_perf_event_read_value flags.
  */
-#define BPF_F_INDEX_MASK               0xffffffffULL
-#define BPF_F_CURRENT_CPU              BPF_F_INDEX_MASK
+enum {
+       BPF_F_INDEX_MASK                = 0xffffffffULL,
+       BPF_F_CURRENT_CPU               = BPF_F_INDEX_MASK,
 /* BPF_FUNC_perf_event_output for sk_buff input context. */
-#define BPF_F_CTXLEN_MASK              (0xfffffULL << 32)
+       BPF_F_CTXLEN_MASK               = (0xfffffULL << 32),
+};
 
 /* Current network namespace */
-#define BPF_F_CURRENT_NETNS            (-1L)
+enum {
+       BPF_F_CURRENT_NETNS             = (-1L),
+};
+
+/* BPF_FUNC_csum_level level values. */
+enum {
+       BPF_CSUM_LEVEL_QUERY,
+       BPF_CSUM_LEVEL_INC,
+       BPF_CSUM_LEVEL_DEC,
+       BPF_CSUM_LEVEL_RESET,
+};
+
+/* BPF_FUNC_skb_adjust_room flags. */
+enum {
+       BPF_F_ADJ_ROOM_FIXED_GSO        = (1ULL << 0),
+       BPF_F_ADJ_ROOM_ENCAP_L3_IPV4    = (1ULL << 1),
+       BPF_F_ADJ_ROOM_ENCAP_L3_IPV6    = (1ULL << 2),
+       BPF_F_ADJ_ROOM_ENCAP_L4_GRE     = (1ULL << 3),
+       BPF_F_ADJ_ROOM_ENCAP_L4_UDP     = (1ULL << 4),
+       BPF_F_ADJ_ROOM_NO_CSUM_RESET    = (1ULL << 5),
+};
+
+enum {
+       BPF_ADJ_ROOM_ENCAP_L2_MASK      = 0xff,
+       BPF_ADJ_ROOM_ENCAP_L2_SHIFT     = 56,
+};
+
+#define BPF_F_ADJ_ROOM_ENCAP_L2(len)   (((__u64)len & \
+                                         BPF_ADJ_ROOM_ENCAP_L2_MASK) \
+                                        << BPF_ADJ_ROOM_ENCAP_L2_SHIFT)
+
+/* BPF_FUNC_sysctl_get_name flags. */
+enum {
+       BPF_F_SYSCTL_BASE_NAME          = (1ULL << 0),
+};
+
+/* BPF_FUNC_<kernel_obj>_storage_get flags */
+enum {
+       BPF_LOCAL_STORAGE_GET_F_CREATE  = (1ULL << 0),
+       /* BPF_SK_STORAGE_GET_F_CREATE is only kept for backward compatibility
+        * and BPF_LOCAL_STORAGE_GET_F_CREATE must be used instead.
+        */
+       BPF_SK_STORAGE_GET_F_CREATE  = BPF_LOCAL_STORAGE_GET_F_CREATE,
+};
+
+/* BPF_FUNC_read_branch_records flags. */
+enum {
+       BPF_F_GET_BRANCH_RECORDS_SIZE   = (1ULL << 0),
+};
+
+/* BPF_FUNC_bpf_ringbuf_commit, BPF_FUNC_bpf_ringbuf_discard, and
+ * BPF_FUNC_bpf_ringbuf_output flags.
+ */
+enum {
+       BPF_RB_NO_WAKEUP                = (1ULL << 0),
+       BPF_RB_FORCE_WAKEUP             = (1ULL << 1),
+};
+
+/* BPF_FUNC_bpf_ringbuf_query flags */
+enum {
+       BPF_RB_AVAIL_DATA = 0,
+       BPF_RB_RING_SIZE = 1,
+       BPF_RB_CONS_POS = 2,
+       BPF_RB_PROD_POS = 3,
+};
+
+/* BPF ring buffer constants */
+enum {
+       BPF_RINGBUF_BUSY_BIT            = (1U << 31),
+       BPF_RINGBUF_DISCARD_BIT         = (1U << 30),
+       BPF_RINGBUF_HDR_SZ              = 8,
+};
+
+/* BPF_FUNC_sk_assign flags in bpf_sk_lookup context. */
+enum {
+       BPF_SK_LOOKUP_F_REPLACE         = (1ULL << 0),
+       BPF_SK_LOOKUP_F_NO_REUSEPORT    = (1ULL << 1),
+};
 
 /* Mode for BPF_FUNC_skb_adjust_room helper. */
 enum bpf_adj_room_mode {
        BPF_ADJ_ROOM_NET,
+       BPF_ADJ_ROOM_MAC,
 };
 
 /* Mode for BPF_FUNC_skb_load_bytes_relative helper. */
@@ -2494,7 +4067,8 @@ enum bpf_hdr_start_off {
 /* Encapsulation type for BPF_FUNC_lwt_push_encap helper. */
 enum bpf_lwt_encap_mode {
        BPF_LWT_ENCAP_SEG6,
-       BPF_LWT_ENCAP_SEG6_INLINE
+       BPF_LWT_ENCAP_SEG6_INLINE,
+       BPF_LWT_ENCAP_IP,
 };
 
 #define __bpf_md_ptr(type, name)       \
@@ -2540,6 +4114,9 @@ struct __sk_buff {
        __bpf_md_ptr(struct bpf_flow_keys *, flow_keys);
        __u64 tstamp;
        __u32 wire_len;
+       __u32 gso_segs;
+       __bpf_md_ptr(struct bpf_sock *, sk);
+       __u32 gso_size;
 };
 
 struct bpf_tunnel_key {
@@ -2581,7 +4158,15 @@ enum bpf_ret_code {
        BPF_DROP = 2,
        /* 3-6 reserved */
        BPF_REDIRECT = 7,
-       /* >127 are reserved for prog type specific return codes */
+       /* >127 are reserved for prog type specific return codes.
+        *
+        * BPF_LWT_REROUTE: used by BPF_PROG_TYPE_LWT_IN and
+        *    BPF_PROG_TYPE_LWT_XMIT to indicate that skb had been
+        *    changed and should be routed based on its new L3 header.
+        *    (This is an L3 redirect, as opposed to L2 redirect
+        *    represented by BPF_REDIRECT above).
+        */
+       BPF_LWT_REROUTE = 128,
 };
 
 struct bpf_sock {
@@ -2591,15 +4176,60 @@ struct bpf_sock {
        __u32 protocol;
        __u32 mark;
        __u32 priority;
-       __u32 src_ip4;          /* Allows 1,2,4-byte read.
-                                * Stored in network byte order.
+       /* IP address also allows 1 and 2 bytes access */
+       __u32 src_ip4;
+       __u32 src_ip6[4];
+       __u32 src_port;         /* host byte order */
+       __u32 dst_port;         /* network byte order */
+       __u32 dst_ip4;
+       __u32 dst_ip6[4];
+       __u32 state;
+       __s32 rx_queue_mapping;
+};
+
+struct bpf_tcp_sock {
+       __u32 snd_cwnd;         /* Sending congestion window            */
+       __u32 srtt_us;          /* smoothed round trip time << 3 in usecs */
+       __u32 rtt_min;
+       __u32 snd_ssthresh;     /* Slow start size threshold            */
+       __u32 rcv_nxt;          /* What we want to receive next         */
+       __u32 snd_nxt;          /* Next sequence we send                */
+       __u32 snd_una;          /* First byte we want an ack for        */
+       __u32 mss_cache;        /* Cached effective mss, not including SACKS */
+       __u32 ecn_flags;        /* ECN status bits.                     */
+       __u32 rate_delivered;   /* saved rate sample: packets delivered */
+       __u32 rate_interval_us; /* saved rate sample: time elapsed */
+       __u32 packets_out;      /* Packets which are "in flight"        */
+       __u32 retrans_out;      /* Retransmitted packets out            */
+       __u32 total_retrans;    /* Total retransmits for entire connection */
+       __u32 segs_in;          /* RFC4898 tcpEStatsPerfSegsIn
+                                * total number of segments in.
                                 */
-       __u32 src_ip6[4];       /* Allows 1,2,4-byte read.
-                                * Stored in network byte order.
+       __u32 data_segs_in;     /* RFC4898 tcpEStatsPerfDataSegsIn
+                                * total number of data segments in.
+                                */
+       __u32 segs_out;         /* RFC4898 tcpEStatsPerfSegsOut
+                                * The total number of segments sent.
+                                */
+       __u32 data_segs_out;    /* RFC4898 tcpEStatsPerfDataSegsOut
+                                * total number of data segments sent.
+                                */
+       __u32 lost_out;         /* Lost packets                 */
+       __u32 sacked_out;       /* SACK'd packets                       */
+       __u64 bytes_received;   /* RFC4898 tcpEStatsAppHCThruOctetsReceived
+                                * sum(delta(rcv_nxt)), or how many bytes
+                                * were acked.
                                 */
-       __u32 src_port;         /* Allows 4-byte read.
-                                * Stored in host byte order
+       __u64 bytes_acked;      /* RFC4898 tcpEStatsAppHCThruOctetsAcked
+                                * sum(delta(snd_una)), or how many bytes
+                                * were acked.
                                 */
+       __u32 dsack_dups;       /* RFC4898 tcpEStatsStackDSACKDups
+                                * total number of DSACK blocks received
+                                */
+       __u32 delivered;        /* Total data packets delivered incl. rexmits */
+       __u32 delivered_ce;     /* Like the above but only ECE marked packets */
+       __u32 icsk_retransmits; /* Number of unrecovered [RTO] timeouts */
 };
 
 struct bpf_sock_tuple {
@@ -2619,6 +4249,10 @@ struct bpf_sock_tuple {
        };
 };
 
+struct bpf_xdp_sock {
+       __u32 queue_id;
+};
+
 #define XDP_PACKET_HEADROOM 256
 
 /* User return codes for XDP prog type.
@@ -2644,6 +4278,34 @@ struct xdp_md {
        /* Below access go through struct xdp_rxq_info */
        __u32 ingress_ifindex; /* rxq->dev->ifindex */
        __u32 rx_queue_index;  /* rxq->queue_index  */
+
+       __u32 egress_ifindex;  /* txq->dev->ifindex */
+};
+
+/* DEVMAP map-value layout
+ *
+ * The struct data-layout of map-value is a configuration interface.
+ * New members can only be added to the end of this structure.
+ */
+struct bpf_devmap_val {
+       __u32 ifindex;   /* device index */
+       union {
+               int   fd;  /* prog fd on map write */
+               __u32 id;  /* prog id on map read */
+       } bpf_prog;
+};
+
+/* CPUMAP map-value layout
+ *
+ * The struct data-layout of map-value is a configuration interface.
+ * New members can only be added to the end of this structure.
+ */
+struct bpf_cpumap_val {
+       __u32 qsize;    /* queue size to remote target CPU */
+       union {
+               int   fd;       /* prog fd on map write */
+               __u32 id;       /* prog id on map read */
+       } bpf_prog;
 };
 
 enum sk_action {
@@ -2666,6 +4328,8 @@ struct sk_msg_md {
        __u32 remote_port;      /* Stored in network byte order */
        __u32 local_port;       /* stored in host byte order */
        __u32 size;             /* Total size of sk_msg */
+
+       __bpf_md_ptr(struct bpf_sock *, sk); /* current socket */
 };
 
 struct sk_reuseport_md {
@@ -2710,6 +4374,7 @@ struct bpf_prog_info {
        char name[BPF_OBJ_NAME_LEN];
        __u32 ifindex;
        __u32 gpl_compatible:1;
+       __u32 :31; /* alignment pad */
        __u64 netns_dev;
        __u64 netns_ino;
        __u32 nr_jited_ksyms;
@@ -2728,6 +4393,8 @@ struct bpf_prog_info {
        __u32 jited_line_info_rec_size;
        __u32 nr_prog_tags;
        __aligned_u64 prog_tags;
+       __u64 run_time_ns;
+       __u64 run_cnt;
 } __attribute__((aligned(8)));
 
 struct bpf_map_info {
@@ -2739,7 +4406,7 @@ struct bpf_map_info {
        __u32 map_flags;
        char  name[BPF_OBJ_NAME_LEN];
        __u32 ifindex;
-       __u32 :32;
+       __u32 btf_vmlinux_value_type_id;
        __u64 netns_dev;
        __u64 netns_ino;
        __u32 btf_id;
@@ -2753,30 +4420,66 @@ struct bpf_btf_info {
        __u32 id;
 } __attribute__((aligned(8)));
 
+struct bpf_link_info {
+       __u32 type;
+       __u32 id;
+       __u32 prog_id;
+       union {
+               struct {
+                       __aligned_u64 tp_name; /* in/out: tp_name buffer ptr */
+                       __u32 tp_name_len;     /* in/out: tp_name buffer len */
+               } raw_tracepoint;
+               struct {
+                       __u32 attach_type;
+               } tracing;
+               struct {
+                       __u64 cgroup_id;
+                       __u32 attach_type;
+               } cgroup;
+               struct {
+                       __aligned_u64 target_name; /* in/out: target_name buffer ptr */
+                       __u32 target_name_len;     /* in/out: target_name buffer len */
+                       union {
+                               struct {
+                                       __u32 map_id;
+                               } map;
+                       };
+               } iter;
+               struct  {
+                       __u32 netns_ino;
+                       __u32 attach_type;
+               } netns;
+               struct {
+                       __u32 ifindex;
+               } xdp;
+       };
+} __attribute__((aligned(8)));
+
 /* User bpf_sock_addr struct to access socket fields and sockaddr struct passed
  * by user and intended to be used by socket (e.g. to bind to, depends on
- * attach attach type).
+ * attach type).
  */
 struct bpf_sock_addr {
        __u32 user_family;      /* Allows 4-byte read, but no write. */
        __u32 user_ip4;         /* Allows 1,2,4-byte read and 4-byte write.
                                 * Stored in network byte order.
                                 */
-       __u32 user_ip6[4];      /* Allows 1,2,4-byte read an 4-byte write.
+       __u32 user_ip6[4];      /* Allows 1,2,4,8-byte read and 4,8-byte write.
                                 * Stored in network byte order.
                                 */
-       __u32 user_port;        /* Allows 4-byte read and write.
+       __u32 user_port;        /* Allows 1,2,4-byte read and 4-byte write.
                                 * Stored in network byte order
                                 */
        __u32 family;           /* Allows 4-byte read, but no write */
        __u32 type;             /* Allows 4-byte read, but no write */
        __u32 protocol;         /* Allows 4-byte read, but no write */
-       __u32 msg_src_ip4;      /* Allows 1,2,4-byte read an 4-byte write.
+       __u32 msg_src_ip4;      /* Allows 1,2,4-byte read and 4-byte write.
                                 * Stored in network byte order.
                                 */
-       __u32 msg_src_ip6[4];   /* Allows 1,2,4-byte read an 4-byte write.
+       __u32 msg_src_ip6[4];   /* Allows 1,2,4,8-byte read and 4,8-byte write.
                                 * Stored in network byte order.
                                 */
+       __bpf_md_ptr(struct bpf_sock *, sk);
 };
 
 /* User bpf_sock_ops struct to access socket values and specify request ops
@@ -2828,15 +4531,91 @@ struct bpf_sock_ops {
        __u32 sk_txhash;
        __u64 bytes_received;
        __u64 bytes_acked;
+       __bpf_md_ptr(struct bpf_sock *, sk);
+       /* [skb_data, skb_data_end) covers the whole TCP header.
+        *
+        * BPF_SOCK_OPS_PARSE_HDR_OPT_CB: The packet received
+        * BPF_SOCK_OPS_HDR_OPT_LEN_CB:   Not useful because the
+        *                                header has not been written.
+        * BPF_SOCK_OPS_WRITE_HDR_OPT_CB: The header and options have
+        *                                been written so far.
+        * BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB:  The SYNACK that concludes
+        *                                      the 3WHS.
+        * BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB: The ACK that concludes
+        *                                      the 3WHS.
+        *
+        * bpf_load_hdr_opt() can also be used to read a particular option.
+        */
+       __bpf_md_ptr(void *, skb_data);
+       __bpf_md_ptr(void *, skb_data_end);
+       __u32 skb_len;          /* The total length of a packet.
+                                * It includes the header, options,
+                                * and payload.
+                                */
+       __u32 skb_tcp_flags;    /* tcp_flags of the header.  It provides
+                                * an easy way to check for tcp_flags
+                                * without parsing skb_data.
+                                *
+                                * In particular, the skb_tcp_flags
+                                * will still be available in
+                                * BPF_SOCK_OPS_HDR_OPT_LEN even though
+                                * the outgoing header has not
+                                * been written yet.
+                                */
 };
 
 /* Definitions for bpf_sock_ops_cb_flags */
-#define BPF_SOCK_OPS_RTO_CB_FLAG       (1<<0)
-#define BPF_SOCK_OPS_RETRANS_CB_FLAG   (1<<1)
-#define BPF_SOCK_OPS_STATE_CB_FLAG     (1<<2)
-#define BPF_SOCK_OPS_ALL_CB_FLAGS       0x7            /* Mask of all currently
-                                                        * supported cb flags
-                                                        */
+enum {
+       BPF_SOCK_OPS_RTO_CB_FLAG        = (1<<0),
+       BPF_SOCK_OPS_RETRANS_CB_FLAG    = (1<<1),
+       BPF_SOCK_OPS_STATE_CB_FLAG      = (1<<2),
+       BPF_SOCK_OPS_RTT_CB_FLAG        = (1<<3),
+       /* Call bpf for all received TCP headers.  The bpf prog will be
+        * called under sock_ops->op == BPF_SOCK_OPS_PARSE_HDR_OPT_CB
+        *
+        * Please refer to the comment in BPF_SOCK_OPS_PARSE_HDR_OPT_CB
+        * for the header option related helpers that will be useful
+        * to the bpf programs.
+        *
+        * It could be used at the client/active side (i.e. connect() side)
+        * when the server told it that the server was in syncookie
+        * mode and required the active side to resend the bpf-written
+        * options.  The active side can keep writing the bpf-options until
+        * it received a valid packet from the server side to confirm
+        * the earlier packet (and options) has been received.  The later
+        * example patch is using it like this at the active side when the
+        * server is in syncookie mode.
+        *
+        * The bpf prog will usually turn this off in the common cases.
+        */
+       BPF_SOCK_OPS_PARSE_ALL_HDR_OPT_CB_FLAG  = (1<<4),
+       /* Call bpf when kernel has received a header option that
+        * the kernel cannot handle.  The bpf prog will be called under
+        * sock_ops->op == BPF_SOCK_OPS_PARSE_HDR_OPT_CB.
+        *
+        * Please refer to the comment in BPF_SOCK_OPS_PARSE_HDR_OPT_CB
+        * for the header option related helpers that will be useful
+        * to the bpf programs.
+        */
+       BPF_SOCK_OPS_PARSE_UNKNOWN_HDR_OPT_CB_FLAG = (1<<5),
+       /* Call bpf when the kernel is writing header options for the
+        * outgoing packet.  The bpf prog will first be called
+        * to reserve space in a skb under
+        * sock_ops->op == BPF_SOCK_OPS_HDR_OPT_LEN_CB.  Then
+        * the bpf prog will be called to write the header option(s)
+        * under sock_ops->op == BPF_SOCK_OPS_WRITE_HDR_OPT_CB.
+        *
+        * Please refer to the comment in BPF_SOCK_OPS_HDR_OPT_LEN_CB
+        * and BPF_SOCK_OPS_WRITE_HDR_OPT_CB for the header option
+        * related helpers that will be useful to the bpf programs.
+        *
+        * The kernel gets its chance to reserve space and write
+        * options first before the BPF program does.
+        */
+       BPF_SOCK_OPS_WRITE_HDR_OPT_CB_FLAG = (1<<6),
+/* Mask of all currently supported cb flags */
+       BPF_SOCK_OPS_ALL_CB_FLAGS       = 0x7F,
+};
 
 /* List of known BPF sock_ops operators.
  * New entries can only be added at the end
@@ -2889,6 +4668,65 @@ enum {
        BPF_SOCK_OPS_TCP_LISTEN_CB,     /* Called on listen(2), right after
                                         * socket transition to LISTEN state.
                                         */
+       BPF_SOCK_OPS_RTT_CB,            /* Called on every RTT.
+                                        */
+       BPF_SOCK_OPS_PARSE_HDR_OPT_CB,  /* Parse the header option.
+                                        * It will be called to handle
+                                        * the packets received at
+                                        * an already established
+                                        * connection.
+                                        *
+                                        * sock_ops->skb_data:
+                                        * Referring to the received skb.
+                                        * It covers the TCP header only.
+                                        *
+                                        * bpf_load_hdr_opt() can also
+                                        * be used to search for a
+                                        * particular option.
+                                        */
+       BPF_SOCK_OPS_HDR_OPT_LEN_CB,    /* Reserve space for writing the
+                                        * header option later in
+                                        * BPF_SOCK_OPS_WRITE_HDR_OPT_CB.
+                                        * Arg1: bool want_cookie. (in
+                                        *       writing SYNACK only)
+                                        *
+                                        * sock_ops->skb_data:
+                                        * Not available because no header has
+                                        * been written yet.
+                                        *
+                                        * sock_ops->skb_tcp_flags:
+                                        * The tcp_flags of the
+                                        * outgoing skb. (e.g. SYN, ACK, FIN).
+                                        *
+                                        * bpf_reserve_hdr_opt() should
+                                        * be used to reserve space.
+                                        */
+       BPF_SOCK_OPS_WRITE_HDR_OPT_CB,  /* Write the header options
+                                        * Arg1: bool want_cookie. (in
+                                        *       writing SYNACK only)
+                                        *
+                                        * sock_ops->skb_data:
+                                        * Referring to the outgoing skb.
+                                        * It covers the TCP header
+                                        * that has already been written
+                                        * by the kernel and the
+                                        * earlier bpf-progs.
+                                        *
+                                        * sock_ops->skb_tcp_flags:
+                                        * The tcp_flags of the outgoing
+                                        * skb. (e.g. SYN, ACK, FIN).
+                                        *
+                                        * bpf_store_hdr_opt() should
+                                        * be used to write the
+                                        * option.
+                                        *
+                                        * bpf_load_hdr_opt() can also
+                                        * be used to search for a
+                                        * particular option that
+                                        * has already been written
+                                        * by the kernel or the
+                                        * earlier bpf-progs.
+                                        */
 };
 
 /* List of TCP states. There is a build check in net/ipv4/tcp.c to detect
@@ -2913,8 +4751,67 @@ enum {
        BPF_TCP_MAX_STATES      /* Leave at the end! */
 };
 
-#define TCP_BPF_IW             1001    /* Set TCP initial congestion window */
-#define TCP_BPF_SNDCWND_CLAMP  1002    /* Set sndcwnd_clamp */
+enum {
+       TCP_BPF_IW              = 1001, /* Set TCP initial congestion window */
+       TCP_BPF_SNDCWND_CLAMP   = 1002, /* Set sndcwnd_clamp */
+       TCP_BPF_DELACK_MAX      = 1003, /* Max delay ack in usecs */
+       TCP_BPF_RTO_MIN         = 1004, /* Min delay ack in usecs */
+       /* Copy the SYN pkt to optval
+        *
+        * BPF_PROG_TYPE_SOCK_OPS only.  It is similar to the
+        * bpf_getsockopt(TCP_SAVED_SYN) but it does not limit
+        * to only getting from the saved_syn.  It can either get the
+        * syn packet from:
+        *
+        * 1. the just-received SYN packet (only available when writing the
+        *    SYNACK).  It will be useful when it is not necessary to
+        *    save the SYN packet for latter use.  It is also the only way
+        *    to get the SYN during syncookie mode because the syn
+        *    packet cannot be saved during syncookie.
+        *
+        * OR
+        *
+        * 2. the earlier saved syn which was done by
+        *    bpf_setsockopt(TCP_SAVE_SYN).
+        *
+        * The bpf_getsockopt(TCP_BPF_SYN*) option will hide where the
+        * SYN packet is obtained.
+        *
+        * If the bpf-prog does not need the IP[46] header,  the
+        * bpf-prog can avoid parsing the IP header by using
+        * TCP_BPF_SYN.  Otherwise, the bpf-prog can get both
+        * IP[46] and TCP header by using TCP_BPF_SYN_IP.
+        *
+        *      >0: Total number of bytes copied
+        * -ENOSPC: Not enough space in optval. Only optlen number of
+        *          bytes is copied.
+        * -ENOENT: The SYN skb is not available now and the earlier SYN pkt
+        *          is not saved by setsockopt(TCP_SAVE_SYN).
+        */
+       TCP_BPF_SYN             = 1005, /* Copy the TCP header */
+       TCP_BPF_SYN_IP          = 1006, /* Copy the IP[46] and TCP header */
+       TCP_BPF_SYN_MAC         = 1007, /* Copy the MAC, IP[46], and TCP header */
+};
+
+enum {
+       BPF_LOAD_HDR_OPT_TCP_SYN = (1ULL << 0),
+};
+
+/* args[0] value during BPF_SOCK_OPS_HDR_OPT_LEN_CB and
+ * BPF_SOCK_OPS_WRITE_HDR_OPT_CB.
+ */
+enum {
+       BPF_WRITE_HDR_TCP_CURRENT_MSS = 1,      /* Kernel is finding the
+                                                * total option spaces
+                                                * required for an established
+                                                * sk in order to calculate the
+                                                * MSS.  No skb is actually
+                                                * sent.
+                                                */
+       BPF_WRITE_HDR_TCP_SYNACK_COOKIE = 2,    /* Kernel is in syncookie mode
+                                                * when sending a SYN.
+                                                */
+};
 
 struct bpf_perf_event_value {
        __u64 counter;
@@ -2922,12 +4819,16 @@ struct bpf_perf_event_value {
        __u64 running;
 };
 
-#define BPF_DEVCG_ACC_MKNOD    (1ULL << 0)
-#define BPF_DEVCG_ACC_READ     (1ULL << 1)
-#define BPF_DEVCG_ACC_WRITE    (1ULL << 2)
+enum {
+       BPF_DEVCG_ACC_MKNOD     = (1ULL << 0),
+       BPF_DEVCG_ACC_READ      = (1ULL << 1),
+       BPF_DEVCG_ACC_WRITE     = (1ULL << 2),
+};
 
-#define BPF_DEVCG_DEV_BLOCK    (1ULL << 0)
-#define BPF_DEVCG_DEV_CHAR     (1ULL << 1)
+enum {
+       BPF_DEVCG_DEV_BLOCK     = (1ULL << 0),
+       BPF_DEVCG_DEV_CHAR      = (1ULL << 1),
+};
 
 struct bpf_cgroup_dev_ctx {
        /* access_type encoded as (BPF_DEVCG_ACC_* << 16) | BPF_DEVCG_DEV_* */
@@ -2943,8 +4844,10 @@ struct bpf_raw_tracepoint_args {
 /* DIRECT:  Skip the FIB rules and go to FIB table associated with device
  * OUTPUT:  Do lookup from egress perspective; default is ingress
  */
-#define BPF_FIB_LOOKUP_DIRECT  BIT(0)
-#define BPF_FIB_LOOKUP_OUTPUT  BIT(1)
+enum {
+       BPF_FIB_LOOKUP_DIRECT  = (1U << 0),
+       BPF_FIB_LOOKUP_OUTPUT  = (1U << 1),
+};
 
 enum {
        BPF_FIB_LKUP_RET_SUCCESS,      /* lookup successful */
@@ -3007,6 +4910,16 @@ struct bpf_fib_lookup {
        __u8    dmac[6];     /* ETH_ALEN */
 };
 
+struct bpf_redir_neigh {
+       /* network family for lookup (AF_INET, AF_INET6) */
+       __u32 nh_family;
+       /* network address of nexthop; skips fib lookup to find gateway */
+       union {
+               __be32          ipv4_nh;
+               __u32           ipv6_nh[4];  /* in6_addr; network order */
+       };
+};
+
 enum bpf_task_fd_type {
        BPF_FD_TYPE_RAW_TRACEPOINT,     /* tp name */
        BPF_FD_TYPE_TRACEPOINT,         /* tp name */
@@ -3016,6 +4929,12 @@ enum bpf_task_fd_type {
        BPF_FD_TYPE_URETPROBE,          /* filename + offset */
 };
 
+enum {
+       BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG             = (1U << 0),
+       BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL         = (1U << 1),
+       BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP              = (1U << 2),
+};
+
 struct bpf_flow_keys {
        __u16   nhoff;
        __u16   thoff;
@@ -3037,6 +4956,8 @@ struct bpf_flow_keys {
                        __u32   ipv6_dst[4];    /* in6_addr; network order */
                };
        };
+       __u32   flags;
+       __be32  flow_label;
 };
 
 struct bpf_func_info {
@@ -3054,4 +4975,77 @@ struct bpf_line_info {
        __u32   line_col;
 };
 
+struct bpf_spin_lock {
+       __u32   val;
+};
+
+struct bpf_sysctl {
+       __u32   write;          /* Sysctl is being read (= 0) or written (= 1).
+                                * Allows 1,2,4-byte read, but no write.
+                                */
+       __u32   file_pos;       /* Sysctl file position to read from, write to.
+                                * Allows 1,2,4-byte read an 4-byte write.
+                                */
+};
+
+struct bpf_sockopt {
+       __bpf_md_ptr(struct bpf_sock *, sk);
+       __bpf_md_ptr(void *, optval);
+       __bpf_md_ptr(void *, optval_end);
+
+       __s32   level;
+       __s32   optname;
+       __s32   optlen;
+       __s32   retval;
+};
+
+struct bpf_pidns_info {
+       __u32 pid;
+       __u32 tgid;
+};
+
+/* User accessible data for SK_LOOKUP programs. Add new fields at the end. */
+struct bpf_sk_lookup {
+       __bpf_md_ptr(struct bpf_sock *, sk); /* Selected socket */
+
+       __u32 family;           /* Protocol family (AF_INET, AF_INET6) */
+       __u32 protocol;         /* IP protocol (IPPROTO_TCP, IPPROTO_UDP) */
+       __u32 remote_ip4;       /* Network byte order */
+       __u32 remote_ip6[4];    /* Network byte order */
+       __u32 remote_port;      /* Network byte order */
+       __u32 local_ip4;        /* Network byte order */
+       __u32 local_ip6[4];     /* Network byte order */
+       __u32 local_port;       /* Host byte order */
+};
+
+/*
+ * struct btf_ptr is used for typed pointer representation; the
+ * type id is used to render the pointer data as the appropriate type
+ * via the bpf_snprintf_btf() helper described above.  A flags field -
+ * potentially to specify additional details about the BTF pointer
+ * (rather than its mode of display) - is included for future use.
+ * Display flags - BTF_F_* - are passed to bpf_snprintf_btf separately.
+ */
+struct btf_ptr {
+       void *ptr;
+       __u32 type_id;
+       __u32 flags;            /* BTF ptr flags; unused at present. */
+};
+
+/*
+ * Flags to control bpf_snprintf_btf() behaviour.
+ *     - BTF_F_COMPACT: no formatting around type information
+ *     - BTF_F_NONAME: no struct/union member names/types
+ *     - BTF_F_PTR_RAW: show raw (unobfuscated) pointer values;
+ *       equivalent to %px.
+ *     - BTF_F_ZERO: show zero-valued struct/union members; they
+ *       are not displayed by default
+ */
+enum {
+       BTF_F_COMPACT   =       (1ULL << 0),
+       BTF_F_NONAME    =       (1ULL << 1),
+       BTF_F_PTR_RAW   =       (1ULL << 2),
+       BTF_F_ZERO      =       (1ULL << 3),
+};
+
 #endif /* _UAPI__LINUX_BPF_H__ */
index b3aeec70f9a31280fddc02615f61b73957a6099f..ab312e13fbcb9cc8afe6913905f3a1edbc02430a 100644 (file)
@@ -243,6 +243,7 @@ enum {
        DM_TARGET_MSG_CMD,
        DM_DEV_SET_GEOMETRY_CMD,
        DM_DEV_ARM_POLL_CMD,
+       DM_GET_TARGET_VERSION_CMD,
 };
 
 #define DM_IOCTL 0xfd
@@ -265,6 +266,7 @@ enum {
 #define DM_TABLE_STATUS  _IOWR(DM_IOCTL, DM_TABLE_STATUS_CMD, struct dm_ioctl)
 
 #define DM_LIST_VERSIONS _IOWR(DM_IOCTL, DM_LIST_VERSIONS_CMD, struct dm_ioctl)
+#define DM_GET_TARGET_VERSION _IOWR(DM_IOCTL, DM_GET_TARGET_VERSION_CMD, struct dm_ioctl)
 
 #define DM_TARGET_MSG   _IOWR(DM_IOCTL, DM_TARGET_MSG_CMD, struct dm_ioctl)
 #define DM_DEV_SET_GEOMETRY    _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
@@ -272,7 +274,7 @@ enum {
 #define DM_VERSION_MAJOR       4
 #define DM_VERSION_MINOR       27
 #define DM_VERSION_PATCHLEVEL  0
-#define DM_VERSION_EXTRA       "-ioctl (2019-01-18)"
+#define DM_VERSION_EXTRA       "-ioctl (2020-10-01)"
 
 /* Status bits */
 #define DM_READONLY_FLAG       (1 << 0) /* In/Out */
index acf346be41e42149cb20005a9be5b940fd18f0d8..974d4292e7d91ebdef2c594d8812e6aeb83d7b12 100644 (file)
@@ -263,10 +263,32 @@ struct ethtool_tunable {
 #define ETHTOOL_PHY_FAST_LINK_DOWN_ON  0
 #define ETHTOOL_PHY_FAST_LINK_DOWN_OFF 0xff
 
+/* Energy Detect Power Down (EDPD) is a feature supported by some PHYs, where
+ * the PHY's RX & TX blocks are put into a low-power mode when there is no
+ * link detected (typically cable is un-plugged). For RX, only a minimal
+ * link-detection is available, and for TX the PHY wakes up to send link pulses
+ * to avoid any lock-ups in case the peer PHY may also be running in EDPD mode.
+ *
+ * Some PHYs may support configuration of the wake-up interval for TX pulses,
+ * and some PHYs may support only disabling TX pulses entirely. For the latter
+ * a special value is required (ETHTOOL_PHY_EDPD_NO_TX) so that this can be
+ * configured from userspace (should the user want it).
+ *
+ * The interval units for TX wake-up are in milliseconds, since this should
+ * cover a reasonable range of intervals:
+ *  - from 1 millisecond, which does not sound like much of a power-saver
+ *  - to ~65 seconds which is quite a lot to wait for a link to come up when
+ *    plugging a cable
+ */
+#define ETHTOOL_PHY_EDPD_DFLT_TX_MSECS         0xffff
+#define ETHTOOL_PHY_EDPD_NO_TX                 0xfffe
+#define ETHTOOL_PHY_EDPD_DISABLE               0
+
 enum phy_tunable_id {
        ETHTOOL_PHY_ID_UNSPEC,
        ETHTOOL_PHY_DOWNSHIFT,
        ETHTOOL_PHY_FAST_LINK_DOWN,
+       ETHTOOL_PHY_EDPD,
        /*
         * Add your fresh new phy tunable attribute above and remember to update
         * phy_tunable_strings[] in net/core/ethtool.c
@@ -561,6 +583,76 @@ struct ethtool_pauseparam {
        __u32   tx_pause;
 };
 
+/**
+ * enum ethtool_link_ext_state - link extended state
+ */
+enum ethtool_link_ext_state {
+       ETHTOOL_LINK_EXT_STATE_AUTONEG,
+       ETHTOOL_LINK_EXT_STATE_LINK_TRAINING_FAILURE,
+       ETHTOOL_LINK_EXT_STATE_LINK_LOGICAL_MISMATCH,
+       ETHTOOL_LINK_EXT_STATE_BAD_SIGNAL_INTEGRITY,
+       ETHTOOL_LINK_EXT_STATE_NO_CABLE,
+       ETHTOOL_LINK_EXT_STATE_CABLE_ISSUE,
+       ETHTOOL_LINK_EXT_STATE_EEPROM_ISSUE,
+       ETHTOOL_LINK_EXT_STATE_CALIBRATION_FAILURE,
+       ETHTOOL_LINK_EXT_STATE_POWER_BUDGET_EXCEEDED,
+       ETHTOOL_LINK_EXT_STATE_OVERHEAT,
+};
+
+/**
+ * enum ethtool_link_ext_substate_autoneg - more information in addition to
+ * ETHTOOL_LINK_EXT_STATE_AUTONEG.
+ */
+enum ethtool_link_ext_substate_autoneg {
+       ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED = 1,
+       ETHTOOL_LINK_EXT_SUBSTATE_AN_ACK_NOT_RECEIVED,
+       ETHTOOL_LINK_EXT_SUBSTATE_AN_NEXT_PAGE_EXCHANGE_FAILED,
+       ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_PARTNER_DETECTED_FORCE_MODE,
+       ETHTOOL_LINK_EXT_SUBSTATE_AN_FEC_MISMATCH_DURING_OVERRIDE,
+       ETHTOOL_LINK_EXT_SUBSTATE_AN_NO_HCD,
+};
+
+/**
+ * enum ethtool_link_ext_substate_link_training - more information in addition to
+ * ETHTOOL_LINK_EXT_STATE_LINK_TRAINING_FAILURE.
+ */
+enum ethtool_link_ext_substate_link_training {
+       ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_FRAME_LOCK_NOT_ACQUIRED = 1,
+       ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_INHIBIT_TIMEOUT,
+       ETHTOOL_LINK_EXT_SUBSTATE_LT_KR_LINK_PARTNER_DID_NOT_SET_RECEIVER_READY,
+       ETHTOOL_LINK_EXT_SUBSTATE_LT_REMOTE_FAULT,
+};
+
+/**
+ * enum ethtool_link_ext_substate_logical_mismatch - more information in addition
+ * to ETHTOOL_LINK_EXT_STATE_LINK_LOGICAL_MISMATCH.
+ */
+enum ethtool_link_ext_substate_link_logical_mismatch {
+       ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_BLOCK_LOCK = 1,
+       ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_ACQUIRE_AM_LOCK,
+       ETHTOOL_LINK_EXT_SUBSTATE_LLM_PCS_DID_NOT_GET_ALIGN_STATUS,
+       ETHTOOL_LINK_EXT_SUBSTATE_LLM_FC_FEC_IS_NOT_LOCKED,
+       ETHTOOL_LINK_EXT_SUBSTATE_LLM_RS_FEC_IS_NOT_LOCKED,
+};
+
+/**
+ * enum ethtool_link_ext_substate_bad_signal_integrity - more information in
+ * addition to ETHTOOL_LINK_EXT_STATE_BAD_SIGNAL_INTEGRITY.
+ */
+enum ethtool_link_ext_substate_bad_signal_integrity {
+       ETHTOOL_LINK_EXT_SUBSTATE_BSI_LARGE_NUMBER_OF_PHYSICAL_ERRORS = 1,
+       ETHTOOL_LINK_EXT_SUBSTATE_BSI_UNSUPPORTED_RATE,
+};
+
+/**
+ * enum ethtool_link_ext_substate_cable_issue - more information in
+ * addition to ETHTOOL_LINK_EXT_STATE_CABLE_ISSUE.
+ */
+enum ethtool_link_ext_substate_cable_issue {
+       ETHTOOL_LINK_EXT_SUBSTATE_CI_UNSUPPORTED_CABLE = 1,
+       ETHTOOL_LINK_EXT_SUBSTATE_CI_CABLE_TEST_FAILURE,
+};
+
 #define ETH_GSTRING_LEN                32
 
 /**
@@ -575,6 +667,13 @@ struct ethtool_pauseparam {
  * @ETH_SS_RSS_HASH_FUNCS: RSS hush function names
  * @ETH_SS_PHY_STATS: Statistic names, for use with %ETHTOOL_GPHYSTATS
  * @ETH_SS_PHY_TUNABLES: PHY tunable names
+ * @ETH_SS_LINK_MODES: link mode names
+ * @ETH_SS_MSG_CLASSES: debug message class names
+ * @ETH_SS_WOL_MODES: wake-on-lan modes
+ * @ETH_SS_SOF_TIMESTAMPING: SOF_TIMESTAMPING_* flags
+ * @ETH_SS_TS_TX_TYPES: timestamping Tx types
+ * @ETH_SS_TS_RX_FILTERS: timestamping Rx filters
+ * @ETH_SS_UDP_TUNNEL_TYPES: UDP tunnel types
  */
 enum ethtool_stringset {
        ETH_SS_TEST             = 0,
@@ -586,6 +685,16 @@ enum ethtool_stringset {
        ETH_SS_TUNABLES,
        ETH_SS_PHY_STATS,
        ETH_SS_PHY_TUNABLES,
+       ETH_SS_LINK_MODES,
+       ETH_SS_MSG_CLASSES,
+       ETH_SS_WOL_MODES,
+       ETH_SS_SOF_TIMESTAMPING,
+       ETH_SS_TS_TX_TYPES,
+       ETH_SS_TS_RX_FILTERS,
+       ETH_SS_UDP_TUNNEL_TYPES,
+
+       /* add new constants above here */
+       ETH_SS_COUNT
 };
 
 /**
@@ -1303,6 +1412,7 @@ enum ethtool_fec_config_bits {
        ETHTOOL_FEC_OFF_BIT,
        ETHTOOL_FEC_RS_BIT,
        ETHTOOL_FEC_BASER_BIT,
+       ETHTOOL_FEC_LLRS_BIT,
 };
 
 #define ETHTOOL_FEC_NONE               (1 << ETHTOOL_FEC_NONE_BIT)
@@ -1310,6 +1420,7 @@ enum ethtool_fec_config_bits {
 #define ETHTOOL_FEC_OFF                        (1 << ETHTOOL_FEC_OFF_BIT)
 #define ETHTOOL_FEC_RS                 (1 << ETHTOOL_FEC_RS_BIT)
 #define ETHTOOL_FEC_BASER              (1 << ETHTOOL_FEC_BASER_BIT)
+#define ETHTOOL_FEC_LLRS               (1 << ETHTOOL_FEC_LLRS_BIT)
 
 /* CMDs currently supported */
 #define ETHTOOL_GSET           0x00000001 /* DEPRECATED, Get settings.
@@ -1487,7 +1598,31 @@ enum ethtool_link_mode_bit_indices {
        ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT = 64,
        ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT         = 65,
        ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT         = 66,
-
+       ETHTOOL_LINK_MODE_100baseT1_Full_BIT             = 67,
+       ETHTOOL_LINK_MODE_1000baseT1_Full_BIT            = 68,
+       ETHTOOL_LINK_MODE_400000baseKR8_Full_BIT         = 69,
+       ETHTOOL_LINK_MODE_400000baseSR8_Full_BIT         = 70,
+       ETHTOOL_LINK_MODE_400000baseLR8_ER8_FR8_Full_BIT = 71,
+       ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT         = 72,
+       ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT         = 73,
+       ETHTOOL_LINK_MODE_FEC_LLRS_BIT                   = 74,
+       ETHTOOL_LINK_MODE_100000baseKR_Full_BIT          = 75,
+       ETHTOOL_LINK_MODE_100000baseSR_Full_BIT          = 76,
+       ETHTOOL_LINK_MODE_100000baseLR_ER_FR_Full_BIT    = 77,
+       ETHTOOL_LINK_MODE_100000baseCR_Full_BIT          = 78,
+       ETHTOOL_LINK_MODE_100000baseDR_Full_BIT          = 79,
+       ETHTOOL_LINK_MODE_200000baseKR2_Full_BIT         = 80,
+       ETHTOOL_LINK_MODE_200000baseSR2_Full_BIT         = 81,
+       ETHTOOL_LINK_MODE_200000baseLR2_ER2_FR2_Full_BIT = 82,
+       ETHTOOL_LINK_MODE_200000baseDR2_Full_BIT         = 83,
+       ETHTOOL_LINK_MODE_200000baseCR2_Full_BIT         = 84,
+       ETHTOOL_LINK_MODE_400000baseKR4_Full_BIT         = 85,
+       ETHTOOL_LINK_MODE_400000baseSR4_Full_BIT         = 86,
+       ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT = 87,
+       ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT         = 88,
+       ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT         = 89,
+       ETHTOOL_LINK_MODE_100baseFX_Half_BIT             = 90,
+       ETHTOOL_LINK_MODE_100baseFX_Full_BIT             = 91,
        /* must be last entry */
        __ETHTOOL_LINK_MODE_MASK_NBITS
 };
@@ -1598,6 +1733,7 @@ enum ethtool_link_mode_bit_indices {
 #define SPEED_56000            56000
 #define SPEED_100000           100000
 #define SPEED_200000           200000
+#define SPEED_400000           400000
 
 #define SPEED_UNKNOWN          -1
 
@@ -1623,6 +1759,18 @@ static inline int ethtool_validate_duplex(__u8 duplex)
        return 0;
 }
 
+#define MASTER_SLAVE_CFG_UNSUPPORTED           0
+#define MASTER_SLAVE_CFG_UNKNOWN               1
+#define MASTER_SLAVE_CFG_MASTER_PREFERRED      2
+#define MASTER_SLAVE_CFG_SLAVE_PREFERRED       3
+#define MASTER_SLAVE_CFG_MASTER_FORCE          4
+#define MASTER_SLAVE_CFG_SLAVE_FORCE           5
+#define MASTER_SLAVE_STATE_UNSUPPORTED         0
+#define MASTER_SLAVE_STATE_UNKNOWN             1
+#define MASTER_SLAVE_STATE_MASTER              2
+#define MASTER_SLAVE_STATE_SLAVE               3
+#define MASTER_SLAVE_STATE_ERR                 4
+
 /* Which connector port. */
 #define PORT_TP                        0x00
 #define PORT_AUI               0x01
@@ -1662,6 +1810,8 @@ static inline int ethtool_validate_duplex(__u8 duplex)
 #define WAKE_MAGICSECURE       (1 << 6) /* only meaningful if WAKE_MAGIC */
 #define WAKE_FILTER            (1 << 7)
 
+#define WOL_MODE_COUNT         8
+
 /* L2-L4 network traffic flow types */
 #define        TCP_V4_FLOW     0x01    /* hash or spec (tcp_ip4_spec) */
 #define        UDP_V4_FLOW     0x02    /* hash or spec (udp_ip4_spec) */
@@ -1859,7 +2009,9 @@ struct ethtool_link_settings {
        __u8    eth_tp_mdix_ctrl;
        __s8    link_mode_masks_nwords;
        __u8    transceiver;
-       __u8    reserved1[3];
+       __u8    master_slave_cfg;
+       __u8    master_slave_state;
+       __u8    reserved1[1];
        __u32   reserved[7];
        __u32   link_mode_masks[0];
        /* layout of link_mode_masks fields:
index b065c1fe4df5d5d71da9c204e97c0c5bc142c57b..47700a2b9af962f387a7759af4092e2a6a04412a 100644 (file)
@@ -11,7 +11,7 @@
  * Copyright 2008 Jouni Malinen <jouni.malinen@atheros.com>
  * Copyright 2008 Colin McCabe <colin@cozybit.com>
  * Copyright 2015-2017 Intel Deutschland GmbH
- * Copyright (C) 2018-2019 Intel Corporation
+ * Copyright (C) 2018-2020 Intel Corporation
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  *
  * By setting @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_PSK flag drivers
  * can indicate they support offloading EAPOL handshakes for WPA/WPA2
- * preshared key authentication. In %NL80211_CMD_CONNECT the preshared
- * key should be specified using %NL80211_ATTR_PMK. Drivers supporting
- * this offload may reject the %NL80211_CMD_CONNECT when no preshared
- * key material is provided, for example when that driver does not
- * support setting the temporal keys through %CMD_NEW_KEY.
+ * preshared key authentication in station mode. In %NL80211_CMD_CONNECT
+ * the preshared key should be specified using %NL80211_ATTR_PMK. Drivers
+ * supporting this offload may reject the %NL80211_CMD_CONNECT when no
+ * preshared key material is provided, for example when that driver does
+ * not support setting the temporal keys through %NL80211_CMD_NEW_KEY.
  *
  * Similarly @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X flag can be
  * set by drivers indicating offload support of the PTK/GTK EAPOL
- * handshakes during 802.1X authentication. In order to use the offload
- * the %NL80211_CMD_CONNECT should have %NL80211_ATTR_WANT_1X_4WAY_HS
- * attribute flag. Drivers supporting this offload may reject the
- * %NL80211_CMD_CONNECT when the attribute flag is not present.
+ * handshakes during 802.1X authentication in station mode. In order to
+ * use the offload the %NL80211_CMD_CONNECT should have
+ * %NL80211_ATTR_WANT_1X_4WAY_HS attribute flag. Drivers supporting this
+ * offload may reject the %NL80211_CMD_CONNECT when the attribute flag is
+ * not present.
+ *
+ * By setting @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK flag drivers
+ * can indicate they support offloading EAPOL handshakes for WPA/WPA2
+ * preshared key authentication in AP mode. In %NL80211_CMD_START_AP
+ * the preshared key should be specified using %NL80211_ATTR_PMK. Drivers
+ * supporting this offload may reject the %NL80211_CMD_START_AP when no
+ * preshared key material is provided, for example when that driver does
+ * not support setting the temporal keys through %NL80211_CMD_NEW_KEY.
  *
  * For 802.1X the PMK or PMK-R0 are set by providing %NL80211_ATTR_PMK
  * using %NL80211_CMD_SET_PMK. For offloaded FT support also
  * DOC: SAE authentication offload
  *
  * By setting @NL80211_EXT_FEATURE_SAE_OFFLOAD flag drivers can indicate they
- * support offloading SAE authentication for WPA3-Personal networks. In
- * %NL80211_CMD_CONNECT the password for SAE should be specified using
- * %NL80211_ATTR_SAE_PASSWORD.
+ * support offloading SAE authentication for WPA3-Personal networks in station
+ * mode. Similarly @NL80211_EXT_FEATURE_SAE_OFFLOAD_AP flag can be set by
+ * drivers indicating the offload support in AP mode.
+ *
+ * The password for SAE should be specified using %NL80211_ATTR_SAE_PASSWORD in
+ * %NL80211_CMD_CONNECT and %NL80211_CMD_START_AP for station and AP mode
+ * respectively.
+ */
+
+/**
+ * DOC: VLAN offload support for setting group keys and binding STAs to VLANs
+ *
+ * By setting @NL80211_EXT_FEATURE_VLAN_OFFLOAD flag drivers can indicate they
+ * support offloading VLAN functionality in a manner where the driver exposes a
+ * single netdev that uses VLAN tagged frames and separate VLAN-specific netdevs
+ * can then be added using RTM_NEWLINK/IFLA_VLAN_ID similarly to the Ethernet
+ * case. Frames received from stations that are not assigned to any VLAN are
+ * delivered on the main netdev and frames to such stations can be sent through
+ * that main netdev.
+ *
+ * %NL80211_CMD_NEW_KEY (for group keys), %NL80211_CMD_NEW_STATION, and
+ * %NL80211_CMD_SET_STATION will optionally specify vlan_id using
+ * %NL80211_ATTR_VLAN_ID.
+ */
+
+/**
+ * DOC: TID configuration
+ *
+ * TID config support can be checked in the %NL80211_ATTR_TID_CONFIG
+ * attribute given in wiphy capabilities.
+ *
+ * The necessary configuration parameters are mentioned in
+ * &enum nl80211_tid_config_attr and it will be passed to the
+ * %NL80211_CMD_SET_TID_CONFIG command in %NL80211_ATTR_TID_CONFIG.
+ *
+ * If the configuration needs to be applied for specific peer then the MAC
+ * address of the peer needs to be passed in %NL80211_ATTR_MAC, otherwise the
+ * configuration will be applied for all the connected peers in the vif except
+ * any peers that have peer specific configuration for the TID by default; if
+ * the %NL80211_TID_CONFIG_ATTR_OVERRIDE flag is set, peer specific values
+ * will be overwritten.
+ *
+ * All this configuration is valid only for STA's current connection
+ * i.e. the configuration will be reset to default when the STA connects back
+ * after disconnection/roaming, and this configuration will be cleared when
+ * the interface goes down.
  */
 
 /**
  *     to get a list of all present wiphys.
  * @NL80211_CMD_SET_WIPHY: set wiphy parameters, needs %NL80211_ATTR_WIPHY or
  *     %NL80211_ATTR_IFINDEX; can be used to set %NL80211_ATTR_WIPHY_NAME,
- *     %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ (and the
- *     attributes determining the channel width; this is used for setting
- *     monitor mode channel),  %NL80211_ATTR_WIPHY_RETRY_SHORT,
- *     %NL80211_ATTR_WIPHY_RETRY_LONG, %NL80211_ATTR_WIPHY_FRAG_THRESHOLD,
- *     and/or %NL80211_ATTR_WIPHY_RTS_THRESHOLD.
- *     However, for setting the channel, see %NL80211_CMD_SET_CHANNEL
- *     instead, the support here is for backward compatibility only.
+ *     %NL80211_ATTR_WIPHY_TXQ_PARAMS, %NL80211_ATTR_WIPHY_FREQ,
+ *     %NL80211_ATTR_WIPHY_FREQ_OFFSET (and the attributes determining the
+ *     channel width; this is used for setting monitor mode channel),
+ *     %NL80211_ATTR_WIPHY_RETRY_SHORT, %NL80211_ATTR_WIPHY_RETRY_LONG,
+ *     %NL80211_ATTR_WIPHY_FRAG_THRESHOLD, and/or
+ *     %NL80211_ATTR_WIPHY_RTS_THRESHOLD.  However, for setting the channel,
+ *     see %NL80211_CMD_SET_CHANNEL instead, the support here is for backward
+ *     compatibility only.
  * @NL80211_CMD_NEW_WIPHY: Newly created wiphy, response to get request
  *     or rename notification. Has attributes %NL80211_ATTR_WIPHY and
  *     %NL80211_ATTR_WIPHY_NAME.
  *     %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_INACTIVITY_TIMEOUT,
  *     %NL80211_ATTR_ACL_POLICY and %NL80211_ATTR_MAC_ADDRS.
  *     The channel to use can be set on the interface or be given using the
- *     %NL80211_ATTR_WIPHY_FREQ and the attributes determining channel width.
+ *     %NL80211_ATTR_WIPHY_FREQ and %NL80211_ATTR_WIPHY_FREQ_OFFSET, and the
+ *     attributes determining channel width.
  * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP
  * @NL80211_CMD_STOP_AP: Stop AP operation on the given interface
  * @NL80211_CMD_DEL_BEACON: old alias for %NL80211_CMD_STOP_AP
  * @NL80211_CMD_SET_STATION: Set station attributes for station identified by
  *     %NL80211_ATTR_MAC on the interface identified by %NL80211_ATTR_IFINDEX.
  * @NL80211_CMD_NEW_STATION: Add a station with given attributes to the
- *     the interface identified by %NL80211_ATTR_IFINDEX.
+ *     interface identified by %NL80211_ATTR_IFINDEX.
  * @NL80211_CMD_DEL_STATION: Remove a station identified by %NL80211_ATTR_MAC
  *     or, if no MAC address given, all stations, on the interface identified
  *     by %NL80211_ATTR_IFINDEX. %NL80211_ATTR_MGMT_SUBTYPE and
  * @NL80211_CMD_DEL_MPATH: Delete a mesh path to the destination given by
  *     %NL80211_ATTR_MAC.
  * @NL80211_CMD_NEW_PATH: Add a mesh path with given attributes to the
- *     the interface identified by %NL80211_ATTR_IFINDEX.
+ *     interface identified by %NL80211_ATTR_IFINDEX.
  * @NL80211_CMD_DEL_PATH: Remove a mesh path identified by %NL80211_ATTR_MAC
  *     or, if no MAC address given, all mesh paths, on the interface identified
  *     by %NL80211_ATTR_IFINDEX.
  *     interface. %NL80211_ATTR_MAC is used to specify PeerSTAAddress (and
  *     BSSID in case of station mode). %NL80211_ATTR_SSID is used to specify
  *     the SSID (mainly for association, but is included in authentication
- *     request, too, to help BSS selection. %NL80211_ATTR_WIPHY_FREQ is used
- *     to specify the frequence of the channel in MHz. %NL80211_ATTR_AUTH_TYPE
- *     is used to specify the authentication type. %NL80211_ATTR_IE is used to
- *     define IEs (VendorSpecificInfo, but also including RSN IE and FT IEs)
- *     to be added to the frame.
+ *     request, too, to help BSS selection. %NL80211_ATTR_WIPHY_FREQ +
+ *     %NL80211_ATTR_WIPHY_FREQ_OFFSET is used to specify the frequence of the
+ *     channel in MHz. %NL80211_ATTR_AUTH_TYPE is used to specify the
+ *     authentication type. %NL80211_ATTR_IE is used to define IEs
+ *     (VendorSpecificInfo, but also including RSN IE and FT IEs) to be added
+ *     to the frame.
  *     When used as an event, this reports reception of an Authentication
  *     frame in station and IBSS modes when the local MLME processed the
  *     frame, i.e., it was for the local STA and was received in correct
  *     requests to connect to a specified network but without separating
  *     auth and assoc steps. For this, you need to specify the SSID in a
  *     %NL80211_ATTR_SSID attribute, and can optionally specify the association
- *     IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_USE_MFP,
- *     %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT,
+ *     IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE,
+ *     %NL80211_ATTR_USE_MFP, %NL80211_ATTR_MAC, %NL80211_ATTR_WIPHY_FREQ,
+ *     %NL80211_ATTR_WIPHY_FREQ_OFFSET, %NL80211_ATTR_CONTROL_PORT,
  *     %NL80211_ATTR_CONTROL_PORT_ETHERTYPE,
  *     %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT,
  *     %NL80211_ATTR_CONTROL_PORT_OVER_NL80211, %NL80211_ATTR_MAC_HINT, and
  *     set of BSSID,frequency parameters is used (i.e., either the enforcing
  *     %NL80211_ATTR_MAC,%NL80211_ATTR_WIPHY_FREQ or the less strict
  *     %NL80211_ATTR_MAC_HINT and %NL80211_ATTR_WIPHY_FREQ_HINT).
+ *     Driver shall not modify the IEs specified through %NL80211_ATTR_IE if
+ *     %NL80211_ATTR_MAC is included. However, if %NL80211_ATTR_MAC_HINT is
+ *     included, these IEs through %NL80211_ATTR_IE are specified by the user
+ *     space based on the best possible BSS selected. Thus, if the driver ends
+ *     up selecting a different BSS, it can modify these IEs accordingly (e.g.
+ *     userspace asks the driver to perform PMKSA caching with BSS1 and the
+ *     driver ends up selecting BSS2 with different PMKSA cache entry; RSNIE
+ *     has to get updated with the apt PMKID).
  *     %NL80211_ATTR_PREV_BSSID can be used to request a reassociation within
  *     the ESS in case the device is already associated and an association with
  *     a different BSS is desired.
  *     authentication/association or not receiving a response from the AP.
  *     Non-zero %NL80211_ATTR_STATUS_CODE value is indicated in that case as
  *     well to remain backwards compatible.
- *     When establishing a security association, drivers that support 4 way
- *     handshake offload should send %NL80211_CMD_PORT_AUTHORIZED event when
- *     the 4 way handshake is completed successfully.
  * @NL80211_CMD_ROAM: Notification indicating the card/driver roamed by itself.
- *     When a security association was established with the new AP (e.g. if
- *     the FT protocol was used for roaming or the driver completed the 4 way
- *     handshake), this event should be followed by an
+ *     When a security association was established on an 802.1X network using
+ *     fast transition, this event should be followed by an
  *     %NL80211_CMD_PORT_AUTHORIZED event.
  * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify
  *     userspace that a connection was dropped by the AP or due to other
  *     four bytes for vendor frames including the OUI. The registration
  *     cannot be dropped, but is removed automatically when the netlink
  *     socket is closed. Multiple registrations can be made.
+ *     The %NL80211_ATTR_RECEIVE_MULTICAST flag attribute can be given if
+ *     %NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS is available, in which
+ *     case the registration can also be modified to include/exclude the
+ *     flag, rather than requiring unregistration to change it.
  * @NL80211_CMD_REGISTER_ACTION: Alias for @NL80211_CMD_REGISTER_FRAME for
  *     backward compatibility
  * @NL80211_CMD_FRAME: Management frame TX request and RX notification. This
  *     various triggers. These triggers can be configured through this
  *     command with the %NL80211_ATTR_WOWLAN_TRIGGERS attribute. For
  *     more background information, see
- *     http://wireless.kernel.org/en/users/Documentation/WoWLAN.
+ *     https://wireless.wiki.kernel.org/en/users/Documentation/WoWLAN.
  *     The @NL80211_CMD_SET_WOWLAN command can also be used as a notification
  *     from the driver reporting the wakeup reason. In this case, the
  *     @NL80211_ATTR_WOWLAN_TRIGGERS attribute will contain the reason
  * @NL80211_CMD_SET_COALESCE: Configure coalesce rules or clear existing rules.
  *
  * @NL80211_CMD_CHANNEL_SWITCH: Perform a channel switch by announcing the
- *     the new channel information (Channel Switch Announcement - CSA)
+ *     new channel information (Channel Switch Announcement - CSA)
  *     in the beacon for some time (as defined in the
  *     %NL80211_ATTR_CH_SWITCH_COUNT parameter) and then change to the
  *     new channel. Userspace provides the new channel information (using
  * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously
  *     configured PMK for the authenticator address identified by
  *     %NL80211_ATTR_MAC.
- * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates that the 4 way
- *     handshake was completed successfully by the driver. The BSSID is
- *     specified with %NL80211_ATTR_MAC. Drivers that support 4 way handshake
- *     offload should send this event after indicating 802.11 association with
- *     %NL80211_CMD_CONNECT or %NL80211_CMD_ROAM. If the 4 way handshake failed
- *     %NL80211_CMD_DISCONNECT should be indicated instead.
- *
+ * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates an 802.1X FT roam was
+ *     completed successfully. Drivers that support 4 way handshake offload
+ *     should send this event after indicating 802.1X FT assocation with
+ *     %NL80211_CMD_ROAM. If the 4 way handshake failed %NL80211_CMD_DISCONNECT
+ *     should be indicated instead.
  * @NL80211_CMD_CONTROL_PORT_FRAME: Control Port (e.g. PAE) frame TX request
  *     and RX notification.  This command is used both as a request to transmit
  *     a control port frame and as a notification that a control port frame
  *     randomization may be enabled and configured by specifying the
  *     %NL80211_ATTR_MAC and %NL80211_ATTR_MAC_MASK attributes.
  *     If a timeout is requested, use the %NL80211_ATTR_TIMEOUT attribute.
- *     A u64 cookie for further %NL80211_ATTR_COOKIE use is is returned in
+ *     A u64 cookie for further %NL80211_ATTR_COOKIE use is returned in
  *     the netlink extended ack message.
  *
  *     To cancel a measurement, close the socket that requested it.
  *     peer MAC address and %NL80211_ATTR_FRAME is used to specify the frame
  *     content. The frame is ethernet data.
  *
+ * @NL80211_CMD_SET_TID_CONFIG: Data frame TID specific configuration
+ *     is passed using %NL80211_ATTR_TID_CONFIG attribute.
+ *
+ * @NL80211_CMD_UNPROT_BEACON: Unprotected or incorrectly protected Beacon
+ *     frame. This event is used to indicate that a received Beacon frame was
+ *     dropped because it did not include a valid MME MIC while beacon
+ *     protection was enabled (BIGTK configured in station mode).
+ *
+ * @NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS: Report TX status of a control
+ *     port frame transmitted with %NL80211_CMD_CONTROL_PORT_FRAME.
+ *     %NL80211_ATTR_COOKIE identifies the TX command and %NL80211_ATTR_FRAME
+ *     includes the contents of the frame. %NL80211_ATTR_ACK flag is included
+ *     if the recipient acknowledged the frame.
+ *
  * @NL80211_CMD_MAX: highest used command number
  * @__NL80211_CMD_AFTER_LAST: internal use
  */
@@ -1325,6 +1401,12 @@ enum nl80211_commands {
 
        NL80211_CMD_PROBE_MESH_LINK,
 
+       NL80211_CMD_SET_TID_CONFIG,
+
+       NL80211_CMD_UNPROT_BEACON,
+
+       NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS,
+
        /* add new commands above here */
 
        /* used to define NL80211_CMD_MAX below */
@@ -1370,7 +1452,8 @@ enum nl80211_commands {
  *     of &enum nl80211_chan_width, describing the channel width. See the
  *     documentation of the enum for more information.
  * @NL80211_ATTR_CENTER_FREQ1: Center frequency of the first part of the
- *     channel, used for anything but 20 MHz bandwidth
+ *     channel, used for anything but 20 MHz bandwidth. In S1G this is the
+ *     operating channel center frequency.
  * @NL80211_ATTR_CENTER_FREQ2: Center frequency of the second part of the
  *     channel, used only for 80+80 MHz bandwidth
  * @NL80211_ATTR_WIPHY_CHANNEL_TYPE: included with NL80211_ATTR_WIPHY_FREQ
@@ -1580,7 +1663,8 @@ enum nl80211_commands {
  *     flag is included, then control port frames are sent over NL80211 instead
  *     using %CMD_CONTROL_PORT_FRAME.  If control port routing over NL80211 is
  *     to be used then userspace must also use the %NL80211_ATTR_SOCKET_OWNER
- *     flag.
+ *     flag. When used with %NL80211_ATTR_CONTROL_PORT_NO_PREAUTH, pre-auth
+ *     frames are not forwared over the control port.
  *
  * @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver.
  *     We recommend using nested, driver-specific attributes within this.
@@ -1996,10 +2080,10 @@ enum nl80211_commands {
  *     operation).
  * @NL80211_ATTR_CSA_IES: Nested set of attributes containing the IE information
  *     for the time while performing a channel switch.
- * @NL80211_ATTR_CSA_C_OFF_BEACON: An array of offsets (u16) to the channel
- *     switch counters in the beacons tail (%NL80211_ATTR_BEACON_TAIL).
- * @NL80211_ATTR_CSA_C_OFF_PRESP: An array of offsets (u16) to the channel
- *     switch counters in the probe response (%NL80211_ATTR_PROBE_RESP).
+ * @NL80211_ATTR_CNTDWN_OFFS_BEACON: An array of offsets (u16) to the channel
+ *     switch or color change counters in the beacons tail (%NL80211_ATTR_BEACON_TAIL).
+ * @NL80211_ATTR_CNTDWN_OFFS_PRESP: An array of offsets (u16) to the channel
+ *     switch or color change counters in the probe response (%NL80211_ATTR_PROBE_RESP).
  *
  * @NL80211_ATTR_RXMGMT_FLAGS: flags for nl80211_send_mgmt(), u32.
  *     As specified in the &enum nl80211_rxmgmt_flags.
@@ -2007,7 +2091,7 @@ enum nl80211_commands {
  * @NL80211_ATTR_STA_SUPPORTED_CHANNELS: array of supported channels.
  *
  * @NL80211_ATTR_STA_SUPPORTED_OPER_CLASSES: array of supported
- *      supported operating classes.
+ *      operating classes.
  *
  * @NL80211_ATTR_HANDLE_DFS: A flag indicating whether user space
  *     controls DFS operation in IBSS mode. If the flag is included in
@@ -2285,10 +2369,11 @@ enum nl80211_commands {
  *
  * @NL80211_ATTR_PMK: attribute for passing PMK key material. Used with
  *     %NL80211_CMD_SET_PMKSA for the PMKSA identified by %NL80211_ATTR_PMKID.
- *     For %NL80211_CMD_CONNECT it is used to provide PSK for offloading 4-way
- *     handshake for WPA/WPA2-PSK networks. For 802.1X authentication it is
- *     used with %NL80211_CMD_SET_PMK. For offloaded FT support this attribute
- *     specifies the PMK-R0 if NL80211_ATTR_PMKR0_NAME is included as well.
+ *     For %NL80211_CMD_CONNECT and %NL80211_CMD_START_AP it is used to provide
+ *     PSK for offloading 4-way handshake for WPA/WPA2-PSK networks. For 802.1X
+ *     authentication it is used with %NL80211_CMD_SET_PMK. For offloaded FT
+ *     support this attribute specifies the PMK-R0 if NL80211_ATTR_PMKR0_NAME
+ *     is included as well.
  *
  * @NL80211_ATTR_SCHED_SCAN_MULTI: flag attribute which user-space shall use to
  *     indicate that it supports multiple active scheduled scan requests.
@@ -2318,7 +2403,7 @@ enum nl80211_commands {
  *      nl80211_txq_stats)
  * @NL80211_ATTR_TXQ_LIMIT: Total packet limit for the TXQ queues for this phy.
  *      The smaller of this and the memory limit is enforced.
- * @NL80211_ATTR_TXQ_MEMORY_LIMIT: Total memory memory limit (in bytes) for the
+ * @NL80211_ATTR_TXQ_MEMORY_LIMIT: Total memory limit (in bytes) for the
  *      TXQ queues for this phy. The smaller of this and the packet limit is
  *      enforced.
  * @NL80211_ATTR_TXQ_QUANTUM: TXQ scheduler quantum (bytes). Number of bytes
@@ -2373,6 +2458,75 @@ enum nl80211_commands {
  *     the allowed channel bandwidth configurations. (u8 attribute)
  *     Defined by IEEE P802.11ay/D4.0 section 9.4.2.251, Table 13.
  *
+ * @NL80211_ATTR_VLAN_ID: VLAN ID (1..4094) for the station and VLAN group key
+ *     (u16).
+ *
+ * @NL80211_ATTR_HE_BSS_COLOR: nested attribute for BSS Color Settings.
+ *
+ * @NL80211_ATTR_IFTYPE_AKM_SUITES: nested array attribute, with each entry
+ *     using attributes from &enum nl80211_iftype_akm_attributes. This
+ *     attribute is sent in a response to %NL80211_CMD_GET_WIPHY indicating
+ *     supported AKM suites capability per interface. AKMs advertised in
+ *     %NL80211_ATTR_AKM_SUITES are default capabilities if AKM suites not
+ *     advertised for a specific interface type.
+ *
+ * @NL80211_ATTR_TID_CONFIG: TID specific configuration in a
+ *     nested attribute with &enum nl80211_tid_config_attr sub-attributes;
+ *     on output (in wiphy attributes) it contains only the feature sub-
+ *     attributes.
+ *
+ * @NL80211_ATTR_CONTROL_PORT_NO_PREAUTH: disable preauth frame rx on control
+ *     port in order to forward/receive them as ordinary data frames.
+ *
+ * @NL80211_ATTR_PMK_LIFETIME: Maximum lifetime for PMKSA in seconds (u32,
+ *     dot11RSNAConfigPMKReauthThreshold; 0 is not a valid value).
+ *     An optional parameter configured through %NL80211_CMD_SET_PMKSA.
+ *     Drivers that trigger roaming need to know the lifetime of the
+ *     configured PMKSA for triggering the full vs. PMKSA caching based
+ *     authentication. This timeout helps authentication methods like SAE,
+ *     where PMK gets updated only by going through a full (new SAE)
+ *     authentication instead of getting updated during an association for EAP
+ *     authentication. No new full authentication within the PMK expiry shall
+ *     result in a disassociation at the end of the lifetime.
+ *
+ * @NL80211_ATTR_PMK_REAUTH_THRESHOLD: Reauthentication threshold time, in
+ *     terms of percentage of %NL80211_ATTR_PMK_LIFETIME
+ *     (u8, dot11RSNAConfigPMKReauthThreshold, 1..100). This is an optional
+ *     parameter configured through %NL80211_CMD_SET_PMKSA. Requests the
+ *     driver to trigger a full authentication roam (without PMKSA caching)
+ *     after the reauthentication threshold time, but before the PMK lifetime
+ *     has expired.
+ *
+ *     Authentication methods like SAE need to be able to generate a new PMKSA
+ *     entry without having to force a disconnection after the PMK timeout. If
+ *     no roaming occurs between the reauth threshold and PMK expiration,
+ *     disassociation is still forced.
+ * @NL80211_ATTR_RECEIVE_MULTICAST: multicast flag for the
+ *     %NL80211_CMD_REGISTER_FRAME command, see the description there.
+ * @NL80211_ATTR_WIPHY_FREQ_OFFSET: offset of the associated
+ *     %NL80211_ATTR_WIPHY_FREQ in positive KHz. Only valid when supplied with
+ *     an %NL80211_ATTR_WIPHY_FREQ_OFFSET.
+ * @NL80211_ATTR_CENTER_FREQ1_OFFSET: Center frequency offset in KHz for the
+ *     first channel segment specified in %NL80211_ATTR_CENTER_FREQ1.
+ * @NL80211_ATTR_SCAN_FREQ_KHZ: nested attribute with KHz frequencies
+ *
+ * @NL80211_ATTR_HE_6GHZ_CAPABILITY: HE 6 GHz Band Capability element (from
+ *     association request when used with NL80211_CMD_NEW_STATION).
+ *
+ * @NL80211_ATTR_FILS_DISCOVERY: Optional parameter to configure FILS
+ *     discovery. It is a nested attribute, see
+ *     &enum nl80211_fils_discovery_attributes.
+ *
+ * @NL80211_ATTR_UNSOL_BCAST_PROBE_RESP: Optional parameter to configure
+ *     unsolicited broadcast probe response. It is a nested attribute, see
+ *     &enum nl80211_unsol_bcast_probe_resp_attributes.
+ *
+ * @NL80211_ATTR_S1G_CAPABILITY: S1G Capability information element (from
+ *     association request when used with NL80211_CMD_NEW_STATION)
+ * @NL80211_ATTR_S1G_CAPABILITY_MASK: S1G Capability Information element
+ *     override mask. Used with NL80211_ATTR_S1G_CAPABILITY in
+ *     NL80211_CMD_ASSOCIATE or NL80211_CMD_CONNECT.
+ *
  * @NUM_NL80211_ATTR: total number of nl80211_attrs available
  * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2679,8 +2833,8 @@ enum nl80211_attrs {
        NL80211_ATTR_CH_SWITCH_COUNT,
        NL80211_ATTR_CH_SWITCH_BLOCK_TX,
        NL80211_ATTR_CSA_IES,
-       NL80211_ATTR_CSA_C_OFF_BEACON,
-       NL80211_ATTR_CSA_C_OFF_PRESP,
+       NL80211_ATTR_CNTDWN_OFFS_BEACON,
+       NL80211_ATTR_CNTDWN_OFFS_PRESP,
 
        NL80211_ATTR_RXMGMT_FLAGS,
 
@@ -2835,6 +2989,33 @@ enum nl80211_attrs {
        NL80211_ATTR_WIPHY_EDMG_CHANNELS,
        NL80211_ATTR_WIPHY_EDMG_BW_CONFIG,
 
+       NL80211_ATTR_VLAN_ID,
+
+       NL80211_ATTR_HE_BSS_COLOR,
+
+       NL80211_ATTR_IFTYPE_AKM_SUITES,
+
+       NL80211_ATTR_TID_CONFIG,
+
+       NL80211_ATTR_CONTROL_PORT_NO_PREAUTH,
+
+       NL80211_ATTR_PMK_LIFETIME,
+       NL80211_ATTR_PMK_REAUTH_THRESHOLD,
+
+       NL80211_ATTR_RECEIVE_MULTICAST,
+       NL80211_ATTR_WIPHY_FREQ_OFFSET,
+       NL80211_ATTR_CENTER_FREQ1_OFFSET,
+       NL80211_ATTR_SCAN_FREQ_KHZ,
+
+       NL80211_ATTR_HE_6GHZ_CAPABILITY,
+
+       NL80211_ATTR_FILS_DISCOVERY,
+
+       NL80211_ATTR_UNSOL_BCAST_PROBE_RESP,
+
+       NL80211_ATTR_S1G_CAPABILITY,
+       NL80211_ATTR_S1G_CAPABILITY_MASK,
+
        /* add attributes here, update the policy in nl80211.c */
 
        __NL80211_ATTR_AFTER_LAST,
@@ -2847,6 +3028,8 @@ enum nl80211_attrs {
 #define        NL80211_ATTR_MESH_PARAMS NL80211_ATTR_MESH_CONFIG
 #define NL80211_ATTR_IFACE_SOCKET_OWNER NL80211_ATTR_SOCKET_OWNER
 #define NL80211_ATTR_SAE_DATA NL80211_ATTR_AUTH_DATA
+#define NL80211_ATTR_CSA_C_OFF_BEACON NL80211_ATTR_CNTDWN_OFFS_BEACON
+#define NL80211_ATTR_CSA_C_OFF_PRESP NL80211_ATTR_CNTDWN_OFFS_PRESP
 
 /*
  * Allow user space programs to use #ifdef on new attributes by defining them
@@ -3024,6 +3207,18 @@ enum nl80211_he_gi {
        NL80211_RATE_INFO_HE_GI_3_2,
 };
 
+/**
+ * enum nl80211_he_ltf - HE long training field
+ * @NL80211_RATE_INFO_HE_1xLTF: 3.2 usec
+ * @NL80211_RATE_INFO_HE_2xLTF: 6.4 usec
+ * @NL80211_RATE_INFO_HE_4xLTF: 12.8 usec
+ */
+enum nl80211_he_ltf {
+       NL80211_RATE_INFO_HE_1XLTF,
+       NL80211_RATE_INFO_HE_2XLTF,
+       NL80211_RATE_INFO_HE_4XLTF,
+};
+
 /**
  * enum nl80211_he_ru_alloc - HE RU allocation values
  * @NL80211_RATE_INFO_HE_RU_ALLOC_26: 26-tone RU allocation
@@ -3218,6 +3413,8 @@ enum nl80211_sta_bss_param {
  * @NL80211_STA_INFO_AIRTIME_LINK_METRIC: airtime link metric for mesh station
  * @NL80211_STA_INFO_ASSOC_AT_BOOTTIME: Timestamp (CLOCK_BOOTTIME, nanoseconds)
  *     of STA's association
+ * @NL80211_STA_INFO_CONNECTED_TO_AS: set to true if STA has a path to a
+ *     authentication server (u8, 0 or 1)
  * @__NL80211_STA_INFO_AFTER_LAST: internal
  * @NL80211_STA_INFO_MAX: highest possible station info attribute
  */
@@ -3265,6 +3462,7 @@ enum nl80211_sta_info {
        NL80211_STA_INFO_AIRTIME_WEIGHT,
        NL80211_STA_INFO_AIRTIME_LINK_METRIC,
        NL80211_STA_INFO_ASSOC_AT_BOOTTIME,
+       NL80211_STA_INFO_CONNECTED_TO_AS,
 
        /* keep last */
        __NL80211_STA_INFO_AFTER_LAST,
@@ -3413,6 +3611,8 @@ enum nl80211_mpath_info {
  *     defined in HE capabilities IE
  * @NL80211_BAND_IFTYPE_ATTR_MAX: highest band HE capability attribute currently
  *     defined
+ * @NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA: HE 6GHz band capabilities (__le16),
+ *     given for all 6 GHz band channels
  * @__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST: internal use
  */
 enum nl80211_band_iftype_attr {
@@ -3423,6 +3623,7 @@ enum nl80211_band_iftype_attr {
        NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY,
        NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET,
        NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE,
+       NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA,
 
        /* keep last */
        __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST,
@@ -3554,6 +3755,19 @@ enum nl80211_wmm_rule {
  * @NL80211_FREQUENCY_ATTR_WMM: this channel has wmm limitations.
  *     This is a nested attribute that contains the wmm limitation per AC.
  *     (see &enum nl80211_wmm_rule)
+ * @NL80211_FREQUENCY_ATTR_NO_HE: HE operation is not allowed on this channel
+ *     in current regulatory domain.
+ * @NL80211_FREQUENCY_ATTR_OFFSET: frequency offset in KHz
+ * @NL80211_FREQUENCY_ATTR_1MHZ: 1 MHz operation is allowed
+ *     on this channel in current regulatory domain.
+ * @NL80211_FREQUENCY_ATTR_2MHZ: 2 MHz operation is allowed
+ *     on this channel in current regulatory domain.
+ * @NL80211_FREQUENCY_ATTR_4MHZ: 4 MHz operation is allowed
+ *     on this channel in current regulatory domain.
+ * @NL80211_FREQUENCY_ATTR_8MHZ: 8 MHz operation is allowed
+ *     on this channel in current regulatory domain.
+ * @NL80211_FREQUENCY_ATTR_16MHZ: 16 MHz operation is allowed
+ *     on this channel in current regulatory domain.
  * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number
  *     currently defined
  * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use
@@ -3583,6 +3797,13 @@ enum nl80211_frequency_attr {
        NL80211_FREQUENCY_ATTR_NO_20MHZ,
        NL80211_FREQUENCY_ATTR_NO_10MHZ,
        NL80211_FREQUENCY_ATTR_WMM,
+       NL80211_FREQUENCY_ATTR_NO_HE,
+       NL80211_FREQUENCY_ATTR_OFFSET,
+       NL80211_FREQUENCY_ATTR_1MHZ,
+       NL80211_FREQUENCY_ATTR_2MHZ,
+       NL80211_FREQUENCY_ATTR_4MHZ,
+       NL80211_FREQUENCY_ATTR_8MHZ,
+       NL80211_FREQUENCY_ATTR_16MHZ,
 
        /* keep last */
        __NL80211_FREQUENCY_ATTR_AFTER_LAST,
@@ -3780,6 +4001,7 @@ enum nl80211_sched_scan_match_attr {
  * @NL80211_RRF_NO_HT40PLUS: channels can't be used in HT40+ operation
  * @NL80211_RRF_NO_80MHZ: 80MHz operation not allowed
  * @NL80211_RRF_NO_160MHZ: 160MHz operation not allowed
+ * @NL80211_RRF_NO_HE: HE operation not allowed
  */
 enum nl80211_reg_rule_flags {
        NL80211_RRF_NO_OFDM             = 1<<0,
@@ -3797,6 +4019,7 @@ enum nl80211_reg_rule_flags {
        NL80211_RRF_NO_HT40PLUS         = 1<<14,
        NL80211_RRF_NO_80MHZ            = 1<<15,
        NL80211_RRF_NO_160MHZ           = 1<<16,
+       NL80211_RRF_NO_HE               = 1<<17,
 };
 
 #define NL80211_RRF_PASSIVE_SCAN       NL80211_RRF_NO_IR
@@ -3874,6 +4097,7 @@ enum nl80211_user_reg_hint_type {
  *     receiving frames destined to the local BSS
  * @NL80211_SURVEY_INFO_MAX: highest survey info attribute number
  *     currently defined
+ * @NL80211_SURVEY_INFO_FREQUENCY_OFFSET: center frequency offset in KHz
  * @__NL80211_SURVEY_INFO_AFTER_LAST: internal use
  */
 enum nl80211_survey_info {
@@ -3889,6 +4113,7 @@ enum nl80211_survey_info {
        NL80211_SURVEY_INFO_TIME_SCAN,
        NL80211_SURVEY_INFO_PAD,
        NL80211_SURVEY_INFO_TIME_BSS_RX,
+       NL80211_SURVEY_INFO_FREQUENCY_OFFSET,
 
        /* keep last */
        __NL80211_SURVEY_INFO_AFTER_LAST,
@@ -4074,6 +4299,16 @@ enum nl80211_mesh_power_mode {
  *     field.  If left unset then the mesh formation field will only
  *     advertise such if there is an active root mesh path.
  *
+ * @NL80211_MESHCONF_NOLEARN: Try to avoid multi-hop path discovery (e.g.
+ *      PREQ/PREP for HWMP) if the destination is a direct neighbor. Note that
+ *      this might not be the optimal decision as a multi-hop route might be
+ *      better. So if using this setting you will likely also want to disable
+ *      dot11MeshForwarding and use another mesh routing protocol on top.
+ *
+ * @NL80211_MESHCONF_CONNECTED_TO_AS: If set to true then this mesh STA
+ *     will advertise that it is connected to a authentication server
+ *     in the mesh formation field.
+ *
  * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
  */
 enum nl80211_meshconf_params {
@@ -4107,6 +4342,8 @@ enum nl80211_meshconf_params {
        NL80211_MESHCONF_AWAKE_WINDOW,
        NL80211_MESHCONF_PLINK_TIMEOUT,
        NL80211_MESHCONF_CONNECTED_TO_GATE,
+       NL80211_MESHCONF_NOLEARN,
+       NL80211_MESHCONF_CONNECTED_TO_AS,
 
        /* keep last */
        __NL80211_MESHCONF_ATTR_AFTER_LAST,
@@ -4275,6 +4512,11 @@ enum nl80211_key_mode {
  *     attribute must be provided as well
  * @NL80211_CHAN_WIDTH_5: 5 MHz OFDM channel
  * @NL80211_CHAN_WIDTH_10: 10 MHz OFDM channel
+ * @NL80211_CHAN_WIDTH_1: 1 MHz OFDM channel
+ * @NL80211_CHAN_WIDTH_2: 2 MHz OFDM channel
+ * @NL80211_CHAN_WIDTH_4: 4 MHz OFDM channel
+ * @NL80211_CHAN_WIDTH_8: 8 MHz OFDM channel
+ * @NL80211_CHAN_WIDTH_16: 16 MHz OFDM channel
  */
 enum nl80211_chan_width {
        NL80211_CHAN_WIDTH_20_NOHT,
@@ -4285,6 +4527,11 @@ enum nl80211_chan_width {
        NL80211_CHAN_WIDTH_160,
        NL80211_CHAN_WIDTH_5,
        NL80211_CHAN_WIDTH_10,
+       NL80211_CHAN_WIDTH_1,
+       NL80211_CHAN_WIDTH_2,
+       NL80211_CHAN_WIDTH_4,
+       NL80211_CHAN_WIDTH_8,
+       NL80211_CHAN_WIDTH_16,
 };
 
 /**
@@ -4295,11 +4542,15 @@ enum nl80211_chan_width {
  * @NL80211_BSS_CHAN_WIDTH_20: control channel is 20 MHz wide or compatible
  * @NL80211_BSS_CHAN_WIDTH_10: control channel is 10 MHz wide
  * @NL80211_BSS_CHAN_WIDTH_5: control channel is 5 MHz wide
+ * @NL80211_BSS_CHAN_WIDTH_1: control channel is 1 MHz wide
+ * @NL80211_BSS_CHAN_WIDTH_2: control channel is 2 MHz wide
  */
 enum nl80211_bss_scan_width {
        NL80211_BSS_CHAN_WIDTH_20,
        NL80211_BSS_CHAN_WIDTH_10,
        NL80211_BSS_CHAN_WIDTH_5,
+       NL80211_BSS_CHAN_WIDTH_1,
+       NL80211_BSS_CHAN_WIDTH_2,
 };
 
 /**
@@ -4351,6 +4602,7 @@ enum nl80211_bss_scan_width {
  * @NL80211_BSS_CHAIN_SIGNAL: per-chain signal strength of last BSS update.
  *     Contains a nested array of signal strength attributes (u8, dBm),
  *     using the nesting index as the antenna number.
+ * @NL80211_BSS_FREQUENCY_OFFSET: frequency offset in KHz
  * @__NL80211_BSS_AFTER_LAST: internal
  * @NL80211_BSS_MAX: highest BSS attribute
  */
@@ -4375,6 +4627,7 @@ enum nl80211_bss {
        NL80211_BSS_PARENT_TSF,
        NL80211_BSS_PARENT_BSSID,
        NL80211_BSS_CHAIN_SIGNAL,
+       NL80211_BSS_FREQUENCY_OFFSET,
 
        /* keep last */
        __NL80211_BSS_AFTER_LAST,
@@ -4503,6 +4756,7 @@ enum nl80211_key_default_types {
  *     See &enum nl80211_key_default_types.
  * @NL80211_KEY_MODE: the mode from enum nl80211_key_mode.
  *     Defaults to @NL80211_KEY_RX_TX.
+ * @NL80211_KEY_DEFAULT_BEACON: flag indicating default Beacon frame key
  *
  * @__NL80211_KEY_AFTER_LAST: internal
  * @NL80211_KEY_MAX: highest key attribute
@@ -4518,6 +4772,7 @@ enum nl80211_key_attributes {
        NL80211_KEY_TYPE,
        NL80211_KEY_DEFAULT_TYPES,
        NL80211_KEY_MODE,
+       NL80211_KEY_DEFAULT_BEACON,
 
        /* keep last */
        __NL80211_KEY_AFTER_LAST,
@@ -4536,6 +4791,10 @@ enum nl80211_key_attributes {
  * @NL80211_TXRATE_VHT: VHT rates allowed for TX rate selection,
  *     see &struct nl80211_txrate_vht
  * @NL80211_TXRATE_GI: configure GI, see &enum nl80211_txrate_gi
+ * @NL80211_TXRATE_HE: HE rates allowed for TX rate selection,
+ *     see &struct nl80211_txrate_he
+ * @NL80211_TXRATE_HE_GI: configure HE GI, 0.8us, 1.6us and 3.2us.
+ * @NL80211_TXRATE_HE_LTF: configure HE LTF, 1XLTF, 2XLTF and 4XLTF.
  * @__NL80211_TXRATE_AFTER_LAST: internal
  * @NL80211_TXRATE_MAX: highest TX rate attribute
  */
@@ -4545,6 +4804,9 @@ enum nl80211_tx_rate_attributes {
        NL80211_TXRATE_HT,
        NL80211_TXRATE_VHT,
        NL80211_TXRATE_GI,
+       NL80211_TXRATE_HE,
+       NL80211_TXRATE_HE_GI,
+       NL80211_TXRATE_HE_LTF,
 
        /* keep last */
        __NL80211_TXRATE_AFTER_LAST,
@@ -4562,6 +4824,15 @@ struct nl80211_txrate_vht {
        __u16 mcs[NL80211_VHT_NSS_MAX];
 };
 
+#define NL80211_HE_NSS_MAX             8
+/**
+ * struct nl80211_txrate_he - HE MCS/NSS txrate bitmap
+ * @mcs: MCS bitmap table for each NSS (array index 0 for 1 stream, etc.)
+ */
+struct nl80211_txrate_he {
+       __u16 mcs[NL80211_HE_NSS_MAX];
+};
+
 enum nl80211_txrate_gi {
        NL80211_TXRATE_DEFAULT_GI,
        NL80211_TXRATE_FORCE_SGI,
@@ -4574,6 +4845,7 @@ enum nl80211_txrate_gi {
  * @NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz)
  * @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 69.12 GHz)
  * @NL80211_BAND_6GHZ: around 6 GHz band (5.9 - 7.2 GHz)
+ * @NL80211_BAND_S1GHZ: around 900MHz, supported by S1G PHYs
  * @NUM_NL80211_BANDS: number of bands, avoid using this in userspace
  *     since newer kernel versions may support more bands
  */
@@ -4582,6 +4854,7 @@ enum nl80211_band {
        NL80211_BAND_5GHZ,
        NL80211_BAND_60GHZ,
        NL80211_BAND_6GHZ,
+       NL80211_BAND_S1GHZ,
 
        NUM_NL80211_BANDS,
 };
@@ -4673,6 +4946,92 @@ enum nl80211_tx_power_setting {
        NL80211_TX_POWER_FIXED,
 };
 
+/**
+ * enum nl80211_tid_config - TID config state
+ * @NL80211_TID_CONFIG_ENABLE: Enable config for the TID
+ * @NL80211_TID_CONFIG_DISABLE: Disable config for the TID
+ */
+enum nl80211_tid_config {
+       NL80211_TID_CONFIG_ENABLE,
+       NL80211_TID_CONFIG_DISABLE,
+};
+
+/* enum nl80211_tx_rate_setting - TX rate configuration type
+ * @NL80211_TX_RATE_AUTOMATIC: automatically determine TX rate
+ * @NL80211_TX_RATE_LIMITED: limit the TX rate by the TX rate parameter
+ * @NL80211_TX_RATE_FIXED: fix TX rate to the TX rate parameter
+ */
+enum nl80211_tx_rate_setting {
+       NL80211_TX_RATE_AUTOMATIC,
+       NL80211_TX_RATE_LIMITED,
+       NL80211_TX_RATE_FIXED,
+};
+
+/* enum nl80211_tid_config_attr - TID specific configuration.
+ * @NL80211_TID_CONFIG_ATTR_PAD: pad attribute for 64-bit values
+ * @NL80211_TID_CONFIG_ATTR_VIF_SUPP: a bitmap (u64) of attributes supported
+ *     for per-vif configuration; doesn't list the ones that are generic
+ *     (%NL80211_TID_CONFIG_ATTR_TIDS, %NL80211_TID_CONFIG_ATTR_OVERRIDE).
+ * @NL80211_TID_CONFIG_ATTR_PEER_SUPP: same as the previous per-vif one, but
+ *     per peer instead.
+ * @NL80211_TID_CONFIG_ATTR_OVERRIDE: flag attribue, if set indicates
+ *     that the new configuration overrides all previous peer
+ *     configurations, otherwise previous peer specific configurations
+ *     should be left untouched.
+ * @NL80211_TID_CONFIG_ATTR_TIDS: a bitmask value of TIDs (bit 0 to 7)
+ *     Its type is u16.
+ * @NL80211_TID_CONFIG_ATTR_NOACK: Configure ack policy for the TID.
+ *     specified in %NL80211_TID_CONFIG_ATTR_TID. see %enum nl80211_tid_config.
+ *     Its type is u8.
+ * @NL80211_TID_CONFIG_ATTR_RETRY_SHORT: Number of retries used with data frame
+ *     transmission, user-space sets this configuration in
+ *     &NL80211_CMD_SET_TID_CONFIG. It is u8 type, min value is 1 and
+ *     the max value is advertised by the driver in this attribute on
+ *     output in wiphy capabilities.
+ * @NL80211_TID_CONFIG_ATTR_RETRY_LONG: Number of retries used with data frame
+ *     transmission, user-space sets this configuration in
+ *     &NL80211_CMD_SET_TID_CONFIG. Its type is u8, min value is 1 and
+ *     the max value is advertised by the driver in this attribute on
+ *     output in wiphy capabilities.
+ * @NL80211_TID_CONFIG_ATTR_AMPDU_CTRL: Enable/Disable MPDU aggregation
+ *     for the TIDs specified in %NL80211_TID_CONFIG_ATTR_TIDS.
+ *     Its type is u8, using the values from &nl80211_tid_config.
+ * @NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL: Enable/Disable RTS_CTS for the TIDs
+ *     specified in %NL80211_TID_CONFIG_ATTR_TIDS. It is u8 type, using
+ *     the values from &nl80211_tid_config.
+ * @NL80211_TID_CONFIG_ATTR_AMSDU_CTRL: Enable/Disable MSDU aggregation
+ *     for the TIDs specified in %NL80211_TID_CONFIG_ATTR_TIDS.
+ *     Its type is u8, using the values from &nl80211_tid_config.
+ * @NL80211_TID_CONFIG_ATTR_TX_RATE_TYPE: This attribute will be useful
+ *     to notfiy the driver that what type of txrate should be used
+ *     for the TIDs specified in %NL80211_TID_CONFIG_ATTR_TIDS. using
+ *     the values form &nl80211_tx_rate_setting.
+ * @NL80211_TID_CONFIG_ATTR_TX_RATE: Data frame TX rate mask should be applied
+ *     with the parameters passed through %NL80211_ATTR_TX_RATES.
+ *     configuration is applied to the data frame for the tid to that connected
+ *     station.
+ */
+enum nl80211_tid_config_attr {
+       __NL80211_TID_CONFIG_ATTR_INVALID,
+       NL80211_TID_CONFIG_ATTR_PAD,
+       NL80211_TID_CONFIG_ATTR_VIF_SUPP,
+       NL80211_TID_CONFIG_ATTR_PEER_SUPP,
+       NL80211_TID_CONFIG_ATTR_OVERRIDE,
+       NL80211_TID_CONFIG_ATTR_TIDS,
+       NL80211_TID_CONFIG_ATTR_NOACK,
+       NL80211_TID_CONFIG_ATTR_RETRY_SHORT,
+       NL80211_TID_CONFIG_ATTR_RETRY_LONG,
+       NL80211_TID_CONFIG_ATTR_AMPDU_CTRL,
+       NL80211_TID_CONFIG_ATTR_RTSCTS_CTRL,
+       NL80211_TID_CONFIG_ATTR_AMSDU_CTRL,
+       NL80211_TID_CONFIG_ATTR_TX_RATE_TYPE,
+       NL80211_TID_CONFIG_ATTR_TX_RATE,
+
+       /* keep last */
+       __NL80211_TID_CONFIG_ATTR_AFTER_LAST,
+       NL80211_TID_CONFIG_ATTR_MAX = __NL80211_TID_CONFIG_ATTR_AFTER_LAST - 1
+};
+
 /**
  * enum nl80211_packet_pattern_attr - packet pattern attribute
  * @__NL80211_PKTPAT_INVALID: invalid number for nested attribute
@@ -5144,6 +5503,8 @@ enum plink_actions {
 
 #define NL80211_KCK_LEN                        16
 #define NL80211_KEK_LEN                        16
+#define NL80211_KCK_EXT_LEN            24
+#define NL80211_KEK_EXT_LEN            32
 #define NL80211_REPLAY_CTR_LEN         8
 
 /**
@@ -5152,6 +5513,7 @@ enum plink_actions {
  * @NL80211_REKEY_DATA_KEK: key encryption key (binary)
  * @NL80211_REKEY_DATA_KCK: key confirmation key (binary)
  * @NL80211_REKEY_DATA_REPLAY_CTR: replay counter (binary)
+ * @NL80211_REKEY_DATA_AKM: AKM data (OUI, suite type)
  * @NUM_NL80211_REKEY_DATA: number of rekey attributes (internal)
  * @MAX_NL80211_REKEY_DATA: highest rekey attribute (internal)
  */
@@ -5160,6 +5522,7 @@ enum nl80211_rekey_data {
        NL80211_REKEY_DATA_KEK,
        NL80211_REKEY_DATA_KCK,
        NL80211_REKEY_DATA_REPLAY_CTR,
+       NL80211_REKEY_DATA_AKM,
 
        /* keep last */
        NUM_NL80211_REKEY_DATA,
@@ -5380,7 +5743,7 @@ enum nl80211_feature_flags {
  * enum nl80211_ext_feature_index - bit index of extended features.
  * @NL80211_EXT_FEATURE_VHT_IBSS: This driver supports IBSS with VHT datarates.
  * @NL80211_EXT_FEATURE_RRM: This driver supports RRM. When featured, user can
- *     can request to use RRM (see %NL80211_ATTR_USE_RRM) with
+ *     request to use RRM (see %NL80211_ATTR_USE_RRM) with
  *     %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests, which will set
  *     the ASSOC_REQ_USE_RRM flag in the association request even if
  *     NL80211_FEATURE_QUIET is not advertized.
@@ -5484,6 +5847,55 @@ enum nl80211_feature_flags {
  * @NL80211_EXT_FEATURE_SAE_OFFLOAD: Device wants to do SAE authentication in
  *     station mode (SAE password is passed as part of the connect command).
  *
+ * @NL80211_EXT_FEATURE_VLAN_OFFLOAD: The driver supports a single netdev
+ *     with VLAN tagged frames and separate VLAN-specific netdevs added using
+ *     vconfig similarly to the Ethernet case.
+ *
+ * @NL80211_EXT_FEATURE_AQL: The driver supports the Airtime Queue Limit (AQL)
+ *     feature, which prevents bufferbloat by using the expected transmission
+ *     time to limit the amount of data buffered in the hardware.
+ *
+ * @NL80211_EXT_FEATURE_BEACON_PROTECTION: The driver supports Beacon protection
+ *     and can receive key configuration for BIGTK using key indexes 6 and 7.
+ * @NL80211_EXT_FEATURE_BEACON_PROTECTION_CLIENT: The driver supports Beacon
+ *     protection as a client only and cannot transmit protected beacons.
+ *
+ * @NL80211_EXT_FEATURE_CONTROL_PORT_NO_PREAUTH: The driver can disable the
+ *     forwarding of preauth frames over the control port. They are then
+ *     handled as ordinary data frames.
+ *
+ * @NL80211_EXT_FEATURE_PROTECTED_TWT: Driver supports protected TWT frames
+ *
+ * @NL80211_EXT_FEATURE_DEL_IBSS_STA: The driver supports removing stations
+ *      in IBSS mode, essentially by dropping their state.
+ *
+ * @NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS: management frame registrations
+ *     are possible for multicast frames and those will be reported properly.
+ *
+ * @NL80211_EXT_FEATURE_SCAN_FREQ_KHZ: This driver supports receiving and
+ *     reporting scan request with %NL80211_ATTR_SCAN_FREQ_KHZ. In order to
+ *     report %NL80211_ATTR_SCAN_FREQ_KHZ, %NL80211_SCAN_FLAG_FREQ_KHZ must be
+ *     included in the scan request.
+ *
+ * @NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS: The driver
+ *     can report tx status for control port over nl80211 tx operations.
+ *
+ * @NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION: Driver supports Operating
+ *     Channel Validation (OCV) when using driver's SME for RSNA handshakes.
+ *
+ * @NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK: Device wants to do 4-way
+ *     handshake with PSK in AP mode (PSK is passed as part of the start AP
+ *     command).
+ *
+ * @NL80211_EXT_FEATURE_SAE_OFFLOAD_AP: Device wants to do SAE authentication
+ *     in AP mode (SAE password is passed as part of the start AP command).
+ *
+ * @NL80211_EXT_FEATURE_FILS_DISCOVERY: Driver/device supports FILS discovery
+ *     frames transmission
+ *
+ * @NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP: Driver/device supports
+ *     unsolicited broadcast probe response transmission
+ *
  * @NUM_NL80211_EXT_FEATURES: number of extended features.
  * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
  */
@@ -5529,6 +5941,21 @@ enum nl80211_ext_feature_index {
        NL80211_EXT_FEATURE_EXT_KEY_ID,
        NL80211_EXT_FEATURE_STA_TX_PWR,
        NL80211_EXT_FEATURE_SAE_OFFLOAD,
+       NL80211_EXT_FEATURE_VLAN_OFFLOAD,
+       NL80211_EXT_FEATURE_AQL,
+       NL80211_EXT_FEATURE_BEACON_PROTECTION,
+       NL80211_EXT_FEATURE_CONTROL_PORT_NO_PREAUTH,
+       NL80211_EXT_FEATURE_PROTECTED_TWT,
+       NL80211_EXT_FEATURE_DEL_IBSS_STA,
+       NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS,
+       NL80211_EXT_FEATURE_BEACON_PROTECTION_CLIENT,
+       NL80211_EXT_FEATURE_SCAN_FREQ_KHZ,
+       NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS,
+       NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION,
+       NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK,
+       NL80211_EXT_FEATURE_SAE_OFFLOAD_AP,
+       NL80211_EXT_FEATURE_FILS_DISCOVERY,
+       NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP,
 
        /* add new features before the definition below */
        NUM_NL80211_EXT_FEATURES,
@@ -5640,6 +6067,11 @@ enum nl80211_timeout_reason {
  * @NL80211_SCAN_FLAG_MIN_PREQ_CONTENT: minimize probe request content to
  *     only have supported rates and no additional capabilities (unless
  *     added by userspace explicitly.)
+ * @NL80211_SCAN_FLAG_FREQ_KHZ: report scan results with
+ *     %NL80211_ATTR_SCAN_FREQ_KHZ. This also means
+ *     %NL80211_ATTR_SCAN_FREQUENCIES will not be included.
+ * @NL80211_SCAN_FLAG_COLOCATED_6GHZ: scan for colocated APs reported by
+ *     2.4/5 GHz APs
  */
 enum nl80211_scan_flags {
        NL80211_SCAN_FLAG_LOW_PRIORITY                          = 1<<0,
@@ -5655,6 +6087,8 @@ enum nl80211_scan_flags {
        NL80211_SCAN_FLAG_HIGH_ACCURACY                         = 1<<10,
        NL80211_SCAN_FLAG_RANDOM_SN                             = 1<<11,
        NL80211_SCAN_FLAG_MIN_PREQ_CONTENT                      = 1<<12,
+       NL80211_SCAN_FLAG_FREQ_KHZ                              = 1<<13,
+       NL80211_SCAN_FLAG_COLOCATED_6GHZ                        = 1<<14,
 };
 
 /**
@@ -5742,7 +6176,7 @@ enum nl80211_dfs_state {
 };
 
 /**
- * enum enum nl80211_protocol_features - nl80211 protocol features
+ * enum nl80211_protocol_features - nl80211 protocol features
  * @NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP: nl80211 supports splitting
  *     wiphy dumps (if requested by the application with the attribute
  *     %NL80211_ATTR_SPLIT_WIPHY_DUMP. Also supported is filtering the
@@ -6151,12 +6585,14 @@ enum nl80211_ftm_responder_stats {
  * @NL80211_PREAMBLE_HT: HT preamble
  * @NL80211_PREAMBLE_VHT: VHT preamble
  * @NL80211_PREAMBLE_DMG: DMG preamble
+ * @NL80211_PREAMBLE_HE: HE preamble
  */
 enum nl80211_preamble {
        NL80211_PREAMBLE_LEGACY,
        NL80211_PREAMBLE_HT,
        NL80211_PREAMBLE_VHT,
        NL80211_PREAMBLE_DMG,
+       NL80211_PREAMBLE_HE,
 };
 
 /**
@@ -6349,6 +6785,10 @@ enum nl80211_peer_measurement_attrs {
  *     is valid)
  * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_FTMS_PER_BURST: u32 attribute indicating
  *     the maximum FTMs per burst (if not present anything is valid)
+ * @NL80211_PMSR_FTM_CAPA_ATTR_TRIGGER_BASED: flag attribute indicating if
+ *     trigger based ranging measurement is supported
+ * @NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED: flag attribute indicating
+ *     if non trigger based ranging measurement is supported
  *
  * @NUM_NL80211_PMSR_FTM_CAPA_ATTR: internal
  * @NL80211_PMSR_FTM_CAPA_ATTR_MAX: highest attribute number
@@ -6364,6 +6804,8 @@ enum nl80211_peer_measurement_ftm_capa {
        NL80211_PMSR_FTM_CAPA_ATTR_BANDWIDTHS,
        NL80211_PMSR_FTM_CAPA_ATTR_MAX_BURSTS_EXPONENT,
        NL80211_PMSR_FTM_CAPA_ATTR_MAX_FTMS_PER_BURST,
+       NL80211_PMSR_FTM_CAPA_ATTR_TRIGGER_BASED,
+       NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED,
 
        /* keep last */
        NUM_NL80211_PMSR_FTM_CAPA_ATTR,
@@ -6393,6 +6835,20 @@ enum nl80211_peer_measurement_ftm_capa {
  * @NL80211_PMSR_FTM_REQ_ATTR_REQUEST_LCI: request LCI data (flag)
  * @NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC: request civic location data
  *     (flag)
+ * @NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED: request trigger based ranging
+ *     measurement (flag).
+ *     This attribute and %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED are
+ *     mutually exclusive.
+ *      if neither %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED nor
+ *     %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set, EDCA based
+ *     ranging will be used.
+ * @NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED: request non trigger based
+ *     ranging measurement (flag)
+ *     This attribute and %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED are
+ *     mutually exclusive.
+ *      if neither %NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED nor
+ *     %NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED is set, EDCA based
+ *     ranging will be used.
  *
  * @NUM_NL80211_PMSR_FTM_REQ_ATTR: internal
  * @NL80211_PMSR_FTM_REQ_ATTR_MAX: highest attribute number
@@ -6409,6 +6865,8 @@ enum nl80211_peer_measurement_ftm_req {
        NL80211_PMSR_FTM_REQ_ATTR_NUM_FTMR_RETRIES,
        NL80211_PMSR_FTM_REQ_ATTR_REQUEST_LCI,
        NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC,
+       NL80211_PMSR_FTM_REQ_ATTR_TRIGGER_BASED,
+       NL80211_PMSR_FTM_REQ_ATTR_NON_TRIGGER_BASED,
 
        /* keep last */
        NUM_NL80211_PMSR_FTM_REQ_ATTR,
@@ -6533,6 +6991,13 @@ enum nl80211_peer_measurement_ftm_resp {
  *
  * @NL80211_HE_OBSS_PD_ATTR_MIN_OFFSET: the OBSS PD minimum tx power offset.
  * @NL80211_HE_OBSS_PD_ATTR_MAX_OFFSET: the OBSS PD maximum tx power offset.
+ * @NL80211_HE_OBSS_PD_ATTR_NON_SRG_MAX_OFFSET: the non-SRG OBSS PD maximum
+ *     tx power offset.
+ * @NL80211_HE_OBSS_PD_ATTR_BSS_COLOR_BITMAP: bitmap that indicates the BSS color
+ *     values used by members of the SRG.
+ * @NL80211_HE_OBSS_PD_ATTR_PARTIAL_BSSID_BITMAP: bitmap that indicates the partial
+ *     BSSID values used by members of the SRG.
+ * @NL80211_HE_OBSS_PD_ATTR_SR_CTRL: The SR Control field of SRP element.
  *
  * @__NL80211_HE_OBSS_PD_ATTR_LAST: Internal
  * @NL80211_HE_OBSS_PD_ATTR_MAX: highest OBSS PD attribute.
@@ -6542,11 +7007,121 @@ enum nl80211_obss_pd_attributes {
 
        NL80211_HE_OBSS_PD_ATTR_MIN_OFFSET,
        NL80211_HE_OBSS_PD_ATTR_MAX_OFFSET,
+       NL80211_HE_OBSS_PD_ATTR_NON_SRG_MAX_OFFSET,
+       NL80211_HE_OBSS_PD_ATTR_BSS_COLOR_BITMAP,
+       NL80211_HE_OBSS_PD_ATTR_PARTIAL_BSSID_BITMAP,
+       NL80211_HE_OBSS_PD_ATTR_SR_CTRL,
 
        /* keep last */
        __NL80211_HE_OBSS_PD_ATTR_LAST,
        NL80211_HE_OBSS_PD_ATTR_MAX = __NL80211_HE_OBSS_PD_ATTR_LAST - 1,
 };
 
+/**
+ * enum nl80211_bss_color_attributes - BSS Color attributes
+ * @__NL80211_HE_BSS_COLOR_ATTR_INVALID: Invalid
+ *
+ * @NL80211_HE_BSS_COLOR_ATTR_COLOR: the current BSS Color.
+ * @NL80211_HE_BSS_COLOR_ATTR_DISABLED: is BSS coloring disabled.
+ * @NL80211_HE_BSS_COLOR_ATTR_PARTIAL: the AID equation to be used..
+ *
+ * @__NL80211_HE_BSS_COLOR_ATTR_LAST: Internal
+ * @NL80211_HE_BSS_COLOR_ATTR_MAX: highest BSS Color attribute.
+ */
+enum nl80211_bss_color_attributes {
+       __NL80211_HE_BSS_COLOR_ATTR_INVALID,
+
+       NL80211_HE_BSS_COLOR_ATTR_COLOR,
+       NL80211_HE_BSS_COLOR_ATTR_DISABLED,
+       NL80211_HE_BSS_COLOR_ATTR_PARTIAL,
 
+       /* keep last */
+       __NL80211_HE_BSS_COLOR_ATTR_LAST,
+       NL80211_HE_BSS_COLOR_ATTR_MAX = __NL80211_HE_BSS_COLOR_ATTR_LAST - 1,
+};
+
+/**
+ * enum nl80211_iftype_akm_attributes - interface type AKM attributes
+ * @__NL80211_IFTYPE_AKM_ATTR_INVALID: Invalid
+ *
+ * @NL80211_IFTYPE_AKM_ATTR_IFTYPES: nested attribute containing a flag
+ *     attribute for each interface type that supports AKM suites specified in
+ *     %NL80211_IFTYPE_AKM_ATTR_SUITES
+ * @NL80211_IFTYPE_AKM_ATTR_SUITES: an array of u32. Used to indicate supported
+ *     AKM suites for the specified interface types.
+ *
+ * @__NL80211_IFTYPE_AKM_ATTR_LAST: Internal
+ * @NL80211_IFTYPE_AKM_ATTR_MAX: highest interface type AKM attribute.
+ */
+enum nl80211_iftype_akm_attributes {
+       __NL80211_IFTYPE_AKM_ATTR_INVALID,
+
+       NL80211_IFTYPE_AKM_ATTR_IFTYPES,
+       NL80211_IFTYPE_AKM_ATTR_SUITES,
+
+       /* keep last */
+       __NL80211_IFTYPE_AKM_ATTR_LAST,
+       NL80211_IFTYPE_AKM_ATTR_MAX = __NL80211_IFTYPE_AKM_ATTR_LAST - 1,
+};
+
+/**
+ * enum nl80211_fils_discovery_attributes - FILS discovery configuration
+ * from IEEE Std 802.11ai-2016, Annex C.3 MIB detail.
+ *
+ * @__NL80211_FILS_DISCOVERY_ATTR_INVALID: Invalid
+ *
+ * @NL80211_FILS_DISCOVERY_ATTR_INT_MIN: Minimum packet interval (u32, TU).
+ *     Allowed range: 0..10000 (TU = Time Unit)
+ * @NL80211_FILS_DISCOVERY_ATTR_INT_MAX: Maximum packet interval (u32, TU).
+ *     Allowed range: 0..10000 (TU = Time Unit)
+ * @NL80211_FILS_DISCOVERY_ATTR_TMPL: Template data for FILS discovery action
+ *     frame including the headers.
+ *
+ * @__NL80211_FILS_DISCOVERY_ATTR_LAST: Internal
+ * @NL80211_FILS_DISCOVERY_ATTR_MAX: highest attribute
+ */
+enum nl80211_fils_discovery_attributes {
+       __NL80211_FILS_DISCOVERY_ATTR_INVALID,
+
+       NL80211_FILS_DISCOVERY_ATTR_INT_MIN,
+       NL80211_FILS_DISCOVERY_ATTR_INT_MAX,
+       NL80211_FILS_DISCOVERY_ATTR_TMPL,
+
+       /* keep last */
+       __NL80211_FILS_DISCOVERY_ATTR_LAST,
+       NL80211_FILS_DISCOVERY_ATTR_MAX = __NL80211_FILS_DISCOVERY_ATTR_LAST - 1
+};
+
+/*
+ * FILS discovery template minimum length with action frame headers and
+ * mandatory fields.
+ */
+#define NL80211_FILS_DISCOVERY_TMPL_MIN_LEN 42
+
+/**
+ * enum nl80211_unsol_bcast_probe_resp_attributes - Unsolicited broadcast probe
+ *     response configuration. Applicable only in 6GHz.
+ *
+ * @__NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INVALID: Invalid
+ *
+ * @NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT: Maximum packet interval (u32, TU).
+ *     Allowed range: 0..20 (TU = Time Unit). IEEE P802.11ax/D6.0
+ *     26.17.2.3.2 (AP behavior for fast passive scanning).
+ * @NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL: Unsolicited broadcast probe response
+ *     frame template (binary).
+ *
+ * @__NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_LAST: Internal
+ * @NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_MAX: highest attribute
+ */
+enum nl80211_unsol_bcast_probe_resp_attributes {
+       __NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INVALID,
+
+       NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT,
+       NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL,
+
+       /* keep last */
+       __NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_LAST,
+       NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_MAX =
+               __NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_LAST - 1
+};
 #endif /* __LINUX_NL80211_H */
index aaad0d9ff04df90d0a127b47c4a40dfc169b9461..7be6b945f2d7165347a1a1f583da0b43d5798324 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-netlink.h"
 
index e88c5e5d2167a4f5cae1dbe88fa40072b1ea4390..c633995dc9a62b7b7c0f5113c9dbed5f7a1e2b6a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-netlink.h"
index 260c2088d58c99d48edd5900312d522daff1a768..6f059abfffa8463a1e9aef6bc59f23a5c068a045 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index e0eef34cdc6d0680cee93f2cd804e14515a01391..36063270dd2f3230268a4521dc97ec5915f7065e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef struct LockFile {
index b844f9ef81262ea4be9310737e1aed0f178ed573..3a4dcaa267b2db2f8992d1660357c284a3941867 100644 (file)
@@ -1,8 +1,15 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "log.h"
 
+#define log_interface_full_errno(ifname, level, error, ...)             \
+        ({                                                              \
+                const char *_ifname = (ifname);                         \
+                _ifname ? log_object_internal(level, error, PROJECT_FILE, __LINE__, __func__, "INTERFACE=", _ifname, NULL, NULL, ##__VA_ARGS__) : \
+                        log_internal(level, error, PROJECT_FILE, __LINE__, __func__, ##__VA_ARGS__); \
+        })
+
 /*
  * The following macros append INTERFACE= to the message.
  * The macros require a struct named 'Link' which contains 'char *ifname':
@@ -17,9 +24,8 @@
 #define log_link_full_errno(link, level, error, ...)                    \
         ({                                                              \
                 const Link *_l = (link);                                \
-                (_l && _l->ifname) ? log_object_internal(level, error, PROJECT_FILE, __LINE__, __func__, "INTERFACE=", _l->ifname, NULL, NULL, ##__VA_ARGS__) : \
-                        log_internal(level, error, PROJECT_FILE, __LINE__, __func__, ##__VA_ARGS__); \
-        })                                                              \
+                log_interface_full_errno(_l ? _l->ifname : NULL, level, error, ##__VA_ARGS__); \
+        })
 
 #define log_link_full(link, level, ...) (void) log_link_full_errno(link, level, 0, __VA_ARGS__)
 
index 4f25c643d23e6c1eab946b52aa8cb96f13de71a8..bf574d32a57dc02876b551049acb4ae4dc26db55 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -347,11 +347,8 @@ static int output_timestamp_monotonic(FILE *f, sd_journal *j, const char *monoto
 }
 
 static int output_timestamp_realtime(FILE *f, sd_journal *j, OutputMode mode, OutputFlags flags, const char *realtime) {
-        char buf[MAX(FORMAT_TIMESTAMP_MAX, 64)];
-        struct tm *(*gettime_r)(const time_t *, struct tm *);
-        struct tm tm;
+        char buf[MAX(FORMAT_TIMESTAMP_MAX, 64U)];
         uint64_t x;
-        time_t t;
         int r;
 
         assert(f);
@@ -376,9 +373,9 @@ static int output_timestamp_realtime(FILE *f, sd_journal *j, OutputMode mode, Ou
                                                "Failed to format timestamp: %" PRIu64, x);
 
         } else {
-                char usec[7];
+                struct tm tm;
+                time_t t;
 
-                gettime_r = (flags & OUTPUT_UTC) ? gmtime_r : localtime_r;
                 t = (time_t) (x / USEC_PER_SEC);
 
                 switch (mode) {
@@ -388,24 +385,29 @@ static int output_timestamp_realtime(FILE *f, sd_journal *j, OutputMode mode, Ou
                         break;
 
                 case OUTPUT_SHORT_ISO:
-                        if (strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S%z", gettime_r(&t, &tm)) <= 0)
+                        if (strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S%z",
+                                     localtime_or_gmtime_r(&t, &tm, flags & OUTPUT_UTC)) <= 0)
                                 return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
                                                        "Failed to format ISO time");
                         break;
 
-                case OUTPUT_SHORT_ISO_PRECISE:
+                case OUTPUT_SHORT_ISO_PRECISE: {
+                        char usec[7];
+
                         /* No usec in strftime, so we leave space and copy over */
-                        if (strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S.xxxxxx%z", gettime_r(&t, &tm)) <= 0)
+                        if (strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S.xxxxxx%z",
+                                     localtime_or_gmtime_r(&t, &tm, flags & OUTPUT_UTC)) <= 0)
                                 return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
                                                        "Failed to format ISO-precise time");
                         xsprintf(usec, "%06"PRI_USEC, x % USEC_PER_SEC);
                         memcpy(buf + 20, usec, 6);
                         break;
-
+                }
                 case OUTPUT_SHORT:
                 case OUTPUT_SHORT_PRECISE:
 
-                        if (strftime(buf, sizeof(buf), "%b %d %H:%M:%S", gettime_r(&t, &tm)) <= 0)
+                        if (strftime(buf, sizeof(buf), "%b %d %H:%M:%S",
+                                     localtime_or_gmtime_r(&t, &tm, flags & OUTPUT_UTC)) <= 0)
                                 return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
                                                        "Failed to format syslog time");
 
index 345efa4b2bbd091697d7bda97328ed5d5e008f4d..71ebe13573740a05b92aba2d527d60436d1f5a32 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 4843cbcaabc40467ce3d4924e2c8d0f5b6b9e7dd..84f415aa61c1eb33af8adda898bdad419672a879 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if HAVE_VALGRIND_MEMCHECK_H
 #include <valgrind/memcheck.h>
 #include <sys/ioctl.h>
 #include <unistd.h>
 
+#include "sd-device.h"
+
 #include "alloc-util.h"
 #include "blockdev-util.h"
+#include "device-util.h"
 #include "errno-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "loop-util.h"
 #include "missing_loop.h"
 #include "parse-util.h"
+#include "random-util.h"
 #include "stat-util.h"
 #include "stdio-util.h"
 #include "string-util.h"
+#include "tmpfile-util.h"
 
 static void cleanup_clear_loop_close(int *fd) {
         if (*fd < 0)
@@ -33,66 +38,221 @@ static void cleanup_clear_loop_close(int *fd) {
         (void) safe_close(*fd);
 }
 
-static int loop_configure(int fd, const struct loop_config *c) {
+static int loop_is_bound(int fd) {
+        struct loop_info64 info;
+
+        assert(fd >= 0);
+
+        if (ioctl(fd, LOOP_GET_STATUS64, &info) < 0) {
+                if (errno == ENXIO)
+                        return false; /* not bound! */
+
+                return -errno;
+        }
+
+        return true; /* bound! */
+}
+
+static int device_has_block_children(sd_device *d) {
+        _cleanup_(sd_device_enumerator_unrefp) sd_device_enumerator *e = NULL;
+        const char *main_sn, *main_ss;
+        sd_device *q;
+        int r;
+
+        assert(d);
+
+        /* Checks if the specified device currently has block device children (i.e. partition block
+         * devices). */
+
+        r = sd_device_get_sysname(d, &main_sn);
+        if (r < 0)
+                return r;
+
+        r = sd_device_get_subsystem(d, &main_ss);
+        if (r < 0)
+                return r;
+
+        if (!streq(main_ss, "block"))
+                return -EINVAL;
+
+        r = sd_device_enumerator_new(&e);
+        if (r < 0)
+                return r;
+
+        r = sd_device_enumerator_allow_uninitialized(e);
+        if (r < 0)
+                return r;
+
+        r = sd_device_enumerator_add_match_parent(e, d);
+        if (r < 0)
+                return r;
+
+        FOREACH_DEVICE(e, q) {
+                const char *ss, *sn;
+
+                r = sd_device_get_subsystem(q, &ss);
+                if (r < 0)
+                        continue;
+
+                if (!streq(ss, "block"))
+                        continue;
+
+                r = sd_device_get_sysname(q, &sn);
+                if (r < 0)
+                        continue;
+
+                if (streq(sn, main_sn))
+                        continue;
+
+                return 1; /* we have block device children */
+        }
+
+        return 0;
+}
+
+static int loop_configure(
+                int fd,
+                int nr,
+                const struct loop_config *c,
+                bool *try_loop_configure) {
+
+        _cleanup_(sd_device_unrefp) sd_device *d = NULL;
+        _cleanup_free_ char *sysname = NULL;
+        _cleanup_close_ int lock_fd = -1;
         int r;
 
         assert(fd >= 0);
+        assert(nr >= 0);
         assert(c);
+        assert(try_loop_configure);
 
-        if (ioctl(fd, LOOP_CONFIGURE, c) < 0) {
-                /* Do fallback only if LOOP_CONFIGURE is not supported, propagate all other errors. Note that
-                 * the kernel is weird: non-existing ioctls currently return EINVAL rather than ENOTTY on
-                 * loopback block devices. They should fix that in the kernel, but in the meantime we accept
-                 * both here. */
-                if (!ERRNO_IS_NOT_SUPPORTED(errno) && errno != EINVAL)
-                        return -errno;
-        } else {
-                bool good = true;
+        if (asprintf(&sysname, "loop%i", nr) < 0)
+                return -ENOMEM;
 
-                if (c->info.lo_sizelimit != 0) {
-                        /* Kernel 5.8 vanilla doesn't properly propagate the size limit into the block
-                         * device. If it's used, let's immediately check if it had the desired effect
-                         * hence. And if not use classic LOOP_SET_STATUS64. */
-                        uint64_t z;
+        r = sd_device_new_from_subsystem_sysname(&d, "block", sysname);
+        if (r < 0)
+                return r;
 
-                        if (ioctl(fd, BLKGETSIZE64, &z) < 0) {
-                                r = -errno;
-                                goto fail;
-                        }
+        /* Let's lock the device before we do anything. We take the BSD lock on a second, separately opened
+         * fd for the device. udev after all watches for close() events (specifically IN_CLOSE_WRITE) on
+         * block devices to reprobe them, hence by having a separate fd we will later close() we can ensure
+         * we trigger udev after everything is done. If we'd lock our own fd instead and keep it open for a
+         * long time udev would possibly never run on it again, even though the fd is unlocked, simply
+         * because we never close() it. It also has the nice benefit we can use the _cleanup_close_ logic to
+         * automatically release the lock, after we are done. */
+        lock_fd = fd_reopen(fd, O_RDWR|O_CLOEXEC|O_NONBLOCK|O_NOCTTY);
+        if (lock_fd < 0)
+                return lock_fd;
+        if (flock(lock_fd, LOCK_EX) < 0)
+                return -errno;
+
+        /* Let's see if the device is really detached, i.e. currently has no associated partition block
+         * devices. On various kernels (such as 5.8) it is possible to have a loopback block device that
+         * superficially is detached but still has partition block devices associated for it. They only go
+         * away when the device is reattached. (Yes, LOOP_CLR_FD doesn't work then, because officially
+         * nothing is attached and LOOP_CTL_REMOVE doesn't either, since it doesn't care about partition
+         * block devices. */
+        r = device_has_block_children(d);
+        if (r < 0)
+                return r;
+        if (r > 0) {
+                r = loop_is_bound(fd);
+                if (r < 0)
+                        return r;
+                if (r > 0)
+                        return -EBUSY;
+
+                return -EUCLEAN; /* Bound but children? Tell caller to reattach something so that the
+                                  * partition block devices are gone too. */
+        }
 
-                        if (z != c->info.lo_sizelimit) {
-                                log_debug("LOOP_CONFIGURE is broken, doesn't honour .lo_sizelimit. Falling back to LOOP_SET_STATUS64.");
-                                good = false;
+        if (*try_loop_configure) {
+                if (ioctl(fd, LOOP_CONFIGURE, c) < 0) {
+                        /* Do fallback only if LOOP_CONFIGURE is not supported, propagate all other
+                         * errors. Note that the kernel is weird: non-existing ioctls currently return EINVAL
+                         * rather than ENOTTY on loopback block devices. They should fix that in the kernel,
+                         * but in the meantime we accept both here. */
+                        if (!ERRNO_IS_NOT_SUPPORTED(errno) && errno != EINVAL)
+                                return -errno;
+
+                        *try_loop_configure = false;
+                } else {
+                        bool good = true;
+
+                        if (c->info.lo_sizelimit != 0) {
+                                /* Kernel 5.8 vanilla doesn't properly propagate the size limit into the
+                                 * block device. If it's used, let's immediately check if it had the desired
+                                 * effect hence. And if not use classic LOOP_SET_STATUS64. */
+                                uint64_t z;
+
+                                if (ioctl(fd, BLKGETSIZE64, &z) < 0) {
+                                        r = -errno;
+                                        goto fail;
+                                }
+
+                                if (z != c->info.lo_sizelimit) {
+                                        log_debug("LOOP_CONFIGURE is broken, doesn't honour .lo_sizelimit. Falling back to LOOP_SET_STATUS64.");
+                                        good = false;
+                                }
                         }
-                }
 
-                if (FLAGS_SET(c->info.lo_flags, LO_FLAGS_PARTSCAN)) {
-                        /* Kernel 5.8 vanilla doesn't properly propagate the partition scanning flag into the
-                         * block device. Let's hence verify if things work correctly here before
-                         * returning. */
+                        if (FLAGS_SET(c->info.lo_flags, LO_FLAGS_PARTSCAN)) {
+                                /* Kernel 5.8 vanilla doesn't properly propagate the partition scanning flag
+                                 * into the block device. Let's hence verify if things work correctly here
+                                 * before returning. */
+
+                                r = blockdev_partscan_enabled(fd);
+                                if (r < 0)
+                                        goto fail;
+                                if (r == 0) {
+                                        log_debug("LOOP_CONFIGURE is broken, doesn't honour LO_FLAGS_PARTSCAN. Falling back to LOOP_SET_STATUS64.");
+                                        good = false;
+                                }
+                        }
 
-                        r = blockdev_partscan_enabled(fd);
-                        if (r < 0)
+                        if (!good) {
+                                /* LOOP_CONFIGURE doesn't work. Remember that. */
+                                *try_loop_configure = false;
+
+                                /* We return EBUSY here instead of retrying immediately with LOOP_SET_FD,
+                                 * because LOOP_CLR_FD is async: if the operation cannot be executed right
+                                 * away it just sets the autoclear flag on the device. This means there's a
+                                 * good chance we cannot actually reuse the loopback device right-away. Hence
+                                 * let's assume it's busy, avoid the trouble and let the calling loop call us
+                                 * again with a new, likely unused device. */
+                                r = -EBUSY;
                                 goto fail;
-                        if (r == 0) {
-                                log_debug("LOOP_CONFIGURE is broken, doesn't honour LO_FLAGS_PARTSCAN. Falling back to LOOP_SET_STATUS64.");
-                                good = false;
                         }
-                }
 
-                if (good)
                         return 0;
-
-                /* Otherwise, undo the attachment and use the old APIs */
-                (void) ioctl(fd, LOOP_CLR_FD);
+                }
         }
 
+        /* Since kernel commit 5db470e229e22b7eda6e23b5566e532c96fb5bc3 (kernel v5.0) the LOOP_SET_STATUS64
+         * ioctl can return EAGAIN in case we change the lo_offset field, if someone else is accessing the
+         * block device while we try to reconfigure it. This is a pretty common case, since udev might
+         * instantly start probing the device as soon as we attach an fd to it. Hence handle it in two ways:
+         * first, let's take the BSD lock to ensure that udev will not step in between the point in
+         * time where we attach the fd and where we reconfigure the device. Secondly, let's wait 50ms on
+         * EAGAIN and retry. The former should be an efficient mechanism to avoid we have to wait 50ms
+         * needlessly if we are just racing against udev. The latter is protection against all other cases,
+         * i.e. peers that do not take the BSD lock. */
+
         if (ioctl(fd, LOOP_SET_FD, c->fd) < 0)
                 return -errno;
 
-        if (ioctl(fd, LOOP_SET_STATUS64, &c->info) < 0) {
-                r = -errno;
-                goto fail;
+        for (unsigned n_attempts = 0;;) {
+                if (ioctl(fd, LOOP_SET_STATUS64, &c->info) >= 0)
+                        break;
+                if (errno != EAGAIN || ++n_attempts >= 64) {
+                        r = log_debug_errno(errno, "Failed to configure loopback device: %m");
+                        goto fail;
+                }
+
+                /* Sleep some random time, but at least 10ms, at most 250ms. Increase the delay the more
+                 * failed attempts we see */
+                (void) usleep(UINT64_C(10) * USEC_PER_MSEC +
+                              random_u64() % (UINT64_C(240) * USEC_PER_MSEC * n_attempts/64));
         }
 
         return 0;
@@ -102,6 +262,44 @@ fail:
         return r;
 }
 
+static int attach_empty_file(int loop, int nr) {
+        _cleanup_close_ int fd = -1;
+
+        /* So here's the thing: on various kernels (5.8 at least) loop block devices might enter a state
+         * where they are detached but nonetheless have partitions, when used heavily. Accessing these
+         * partitions results in immediatey IO errors. There's no pretty way to get rid of them
+         * again. Neither LOOP_CLR_FD nor LOOP_CTL_REMOVE suffice (see above). What does work is to
+         * reassociate them with a new fd however. This is what we do here hence: we associate the devices
+         * with an empty file (i.e. an image that definitely has no partitions). We then immediately clear it
+         * again. This suffices to make the partitions go away. Ugly but appears to work. */
+
+        log_debug("Found unattached loopback block device /dev/loop%i with partitions. Attaching empty file to remove them.", nr);
+
+        fd = open_tmpfile_unlinkable(NULL, O_RDONLY);
+        if (fd < 0)
+                return fd;
+
+        if (flock(loop, LOCK_EX) < 0)
+                return -errno;
+
+        if (ioctl(loop, LOOP_SET_FD, fd) < 0)
+                return -errno;
+
+        if (ioctl(loop, LOOP_SET_STATUS64, &(struct loop_info64) {
+                                .lo_flags = LO_FLAGS_READ_ONLY|
+                                            LO_FLAGS_AUTOCLEAR|
+                                            LO_FLAGS_PARTSCAN, /* enable partscan, so that the partitions really go away */
+                        }) < 0)
+                return -errno;
+
+        if (ioctl(loop, LOOP_CLR_FD) < 0)
+                return -errno;
+
+        /* The caller is expected to immediately close the loopback device after this, so that the BSD lock
+         * is released, and udev sees the changes. */
+        return 0;
+}
+
 int loop_device_make(
                 int fd,
                 int open_flags,
@@ -111,6 +309,7 @@ int loop_device_make(
                 LoopDevice **ret) {
 
         _cleanup_free_ char *loopdev = NULL;
+        bool try_loop_configure = true;
         struct loop_config config;
         LoopDevice *d = NULL;
         struct stat st;
@@ -201,12 +400,17 @@ int loop_device_make(
                         if (!IN_SET(errno, ENOENT, ENXIO))
                                 return -errno;
                 } else {
-                        r = loop_configure(loop, &config);
+                        r = loop_configure(loop, nr, &config, &try_loop_configure);
                         if (r >= 0) {
                                 loop_with_fd = TAKE_FD(loop);
                                 break;
                         }
-                        if (r != -EBUSY)
+                        if (r == -EUCLEAN) {
+                                /* Make left-over partition disappear hack (see above) */
+                                r = attach_empty_file(loop, nr);
+                                if (r < 0 && r != -EBUSY)
+                                        return r;
+                        } else if (r != -EBUSY)
                                 return r;
                 }
 
@@ -214,6 +418,11 @@ int loop_device_make(
                         return -EBUSY;
 
                 loopdev = mfree(loopdev);
+
+                /* Wait some random time, to make collision less likely. Let's pick a random time in the
+                 * range 0ms…250ms, linearly scaled by the number of failed attempts. */
+                (void) usleep(random_u64() % (UINT64_C(10) * USEC_PER_MSEC +
+                                              UINT64_C(240) * USEC_PER_MSEC * n_attempts/64));
         }
 
         d = new(LoopDevice, 1);
index 16f215b059ab3fd68231b1321aaf841ebb0abc24..9538daea3116cc48cdf6e58df94e654303657fd9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "macro.h"
index 71d6a2c80bc3b5de37a03790120bc8b2403fb8b6..671a56b9e990f1f80332d7358c173b3eab04ce51 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 9fd45899c80d3a5e160ca4a2a4ee04481ba3900b..95a8f5cfbd4818739f0371fc836cf60dcf1b7029 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 7e3312835d71961fbce73b1a5a587371641df6aa..1f0b0b47303e16f084ae08395ca9eb25c05f3b71 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index 6f59a18fb69855d123397ffe8012d11ebfe34155..3f528ab060e2b29374bea3e3efbede103d140efb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdint.h>
index 926b4d42a02996ef93a207a6610904a04fa4adf2..11dffe99b2a2b6919a6b13dc352c92c6ee6d50b6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "conf-parser.h"
 #include "macvlan-util.h"
index 7670bbf4020e775ea0ff325573a78621728a1026..0d3a5f40506fc068ad70176d66331322a1bb6438 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <linux/if_link.h>
index cf23ad450c5ceb49b66fa9efd14604e77f4483b6..05cdffeec00da3073368e5e03e688cdae303239a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdlib.h>
index 3f409584e61511db467f68517b928573fae7963f..53165541ac875c3bad00ba50c7821e66826eff76 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 shared_sources = files('''
         acl-util.h
@@ -169,6 +169,8 @@ shared_sources = files('''
         module-util.h
         mount-util.c
         mount-util.h
+        net-condition.c
+        net-condition.h
         netif-naming-scheme.c
         netif-naming-scheme.h
         nscd-flush.c
@@ -189,10 +191,14 @@ shared_sources = files('''
         pkcs11-util.h
         pretty-print.c
         pretty-print.h
+        psi-util.c
+        psi-util.h
         ptyfwd.c
         ptyfwd.h
         pwquality-util.c
         pwquality-util.h
+        qrcode-util.c
+        qrcode-util.h
         reboot-util.c
         reboot-util.h
         resize-fs.c
@@ -302,13 +308,6 @@ if conf.get('HAVE_PAM') == 1
 '''.split())
 endif
 
-if conf.get('HAVE_QRENCODE') == 1
-        shared_sources += files('''
-        qrcode-util.c
-        qrcode-util.h
-'''.split())
-endif
-
 generate_ip_protocol_list = find_program('generate-ip-protocol-list.sh')
 ip_protocol_list_txt = custom_target(
         'ip-protocol-list.txt',
index 6289a7339910a719fc41f1c557e575bf10e908b5..ce10e60bb6b9f24d106ce42451adaf5c0bff8467 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "id128-util.h"
 #include "mkfs-util.h"
index 54e9b931e68bf49038bba50b0ed4496724986c81..7647afbfc70f1eba696364c154f1931d394ddaba 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index e1d394c0e1bc53538e30f39e67f8bef2cfca6737..587e6369fb89f8b2f08ede3ec20e86d1ee627126 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index c386c5b459219550391b34a54ce80390e035c36a..4db8c5f04ed6bf1ade57ba128180a938db8954aa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <libkmod.h>
index 83ce749d12782545d43a85dbb3c54c8db3191b5b..b19b3849aaa68b6cf378a067d12b202c197eb723 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdlib.h>
index ba5d6280d2d628232f506f847f15802f214f29f5..033fcd1f47a0008f14735109e2e142ccf657ea24 100644 (file)
@@ -1,10 +1,11 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <mntent.h>
 #include <stdio.h>
 #include <unistd.h>
 
+#include "alloc-util.h"
 #include "errno-util.h"
 #include "macro.h"
 
@@ -89,10 +90,10 @@ int mount_option_mangle(
 int mode_to_inaccessible_node(const char *runtime_dir, mode_t mode, char **dest);
 
 /* Useful for usage with _cleanup_(), unmounts, removes a directory and frees the pointer */
-static inline void umount_and_rmdir_and_free(char *p) {
+static inline char* umount_and_rmdir_and_free(char *p) {
         PROTECT_ERRNO;
         (void) umount_recursive(p, 0);
         (void) rmdir(p);
-        free(p);
+        return mfree(p);
 }
 DEFINE_TRIVIAL_CLEANUP_FUNC(char*, umount_and_rmdir_and_free);
diff --git a/src/shared/net-condition.c b/src/shared/net-condition.c
new file mode 100644 (file)
index 0000000..bdc8bc3
--- /dev/null
@@ -0,0 +1,428 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
+
+#include <netinet/ether.h>
+
+#include "condition.h"
+#include "env-util.h"
+#include "log.h"
+#include "net-condition.h"
+#include "network-util.h"
+#include "socket-util.h"
+#include "string-table.h"
+#include "strv.h"
+
+void net_match_clear(NetMatch *match) {
+        if (!match)
+                return;
+
+        match->mac = set_free_free(match->mac);
+        match->permanent_mac = set_free_free(match->permanent_mac);
+        match->path = strv_free(match->path);
+        match->driver = strv_free(match->driver);
+        match->iftype = strv_free(match->iftype);
+        match->ifname = strv_free(match->ifname);
+        match->property = strv_free(match->property);
+        match->wifi_iftype = strv_free(match->wifi_iftype);
+        match->ssid = strv_free(match->ssid);
+        match->bssid = set_free_free(match->bssid);
+}
+
+bool net_match_is_empty(const NetMatch *match) {
+        assert(match);
+
+        return
+                set_isempty(match->mac) &&
+                set_isempty(match->permanent_mac) &&
+                strv_isempty(match->path) &&
+                strv_isempty(match->driver) &&
+                strv_isempty(match->iftype) &&
+                strv_isempty(match->ifname) &&
+                strv_isempty(match->property) &&
+                strv_isempty(match->wifi_iftype) &&
+                strv_isempty(match->ssid) &&
+                set_isempty(match->bssid);
+}
+
+static bool net_condition_test_strv(char * const *patterns, const char *string) {
+        char * const *p;
+        bool match = false, has_positive_rule = false;
+
+        if (strv_isempty(patterns))
+                return true;
+
+        STRV_FOREACH(p, patterns) {
+                const char *q = *p;
+                bool invert;
+
+                invert = *q == '!';
+                q += invert;
+
+                if (!invert)
+                        has_positive_rule = true;
+
+                if (string && fnmatch(q, string, 0) == 0) {
+                        if (invert)
+                                return false;
+                        else
+                                match = true;
+                }
+        }
+
+        return has_positive_rule ? match : true;
+}
+
+static bool net_condition_test_ifname(char * const *patterns, const char *ifname, char * const *alternative_names) {
+        if (net_condition_test_strv(patterns, ifname))
+                return true;
+
+        char * const *p;
+        STRV_FOREACH(p, alternative_names)
+                if (net_condition_test_strv(patterns, *p))
+                        return true;
+
+        return false;
+}
+
+static int net_condition_test_property(char * const *match_property, sd_device *device) {
+        char * const *p;
+
+        if (strv_isempty(match_property))
+                return true;
+
+        STRV_FOREACH(p, match_property) {
+                _cleanup_free_ char *key = NULL;
+                const char *val, *dev_val;
+                bool invert, v;
+
+                invert = **p == '!';
+
+                val = strchr(*p + invert, '=');
+                if (!val)
+                        return -EINVAL;
+
+                key = strndup(*p + invert, val - *p - invert);
+                if (!key)
+                        return -ENOMEM;
+
+                val++;
+
+                v = device &&
+                        sd_device_get_property_value(device, key, &dev_val) >= 0 &&
+                        fnmatch(val, dev_val, 0) == 0;
+
+                if (invert ? v : !v)
+                        return false;
+        }
+
+        return true;
+}
+
+static const char *const wifi_iftype_table[NL80211_IFTYPE_MAX+1] = {
+        [NL80211_IFTYPE_ADHOC] = "ad-hoc",
+        [NL80211_IFTYPE_STATION] = "station",
+        [NL80211_IFTYPE_AP] = "ap",
+        [NL80211_IFTYPE_AP_VLAN] = "ap-vlan",
+        [NL80211_IFTYPE_WDS] = "wds",
+        [NL80211_IFTYPE_MONITOR] = "monitor",
+        [NL80211_IFTYPE_MESH_POINT] = "mesh-point",
+        [NL80211_IFTYPE_P2P_CLIENT] = "p2p-client",
+        [NL80211_IFTYPE_P2P_GO] = "p2p-go",
+        [NL80211_IFTYPE_P2P_DEVICE] = "p2p-device",
+        [NL80211_IFTYPE_OCB] = "ocb",
+        [NL80211_IFTYPE_NAN] = "nan",
+};
+
+DEFINE_PRIVATE_STRING_TABLE_LOOKUP_TO_STRING(wifi_iftype, enum nl80211_iftype);
+
+bool net_match_config(
+                const NetMatch *match,
+                sd_device *device,
+                const struct ether_addr *mac,
+                const struct ether_addr *permanent_mac,
+                const char *driver,
+                unsigned short iftype,
+                const char *ifname,
+                char * const *alternative_names,
+                enum nl80211_iftype wifi_iftype,
+                const char *ssid,
+                const struct ether_addr *bssid) {
+
+        _cleanup_free_ char *iftype_str;
+        const char *path = NULL;
+
+        assert(match);
+
+        iftype_str = link_get_type_string(device, iftype);
+
+        if (device) {
+                const char *mac_str;
+
+                (void) sd_device_get_property_value(device, "ID_PATH", &path);
+                if (!driver)
+                        (void) sd_device_get_property_value(device, "ID_NET_DRIVER", &driver);
+                if (!ifname)
+                        (void) sd_device_get_sysname(device, &ifname);
+                if (!mac &&
+                    sd_device_get_sysattr_value(device, "address", &mac_str) >= 0)
+                        mac = ether_aton(mac_str);
+        }
+
+        if (match->mac && (!mac || !set_contains(match->mac, mac)))
+                return false;
+
+        if (match->permanent_mac &&
+            (!permanent_mac ||
+             ether_addr_is_null(permanent_mac) ||
+             !set_contains(match->permanent_mac, permanent_mac)))
+                return false;
+
+        if (!net_condition_test_strv(match->path, path))
+                return false;
+
+        if (!net_condition_test_strv(match->driver, driver))
+                return false;
+
+        if (!net_condition_test_strv(match->iftype, iftype_str))
+                return false;
+
+        if (!net_condition_test_ifname(match->ifname, ifname, alternative_names))
+                return false;
+
+        if (!net_condition_test_property(match->property, device))
+                return false;
+
+        if (!net_condition_test_strv(match->wifi_iftype, wifi_iftype_to_string(wifi_iftype)))
+                return false;
+
+        if (!net_condition_test_strv(match->ssid, ssid))
+                return false;
+
+        if (match->bssid && (!bssid || !set_contains(match->bssid, bssid)))
+                return false;
+
+        return true;
+}
+
+int config_parse_net_condition(
+                const char *unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
+
+        ConditionType cond = ltype;
+        Condition **list = data, *c;
+        bool negate;
+
+        assert(filename);
+        assert(lvalue);
+        assert(rvalue);
+        assert(data);
+
+        if (isempty(rvalue)) {
+                *list = condition_free_list_type(*list, cond);
+                return 0;
+        }
+
+        negate = rvalue[0] == '!';
+        if (negate)
+                rvalue++;
+
+        c = condition_new(cond, rvalue, false, negate);
+        if (!c)
+                return log_oom();
+
+        /* Drop previous assignment. */
+        *list = condition_free_list_type(*list, cond);
+
+        LIST_PREPEND(conditions, *list, c);
+        return 0;
+}
+
+int config_parse_match_strv(
+                const char *unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
+
+        const char *p = rvalue;
+        char ***sv = data;
+        bool invert;
+        int r;
+
+        assert(filename);
+        assert(lvalue);
+        assert(rvalue);
+        assert(data);
+
+        if (isempty(rvalue)) {
+                *sv = strv_free(*sv);
+                return 0;
+        }
+
+        invert = *p == '!';
+        p += invert;
+
+        for (;;) {
+                _cleanup_free_ char *word = NULL, *k = NULL;
+
+                r = extract_first_word(&p, &word, NULL, EXTRACT_UNQUOTE|EXTRACT_RETAIN_ESCAPE);
+                if (r == 0)
+                        return 0;
+                if (r == -ENOMEM)
+                        return log_oom();
+                if (r < 0) {
+                        log_syntax(unit, LOG_WARNING, filename, line, r,
+                                   "Invalid syntax, ignoring: %s", rvalue);
+                        return 0;
+                }
+
+                if (invert) {
+                        k = strjoin("!", word);
+                        if (!k)
+                                return log_oom();
+                } else
+                        k = TAKE_PTR(word);
+
+                r = strv_consume(sv, TAKE_PTR(k));
+                if (r < 0)
+                        return log_oom();
+        }
+}
+
+int config_parse_match_ifnames(
+                const char *unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
+
+        const char *p = rvalue;
+        char ***sv = data;
+        bool invert;
+        int r;
+
+        assert(filename);
+        assert(lvalue);
+        assert(rvalue);
+        assert(data);
+
+        if (isempty(rvalue)) {
+                *sv = strv_free(*sv);
+                return 0;
+        }
+
+        invert = *p == '!';
+        p += invert;
+
+        for (;;) {
+                _cleanup_free_ char *word = NULL, *k = NULL;
+
+                r = extract_first_word(&p, &word, NULL, 0);
+                if (r == 0)
+                        return 0;
+                if (r == -ENOMEM)
+                        return log_oom();
+                if (r < 0) {
+                        log_syntax(unit, LOG_WARNING, filename, line, 0,
+                                   "Failed to parse interface name list, ignoring: %s", rvalue);
+                        return 0;
+                }
+
+                if (!ifname_valid_full(word, ltype)) {
+                        log_syntax(unit, LOG_WARNING, filename, line, 0,
+                                   "Interface name is not valid or too long, ignoring assignment: %s", word);
+                        continue;
+                }
+
+                if (invert) {
+                        k = strjoin("!", word);
+                        if (!k)
+                                return log_oom();
+                } else
+                        k = TAKE_PTR(word);
+
+                r = strv_consume(sv, TAKE_PTR(k));
+                if (r < 0)
+                        return log_oom();
+        }
+}
+
+int config_parse_match_property(
+                const char *unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
+
+        const char *p = rvalue;
+        char ***sv = data;
+        bool invert;
+        int r;
+
+        assert(filename);
+        assert(lvalue);
+        assert(rvalue);
+        assert(data);
+
+        if (isempty(rvalue)) {
+                *sv = strv_free(*sv);
+                return 0;
+        }
+
+        invert = *p == '!';
+        p += invert;
+
+        for (;;) {
+                _cleanup_free_ char *word = NULL, *k = NULL;
+
+                r = extract_first_word(&p, &word, NULL, EXTRACT_CUNESCAPE|EXTRACT_UNQUOTE);
+                if (r == 0)
+                        return 0;
+                if (r == -ENOMEM)
+                        return log_oom();
+                if (r < 0) {
+                        log_syntax(unit, LOG_WARNING, filename, line, 0,
+                                   "Invalid syntax, ignoring: %s", rvalue);
+                        return 0;
+                }
+
+                if (!env_assignment_is_valid(word)) {
+                        log_syntax(unit, LOG_WARNING, filename, line, 0,
+                                   "Invalid property or value, ignoring assignment: %s", word);
+                        continue;
+                }
+
+                if (invert) {
+                        k = strjoin("!", word);
+                        if (!k)
+                                return log_oom();
+                } else
+                        k = TAKE_PTR(word);
+
+                r = strv_consume(sv, TAKE_PTR(k));
+                if (r < 0)
+                        return log_oom();
+        }
+}
diff --git a/src/shared/net-condition.h b/src/shared/net-condition.h
new file mode 100644 (file)
index 0000000..6105884
--- /dev/null
@@ -0,0 +1,45 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
+#pragma once
+
+#include <linux/nl80211.h>
+#include <stdbool.h>
+
+#include "sd-device.h"
+
+#include "conf-parser.h"
+#include "ether-addr-util.h"
+#include "set.h"
+
+typedef struct NetMatch {
+        Set *mac;
+        Set *permanent_mac;
+        char **path;
+        char **driver;
+        char **iftype;
+        char **ifname;
+        char **property;
+        char **wifi_iftype;
+        char **ssid;
+        Set *bssid;
+} NetMatch;
+
+void net_match_clear(NetMatch *match);
+bool net_match_is_empty(const NetMatch *match);
+
+bool net_match_config(
+                const NetMatch *match,
+                sd_device *device,
+                const struct ether_addr *mac,
+                const struct ether_addr *permanent_mac,
+                const char *driver,
+                unsigned short iftype,
+                const char *ifname,
+                char * const *alternative_names,
+                enum nl80211_iftype wifi_iftype,
+                const char *ssid,
+                const struct ether_addr *bssid);
+
+CONFIG_PARSER_PROTOTYPE(config_parse_net_condition);
+CONFIG_PARSER_PROTOTYPE(config_parse_match_strv);
+CONFIG_PARSER_PROTOTYPE(config_parse_match_ifnames);
+CONFIG_PARSER_PROTOTYPE(config_parse_match_property);
index 710b6376daf19527f946def2fd6021ae39cc4fef..df520ab89ed31ec015026eb4f4fcf73da08d9736 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "netif-naming-scheme.h"
@@ -12,6 +12,7 @@ static const NamingScheme naming_schemes[] = {
         { "v241", NAMING_V241 },
         { "v243", NAMING_V243 },
         { "v245", NAMING_V245 },
+        { "v247", NAMING_V247 },
         /* … add more schemes here, as the logic to name devices is updated … */
 };
 
index 6fb26d5cab4f276e0ba50f908827ed94485a87e2..503a74ea33eb9abeb772158fee6f15d09a9a2db0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
@@ -31,6 +31,7 @@ typedef enum NamingSchemeFlags {
         NAMING_NETDEVSIM           = 1 << 6, /* Generate names for netdevsim devices, see eaa9d507d855 */
         NAMING_LABEL_NOPREFIX      = 1 << 7, /* Don't prepend ID_NET_LABEL_ONBOARD with interface type prefix */
         NAMING_NSPAWN_LONG_HASH    = 1 << 8, /* Shorten nspawn interfaces by including 24bit hash, instead of simple truncation  */
+        NAMING_BRIDGE_NO_SLOT      = 1 << 9, /* Don't use PCI hotplug slot information if the corresponding device is a PCI bridge */
 
         /* And now the masks that combine the features above */
         NAMING_V238 = 0,
@@ -39,6 +40,7 @@ typedef enum NamingSchemeFlags {
         NAMING_V241 = NAMING_V240 | NAMING_STABLE_VIRTUAL_MACS,
         NAMING_V243 = NAMING_V241 | NAMING_NETDEVSIM | NAMING_LABEL_NOPREFIX,
         NAMING_V245 = NAMING_V243 | NAMING_NSPAWN_LONG_HASH,
+        NAMING_V247 = NAMING_V245 | NAMING_BRIDGE_NO_SLOT,
 
         _NAMING_SCHEME_FLAGS_INVALID = -1,
 } NamingSchemeFlags;
index 10fdbaf326d06f24bd80e89a024efd1a6f34a270..dfc47c423441a1aea646cac6c7c9fcd2f12141da 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #include <sys/poll.h>
 
 #include "fd-util.h"
index 22774bf4b74e24cb854f1f2a113f1cdf94b7b9fb..5aafa9a24e90fda02e90fde8b8ad78582e1e688b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int nscd_flush_cache(char **databases);
index 4dbd18b86833639437f40332045e575525eeaae9..2845041cf49c056d4b93c1883eacf6580b64a4d3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index 0aeb0bc89143921538323d86eb12bf74efc718e6..3d774c755ca4bb08de058a9c4c95e98334824421 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "missing_sched.h"
index 3ec8ffc5b267f1d38480808b34274d612b835728..7e41d686628467676da0f14cd25a0be1eff1082c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sched.h>
index 2a9ced74e8d40aecca1988222f4245d8ab9a886c..2f736c9c350fd8a283b638c4d2ca0b4f5cf1ec37 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "cpu-set-util.h"
index 2d14a38dfeb38b3e0ef8fd40803d2fb8255e402f..b607aacf576c71ab186877ea0f6f57ffc0b315cd 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "fd-util.h"
 #include "fs-util.h"
index 90bdfc79be06b0deaee1035baa45046cc788e69c..587af7b01cd217a5409bd124d2b30e8899b47fd3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/types.h>
index a7dab530e4c83349a3e86ebb3ffd735e322857e9..1b49834dd8b2d4b33428d0b9f8dfd29b3bf96e92 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #if HAVE_OPENSSL
index 042e77c8c7f758ec605a7bbf60ac419f7bff5fbd..3b7e4958464c0e380803eeb58e3ed7f72a760887 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "env-file.h"
index b54bb0916dbf3e5e038c1c1723c7d8509ab1c0b0..1d9b0b146b3a22f9718072d115cbac3313a2c738 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdio.h>
index 107b345538cf7e230f63427f9eec9a7d4ad4239f..1645b756df930f007fd888de190be7848fbea6df 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "output-mode.h"
 #include "string-table.h"
index 1b4765b3ec10e41faa2a0fafc55acc1151beb9c3..a879054b67618957cf51558046f450b042dcda98 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "json.h"
index e03be6d23b2d7f24264412881b65f889fd607c3f..f689d9f28f0f6f287641629ac361eecab1ffa6fb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stddef.h>
@@ -8,7 +8,10 @@
 #include <sys/prctl.h>
 #include <unistd.h>
 
+#include "sd-login.h"
+
 #include "copy.h"
+#include "env-util.h"
 #include "fd-util.h"
 #include "fileio.h"
 #include "io-util.h"
@@ -152,8 +155,7 @@ int pager_open(PagerFlags flags) {
                         _exit(EXIT_FAILURE);
                 }
 
-                /* Initialize a good charset for less. This is
-                 * particularly important if we output UTF-8
+                /* Initialize a good charset for less. This is particularly important if we output UTF-8
                  * characters. */
                 less_charset = getenv("SYSTEMD_LESSCHARSET");
                 if (!less_charset && is_locale_utf8())
@@ -164,7 +166,40 @@ int pager_open(PagerFlags flags) {
                         _exit(EXIT_FAILURE);
                 }
 
-                if (pager_args) {
+                /* People might invoke us from sudo, don't needlessly allow less to be a way to shell out
+                 * privileged stuff. If the user set $SYSTEMD_PAGERSECURE, trust their configuration of the
+                 * pager. If they didn't, use secure mode when under euid is changed. If $SYSTEMD_PAGERSECURE
+                 * wasn't explicitly set, and we autodetect the need for secure mode, only use the pager we
+                 * know to be good. */
+                int use_secure_mode = getenv_bool_secure("SYSTEMD_PAGERSECURE");
+                bool trust_pager = use_secure_mode >= 0;
+                if (use_secure_mode == -ENXIO) {
+                        uid_t uid;
+
+                        r = sd_pid_get_owner_uid(0, &uid);
+                        if (r < 0)
+                                log_debug_errno(r, "sd_pid_get_owner_uid() failed, enabling pager secure mode: %m");
+
+                        use_secure_mode = r < 0 || uid != geteuid();
+
+                } else if (use_secure_mode < 0) {
+                        log_warning_errno(use_secure_mode, "Unable to parse $SYSTEMD_PAGERSECURE, assuming true: %m");
+                        use_secure_mode = true;
+                }
+
+                /* We generally always set variables used by less, even if we end up using a different pager.
+                 * They shouldn't hurt in any case, and ideally other pagers would look at them too. */
+                r = set_unset_env("LESSSECURE", use_secure_mode ? "1" : NULL, true);
+                if (r < 0) {
+                        log_error_errno(r, "Failed to adjust environment variable LESSSECURE: %m");
+                        _exit(EXIT_FAILURE);
+                }
+
+                if (trust_pager && pager_args) { /* The pager config might be set globally, and we cannot
+                                                  * know if the user adjusted it to be appropriate for the
+                                                  * secure mode. Thus, start the pager specified through
+                                                  * envvars only when $SYSTEMD_PAGERSECURE was explicitly set
+                                                  * as well. */
                         r = loop_write(exe_name_pipe[1], pager_args[0], strlen(pager_args[0]) + 1, false);
                         if (r < 0) {
                                 log_error_errno(r, "Failed to write pager name to socket: %m");
@@ -176,13 +211,14 @@ int pager_open(PagerFlags flags) {
                                        "Failed to execute '%s', using fallback pagers: %m", pager_args[0]);
                 }
 
-                /* Debian's alternatives command for pagers is
-                 * called 'pager'. Note that we do not call
-                 * sensible-pagers here, since that is just a
-                 * shell script that implements a logic that
-                 * is similar to this one anyway, but is
-                 * Debian-specific. */
+                /* Debian's alternatives command for pagers is called 'pager'. Note that we do not call
+                 * sensible-pagers here, since that is just a shell script that implements a logic that is
+                 * similar to this one anyway, but is Debian-specific. */
                 FOREACH_STRING(exe, "pager", "less", "more") {
+                        /* Only less implements secure mode right now. */
+                        if (use_secure_mode && !streq(exe, "less"))
+                                continue;
+
                         r = loop_write(exe_name_pipe[1], exe, strlen(exe) + 1, false);
                         if (r  < 0) {
                                 log_error_errno(r, "Failed to write pager name to socket: %m");
@@ -193,6 +229,7 @@ int pager_open(PagerFlags flags) {
                                        "Failed to execute '%s', using next fallback pager: %m", exe);
                 }
 
+                /* Our builtin is also very secure. */
                 r = loop_write(exe_name_pipe[1], "(built-in)", strlen("(built-in)") + 1, false);
                 if (r < 0) {
                         log_error_errno(r, "Failed to write pager name to socket: %m");
index 8299e23856591dc090295596c41ecbba2cf97d19..b3b1b4f6b0720ee6c811227bc050e967a0ac33ea 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index f000798ce0683825b8dc2dad25d753e9f1f9d416..621e7fe802e3440cb6b6545f2cde7df4b00a1851 100644 (file)
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
 #include <security/pam_ext.h>
 #include <syslog.h>
 #include <stdlib.h>
index 26d07b7f0cbedb02e252200ef03ade6b5ddb6585..41f1835b3c712fd9f161eb3948ce4209b09df67c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <security/pam_modules.h>
index a3629175239e26744ab811570d149dfd7c1512f4..54433c79b851f4863d649bdc3472645b95089ed6 100644 (file)
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
 #pragma once
 
 #include <inttypes.h>
index 400cebb66fc953c51e7f037996d6d28ab5f9c05e..e74f0be26062713040a697b0a2886b7f40cee3aa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 
index 959e7c3e0d9c90f63760ab1898aae978beb81dcc..f14607de8406b84fa1b8b786936456891f2e4e72 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index f690f334a2afe6d0914abe1b7b7e4bb4107e3c9f..0f02f327601171d77aa690ca01063984aff4a668 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/utsname.h>
 #include <errno.h>
 bool urlify_enabled(void) {
         static int cached_urlify_enabled = -1;
 
-        /* Unfortunately 'less' doesn't support links like this yet 😭, hence let's disable this as long as there's a
-         * pager in effect. Let's drop this check as soon as less got fixed a and enough time passed so that it's safe
-         * to assume that a link-enabled 'less' version has hit most installations. */
-
         if (cached_urlify_enabled < 0) {
                 int val;
 
@@ -32,7 +28,7 @@ bool urlify_enabled(void) {
                 if (val >= 0)
                         cached_urlify_enabled = val;
                 else
-                        cached_urlify_enabled = colors_enabled() && !pager_have();
+                        cached_urlify_enabled = colors_enabled();
         }
 
         return cached_urlify_enabled;
index b3057ae6b8868fb5f98c6177f32d93bc0c5f69d1..4619f4e4d7fe97e52a0afc09e395922afd42c09e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 void print_separator(void);
diff --git a/src/shared/psi-util.c b/src/shared/psi-util.c
new file mode 100644 (file)
index 0000000..7a184d5
--- /dev/null
@@ -0,0 +1,118 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#include <stdio.h>
+#include <unistd.h>
+
+#include "alloc-util.h"
+#include "extract-word.h"
+#include "fd-util.h"
+#include "fileio.h"
+#include "parse-util.h"
+#include "psi-util.h"
+#include "string-util.h"
+#include "stat-util.h"
+#include "strv.h"
+
+int read_resource_pressure(const char *path, PressureType type, ResourcePressure *ret) {
+        _cleanup_free_ char *line = NULL;
+        _cleanup_fclose_ FILE *f = NULL;
+        unsigned field_filled = 0;
+        ResourcePressure rp = {};
+        const char *t, *cline;
+        char *word;
+        int r;
+
+        assert(path);
+        assert(IN_SET(type, PRESSURE_TYPE_SOME, PRESSURE_TYPE_FULL));
+        assert(ret);
+
+        if (type == PRESSURE_TYPE_SOME)
+                t = "some";
+        else if (type == PRESSURE_TYPE_FULL)
+                t = "full";
+        else
+                return -EINVAL;
+
+        r = fopen_unlocked(path, "re", &f);
+         if (r < 0)
+                 return r;
+
+        for (;;) {
+                _cleanup_free_ char *l = NULL;
+                char *w;
+
+                r = read_line(f, LONG_LINE_MAX, &l);
+                if (r < 0)
+                        return r;
+                if (r == 0)
+                        break;
+
+                w = first_word(l, t);
+                if (w) {
+                        line = TAKE_PTR(l);
+                        cline = w;
+                        break;
+                }
+        }
+
+        if (!line)
+                return -ENODATA;
+
+        /* extracts either avgX=Y.Z or total=X */
+        while ((r = extract_first_word(&cline, &word, NULL, 0)) > 0) {
+                _cleanup_free_ char *w = word;
+                const char *v;
+
+                if ((v = startswith(w, "avg10="))) {
+                        if (field_filled & (1U << 0))
+                                return -EINVAL;
+
+                        field_filled |= 1U << 0;
+                        r = parse_loadavg_fixed_point(v, &rp.avg10);
+                } else if ((v = startswith(w, "avg60="))) {
+                        if (field_filled & (1U << 1))
+                                return -EINVAL;
+
+                        field_filled |= 1U << 1;
+                        r = parse_loadavg_fixed_point(v, &rp.avg60);
+                } else if ((v = startswith(w, "avg300="))) {
+                        if (field_filled & (1U << 2))
+                                return -EINVAL;
+
+                        field_filled |= 1U << 2;
+                        r = parse_loadavg_fixed_point(v, &rp.avg300);
+                } else if ((v = startswith(w, "total="))) {
+                        if (field_filled & (1U << 3))
+                                return -EINVAL;
+
+                        field_filled |= 1U << 3;
+                        r = safe_atou64(v, &rp.total);
+                } else
+                        continue;
+
+                if (r < 0)
+                        return r;
+        }
+
+        if (r < 0)
+                return r;
+
+        if (field_filled != 15U)
+                return -EINVAL;
+
+        *ret = rp;
+        return 0;
+}
+
+int is_pressure_supported(void) {
+        const char *p;
+
+        FOREACH_STRING(p, "/proc/pressure/cpu", "/proc/pressure/io", "/proc/pressure/memory")
+                if (access(p, F_OK) < 0) {
+                        if (errno == ENOENT)
+                                return 0;
+                        return -errno;
+                }
+
+        return 1;
+}
diff --git a/src/shared/psi-util.h b/src/shared/psi-util.h
new file mode 100644 (file)
index 0000000..415fbbd
--- /dev/null
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#pragma once
+
+#include <stdbool.h>
+
+#include "parse-util.h"
+#include "time-util.h"
+
+typedef enum PressureType {
+        PRESSURE_TYPE_SOME,
+        PRESSURE_TYPE_FULL,
+} PressureType;
+
+/* Averages are stored in fixed-point with 11 bit fractions */
+typedef struct ResourcePressure {
+        loadavg_t avg10;
+        loadavg_t avg60;
+        loadavg_t avg300;
+        usec_t total;
+} ResourcePressure;
+
+/** Upstream 4.20+ format
+ *
+ *  some avg10=0.22 avg60=0.17 avg300=1.11 total=58761459
+ *  full avg10=0.23 avg60=0.16 avg300=1.08 total=58464525
+ */
+int read_resource_pressure(const char *path, PressureType type, ResourcePressure *ret);
+
+/* Was the kernel compiled with CONFIG_PSI=y? 1 if yes, 0 if not, negative on error. */
+int is_pressure_supported(void);
index 6bcdfff41a730c33f6b345d662135bf3b98d3ce7..754b4f5a94f92d3395601f4f95b302ba7cd7ea48 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 887d3cba53a0b651429b8f04941203dae9e3dffd..f0ae6e949d04b76d8b5f83c73e94d73b67ecad9f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 67332833a5fa34ec5ba9de934b2df5855042a2c7..4000bef89e7a90cfb3755bdf1c193ce034ccfba9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
index a49de07990741ebdc23bdd3c2ab5daa0133b123f..de288bb017c4361e3a1696278a728d96ce8c3bdd 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "macro.h"
index a545daaef3fe4af8eead1002515532da6a3f4e6e..7050e186b75aa3e65d64f5498883a3dc58ede0cc 100644 (file)
@@ -1,25 +1,29 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
 #include "qrcode-util.h"
+
+#if HAVE_QRENCODE
+#include <qrencode.h>
+
+#include "dlfcn-util.h"
+#include "locale-util.h"
 #include "terminal-util.h"
 
 #define ANSI_WHITE_ON_BLACK "\033[40;37;1m"
 
 static void print_border(FILE *output, unsigned width) {
-        unsigned x, y;
-
         /* Four rows of border */
-        for (y = 0; y < 4; y += 2) {
+        for (unsigned y = 0; y < 4; y += 2) {
                 fputs(ANSI_WHITE_ON_BLACK, output);
 
-                for (x = 0; x < 4 + width + 4; x++)
+                for (unsigned x = 0; x < 4 + width + 4; x++)
                         fputs("\342\226\210", output);
 
                 fputs(ANSI_NORMAL "\n", output);
         }
 }
 
-void write_qrcode(FILE *output, QRcode *qr) {
-        unsigned x, y;
-
+static void write_qrcode(FILE *output, QRcode *qr) {
         assert(qr);
 
         if (!output)
@@ -27,17 +31,15 @@ void write_qrcode(FILE *output, QRcode *qr) {
 
         print_border(output, qr->width);
 
-        for (y = 0; y < (unsigned) qr->width; y += 2) {
-                const uint8_t *row1, *row2;
-
-                row1 = qr->data + qr->width * y;
-                row2 = row1 + qr->width;
+        for (unsigned y = 0; y < (unsigned) qr->width; y += 2) {
+                const uint8_t *row1 = qr->data + qr->width * y;
+                const uint8_t *row2 = row1 + qr->width;
 
                 fputs(ANSI_WHITE_ON_BLACK, output);
-                for (x = 0; x < 4; x++)
+                for (unsigned x = 0; x < 4; x++)
                         fputs("\342\226\210", output);
 
-                for (x = 0; x < (unsigned) qr->width; x ++) {
+                for (unsigned x = 0; x < (unsigned) qr->width; x++) {
                         bool a, b;
 
                         a = row1[x] & 1;
@@ -53,7 +55,7 @@ void write_qrcode(FILE *output, QRcode *qr) {
                                 fputs("\342\226\210", output);
                 }
 
-                for (x = 0; x < 4; x++)
+                for (unsigned x = 0; x < 4; x++)
                         fputs("\342\226\210", output);
                 fputs(ANSI_NORMAL "\n", output);
         }
@@ -61,3 +63,45 @@ void write_qrcode(FILE *output, QRcode *qr) {
         print_border(output, qr->width);
         fflush(output);
 }
+
+int print_qrcode(FILE *out, const char *header, const char *string) {
+        QRcode* (*sym_QRcode_encodeString)(const char *string, int version, QRecLevel level, QRencodeMode hint, int casesensitive);
+        void (*sym_QRcode_free)(QRcode *qrcode);
+        _cleanup_(dlclosep) void *dl = NULL;
+        QRcode* qr;
+        int r;
+
+        /* If this is not an UTF-8 system or ANSI colors aren't supported/disabled don't print any QR
+         * codes */
+        if (!is_locale_utf8() || !colors_enabled())
+                return -EOPNOTSUPP;
+
+        dl = dlopen("libqrencode.so.4", RTLD_LAZY);
+        if (!dl)
+                return log_debug_errno(SYNTHETIC_ERRNO(EOPNOTSUPP),
+                                       "QRCODE support is not installed: %s", dlerror());
+
+        r = dlsym_many_and_warn(
+                        dl,
+                        LOG_DEBUG,
+                        &sym_QRcode_encodeString, "QRcode_encodeString",
+                        &sym_QRcode_free, "QRcode_free",
+                        NULL);
+        if (r < 0)
+                return r;
+
+        qr = sym_QRcode_encodeString(string, 0, QR_ECLEVEL_L, QR_MODE_8, 0);
+        if (!qr)
+                return -ENOMEM;
+
+        if (header)
+                fprintf(out, "\n%s:\n\n", header);
+
+        write_qrcode(out, qr);
+
+        fputc('\n', out);
+
+        sym_QRcode_free(qr);
+        return 0;
+}
+#endif
index 9a21ffd7fe654b0355d73082b89a630795d3219b..6fc45c93d1a1360f50be6064c120f8e2b1daa2d8 100644 (file)
@@ -1,9 +1,13 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
-#pragma once
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#if HAVE_QRENCODE
-#include <qrencode.h>
+#pragma once
 #include <stdio.h>
+#include <errno.h>
 
-void write_qrcode(FILE *output, QRcode *qr);
+#if HAVE_QRENCODE
+int print_qrcode(FILE *out, const char *header, const char *string);
+#else
+static inline int print_qrcode(FILE *out, const char *header, const char *string) {
+        return -EOPNOTSUPP;
+}
 #endif
index 888f685aed9ee678fa7f2774fa70265a382ac2a5..756f9d30e0becb51ff9018e957d4c2538134a487 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <unistd.h>
index 1e98ee1dba58557d471cb067acd49b7577197796..bbca8b858d7018bab892006fb9bebece68b40075 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int update_reboot_parameter_and_warn(const char *parameter, bool keep);
index 24a17a2ffef8873aae63155a1ba43c0cd7a1a22f..33cb78babfb83c23fe2692813c04256c52a2a432 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/btrfs.h>
 #include <linux/magic.h>
index 92b41d318c15ea4c974ea83aad0c6525a3581362..8831fd8b409069bb312e8cc53f4539dc3a5b9527 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index 615cb6d852f8290e7440684d9df0af7ca2f94919..1023b62499b3f05f5004e66a06175470b515af31 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "conf-parser.h"
 #include "resolve-util.h"
index a7a9c77bdfc83d89c5893e7bbd5d4f788cba141a..4ea24a60b3be84e4b02c04e854148b5210098886 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "conf-parser.h"
index 4a541111f96fab5950a18ff254c2653964d5226f..ccae9d4f143bb409dbd8af580212974e48b8ee1e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -259,10 +259,20 @@ static bool is_seccomp_filter_available(void) {
 bool is_seccomp_available(void) {
         static int cached_enabled = -1;
 
-        if (cached_enabled < 0)
-                cached_enabled =
-                        is_basic_seccomp_available() &&
-                        is_seccomp_filter_available();
+        if (cached_enabled < 0) {
+                int b;
+
+                b = getenv_bool_secure("SYSTEMD_SECCOMP");
+                if (b != 0) {
+                        if (b < 0 && b != -ENXIO) /* ENXIO: env var unset */
+                                log_debug_errno(b, "Failed to parse $SYSTEMD_SECCOMP value, ignoring.");
+
+                        cached_enabled =
+                                is_basic_seccomp_available() &&
+                                is_seccomp_filter_available();
+                } else
+                        cached_enabled = false;
+        }
 
         return cached_enabled;
 }
@@ -272,6 +282,7 @@ const SyscallFilterSet syscall_filter_sets[_SYSCALL_FILTER_SET_MAX] = {
                 .name = "@default",
                 .help = "System calls that are always permitted",
                 .value =
+                "brk\0"
                 "cacheflush\0"
                 "clock_getres\0"
                 "clock_getres_time64\0"
@@ -309,6 +320,9 @@ const SyscallFilterSet syscall_filter_sets[_SYSCALL_FILTER_SET_MAX] = {
                 "getuid\0"
                 "getuid32\0"
                 "membarrier\0"
+                "mmap\0"
+                "mmap2\0"
+                "munmap\0"
                 "nanosleep\0"
                 "pause\0"
                 "prlimit64\0"
@@ -383,7 +397,6 @@ const SyscallFilterSet syscall_filter_sets[_SYSCALL_FILTER_SET_MAX] = {
                 "clock_settime\0"
                 "clock_settime64\0"
                 "settimeofday\0"
-                "stime\0"
         },
         [SYSCALL_FILTER_SET_CPU_EMULATION] = {
                 .name = "@cpu-emulation",
@@ -459,9 +472,6 @@ const SyscallFilterSet syscall_filter_sets[_SYSCALL_FILTER_SET_MAX] = {
                 "mkdirat\0"
                 "mknod\0"
                 "mknodat\0"
-                "mmap\0"
-                "mmap2\0"
-                "munmap\0"
                 "newfstatat\0"
                 "oldfstat\0"
                 "oldlstat\0"
@@ -639,6 +649,7 @@ const SyscallFilterSet syscall_filter_sets[_SYSCALL_FILTER_SET_MAX] = {
                 "security\0"
                 "sgetmask\0"
                 "ssetmask\0"
+                "stime\0"
                 "stty\0"
                 "sysfs\0"
                 "tuxcall\0"
@@ -834,7 +845,6 @@ const SyscallFilterSet syscall_filter_sets[_SYSCALL_FILTER_SET_MAX] = {
                 "@signal\0"
                 "@sync\0"
                 "@timer\0"
-                "brk\0"
                 "capget\0"
                 "capset\0"
                 "copy_file_range\0"
@@ -1384,9 +1394,6 @@ int seccomp_restrict_address_families(Set *address_families, bool allow_list) {
                 case SCMP_ARCH_X32:
                 case SCMP_ARCH_ARM:
                 case SCMP_ARCH_AARCH64:
-                case SCMP_ARCH_PPC:
-                case SCMP_ARCH_PPC64:
-                case SCMP_ARCH_PPC64LE:
                 case SCMP_ARCH_MIPSEL64N32:
                 case SCMP_ARCH_MIPS64N32:
                 case SCMP_ARCH_MIPSEL64:
@@ -1403,6 +1410,9 @@ int seccomp_restrict_address_families(Set *address_families, bool allow_list) {
                 case SCMP_ARCH_X86:
                 case SCMP_ARCH_MIPSEL:
                 case SCMP_ARCH_MIPS:
+                case SCMP_ARCH_PPC:
+                case SCMP_ARCH_PPC64:
+                case SCMP_ARCH_PPC64LE:
                 default:
                         /* These we either know we don't support (i.e. are the ones that do use socketcall()), or we
                          * don't know */
index ff3b96df4bb4ab4ef08c517a37f22739e2ed1d0f..610597127e4e4810b0d7a2fcf46d271378e2e982 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <seccomp.h>
index b2abaf4f526f92ef2d23ec456e870e6aa8defdf5..c867807bec7cb85d94d3270443bc54889b48b9f0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdio.h>
index b5ec6ee0e683e54af59fd777800bd8acb3cd38c3..f2e65cfcb09e3eee161e736a546135f8c0aedc3a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "missing_securebits.h"
index 00b70a777ee3a10aca42a701081758a99d32e434..45f57d6a5316ef93a70221b1be46f837880c175d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 
index 9e61c825aa95ebc1feceb4e0bc2cf91d1fea7cdb..6d4f1ef4181bbfe7e13ed349ab242e54e5db5674 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdio.h>
index c9b684fc05ea440f43fbcfca3b02413ab0f57e9d..092be6ee7f620ba062b41ae99a66a280b4992c2c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 #include <stdio.h>
index 928c5961e7a9ec432a826f2eeaf12d3ac5ddb874..360341fb2f4e535a5d09741e28bf8995d72f30a1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "bus-object.h"
index 134cedaf8b65af8671ad79ed9953d2385a53dc57..cea51482deec43476c37f4fc0b913fff59dd9dfa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2018 Dell Inc.
 ***/
index 86dfbf19be00802ae515684c86e09604aef73f95..4b30e6db53c5640af0d463c8ad0c8e9f1a98a72e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <linux/fiemap.h>
index 23970dbe55607ab6d26ce115f079976cd23c5a64..4a7007d06e509d3c7f6a0957b082c133d13e4f8e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <arpa/inet.h>
 #include <errno.h>
index e6cd7d9bf190aeac8752911d2934911a605e3e94..eac599159db82e49df9411c7cf154a3220980214 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-netlink.h"
index ddaebf0f61ad88eb2391ed819585e15453108728..1f07b198fa151ba898e525efc6ab90853b43741d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <signal.h>
 #include <stdlib.h>
index 97b12fe2685f201b7c646598796ca9dd48babfea..a76cdb11fea3f0df804f7a76f547af1a7e765745 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 4d6c0cae6caf1a8f359b4cc6cdc457f98eb3c1f2..a0024eb2ea00084eeb1f9d09e117be32c9f001c5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <poll.h>
index 56b0175944e5b7607664877e3912558384abf4f1..325dfdde466ec6de5470a594f0e10f3bc5414167 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 112cf6f8fb524dae0a7e10590145604694d92134..86731f8cd235028052705595384cdb7f5c295293 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdbool.h>
index 50c6cbd6ab466644dcf59f58a9f6c92be9a1ec9d..1323b41d98567c52bb542c40355779c1c5c7d1c2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "string-util.h"
@@ -36,6 +36,54 @@ int specifier_user_shell(char specifier, const void *data, const void *userdata,
 int specifier_tmp_dir(char specifier, const void *data, const void *userdata, char **ret);
 int specifier_var_tmp_dir(char specifier, const void *data, const void *userdata, char **ret);
 
+/* Typically, in places where one of the above specifier is to be resolved the other similar ones are to be
+ * resolved, too. Hence let's define common macros for the relevant array entries.
+ *
+ * COMMON_SYSTEM_SPECIFIERS:
+ * %a: the native userspace architecture
+ * %b: the boot ID of the running system
+ * %B: the OS build ID, according to /etc/os-release
+ * %H: the hostname of the running system
+ * %l: the short hostname of the running system
+ * %m: the machine ID of the running system
+ * %o: the OS ID according to /etc/os-release
+ * %v: the kernel version
+ * %w: the OS version ID, according to /etc/os-release
+ * %W: the OS variant ID, according to /etc/os-release
+ *
+ * COMMON_CREDS_SPECIFIERS:
+ * %g: the groupname of the running user
+ * %G: the GID of the running user
+ * %u: the username of the running user
+ * %U: the UID of the running user
+ *
+ * COMMON_TMP_SPECIFIERS:
+ * %T: the temporary directory (e.g. /tmp, or $TMPDIR, $TEMP, $TMP)
+ * %V: the temporary directory for large, persistent stuff (e.g. /var/tmp, or $TMPDIR, $TEMP, $TMP)
+ */
+
+#define COMMON_SYSTEM_SPECIFIERS                  \
+        { 'a', specifier_architecture,    NULL }, \
+        { 'b', specifier_boot_id,         NULL }, \
+        { 'B', specifier_os_build_id,     NULL }, \
+        { 'H', specifier_host_name,       NULL }, \
+        { 'l', specifier_short_host_name, NULL }, \
+        { 'm', specifier_machine_id,      NULL }, \
+        { 'o', specifier_os_id,           NULL }, \
+        { 'v', specifier_kernel_release,  NULL }, \
+        { 'w', specifier_os_version_id,   NULL }, \
+        { 'W', specifier_os_variant_id,   NULL }
+
+#define COMMON_CREDS_SPECIFIERS                   \
+        { 'g', specifier_group_name,      NULL }, \
+        { 'G', specifier_group_id,        NULL }, \
+        { 'u', specifier_user_name,       NULL }, \
+        { 'U', specifier_user_id,         NULL }
+
+#define COMMON_TMP_SPECIFIERS                     \
+        { 'T', specifier_tmp_dir,         NULL }, \
+        { 'V', specifier_var_tmp_dir,     NULL }
+
 static inline char* specifier_escape(const char *string) {
         return strreplace(string, "%", "%%");
 }
index bd89cb4ef11f4877b82681ba74bc05e1051a4f4b..e0dd17a2f855dc857dced74312c4003fe67a9498 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index f4d48cb431d5d10598777b3eac540cb8773c7084..4e04283e530fa93ee1de4aadca6a4a463837ab73 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 40d18a8894072b74f6457608c238dfd907ec1efe..f1b7e29d507b6eff693f751f70fb21e534ce6489 100644 (file)
@@ -392,6 +392,7 @@ pread64
 preadv
 preadv2
 prlimit64
+process_madvise
 process_vm_readv
 process_vm_writev
 pselect6
index 8543dbd2d05f39b2bc4db7cd5bfa58d249d8dfd4..a835a8bd0a74d6b78b722ca7e00fcdf61ce4d771 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -122,6 +122,7 @@ int sysctl_read_ip_property(int af, const char *ifname, const char *property, ch
         if (r < 0)
                 return r;
 
+        truncate_nl(value);
         if (ret)
                 *ret = TAKE_PTR(value);
 
index 316cfcccf9d555d09612cc788a63d8667d3896c2..32364196f97a43c9875667309e961e49542c8e4b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 4eeda3b1bb96e769d75b9037dde228b360011b98..bb8177b6492e9e6de27dbe3d0317f935b6607e9a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 #include <stdlib.h>
index a5cb486c99e7d4207acf8762f1a9d0e33727f27b..ab7d799029654a66f43984c45aa78954845d2a45 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sched.h>
 #include <signal.h>
@@ -254,7 +254,7 @@ static int allocate_scope(void) {
         return 0;
 }
 
-int enter_cgroup_subroot(char **ret_cgroup) {
+static int enter_cgroup(char **ret_cgroup, bool enter_subroot) {
         _cleanup_free_ char *cgroup_root = NULL, *cgroup_subroot = NULL;
         CGroupMask supported;
         int r;
@@ -268,7 +268,13 @@ int enter_cgroup_subroot(char **ret_cgroup) {
                 return log_warning_errno(r, "cg_pid_get_path(NULL, 0, ...) failed: %m");
         assert(r >= 0);
 
-        assert_se(asprintf(&cgroup_subroot, "%s/%" PRIx64, cgroup_root, random_u64()) >= 0);
+        if (enter_subroot)
+                assert_se(asprintf(&cgroup_subroot, "%s/%" PRIx64, cgroup_root, random_u64()) >= 0);
+        else {
+                cgroup_subroot = strdup(cgroup_root);
+                assert_se(cgroup_subroot != NULL);
+        }
+
         assert_se(cg_mask_supported(&supported) >= 0);
 
         /* If this fails, then we don't mind as the later cgroup operations will fail too, and it's fine if
@@ -287,3 +293,51 @@ int enter_cgroup_subroot(char **ret_cgroup) {
 
         return 0;
 }
+
+int enter_cgroup_subroot(char **ret_cgroup) {
+        return enter_cgroup(ret_cgroup, true);
+}
+
+int enter_cgroup_root(char **ret_cgroup) {
+        return enter_cgroup(ret_cgroup, false);
+}
+
+const char *ci_environment(void) {
+        /* We return a string because we might want to provide multiple bits of information later on: not
+         * just the general CI environment type, but also whether we're sanitizing or not, etc. The caller is
+         * expected to use strstr on the returned value. */
+        static const char *ans = POINTER_MAX;
+        const char *p;
+        int r;
+
+        if (ans != POINTER_MAX)
+                return ans;
+
+        /* We allow specifying the environment with $CITYPE. Nobody uses this so far, but we are ready. */
+        p = getenv("CITYPE");
+        if (!isempty(p))
+                return (ans = p);
+
+        if (getenv_bool("TRAVIS") > 0)
+                return (ans = "travis");
+        if (getenv_bool("SEMAPHORE") > 0)
+                return (ans = "semaphore");
+        if (getenv_bool("GITHUB_ACTIONS") > 0)
+                return (ans = "github-actions");
+        if (getenv("AUTOPKGTEST_ARTIFACTS") || getenv("AUTOPKGTEST_TMP"))
+                return (ans = "autopkgtest");
+
+        FOREACH_STRING(p, "CI", "CONTINOUS_INTEGRATION") {
+                /* Those vars are booleans according to Semaphore and Travis docs:
+                 * https://docs.travis-ci.com/user/environment-variables/#default-environment-variables
+                 * https://docs.semaphoreci.com/ci-cd-environment/environment-variables/#ci
+                 */
+                r = getenv_bool(p);
+                if (r > 0)
+                        return (ans = "unknown"); /* Some other unknown thing */
+                if (r == 0)
+                        return (ans = NULL);
+        }
+
+        return (ans = NULL);
+}
index 6817ef4860653c98403cdc04ec5a8ae79aea5087..c1350763ad7288f5430e639ce8280c8d43b9e337 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
@@ -20,6 +20,7 @@ static inline bool manager_errno_skip_test(int r) {
 
 char* setup_fake_runtime_dir(void);
 int enter_cgroup_subroot(char **ret_cgroup);
+int enter_cgroup_root(char **ret_cgroup);
 int get_testdata_dir(const char *suffix, char **ret);
 const char* get_catalog_dir(void);
 bool slow_tests_enabled(void);
@@ -39,3 +40,6 @@ bool can_memlock(void);
         } else {                                                    \
                 printf("systemd not booted skipping '%s'\n", #x);   \
         }
+
+/* Provide a convenient way to check if we're running in CI. */
+const char *ci_environment(void);
index c12d7c1375d5bedcbaee7f24086f59bbdd6dda3e..d37c0b08456972fb097ef6a517f760467ef61e48 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/stat.h>
 
index 97a875161b3b7d437186331e93469f429582ad29..01afc0658d2fb97a9a8732caaeb1125d31a610aa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdio.h>
index 75c24d800730aa367ee338aad25a91f920202517..2347179cbc77dac215862ad7a02ca0ba5328823d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
index 06e822785715fddc70ec9a8d515d85aba2526a25..a6ee7d4b26b8a1193439d680f4c9fcb6f69303ce 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 98bbfb2ae3444ebc3b0cc61d930b50061f076b39..030922eca931b2a8db6eb17fe5eeb9bed642625a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <unistd.h>
@@ -6,13 +6,16 @@
 #include "alloc-util.h"
 #include "device-util.h"
 #include "env-file.h"
+#include "escape.h"
 #include "log.h"
+#include "macro.h"
 #include "parse-util.h"
 #include "path-util.h"
 #include "signal-util.h"
 #include "string-table.h"
 #include "string-util.h"
 #include "udev-util.h"
+#include "utf8.h"
 
 static const char* const resolve_name_timing_table[_RESOLVE_NAME_TIMING_MAX] = {
         [RESOLVE_NAME_NEVER] = "never",
@@ -195,8 +198,9 @@ static int device_wait_for_initialization_internal(
                 sd_device *_device,
                 const char *devlink,
                 const char *subsystem,
-                usec_t timeout,
+                usec_t deadline,
                 sd_device **ret) {
+
         _cleanup_(sd_device_monitor_unrefp) sd_device_monitor *monitor = NULL;
         _cleanup_(sd_event_source_unrefp) sd_event_source *timeout_source = NULL;
         _cleanup_(sd_event_unrefp) sd_event *event = NULL;
@@ -256,10 +260,10 @@ static int device_wait_for_initialization_internal(
         if (r < 0)
                 return log_error_errno(r, "Failed to start device monitor: %m");
 
-        if (timeout != USEC_INFINITY) {
-                r = sd_event_add_time_relative(
+        if (deadline != USEC_INFINITY) {
+                r = sd_event_add_time(
                                 event, &timeout_source,
-                                CLOCK_MONOTONIC, timeout, 0,
+                                CLOCK_MONOTONIC, deadline, 0,
                                 NULL, INT_TO_PTR(-ETIMEDOUT));
                 if (r < 0)
                         return log_error_errno(r, "Failed to add timeout event source: %m");
@@ -287,12 +291,12 @@ static int device_wait_for_initialization_internal(
         return 0;
 }
 
-int device_wait_for_initialization(sd_device *device, const char *subsystem, usec_t timeout, sd_device **ret) {
-        return device_wait_for_initialization_internal(device, NULL, subsystem, timeout, ret);
+int device_wait_for_initialization(sd_device *device, const char *subsystem, usec_t deadline, sd_device **ret) {
+        return device_wait_for_initialization_internal(device, NULL, subsystem, deadline, ret);
 }
 
-int device_wait_for_devlink(const char *devlink, const char *subsystem, usec_t timeout, sd_device **ret) {
-        return device_wait_for_initialization_internal(NULL, devlink, subsystem, timeout, ret);
+int device_wait_for_devlink(const char *devlink, const char *subsystem, usec_t deadline, sd_device **ret) {
+        return device_wait_for_initialization_internal(NULL, devlink, subsystem, deadline, ret);
 }
 
 int device_is_renaming(sd_device *dev) {
@@ -319,3 +323,49 @@ bool device_for_action(sd_device *dev, DeviceAction action) {
 
         return a == action;
 }
+
+int udev_rule_parse_value(char *str, char **ret_value, char **ret_endpos) {
+        char *i, *j;
+        int r;
+        bool is_escaped;
+
+        /* value must be double quotated */
+        is_escaped = str[0] == 'e';
+        str += is_escaped;
+        if (str[0] != '"')
+                return -EINVAL;
+        str++;
+
+        if (!is_escaped) {
+                /* unescape double quotation '\"'->'"' */
+                for (i = j = str; *i != '"'; i++, j++) {
+                        if (*i == '\0')
+                                return -EINVAL;
+                        if (i[0] == '\\' && i[1] == '"')
+                                i++;
+                        *j = *i;
+                }
+                j[0] = '\0';
+        } else {
+                _cleanup_free_ char *unescaped = NULL;
+
+                /* find the end position of value */
+                for (i = str; *i != '"'; i++) {
+                        if (i[0] == '\\')
+                                i++;
+                        if (*i == '\0')
+                                return -EINVAL;
+                }
+                i[0] = '\0';
+
+                r = cunescape_length(str, i - str, 0, &unescaped);
+                if (r < 0)
+                        return r;
+                assert(r <= i - str);
+                memcpy(str, unescaped, r + 1);
+        }
+
+        *ret_value = str;
+        *ret_endpos = i + 1;
+        return 0;
+}
index 04c7ce55203df2d2ef2467dc275b155f3388856d..270861e55edc97663af1387f4ad6bcbaf4fb7067 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-device.h"
@@ -28,7 +28,9 @@ static inline int udev_parse_config(void) {
         return udev_parse_config_full(NULL, NULL, NULL, NULL, NULL);
 }
 
-int device_wait_for_initialization(sd_device *device, const char *subsystem, usec_t timeout, sd_device **ret);
-int device_wait_for_devlink(const char *path, const char *subsystem, usec_t timeout, sd_device **ret);
+int device_wait_for_initialization(sd_device *device, const char *subsystem, usec_t deadline, sd_device **ret);
+int device_wait_for_devlink(const char *path, const char *subsystem, usec_t deadline, sd_device **ret);
 int device_is_renaming(sd_device *dev);
 bool device_for_action(sd_device *dev, DeviceAction action);
+
+int udev_rule_parse_value(char *str, char **ret_value, char **ret_endpos);
index 201d27ab63a778a5c35ab1ffb810d92f6ba2c2f7..5d5bf7f21d87b4dc9e924ca210e058a3340cad5d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdlib.h>
index 49ba38287e1b7ce1e3a7a221c526c8aa6694ae02..ef168cdb33a34e1d7ec10f3f05b707072dff0f9a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 3b51c7c9986e398caf2b3aa34a040b0635b697a3..4c307199e6e8d70c5009f0a7a2820683b0065d8c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-id128.h"
 
index d36bb07cc275109b9a5f097647b1230b0b89df86..5463b0ab13b91afc685d691550b964a87e27c8c4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index d06c8abdbe6c2d15e1444d83e4594ac522fb675c..88b8fc2f8f5f8f43a6f1c660926fce659efd0f74 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "errno-util.h"
 #include "format-util.h"
index e2a87f664c357cb6edbcf983868a94f2b9a7bfda..22ab04d6eec3d150ec572dddc85c82e08713137a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <grp.h>
index 9046fafcb2e3b481e8a28b6b4d5fceff38d784dd..29790282b4e2c648b231b083e8b287459e7a6a34 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "format-util.h"
 #include "fs-util.h"
index 4dcee180a2d42158b14a8e3c10058eaecc95fc46..dcef065d9236b19c659fe78bf5e2be4d45f521c9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "user-record.h"
index 7e7b28eb55023b1cb12e6ebe89577eb9232ba11e..6c48c56a2a733caaa8d6a4bf3c431bdf96065bf6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/mount.h>
 
@@ -2062,7 +2062,7 @@ bool user_record_compatible(UserRecord *a, UserRecord *b) {
         assert(a);
         assert(b);
 
-        /* If either lacks the regular section, we can't really decide, let's hence say they are
+        /* If either lacks the regular section, we can't really decide, let's hence say they are
          * incompatible. */
         if (!(a->mask & b->mask & USER_RECORD_REGULAR))
                 return false;
index 2e74b910c2756a54811471d87d8f4560acb49ff5..542a0dc84a9f734bb4330aa290c328f05117bf68 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index 57e58a61a9103fd8338a56dcb1313fc70533ebf5..2d480283d12a335d78c234ddcc53512871208c64 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/auxv.h>
 
index 2464f54c3e22e1dd2d79639d9d28c58e35d89293..ee207b518ed68c67a1c7cfa4b1f84708c94c9b71 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/socket.h>
index 9edcd8302ac79d204693a7600130d16af7491760..b36bc205123eac0c82382a318db6f4dd98684853 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index fe55bad12d632bd85b11938eca87a0fba780bbf2..3e71f76b27dbdc3ec15473908e48f71db2d02436 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 86b5f08ae76dcd7f2f3e4a9d38c76ace2bbc706d..e7be33ca7080bdf6cac4be8df0d9834792615a59 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/poll.h>
 
@@ -418,6 +418,11 @@ static int varlink_test_disconnect(Varlink *v) {
         if (IN_SET(v->state, VARLINK_IDLE_CLIENT) && (v->write_disconnected || v->got_pollhup))
                 goto disconnect;
 
+        /* The server is still expecting to write more, but its write end is disconnected and it got a POLLHUP
+         * (i.e. from a disconnected client), so disconnect. */
+        if (IN_SET(v->state, VARLINK_PENDING_METHOD, VARLINK_PENDING_METHOD_MORE) && v->write_disconnected && v->got_pollhup)
+                goto disconnect;
+
         return 0;
 
 disconnect:
index 06a34b480d46307a07475599f9b7e86f48094f9c..7ea1f9113fae1175e42024ec3e7589a1623a4113 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-event.h"
@@ -171,3 +171,4 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(VarlinkServer *, varlink_server_unref);
 #define VARLINK_ERROR_METHOD_NOT_FOUND "org.varlink.service.MethodNotFound"
 #define VARLINK_ERROR_METHOD_NOT_IMPLEMENTED "org.varlink.service.MethodNotImplemented"
 #define VARLINK_ERROR_INVALID_PARAMETER "org.varlink.service.InvalidParameter"
+#define VARLINK_ERROR_SUBSCRIPTION_TAKEN "org.varlink.service.SubscriptionTaken"
index d2744b6918f4c2ba86b5fe4f4419ff6532635256..2d19172c6f263981aabd85803760669d36f28ec9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <getopt.h>
index b6a1afcdee630de970a1acf205633a629e8427f4..245bb37ae464a715555e8e624b9abd7d80370ce4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 180f56ede8604c8292993b1339cc1b1a583b7ae6..cb43d50220b870201640ff00b6773cda387180e2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "conf-parser.h"
 #include "parse-util.h"
index c55adee3c07ab7487eb64e79d499db1123ad6658..0336908bf33923131c331da458aab932efecff35 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 5ca6ab3376c573e24091ba89a8870ddd59468e75..3323897a4ca2db58e2e689e5e1c5d41d30667584 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index 2d31bb11749d339a1b1d918663e5f4bf17c6ed08..9a1bb384e921c44c0e13764b3e56f95486ffcce2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 typedef enum VolatileMode {
index 4d3d8828f57d98f1bc0d9a573c96191ab00593aa..d33acafe64d869b91aee402e0307ac7462e8f067 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -7,6 +7,7 @@
 #include <unistd.h>
 #include <linux/watchdog.h>
 
+#include "errno-util.h"
 #include "fd-util.h"
 #include "log.h"
 #include "string-util.h"
@@ -19,44 +20,40 @@ static usec_t watchdog_timeout = USEC_INFINITY;
 static usec_t watchdog_last_ping = USEC_INFINITY;
 
 static int update_timeout(void) {
-        int r;
-
         if (watchdog_fd < 0)
                 return 0;
-
         if (watchdog_timeout == USEC_INFINITY)
                 return 0;
-        else if (watchdog_timeout == 0) {
+
+        if (watchdog_timeout == 0) {
                 int flags;
 
                 flags = WDIOS_DISABLECARD;
-                r = ioctl(watchdog_fd, WDIOC_SETOPTIONS, &flags);
-                if (r < 0)
+                if (ioctl(watchdog_fd, WDIOC_SETOPTIONS, &flags) < 0)
                         return log_warning_errno(errno, "Failed to disable hardware watchdog: %m");
         } else {
-                int sec, flags;
                 char buf[FORMAT_TIMESPAN_MAX];
+                int sec, flags;
+                usec_t t;
 
-                sec = (int) DIV_ROUND_UP(watchdog_timeout, USEC_PER_SEC);
-                r = ioctl(watchdog_fd, WDIOC_SETTIMEOUT, &sec);
-                if (r < 0)
+                t = DIV_ROUND_UP(watchdog_timeout, USEC_PER_SEC);
+                sec = (int) t >= INT_MAX ? INT_MAX : t; /* Saturate */
+                if (ioctl(watchdog_fd, WDIOC_SETTIMEOUT, &sec) < 0)
                         return log_warning_errno(errno, "Failed to set timeout to %is: %m", sec);
 
                 watchdog_timeout = (usec_t) sec * USEC_PER_SEC;
                 log_info("Set hardware watchdog to %s.", format_timespan(buf, sizeof(buf), watchdog_timeout, 0));
 
                 flags = WDIOS_ENABLECARD;
-                r = ioctl(watchdog_fd, WDIOC_SETOPTIONS, &flags);
-                if (r < 0) {
+                if (ioctl(watchdog_fd, WDIOC_SETOPTIONS, &flags) < 0) {
                         /* ENOTTY means the watchdog is always enabled so we're fine */
-                        log_full(errno == ENOTTY ? LOG_DEBUG : LOG_WARNING,
+                        log_full(ERRNO_IS_NOT_SUPPORTED(errno) ? LOG_DEBUG : LOG_WARNING,
                                  "Failed to enable hardware watchdog: %m");
-                        if (errno != ENOTTY)
+                        if (!ERRNO_IS_NOT_SUPPORTED(errno))
                                 return -errno;
                 }
 
-                r = ioctl(watchdog_fd, WDIOC_KEEPALIVE, 0);
-                if (r < 0)
+                if (ioctl(watchdog_fd, WDIOC_KEEPALIVE, 0) < 0)
                         return log_warning_errno(errno, "Failed to ping hardware watchdog: %m");
 
                 watchdog_last_ping = now(clock_boottime_or_monotonic());
@@ -67,19 +64,23 @@ static int update_timeout(void) {
 
 static int open_watchdog(void) {
         struct watchdog_info ident;
+        const char *fn;
 
         if (watchdog_fd >= 0)
                 return 0;
 
-        watchdog_fd = open(watchdog_device ?: "/dev/watchdog",
-                           O_WRONLY|O_CLOEXEC);
+        fn = watchdog_device ?: "/dev/watchdog";
+        watchdog_fd = open(fn, O_WRONLY|O_CLOEXEC);
         if (watchdog_fd < 0)
-                return -errno;
+                return log_debug_errno(errno, "Failed to open watchdog device %s: %m", fn);
 
-        if (ioctl(watchdog_fd, WDIOC_GETSUPPORT, &ident) >= 0)
-                log_info("Hardware watchdog '%s', version %x",
+        if (ioctl(watchdog_fd, WDIOC_GETSUPPORT, &ident) < 0)
+                log_debug_errno(errno, "Hardware watchdog %s does not support WDIOC_GETSUPPORT ioctl: %m", fn);
+        else
+                log_info("Using hardware watchdog '%s', version %x, device %s",
                          ident.identity,
-                         ident.firmware_version);
+                         ident.firmware_version,
+                         fn);
 
         return update_timeout();
 }
@@ -102,8 +103,8 @@ int watchdog_set_timeout(usec_t *usec) {
 
         watchdog_timeout = *usec;
 
-        /* If we didn't open the watchdog yet and didn't get any
-         * explicit timeout value set, don't do anything */
+        /* If we didn't open the watchdog yet and didn't get any explicit timeout value set, don't do
+         * anything */
         if (watchdog_fd < 0 && watchdog_timeout == USEC_INFINITY)
                 return 0;
 
@@ -113,13 +114,11 @@ int watchdog_set_timeout(usec_t *usec) {
                 r = update_timeout();
 
         *usec = watchdog_timeout;
-
         return r;
 }
 
 usec_t watchdog_runtime_wait(void) {
-        usec_t rtwait;
-        usec_t ntime;
+        usec_t rtwait, ntime;
 
         if (!timestamp_is_set(watchdog_timeout))
                 return USEC_INFINITY;
@@ -155,18 +154,14 @@ int watchdog_ping(void) {
                         return r;
         }
 
-        r = ioctl(watchdog_fd, WDIOC_KEEPALIVE, 0);
-        if (r < 0)
+        if (ioctl(watchdog_fd, WDIOC_KEEPALIVE, 0) < 0)
                 return log_warning_errno(errno, "Failed to ping hardware watchdog: %m");
 
         watchdog_last_ping = ntime;
-
         return 0;
 }
 
 void watchdog_close(bool disarm) {
-        int r;
-
         if (watchdog_fd < 0)
                 return;
 
@@ -175,8 +170,7 @@ void watchdog_close(bool disarm) {
 
                 /* Explicitly disarm it */
                 flags = WDIOS_DISABLECARD;
-                r = ioctl(watchdog_fd, WDIOC_SETOPTIONS, &flags);
-                if (r < 0)
+                if (ioctl(watchdog_fd, WDIOC_SETOPTIONS, &flags) < 0)
                         log_warning_errno(errno, "Failed to disable hardware watchdog: %m");
 
                 /* To be sure, use magic close logic, too */
index ce739fd8a38e4cccd5824dbd71b4d5875da93afd..b7587db3abada7e3b43aa7f7d5e63c0d88c82236 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index edf650d200454b49654778b4c7856760646552f0..82cd5fbd6bb245686c33ce0827d2f77843da5b32 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdbool.h>
 
index c9e67e5c0a740e7217ca100f1c949a129ffc5535..ec54669f50131e4be05e6d79dd62b45ac638da71 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 22bb3041fbbc1fa8ba52aeb86c3fa714bfd4466a..ae5cecc25d116c211c708c91f7da5637830d57e3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <net/ethernet.h>
 #include <linux/nl80211.h>
index c7553fafde0296d4988f9e9f738c15fc186fd5ae..01b0c3c63540b95bfbcdad1945e8bb411f8f0398 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #pragma once
 
index 78ac42f08025fa642c424ca012f163d827a17bfe..8ff3feafe40790a436b1f9fa7fc69b44f43cbefb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stddef.h>
index 8da2ff5f75cd4a75cd1733b107db51f42fa4bafe..217b3b0e40e8ee2d11ea88971945d562acfb2a45 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 enum {
index 83c4bf4b3d615d390b256a6ef87b1851675c250b..0d07865542e0f04759b7be6be1fb31212a0d5491 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2010 ProFUSION embedded systems
 ***/
@@ -232,8 +232,8 @@ static void sync_with_progress(void) {
 
         BLOCK_SIGNALS(SIGCHLD);
 
-        /* Due to the possibility of the sync operation hanging, we fork a child process and monitor the progress. If
-         * the timeout lapses, the assumption is that that particular sync stalled. */
+        /* Due to the possibility of the sync operation hanging, we fork a child process and monitor
+         * the progress. If the timeout lapses, the assumption is that the particular sync stalled. */
 
         r = asynchronous_sync(&pid);
         if (r < 0) {
index 6eebaf7abc857da38560a40958b89ae97df677fa..3a72a13e1ab786683e917b678a940f88360706a8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2010 ProFUSION embedded systems
 ***/
@@ -514,10 +514,8 @@ static int remount_with_timeout(MountPoint *m, int umount_log_level) {
 
         assert(m);
 
-        /* Due to the possibility of a remount operation hanging, we
-         * fork a child process and set a timeout. If the timeout
-         * lapses, the assumption is that that particular remount
-         * failed. */
+        /* Due to the possibility of a remount operation hanging, we fork a child process and set a
+         * timeout. If the timeout lapses, the assumption is that the particular remount failed. */
         r = safe_fork("(sd-remount)", FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_LOG|FORK_REOPEN_LOG, &pid);
         if (r < 0)
                 return r;
@@ -552,10 +550,8 @@ static int umount_with_timeout(MountPoint *m, int umount_log_level) {
 
         assert(m);
 
-        /* Due to the possibility of a umount operation hanging, we
-         * fork a child process and set a timeout. If the timeout
-         * lapses, the assumption is that that particular umount
-         * failed. */
+        /* Due to the possibility of a umount operation hanging, we fork a child process and set a
+         * timeout. If the timeout lapses, the assumption is that the particular umount failed. */
         r = safe_fork("(sd-umount)", FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_LOG|FORK_REOPEN_LOG, &pid);
         if (r < 0)
                 return r;
index b01062484f0a53bcc15fd1eb5ae29082eca932c4..fac1a12406a79591fc603bb3e9a8d7ff63ca8ec2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 /***
index 6bb1a04793db1892f06abdc747a733234cfffae1..39ab55429028703c01b39faf14cc33ac1412f287 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2010-2017 Canonical
   Copyright © 2018 Dell Inc.
index 64dd623c809daecc2aba27b2a6542e53bb91664d..4391d9f1f5dc409d58bfcaa51a339cd2864103a6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index ca145aebf932d2ad0ef8a37266dd8f7bec3c3ef2..81d50717b24ddf17c62fcab4a564607dd88228b4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <getopt.h>
index 4cf9d22c87cd2bcc049bf7b5533061107df4093f..b0d71ff580c40f597115019a2a276ab74224b2a1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2017 Felipe Sateler
 ***/
index e44a0433b108038e086869a1272c725edadffba1..e263d459a84c9aba1324817293bfb5ed44624bfc 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <getopt.h>
index 666affca190b06fad66c6e16db7688817d0aa2a5..26874cf87712ab375da9bfcdee32a31cbe06537e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <unistd.h>
index 049719acdf08b6d2466f0ada0acaa543d4330a01..2a0290de7f459d90aa75748dbaec5dfba036b460 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-error.h"
 #include "bus-locator.h"
index 14572d520ee51b8fddd0123ad3521d18579a7d7d..deb0da4f30ac564f3449a1c7dd0d8161bf659355 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int add_dependency(int argc, char *argv[], void *userdata);
index ff211f3a086a22e28606240219a388929ed3476f..4c5203c1f9b32a25ebd7c6050c3f9eb1b34d2de8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-error.h"
 #include "bus-locator.h"
index f337beac46cfceaae5c438f3079622341a193e3d..75151d67fc89df7bfba3bf5cc6bbbe79336ecdfa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int cancel_job(int argc, char *argv[], void *userdata);
index ca15f751463ec54e4818427040c3fa4bbaa8428f..eca3a6d35490e2d1a8b43b02a74a4d164a1abf90 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-error.h"
 #include "bus-locator.h"
index 5db9871e51a6f5c4273c62d6f143ed2d865a09e7..8e73f4efbed4b08288dfdb7fa955874c02d629e3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int clean_or_freeze_unit(int argc, char *argv[], void *userdata);
index dd76d8ee3413ae7c574a19622f5584fb939b1d5d..8e41bd6cb83f93b015b7a0cb22f8333d6182dcca 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 #include <unistd.h>
index da89aa57638e21f6b0905a446ca396b80427f19b..85b9dda0e4a0e6252c771e8e5914caf364c8a0d1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int halt_parse_argv(int argc, char *argv[]);
index 39dbba861ecbf219072a2fb729427f556aee83c4..e05b1b4705f4358b3238f92284d2dd0578c77bdf 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 
index 5c89f3decc1c7de1a21992c315c8c9f5a1798d73..658524bf1e8f2e49e395b6598c3d7c9544107b51 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int runlevel_parse_argv(int argc, char *argv[]);
index aca90c93c23df8edfe6f5ca36f483fdcd478175d..0c7d18b6d4b800045a224b1154363a5a9f3bd7f0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 
index 79a317d053b7e7ccba4ef1d20f1b9ad8d9e7038d..7acf9414c9ab9f7d9b64b236c8cf0f3c8ee5b4f7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int shutdown_parse_argv(int argc, char *argv[]);
index 35437ab4c14b47eb24a0d4c24372757772cfef93..148574d52c154ab64786408a3e9bf1cd6b9cbd82 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 
index ed3e08ef9b9cef31489bdaa89b99a88aa2ec58f5..1a2bcd440523b8068a12eae8f7302efad47b37ec 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int telinit_parse_argv(int argc, char *argv[]);
index 6730877e6d84767180a905fb5f9f519ed62ff9f5..03ba90838329f73c7309a365ccc61adef89cff6a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-error.h"
 #include "bus-locator.h"
index 01fd500bf62055193063a194b81c8671655bba1d..a9fc00770a9f1a16226c58f6f4fdd61298f67768 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int daemon_reload(int argc, char *argv[], void *userdata);
index f4b256335ae394b8c8cf5b3f3edf9e7283d2abd1..f6e8671a388268d48e07a32b017243d5cde45a91 100644 (file)
@@ -1,7 +1,9 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-error.h"
 #include "copy.h"
+#include "fd-util.h"
+#include "fileio.h"
 #include "fs-util.h"
 #include "mkdir.h"
 #include "pager.h"
@@ -17,6 +19,9 @@
 #include "terminal-util.h"
 #include "tmpfile-util.h"
 
+#define EDIT_MARKER_START "### Anything between here and the comment below will become the new contents of the file"
+#define EDIT_MARKER_END "### Lines below this comment will be discarded"
+
 int cat(int argc, char *argv[], void *userdata) {
         _cleanup_(hashmap_freep) Hashmap *cached_name_map = NULL, *cached_id_map = NULL;
         _cleanup_(lookup_paths_free) LookupPaths lp = {};
@@ -106,12 +111,11 @@ int cat(int argc, char *argv[], void *userdata) {
         return rc;
 }
 
-static int create_edit_temp_file(const char *new_path, const char *original_path, char **ret_tmp_fn) {
+static int create_edit_temp_file(const char *new_path, const char *original_path, char ** const original_unit_paths, char **ret_tmp_fn) {
         _cleanup_free_ char *t = NULL;
         int r;
 
         assert(new_path);
-        assert(original_path);
         assert(ret_tmp_fn);
 
         r = tempfn_random(new_path, NULL, &t);
@@ -122,25 +126,78 @@ static int create_edit_temp_file(const char *new_path, const char *original_path
         if (r < 0)
                 return log_error_errno(r, "Failed to create directories for \"%s\": %m", new_path);
 
-        r = mac_selinux_create_file_prepare(original_path, S_IFREG);
-        if (r < 0)
-                return r;
+        if (original_path) {
+                r = mac_selinux_create_file_prepare(new_path, S_IFREG);
+                if (r < 0)
+                        return r;
 
-        r = copy_file(original_path, t, 0, 0644, 0, 0, COPY_REFLINK);
-        if (r == -ENOENT) {
+                r = copy_file(original_path, t, 0, 0644, 0, 0, COPY_REFLINK);
+                if (r == -ENOENT) {
+                        r = touch(t);
+                        mac_selinux_create_file_clear();
+                        if (r < 0)
+                                return log_error_errno(r, "Failed to create temporary file \"%s\": %m", t);
+                } else {
+                        mac_selinux_create_file_clear();
+                        if (r < 0)
+                                return log_error_errno(r, "Failed to create temporary file for \"%s\": %m", new_path);
+                }
+        } else if (original_unit_paths) {
+                _cleanup_free_ char *new_contents = NULL;
+                _cleanup_fclose_ FILE *f = NULL;
+                char **path;
+                size_t size;
 
-                r = touch(t);
+                r = mac_selinux_create_file_prepare(new_path, S_IFREG);
+                if (r < 0)
+                        return r;
 
+                f = fopen(t, "we");
                 mac_selinux_create_file_clear();
+                if (!f)
+                        return log_error_errno(errno, "Failed to open \"%s\": %m", t);
 
+                r = fchmod(fileno(f), 0644);
                 if (r < 0)
-                        return log_error_errno(r, "Failed to create temporary file \"%s\": %m", t);
-
-        } else {
-                mac_selinux_create_file_clear();
+                        return log_error_errno(errno, "Failed to change mode of \"%s\": %m", t);
+
+                r = read_full_file(new_path, &new_contents, &size);
+                if (r < 0 && r != -ENOENT)
+                        return log_error_errno(r, "Failed to read \"%s\": %m", new_path);
+
+                fprintf(f,
+                        "### Editing %s\n"
+                        EDIT_MARKER_START
+                        "\n\n%s%s\n"
+                        EDIT_MARKER_END,
+                        new_path,
+                        strempty(new_contents),
+                        new_contents && endswith(new_contents, "\n") ? "" : "\n");
+
+                /* Add a comment with the contents of the original unit files */
+                STRV_FOREACH(path, original_unit_paths) {
+                        _cleanup_free_ char *contents = NULL;
+
+                        /* Skip the file that's being edited */
+                        if (path_equal(*path, new_path))
+                                continue;
+
+                        r = read_full_file(*path, &contents, &size);
+                        if (r < 0)
+                                return log_error_errno(r, "Failed to read \"%s\": %m", *path);
+
+                        fprintf(f, "\n\n### %s", *path);
+                        if (!isempty(contents)) {
+                                contents = strreplace(strstrip(contents), "\n", "\n# ");
+                                if (!contents)
+                                        return log_oom();
+                                fprintf(f, "\n# %s", contents);
+                        }
+                }
 
+                r = fflush_and_check(f);
                 if (r < 0)
-                         return log_error_errno(r, "Failed to create temporary file for \"%s\": %m", new_path);
+                        return log_error_errno(r, "Failed to create temporary file \"%s\": %m", t);
         }
 
         *ret_tmp_fn = TAKE_PTR(t);
@@ -185,6 +242,7 @@ static int unit_file_create_new(
                 const LookupPaths *paths,
                 const char *unit_name,
                 const char *suffix,
+                char ** const original_unit_paths,
                 char **ret_new_path,
                 char **ret_tmp_path) {
 
@@ -201,7 +259,7 @@ static int unit_file_create_new(
         if (r < 0)
                 return r;
 
-        r = create_edit_temp_file(new_path, new_path, &tmp_path);
+        r = create_edit_temp_file(new_path, NULL, original_unit_paths, &tmp_path);
         if (r < 0)
                 return r;
 
@@ -240,7 +298,7 @@ static int unit_file_create_copy(
                         return log_warning_errno(SYNTHETIC_ERRNO(EKEYREJECTED), "%s skipped.", unit_name);
         }
 
-        r = create_edit_temp_file(new_path, fragment_path, &tmp_path);
+        r = create_edit_temp_file(new_path, fragment_path, NULL, &tmp_path);
         if (r < 0)
                 return r;
 
@@ -332,9 +390,10 @@ static int find_paths_to_edit(sd_bus *bus, char **names, char ***paths) {
 
         STRV_FOREACH(name, names) {
                 _cleanup_free_ char *path = NULL, *new_path = NULL, *tmp_path = NULL, *tmp_name = NULL;
+                _cleanup_strv_free_ char **unit_paths = NULL;
                 const char *unit_name;
 
-                r = unit_find_paths(bus, *name, &lp, false, &cached_name_map, &cached_id_map, &path, NULL);
+                r = unit_find_paths(bus, *name, &lp, false, &cached_name_map, &cached_id_map, &path, &unit_paths);
                 if (r == -EKEYREJECTED) {
                         /* If loading of the unit failed server side complete, then the server won't tell us
                          * the unit file path. In that case, find the file client side. */
@@ -361,7 +420,7 @@ static int find_paths_to_edit(sd_bus *bus, char **names, char ***paths) {
                         unit_name = *name;
                         r = unit_file_create_new(&lp, unit_name,
                                                  arg_full ? NULL : ".d/override.conf",
-                                                 &new_path, &tmp_path);
+                                                 NULL, &new_path, &tmp_path);
                 } else {
                         assert(path);
 
@@ -384,8 +443,13 @@ static int find_paths_to_edit(sd_bus *bus, char **names, char ***paths) {
 
                         if (arg_full)
                                 r = unit_file_create_copy(&lp, unit_name, path, &new_path, &tmp_path);
-                        else
-                                r = unit_file_create_new(&lp, unit_name, ".d/override.conf", &new_path, &tmp_path);
+                        else {
+                                r = strv_prepend(&unit_paths, path);
+                                if (r < 0)
+                                        return log_oom();
+
+                                r = unit_file_create_new(&lp, unit_name, ".d/override.conf", unit_paths, &new_path, &tmp_path);
+                        }
                 }
                 if (r < 0)
                         return r;
@@ -400,6 +464,40 @@ static int find_paths_to_edit(sd_bus *bus, char **names, char ***paths) {
         return 0;
 }
 
+static int trim_edit_markers(const char *path) {
+        _cleanup_free_ char *contents = NULL;
+        char *contents_start = NULL;
+        const char *contents_end = NULL;
+        size_t size;
+        int r;
+
+        /* Trim out the lines between the two markers */
+        r = read_full_file(path, &contents, &size);
+        if (r < 0)
+                return log_error_errno(r, "Failed to read temporary file \"%s\": %m", path);
+
+        contents_start = strstr(contents, EDIT_MARKER_START);
+        if (contents_start)
+                contents_start += strlen(EDIT_MARKER_START);
+        else
+                contents_start = contents;
+
+        contents_end = strstr(contents_start, EDIT_MARKER_END);
+        if (contents_end)
+                strshorten(contents_start, contents_end - contents_start);
+
+        contents_start = strstrip(contents_start);
+
+        /* Write new contents if the trimming actually changed anything */
+        if (strlen(contents) != size) {
+                r = write_string_file(path, contents_start, WRITE_STRING_FILE_CREATE | WRITE_STRING_FILE_TRUNCATE | WRITE_STRING_FILE_AVOID_NEWLINE);
+                if (r < 0)
+                        return log_error_errno(r, "Failed to modify temporary file \"%s\": %m", path);
+        }
+
+        return 0;
+}
+
 int edit(int argc, char *argv[], void *userdata) {
         _cleanup_(lookup_paths_free) LookupPaths lp = {};
         _cleanup_strv_free_ char **names = NULL;
@@ -452,6 +550,10 @@ int edit(int argc, char *argv[], void *userdata) {
         STRV_FOREACH_PAIR(original, tmp, paths) {
                 /* If the temporary file is empty we ignore it. This allows the user to cancel the
                  * modification. */
+                r = trim_edit_markers(*tmp);
+                if (r < 0)
+                        continue;
+
                 if (null_or_empty_path(*tmp)) {
                         log_warning("Editing \"%s\" canceled: temporary file is empty.", *original);
                         continue;
index 98cb942688405c0d00a230574f309ed21a09c4d8..fe7e4dc757529b75e781be52fd77d4b461a3b5f4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int cat(int argc, char *argv[], void *userdata);
index c9daeb15bab73c0ed40a2b9603ec75c91af15208..8f053ca649c71eb08c422b6df7a62fce0a602e9d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-error.h"
 #include "bus-locator.h"
index 33802b437be7498587de4318146310323593ed11..43f60e78e3c8fae47ca33e32165c8e87d3b0ee51 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int enable_unit(int argc, char *argv[], void *userdata);
index 18eba2d82e40a944fe4757d46bf711c90f678b07..3d99b0deb60f2b6411bc1654ed32cfa3010e9fdd 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-error.h"
 #include "bus-locator.h"
index 18b0e1d9aa8f9ccabb6d68945515f2965f91eb07..9a5238e8c08dd3b1c09cea482e44bdede9dafce1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int check_unit_active(int argc, char *argv[], void *userdata);
index dd64d2e8be7ddaf5a75aebf2c1f99a755d9bab13..02ef8df86e4a51f5b9b3c0b7100f50ee1c7622ad 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-error.h"
 #include "bus-locator.h"
index 860153e42058eed3994cfd8da4bfe9477eb7ea29..5cb9e5c5375fb43ffb810b626d57a316ffca4966 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int unit_is_enabled(int argc, char *argv[], void *userdata);
index 96186ee6e660ef330d8d1d89c09aaac337b33274..ecebf0d1145a000c5e7217ea9e72dacf7a79d4c6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-event.h"
 #include "sd-daemon.h"
index c955f32e2d73396976604ced9a6f8999f21736df..3d7e9fb83d8e3672ed3959c810e4991dc1f70c35 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int is_system_running(int argc, char *argv[], void *userdata);
index 258546f7c15a0efcdd8dd8948b81f350c5ad1abb..810aad108a3d0ac00cce324f1364276df6ddc0e1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-error.h"
 #include "bus-locator.h"
index d904612e4e216a8b7895112a2ac9793fa05d77ba..a42d4f1f90f048a132a44a4f73fd60fc742b3554 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int kill_unit(int argc, char *argv[], void *userdata);
index 9aedcc530fb67c1f3833cc86500054ad0fe6ab16..821998eb4fc7146c89043d830260e3ce4ebbb2b0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "locale-util.h"
 #include "sort-util.h"
index cdc7fc2f648f5fb0a81dd54bba7eeb09f1956ba7..7246570144c35d1370f0d50f5aefb309fb78befc 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int list_dependencies(int argc, char *argv[], void *userdata);
index 64a8d6779c3e740920119eeaee0a3620694f66f3..8b028c013aef23591a940c33baec72c6da4966c3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-error.h"
 #include "bus-locator.h"
index 40d6e83108565ea760f13a31910c46e8f518cdfb..aa4969639435d2ace25013945f414f4571d5e50e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int list_jobs(int argc, char *argv[], void *userdata);
index 424778c803e5d3d3c728ed231aae2a82394fba0c..48d0e8bde477673b53b4be38ccbaa05b5bceebe3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
index c20b0e9086012ae8a0e4d31ba0296da4772c5632..4a33e2b27c4dc8508fe7eedc27c5e11a731f5b81 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <inttypes.h>
index 508909a373cc3e6939d6b3187eef3bb070cd1fa6..e1bf8766205b1fa4710079d037a299aa0c7f2b19 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-error.h"
 #include "bus-locator.h"
index 12f84923a4c1087b1d3eee9d99532bb7242fba7e..387233e01c5172a477fec295148298fa6451c3e6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int list_unit_files(int argc, char *argv[], void *userdata);
index 15d8e4b234395f6ac4b71717f3b21674cfcacfb6..c7a91ba4f80df75b14a4c00d2453c52aeb95eea3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-login.h"
 
@@ -90,6 +90,7 @@ static int get_unit_list_recursive(
 
 static int output_units_list(const UnitInfo *unit_infos, unsigned c) {
         _cleanup_(table_unrefp) Table *table = NULL;
+        unsigned job_count = 0;
         int r;
 
         table = table_new("", "unit", "load", "active", "sub", "job", "description");
@@ -108,8 +109,7 @@ static int output_units_list(const UnitInfo *unit_infos, unsigned c) {
 
         (void) table_set_empty_string(table, "-");
 
-        int job_count = 0;
-        for (const UnitInfo *u = unit_infos; unit_infos && u < unit_infos + c; u++) {
+        for (const UnitInfo *u = unit_infos; unit_infos && u - unit_infos < c; u++) {
                 _cleanup_free_ char *j = NULL;
                 const char *on_underline = "", *on_loaded = "", *on_active = "";
                 const char *on_circle = "", *id;
@@ -156,7 +156,7 @@ static int output_units_list(const UnitInfo *unit_infos, unsigned c) {
                                    TABLE_STRING, u->sub_state,
                                    TABLE_SET_BOTH_COLORS, on_active,
                                    TABLE_STRING, u->job_id ? u->job_type: "",
-                                   TABLE_SET_BOTH_COLORS, u->job_id ? on_underline : "",
+                                   TABLE_SET_BOTH_COLORS, on_underline,
                                    TABLE_STRING, u->description,
                                    TABLE_SET_BOTH_COLORS, on_underline);
                 if (r < 0)
@@ -186,7 +186,8 @@ static int output_units_list(const UnitInfo *unit_infos, unsigned c) {
                              "LOAD   = Reflects whether the unit definition was properly loaded.\n"
                              "ACTIVE = The high-level unit activation state, i.e. generalization of SUB.\n"
                              "SUB    = The low-level unit activation state, values depend on unit type.");
-                        puts(job_count ? "JOB    = Pending job for the unit.\n" : "");
+                        if (job_count > 0)
+                                puts("JOB    = Pending job for the unit.\n");
                         on = ansi_highlight();
                         off = ansi_normal();
                 } else {
index a4c9775837a8e234fcff6378ee9cb9092a26340a..ef2762771264bd7706e1bf00f6890e9b82ca1d86 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int list_units(int argc, char *argv[], void *userdata);
index 435ab0e480ea83c832cbc0a92711975da15ef7c7..64984e4a81cbfbe31d77ccc887a4783019d80057 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-error.h"
 #include "bus-locator.h"
index 7e134a106075b41878a5353efc1f1587a7b67a9a..9a2e793f031f3c763733d35c8aeb85dd73445e11 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int log_setting(int argc, char *argv[], void *userdata);
index 20486c968ea1ed40b3000fcba49df32600ffe23f..405f12a33d930a3653a689ddce2cc6823ecabb13 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
@@ -146,7 +146,7 @@ int logind_check_inhibitors(enum action a) {
                                           ACTION_KEXEC) ? "shutdown" : "sleep"))
                         continue;
 
-                get_process_comm(pid, &comm);
+                (void) get_process_comm(pid, &comm);
                 user = uid_to_name(uid);
 
                 log_warning("Operation inhibited by \"%s\" (PID "PID_FMT" \"%s\", user %s), reason is \"%s\".",
index a9399e611e16414506eb950573bd0f8b0c3e6476..144056b93978786ec961c3cd3c4bed76f6fec08f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "systemctl.h"
index 2fada83958e18cf180fc9a3883be6d2a230bf392..b5eb199f4af85ef20895fd798e36bf470563a6e6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-error.h"
 #include "bus-locator.h"
index 408e43b599907ec9eb997eaca6b36cc8cf6eef97..f4f6790404004bfdca847390a03a6fda447823d2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int preset_all(int argc, char *argv[], void *userdata);
index bf7e26dcb70ac7d0c9effb0c3118121cbcb48f2c..eee7586465626df6562d0f550cd25a9096cb9bf5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-error.h"
 #include "bus-locator.h"
index b7902ce71660f30ea4fe215aa1edb5bc55a3d21c..956bb469df25b75fca669cc14e706240fe8afbf9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int reset_failed(int argc, char *argv[], void *userdata);
index 6a954bfa4351eba5f6643a74d62852ca55978566..e5798510976121fd06801f04612daae00687b5a1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-error.h"
 #include "bus-locator.h"
index 8189376f1dd6508da4e1a4ede50f141ffd9e9015..11a53dbbf1908a1469b42009f1260034e938b326 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int service_watchdogs(int argc, char *argv[], void *userdata);
index 423d881dac69210f6bc72b9d3fbc919bb1b2a946..05c1894b1d05c6535968c8faf802d716dc16770f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-error.h"
 #include "bus-locator.h"
index 2067c8c0d0dd82cfea41b0a57617ebf40ecc1f55..839b2c9b9f1f7c612a2441c849b3215ef9cc85ec 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int get_default(int argc, char *argv[], void *userdata);
index 462924f5c9a63ef8a4aff7335062fa758eee6563..b68e6f6f66ed1e3af21dcc2ecc241dcaaaa335be 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-error.h"
 #include "bus-locator.h"
@@ -61,6 +61,12 @@ int show_environment(int argc, char *argv[], void *userdata) {
         return 0;
 }
 
+static void invalid_callback(const char *p, void *userdata) {
+        _cleanup_free_ char *t = cescape(p);
+
+        log_debug("Ignoring invalid environment assignment \"%s\".", strnull(t));
+}
+
 int set_environment(int argc, char *argv[], void *userdata) {
         _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
         _cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
@@ -112,9 +118,18 @@ int import_environment(int argc, char *argv[], void *userdata) {
         if (r < 0)
                 return bus_log_create_error(r);
 
-        if (argc < 2)
-                r = sd_bus_message_append_strv(m, environ);
-        else {
+        if (argc < 2) {
+                _cleanup_strv_free_ char **copy = NULL;
+
+                copy = strv_copy(environ);
+                if (!copy)
+                        return log_oom();
+
+                strv_env_clean_with_callback(copy, invalid_callback, NULL);
+
+                r = sd_bus_message_append_strv(m, copy);
+
+        } else {
                 char **a, **b;
 
                 r = sd_bus_message_open_container(m, 'a', "s");
index 57e51d483cb49451163eb798ff3b7dc9fb6b54d1..bd05e318ad6e0cd3dcc764877889d2e2a6fd217c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int show_environment(int argc, char *argv[], void *userdata);
index 891b67eae7892691e6589393885d7974e5426646..183a7b6a8ad650182dad5ce7f8b0246385149c58 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-error.h"
 #include "bus-locator.h"
index e431de5533afb359fd35c2a71b62dfaa72926d64..74990e7cba795d9c7992ed2bd11270e4fe650a75 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int set_property(int argc, char *argv[], void *userdata);
index 119825f86e7d2a126fa14cd1b2c320bfc0e97457..fabaa545e14972e81d46a67c4be2dfd9ddd2820c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/mount.h>
 
index b4e5dda5b7295d44feb614a20347c66716dfebbb..d778bebb43ac6f4f2057281384927593ece623f3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int show(int argc, char *argv[], void *userdata);
index 46f58ff921e41df21cc0d2d337a0cf5cd4417183..15d2ea7941f84b3a57447a761c999da847a2c2d0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bootspec.h"
 #include "bus-error.h"
index 43a31ba287e5aab90d8399039ec95086cb9dbc01..06875e9c63cf4d9ba0ae8c16b020a539c17d1c23 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int start_special(int argc, char *argv[], void *userdata);
index bd78568a2daa19dc0d38074b7cec736a01fb6f10..b398e77eb281f0f65dcb4da46a6134c19fccdcdf 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-bus.h"
 
index 3f827405cc1ba47b27c18b60000d16654a6734cb..915c6fa7fb4cebcc248de3528d2786866ccc7949 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "systemctl.h"
index ebcc66a30db299da0ebd4bd89c42f2d7b602b387..9ed40e6ec3aa44d908a68e2de3fc67754177fe26 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-error.h"
 #include "bus-locator.h"
index 47ed852c63a92dfacf7da5f1ee9dcf7f709b9e24..6e13961ab7de0ffe8fea020efd6182a4838557f1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int switch_root(int argc, char *argv[], void *userdata);
index 2dca9e480f7daba0f0f17aa9a5c05ea2878ad526..a78fa1e04ca08bbaf6f18fc3a0d32ba9ac64fcb9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/stat.h>
index 9a3b84dedaf7c0d9865f0ba4c68c8c26c228c5f5..86fd3ec1861cf3c8ba7056c99309f15c70156538 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "time-util.h"
index 1f1181f2135c81ebf6cf3634dc017f6da111f808..c0b4d489a2461f9f47689258dff1df9462209b53 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-error.h"
 #include "bus-locator.h"
index 044540bd90b6ddfa5fbaea7bc43320d5acd30332..6dcd15284577bbbfd1243926d1079f9b202086a2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 int trivial_method(int argc, char *argv[], void *userdata);
index db1888956fb2540a75a17f5c2a7962880c4307bc..9713fce7af0c995a5c11882174549f200dbec28e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/reboot.h>
 #include <unistd.h>
@@ -52,7 +52,7 @@ int acquire_bus(BusFocus focus, sd_bus **ret) {
                 else
                         r = bus_connect_transport(arg_transport, arg_host, user, &buses[focus]);
                 if (r < 0)
-                        return log_error_errno(r, "Failed to connect to bus: %m");
+                        return bus_log_connect_error(r);
 
                 (void) sd_bus_set_allow_interactive_authorization(buses[focus], arg_ask_password);
         }
index 3693f1d678d00d01b56e18a531bb17d36a621e3a..6445bb488741b23039e4d5e90211cbf784baf8f6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index 075159ea57e50bd1bf7eb841dc6b0d8f19cb618b..d002d933aed9a52269c98a64495e13803c179d1b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 #include <locale.h>
index 079c108d7d558ba69d3b80c57dfe7717340e4645..f8cefc9b0128a5104f92cf1cdab02c4a4e2b7292 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <stdbool.h>
index 1055b00d0767d7f72b0a87e8be2fc22ef760e349..e3de2ae56292b465df04d53ce46523ed9dfeef64 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosdcommonhfoo
 #define foosdcommonhfoo
 
index 62baf7784e492f90c8baea9bcef1d50395a8140c..c9c484b411407eafea97be39690c854b2fba9029 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 _systemd_headers = '''
         sd-bus.h
@@ -58,17 +58,21 @@ if add_languages('cpp', required : false)
         opts += [['c++'],
                  ['c++', '-std=c++98'],
                  ['c++', '-std=c++11']]
-        if cc.has_argument('-std=c++14')
+        if cxx.has_argument('-std=c++14')
                 opts += [['c++', '-std=c++14']]
         endif
-        if cc.has_argument('-std=c++17')
+        if cxx.has_argument('-std=c++17')
                 opts += [['c++', '-std=c++17']]
         endif
+        if cxx.has_argument('-std=c++20')
+                opts += [['c++', '-std=c++20']]
+        endif
 endif
 
-foreach header : _systemd_headers + _not_installed_headers + ['../libudev/libudev.h']
+foreach header : _systemd_headers + _not_installed_headers + [libudev_h_path]
         foreach opt : opts
-                name = ''.join(['cc-', header.split('/')[-1], ':'] + opt)
+                std_name = opt.length() == 2 ? '_'.join(opt[1].split(':')) : ''
+                name = ''.join(['cc-', header.split('/')[-1], '_', opt[0], std_name])
                 if want_tests != 'false'
                         test(name,
                              check_compilation_sh,
index 8883ec62b916dff47bb8ce823c1a06e6cfe2b1fd..ed96cdbab13e6a96a73095278c194b70354cc9ea 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosdbusprotocolhfoo
 #define foosdbusprotocolhfoo
 
index b10a3e04bc3490cb7d50987126433f1fb095138c..ef57efd59593fe58e00dcb09c73acf2face8f92d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosdbusvtablehfoo
 #define foosdbusvtablehfoo
 
index 9c37e7e6c97550416cb861cf3774d657a4152d05..87fbcf366e47a77d330aacb45eea0dbdd105fe32 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosdbushfoo
 #define foosdbushfoo
 
index b47b15a445a9693aa7238b9eebedf4861ef7c4b5..f42a5d89669a0f7218c3e8014c890cc19bdd4364 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosddaemonhfoo
 #define foosddaemonhfoo
 
index 53092d28f92cc293d56886b8646fe4338f3f5a08..78fe5841609c6652adf3e74004cddc46397de6a2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosddevicehfoo
 #define foosddevicehfoo
 
index ac3b5b369c11319b3224c1a98cc9a872c58dec84..c35328a9a6fc6d87e615c5bb894c3fb560da9a98 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosddhcpclienthfoo
 #define foosddhcpclienthfoo
 
@@ -40,6 +40,8 @@ enum {
         SD_DHCP_CLIENT_EVENT_EXPIRED            = 3,
         SD_DHCP_CLIENT_EVENT_RENEW              = 4,
         SD_DHCP_CLIENT_EVENT_SELECTING          = 5,
+        SD_DHCP_CLIENT_EVENT_TRANSIENT_FAILURE  = 6, /* Sent when we have not received a reply after the first few attempts.
+                                                      * The client may want to start acquiring link-local addresses. */
 };
 
 enum {
@@ -126,6 +128,7 @@ int sd_dhcp_client_set_ifindex(
 int sd_dhcp_client_set_mac(
                 sd_dhcp_client *client,
                 const uint8_t *addr,
+                const uint8_t *bcast_addr,
                 size_t addr_len,
                 uint16_t arp_type);
 int sd_dhcp_client_set_client_id(
index 17bd491819ff324d01f42eae1c80f62e3a238dfc..c255a1f912ecfba4fe58c7ad1c5de91de8cd280a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosddhcpleasehfoo
 #define foosddhcpleasehfoo
 
index 45dbd27985312847f2046524c00d612dc05678aa..71aa479b5ebed949ae0a5686f0c7d6db8216a132 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosddhcpoptionhfoo
 #define foosddhcpoptionhfoo
 
index b6a5e9db84742a5b1f8abf9ab3842af3e422e961..f42c3dbb8b7fb33b1489a5e803dd85cee816a3b4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosddhcpserverhfoo
 #define foosddhcpserverhfoo
 
index 2b0d63a527d94236241e7a7c2daef7e6084a1f02..75ee27d68bdb41826f74993a9d169a1b3c477503 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosddhcp6clienthfoo
 #define foosddhcp6clienthfoo
 
index 240df74af8c520cf707f9bde280ddfcc17d8129d..f77b31acf997597b58ac2f3188fbfd04a8e4d33f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosddhcp6leasehfoo
 #define foosddhcp6leasehfoo
 
index 88a4986315123d7bcab8e6986dcaaf09d451a88b..ddb2c7cecdf4bf765cd8352d721678fb14953f74 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosddhcp6optionhfoo
 #define foosddhcp6optionhfoo
 
index 3a53c3d27da1419cbf282e787e05d5c6bf03bcb9..2ae2a0da48a2ac180ad6504e5fee92ce4d6e0f5f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosdeventhfoo
 #define foosdeventhfoo
 
@@ -162,6 +162,9 @@ int sd_event_source_get_floating(sd_event_source *s);
 int sd_event_source_set_floating(sd_event_source *s, int b);
 int sd_event_source_get_exit_on_failure(sd_event_source *s);
 int sd_event_source_set_exit_on_failure(sd_event_source *s, int b);
+int sd_event_source_set_ratelimit(sd_event_source *s, uint64_t interval_usec, unsigned burst);
+int sd_event_source_get_ratelimit(sd_event_source *s, uint64_t *ret_interval_usec, unsigned *ret_burst);
+int sd_event_source_is_ratelimited(sd_event_source *s);
 
 /* Define helpers so that __attribute__((cleanup(sd_event_unrefp))) and similar may be used. */
 _SD_DEFINE_POINTER_CLEANUP_FUNC(sd_event, sd_event_unref);
index 2b0cd7f5e769d87b5e050c1845b7c965eb62e8b6..9380759e07c1b7a4e0a843e501fee34eaa964d64 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosdhwdbhfoo
 #define foosdhwdbhfoo
 
index 9b00b76ea63eef9758e5e69927db034eb4294aee..02aa318a06082ebf7be74f20ecf5b992bcda7f36 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosdid128hfoo
 #define foosdid128hfoo
 
index ebf723fc221e08492687a9bb9164a9ca90e29e25..2809d8748bd7ea1ef154017f5efa488faebab28e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosdipv4acdfoo
 #define foosdipv4acdfoo
 
@@ -43,6 +43,8 @@ int sd_ipv4acd_get_address(sd_ipv4acd *acd, struct in_addr *address);
 int sd_ipv4acd_set_callback(sd_ipv4acd *acd, sd_ipv4acd_callback_t cb, void *userdata);
 int sd_ipv4acd_set_mac(sd_ipv4acd *acd, const struct ether_addr *addr);
 int sd_ipv4acd_set_ifindex(sd_ipv4acd *acd, int interface_index);
+int sd_ipv4acd_get_ifindex(sd_ipv4acd *acd);
+const char *sd_ipv4acd_get_ifname(sd_ipv4acd *acd);
 int sd_ipv4acd_set_address(sd_ipv4acd *acd, const struct in_addr *address);
 int sd_ipv4acd_is_running(sd_ipv4acd *acd);
 int sd_ipv4acd_start(sd_ipv4acd *acd, bool reset_conflicts);
index 71bd4cfe484dff0d5a3e6728042e2a8e7e7dc6c7..aa4d174e4b795f877238ffdff3ddc1fb170e61c6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosdipv4llfoo
 #define foosdipv4llfoo
 
@@ -43,6 +43,8 @@ int sd_ipv4ll_get_address(sd_ipv4ll *ll, struct in_addr *address);
 int sd_ipv4ll_set_callback(sd_ipv4ll *ll, sd_ipv4ll_callback_t cb, void *userdata);
 int sd_ipv4ll_set_mac(sd_ipv4ll *ll, const struct ether_addr *addr);
 int sd_ipv4ll_set_ifindex(sd_ipv4ll *ll, int interface_index);
+int sd_ipv4ll_get_ifindex(sd_ipv4ll *ll);
+const char *sd_ipv4ll_get_ifname(sd_ipv4ll *ll);
 int sd_ipv4ll_set_address(sd_ipv4ll *ll, const struct in_addr *address);
 int sd_ipv4ll_set_address_seed(sd_ipv4ll *ll, uint64_t seed);
 int sd_ipv4ll_is_running(sd_ipv4ll *ll);
index d220f21aa29f518578d22d619f19aeefa250cfe8..03696eb1af9bf76cdd85284adb16a5d3b239cdc3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosdjournalhfoo
 #define foosdjournalhfoo
 
index c2abc201216e2980b89940c937bcff3730c138bb..f551f6b4fa92888257f41c6309be8c1933bf92d6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosdlldphfoo
 #define foosdlldphfoo
 
index 6a8c20625910f8a406c371b4bee9cb3eadbc7363..6958d99a1e8f86d2ee91bc18906ec2d208fbd90a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosdloginhfoo
 #define foosdloginhfoo
 
index 05f00ed5770c42d039d19305645b4224a91b1c87..97ba02ffa83c3ae6a5df11e06b7bb9e1e8c78e77 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosdmessageshfoo
 #define foosdmessageshfoo
 
@@ -127,6 +127,9 @@ _SD_BEGIN_DECLARATIONS;
 #define SD_MESSAGE_OVERMOUNTING           SD_ID128_MAKE(1d,ee,03,69,c7,fc,47,36,b7,09,9b,38,ec,b4,6e,e7)
 #define SD_MESSAGE_OVERMOUNTING_STR       SD_ID128_MAKE_STR(1d,ee,03,69,c7,fc,47,36,b7,09,9b,38,ec,b4,6e,e7)
 
+#define SD_MESSAGE_UNIT_OOMD_KILL         SD_ID128_MAKE(d9,89,61,1b,15,e4,4c,9d,bf,31,e3,c8,12,56,e4,ed)
+#define SD_MESSAGE_UNIT_OOMD_KILL_STR     SD_ID128_MAKE_STR(d9,89,61,1b,15,e4,4c,9d,bf,31,e3,c8,12,56,e4,ed)
+
 #define SD_MESSAGE_UNIT_OUT_OF_MEMORY     SD_ID128_MAKE(fe,6f,aa,94,e7,77,46,63,a0,da,52,71,78,91,d8,ef)
 #define SD_MESSAGE_UNIT_OUT_OF_MEMORY_STR SD_ID128_MAKE_STR(fe,6f,aa,94,e7,77,46,63,a0,da,52,71,78,91,d8,ef)
 
index 3ddfc8cb6d2f2c9aabbbf9a970ad5e5cc1c27b8c..c0e37899a7208c6c8fea5ebc7dc47f5153c0a416 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosdndiscfoo
 #define foosdndiscfoo
 
index e01d960e37b8b69275147049316a9605e49e95b4..bf6d1e47ffea3fa3b6eb7950d167c78f7f9a1ea6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosdnetlinkhfoo
 #define foosdnetlinkhfoo
 
index 42bcd74b745885b2f0875d35a65e5cf208e545d1..7e062514189627876e4ce6d9b156adfee43c069f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosdnetworkhfoo
 #define foosdnetworkhfoo
 
index e13e67db8fc4904e71e52c27141420912e4e05f2..5f2f03c27beefb0a5940ae250a639ed98c58fe15 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosdpathhfoo
 #define foosdpathhfoo
 
index 0f1437829d03f11a4e9483e21e6ffd03b7a1b41b..3f6c149d5e259daba08b92da1799b184195c9893 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosdradvfoo
 #define foosdradvfoo
 
@@ -56,7 +56,7 @@ int sd_radv_set_ifindex(sd_radv *ra, int interface_index);
 int sd_radv_set_mac(sd_radv *ra, const struct ether_addr *mac_addr);
 int sd_radv_set_mtu(sd_radv *ra, uint32_t mtu);
 int sd_radv_set_hop_limit(sd_radv *ra, uint8_t hop_limit);
-int sd_radv_set_router_lifetime(sd_radv *ra, uint32_t router_lifetime);
+int sd_radv_set_router_lifetime(sd_radv *ra, uint16_t router_lifetime);
 int sd_radv_set_managed_information(sd_radv *ra, int managed);
 int sd_radv_set_other_information(sd_radv *ra, int other);
 int sd_radv_set_preference(sd_radv *ra, unsigned preference);
index d78e8db257ca3e047a5f3ca9233ddf316dd2153e..ee58d18137d4ad0d8f2e9ccaec6ebeb903de5749 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosdresolvehfoo
 #define foosdresolvehfoo
 
index 151b423d51df0ec92d2dc05297911dedcfbb7782..57013d011fce0f3f71b0b38db5d1e8867dee9124 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #ifndef foosdutf8hfoo
 #define foosdutf8hfoo
 
index fbd80969a4926530f5b6aba6e1a25bcc6257956d..6b0acd529e48ce7f9e5e4841e0190f96ddb50ad4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 #include <utmp.h>
@@ -1391,18 +1391,8 @@ static bool item_equal(Item *a, Item *b) {
 static int parse_line(const char *fname, unsigned line, const char *buffer) {
 
         static const Specifier specifier_table[] = {
-                { 'm', specifier_machine_id,      NULL },
-                { 'b', specifier_boot_id,         NULL },
-                { 'H', specifier_host_name,       NULL },
-                { 'l', specifier_short_host_name, NULL },
-                { 'v', specifier_kernel_release,  NULL },
-                { 'a', specifier_architecture,    NULL },
-                { 'o', specifier_os_id,           NULL },
-                { 'w', specifier_os_version_id,   NULL },
-                { 'B', specifier_os_build_id,     NULL },
-                { 'W', specifier_os_variant_id,   NULL },
-                { 'T', specifier_tmp_dir,         NULL },
-                { 'V', specifier_var_tmp_dir,     NULL },
+                COMMON_SYSTEM_SPECIFIERS,
+                COMMON_TMP_SPECIFIERS,
                 {}
         };
 
@@ -1825,10 +1815,15 @@ static int parse_argv(int argc, char *argv[]) {
                         break;
 
                 case ARG_IMAGE:
+#ifdef STANDALONE
+                        return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP),
+                                               "This systemd-sysusers version is compiled without support for --image=.");
+#else
                         r = parse_path_argument_and_warn(optarg, /* suppress_root= */ false, &arg_image);
                         if (r < 0)
                                 return r;
                         break;
+#endif
 
                 case ARG_REPLACE:
                         if (!path_is_absolute(optarg) ||
@@ -1916,9 +1911,11 @@ static int read_config_files(char **args) {
 }
 
 static int run(int argc, char *argv[]) {
+#ifndef STANDALONE
         _cleanup_(loop_device_unrefp) LoopDevice *loop_device = NULL;
         _cleanup_(decrypted_image_unrefp) DecryptedImage *decrypted_image = NULL;
         _cleanup_(umount_and_rmdir_and_freep) char *unlink_dir = NULL;
+#endif
         _cleanup_close_ int lock = -1;
         Item *i;
         int r;
@@ -1938,6 +1935,7 @@ static int run(int argc, char *argv[]) {
         if (r < 0)
                 return r;
 
+#ifndef STANDALONE
         if (arg_image) {
                 assert(!arg_root);
 
@@ -1954,6 +1952,9 @@ static int run(int argc, char *argv[]) {
                 if (!arg_root)
                         return log_oom();
         }
+#else
+        assert(!arg_image);
+#endif
 
         /* If command line arguments are specified along with --replace, read all
          * configuration files and insert the positional arguments at the specified
index 7d6be317424738d40d5d66b01562975f0da1ca02..008a8250bbe78f9deea801f251abc25864caf2e0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdio.h>
index 9bb349996372f8669f0eb3d7904355aac009a0e8..12bcf35708d53ed8be2f3f13c632fa048f74ae73 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 awkscript = 'test-hashmap-ordered.awk'
 test_hashmap_ordered_c = custom_target(
@@ -126,8 +126,7 @@ tests += [
 
         [['src/test/test-dns-domain.c'],
          [libcore,
-          libshared,
-          libsystemd_network],
+          libshared],
          []],
 
         [['src/test/test-boot-timestamps.c'],
@@ -303,7 +302,8 @@ tests += [
 
         [['src/test/test-libcrypt-util.c'],
          [],
-         []],
+         [],
+         '', 'timeout=120'],
 
         [['src/test/test-offline-passwd.c',
           'src/shared/offline-passwd.c',
@@ -333,7 +333,7 @@ tests += [
 
         [['src/test/test-parse-util.c'],
          [],
-         []],
+         [libseccomp]],
 
         [['src/test/test-sysctl-util.c'],
          [],
@@ -433,6 +433,17 @@ tests += [
          [],
          []],
 
+        [['src/test/test-loop-block.c'],
+         [libcore,
+          libshared],
+         [threads,
+          libblkid],
+         '',
+         '',
+         [],
+         includes,
+         false],
+
         [['src/test/test-selinux.c'],
          [],
          []],
@@ -518,7 +529,6 @@ tests += [
           libjournal_core,
           libudev_core,
           libudev_static,
-          libsystemd_network,
           libshared],
          [threads,
           libseccomp,
@@ -754,7 +764,6 @@ tests += [
         [['src/test/test-udev.c'],
          [libudev_core,
           libudev_static,
-          libsystemd_network,
           libshared],
          [threads,
           librt,
@@ -764,6 +773,10 @@ tests += [
           libselinux],
          '', 'manual', '-DLOG_REALM=LOG_REALM_UDEV'],
 
+        [['src/test/test-udev-util.c'],
+         [],
+         []],
+
         [['src/test/test-id128.c'],
          [],
          []],
@@ -804,6 +817,14 @@ tests += [
         [['src/test/test-local-addresses.c'],
          [],
          []],
+
+        [['src/test/test-psi-util.c'],
+         [],
+         []],
+
+        [['src/test/test-qrcode-util.c'],
+         [libshared],
+         [libdl]],
 ]
 
 ############################################################
index 08764faa4f5a852b7292872ddfd2927dacab6b30..37c8265268ce7c55fcded4bf541c6f043c13e7f1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <stdlib.h>
index 884372e60e228f5f0d28c06293e18323b17b450e..672dc68be92a13f69a58c9e1205b59a55d651433 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/socket.h>
 
index 72356aeaa4da2bec0fcf8923686d3a6d69e4f3df..b4319f9c7da93df87f622aca45e835cffe62e67f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <malloc.h>
 #include <stdint.h>
index 8c43bfc750ec265e9a58d63ada0836e453732daf..798c95c0e91ac3197ab2b0471615ee6bf0664ef0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "architecture.h"
 #include "log.h"
index d7352b54e072ffbb47b4d00e03a40f420b646938..9e21f3218946a898e9ca5e7266d33826b3f27428 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/if_arp.h>
 
index 098bb35bce67ebebc8fc43e99d743d21eae4d1f2..06158acf12bffb243c589d0b8f44aea6e39f18bb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "ask-password-api.h"
 #include "strv.h"
index 7d8accc2fc0af85a64cc9575be6a75cadd77b65d..8eefad50447bbe59c060ba7fc63b97b29eb2be3f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <unistd.h>
index 10417f662f9d3be4708c7d3c65626ef058df5e60..6ef2998a56508b52a422560782d2eabd80e16293 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 /*
  * IPC barrier tests
index b281c1ae74e40dd377d7057dc4848c8307b4624c..9c5d551d276255a96ed3d29cc46777ad1c806d64 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bitmap.h"
 
index 29074ecccd38de6517430c0c59d2c21dfe49c7e5..ae5b5821f0fa822ba2553939d67fb97579dcca0c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/types.h>
 #include <unistd.h>
index d2740bca73012938dd750fa929c6efe721e2c02d..2c5eb7313bd389154a2d4dd66fec5fcc4cb78b0b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/resource.h>
 #include <sys/time.h>
index 71aed125583d34ad4a42588a19c7672275ef86ab..cb7d8398a81c59297eade2ea8e9110efd523f194 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/bpf_insn.h>
 #include <string.h>
index 9dbe4dccd136f442e521168d1de8ee39c747796d..e840536d4b37273f10e87baf9bb944d68cd36ab6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 
index a536608ce094ae5b089c9ef84ce2d2dcf01780c6..0381ba1ee4feb24e47df3341a1d4c1e373556dc7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "bus-util.h"
 #include "log.h"
index d566638d5d46b29b73beee373d4ebbdbcc1214be..e0b7f2280843db66a371c6da1b5c4259fd5a7d3f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "calendarspec.h"
index 81d5c456d749b122a699f30c41c51517eeb968fa..c4b40f34faca09f33fc48b1444dc3d3b68d37495 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 #include <sys/prctl.h>
@@ -55,7 +55,7 @@ static void test_cap_list(void) {
 
 static void test_capability_set_one(uint64_t c, const char *t) {
         _cleanup_free_ char *t1 = NULL;
-        uint64_t c1, c_masked = c & ((UINT64_C(1) << capability_list_length()) - 1);
+        uint64_t c1, c_masked = c & all_capabilities();
 
         assert_se(capability_set_to_string_alloc(c, &t1) == 0);
         assert_se(streq(t1, t));
@@ -70,7 +70,7 @@ static void test_capability_set_one(uint64_t c, const char *t) {
         assert_se(c1 == c_masked);
 }
 
-static void test_capability_set(void) {
+static void test_capability_set_from_string(void) {
         uint64_t c;
 
         assert_se(capability_set_from_string(NULL, &c) == 0);
@@ -87,38 +87,42 @@ static void test_capability_set(void) {
 
         assert_se(capability_set_from_string("0 1 2 3", &c) == 0);
         assert_se(c == (UINT64_C(1) << 4) - 1);
+}
+
+static void test_capability_set_to_string(uint64_t invalid_cap_set) {
+        uint64_t c;
 
-        test_capability_set_one(0, "");
-        test_capability_set_one(
-                UINT64_C(1) << CAP_DAC_OVERRIDE,
-                "cap_dac_override");
-        test_capability_set_one(
-                UINT64_C(1) << CAP_DAC_OVERRIDE |
-                UINT64_C(1) << capability_list_length(),
-                "cap_dac_override");
-        test_capability_set_one(
-                UINT64_C(1) << capability_list_length(), "");
-        test_capability_set_one(
-                UINT64_C(1) << CAP_CHOWN |
-                UINT64_C(1) << CAP_DAC_OVERRIDE |
-                UINT64_C(1) << CAP_DAC_READ_SEARCH |
-                UINT64_C(1) << CAP_FOWNER |
-                UINT64_C(1) << CAP_SETGID |
-                UINT64_C(1) << CAP_SETUID |
-                UINT64_C(1) << CAP_SYS_PTRACE |
-                UINT64_C(1) << CAP_SYS_ADMIN |
-                UINT64_C(1) << CAP_AUDIT_CONTROL |
-                UINT64_C(1) << CAP_MAC_OVERRIDE |
-                UINT64_C(1) << CAP_SYSLOG |
-                UINT64_C(1) << (capability_list_length() + 1),
-                "cap_chown cap_dac_override cap_dac_read_search cap_fowner "
-                "cap_setgid cap_setuid cap_sys_ptrace cap_sys_admin "
-                "cap_audit_control cap_mac_override cap_syslog");
+        test_capability_set_one(invalid_cap_set, "");
+
+        c = (UINT64_C(1) << CAP_DAC_OVERRIDE | invalid_cap_set);
+        test_capability_set_one(c, "cap_dac_override");
+
+        c = (UINT64_C(1) << CAP_CHOWN |
+             UINT64_C(1) << CAP_DAC_OVERRIDE |
+             UINT64_C(1) << CAP_DAC_READ_SEARCH |
+             UINT64_C(1) << CAP_FOWNER |
+             UINT64_C(1) << CAP_SETGID |
+             UINT64_C(1) << CAP_SETUID |
+             UINT64_C(1) << CAP_SYS_PTRACE |
+             UINT64_C(1) << CAP_SYS_ADMIN |
+             UINT64_C(1) << CAP_AUDIT_CONTROL |
+             UINT64_C(1) << CAP_MAC_OVERRIDE |
+             UINT64_C(1) << CAP_SYSLOG |
+             invalid_cap_set);
+        test_capability_set_one(c, ("cap_chown cap_dac_override cap_dac_read_search cap_fowner "
+                                    "cap_setgid cap_setuid cap_sys_ptrace cap_sys_admin "
+                                    "cap_audit_control cap_mac_override cap_syslog"));
 }
 
 int main(int argc, char *argv[]) {
         test_cap_list();
-        test_capability_set();
+        test_capability_set_from_string();
+        test_capability_set_to_string(0);
+
+        /* once the kernel supports 63 caps, there are no 'invalid' numbers
+         * for us to test with */
+        if (cap_last_cap() < 63)
+                test_capability_set_to_string(all_capabilities() + 1);
 
         return 0;
 }
index 2d47c77f4669ece391fcd1f588d1673efb65c3b9..0ff56070b163fb25b4f1188641f826f135bbc25f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
 #include <pwd.h>
index a445acc955071a3a58e76cb6aa709fc8e086fab1..be73be83f8225f69639e8d8c499bc633ef1c17c5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "cgroup.h"
 #include "log.h"
index 27bfcdc17fc2b42e1df2ac96520ce241e457bea7..b53e327c63d302e5d6937e5aaae073a0777e1ee8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 
index 25fa0d75df0c0ee78ad008e971f2926c5df333c8..4978a92e4632beb4652cc0eb0ea08ab01aecd8df 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
@@ -18,7 +18,7 @@ static void test_is_wanted_print(bool header) {
         assert_se(proc_cmdline(&cmdline) >= 0);
         log_info("cmdline: %s", cmdline);
         if (header) {
-                log_info(_CGROUP_HIERARCHY_);
+                log_info("default-hierarchy=" DEFAULT_HIERARCHY_NAME);
                 (void) system("findmnt -n /sys/fs/cgroup");
         }
 
index f4843374ea320fef3c5f77189b4d43b39e9aaeef..b03f6ff12ee2808259ff814b1fe3714559c18f41 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 
index eff586a2e1d5497f5e1e34e7204219dfce1a352b..41b1df117ee69dc11731676d037df488f1acc851 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "build.h"
index 4fbb186f52cfe622d1fe8af724d167fcf5c58f7c..722e11a0c0c2c92408040e045e02bbf69e4b2a99 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
index f7b3dd5e00509b873bd0d397e43eab7211747b41..d9b9b62dc5a5c00b4b813fbb39044b342887c15b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #include <getopt.h>
 
 #include "fd-util.h"
index aa11bd270ffda8f8a88e48512419037364061eb2..66c6fd97d1dc09dbf7e25a9253920c1d0ff6901b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/xattr.h>
 #include <unistd.h>
index 271d4655463a183b97addc37b04aa671ee21b073..714935cb817184294edd2b5085ad6c121ffe8093 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2016 Canonical Ltd.
 ***/
index b42de612003d518936832eab2efb24ac5f53944c..15099d8df8b521cba8c320594d6ce3d6cec4fe33 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 #include <sys/types.h>
index f37f32f1b5288f29cbfd23805cb8166ff036588f..ee7bbd1002d2ca3fe56d9a266a35989a241125e4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2014 Michael Marineau
 ***/
index 07edc17f92ef6d79b00540115f873f8e24f92ab8..04b610c6f1fdb29f690d46049a46a514b011e001 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "conf-parser.h"
 #include "fd-util.h"
index 6ed655a358bc0c1ff68bcfc0c6cef2556e01f4ed..ffa929788928e14a9bf4bdc8faecdbe67d181d67 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/xattr.h>
 #include <unistd.h>
index 14a78007e3188af9dce6033c238437e18cbebed1..f9a44b2c6589d843e71b130fef0809de5ee06f03 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "coredump-util.h"
index 450e19e06f2d90166cca85cb493a2d69aa1750c8..0cfc883d66885d2c951e4ba99089f7c710fbb0bf 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "cpu-set-util.h"
index 6ca821581f33c629bba1d037faf8d3102f363d2d..e6dd29a0a7a378c56b69d3ad98d829065da0aead 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
index f39eca61763ead0741631a2e945d99c2f429b356..47b70967385554e6b73de64be07325dbe4e6d8f8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "string-util.h"
index 11196cd4d6adf143b78eba5319f2d7448bfcd363..ea9df56aebc0bddfdbdbc719f88b7c3274284c39 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "capability-util.h"
 #include "dev-setup.h"
index ad8d9ace16c180a7441768e27f178a01561d1874..9efb3fe3b3f9754ab426fb9793f840aa8d86a57a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/types.h>
 
index 148ebaa4d0728050516b08741d3bd29c72b57e66..35981ebc3b46fcf74bb2081651909914dac1dbc7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <dlfcn.h>
 #include <stdlib.h>
index b73dc56465617a3336c2aee7c988958a2a12a0ee..2df2380de4d2b2dea23f19adb7ba4bfd930c5a82 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "dns-domain.h"
index 92692bd487b80bab09ae816932333af01b611412..a25c0b57bdafcca4648c9d2d0c5909ce8d2d60d8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 
index 8ce28ed9f53a46be8fa6223968dcbe40a0c6d247..88214aa7a68a5f7321456b13ed4322677ae25e20 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "emergency-action.h"
 #include "tests.h"
index 6465151b271d2511052348e836d97efbe1428e7f..cd7cfd9f09b09a4deebd00b6c8a953e6e13f7c7e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdio.h>
index 23779b9b8775999c5dc40f1c40281a795681f1f0..a3acde17bacb99035ac7fdb612a56f35d79e49e6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "env-file.h"
 #include "fd-util.h"
index f0ffe89729b069617b6d85b611c1ef81a12151d3..dd150b30680c129e48ebb2070f1fff1055a073fb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "env-util.h"
 #include "fd-util.h"
@@ -10,6 +10,8 @@
 #include "util.h"
 
 static void test_strv_env_delete(void) {
+        log_info("/* %s */", __func__);
+
         _cleanup_strv_free_ char **a = NULL, **b = NULL, **c = NULL, **d = NULL;
 
         a = strv_new("FOO=BAR", "WALDO=WALDO", "WALDO=", "PIEP", "SCHLUMPF=SMURF");
@@ -30,9 +32,9 @@ static void test_strv_env_delete(void) {
 }
 
 static void test_strv_env_get(void) {
-        char **l;
+        log_info("/* %s */", __func__);
 
-        l = STRV_MAKE("ONE_OR_TWO=1", "THREE=3", "ONE_OR_TWO=2", "FOUR=4");
+        char **l = STRV_MAKE("ONE_OR_TWO=1", "THREE=3", "ONE_OR_TWO=2", "FOUR=4");
 
         assert_se(streq(strv_env_get(l, "ONE_OR_TWO"), "2"));
         assert_se(streq(strv_env_get(l, "THREE"), "3"));
@@ -40,6 +42,8 @@ static void test_strv_env_get(void) {
 }
 
 static void test_strv_env_unset(void) {
+        log_info("/* %s */", __func__);
+
         _cleanup_strv_free_ char **l = NULL;
 
         l = strv_new("PIEP", "SCHLUMPF=SMURFF", "NANANANA=YES");
@@ -53,6 +57,8 @@ static void test_strv_env_unset(void) {
 }
 
 static void test_strv_env_set(void) {
+        log_info("/* %s */", __func__);
+
         _cleanup_strv_free_ char **l = NULL, **r = NULL;
 
         l = strv_new("PIEP", "SCHLUMPF=SMURFF", "NANANANA=YES");
@@ -69,6 +75,8 @@ static void test_strv_env_set(void) {
 }
 
 static void test_strv_env_merge(void) {
+        log_info("/* %s */", __func__);
+
         _cleanup_strv_free_ char **a = NULL, **b = NULL, **r = NULL;
 
         a = strv_new("FOO=BAR", "WALDO=WALDO", "WALDO=", "PIEP", "SCHLUMPF=SMURF");
@@ -97,6 +105,8 @@ static void test_strv_env_merge(void) {
 }
 
 static void test_env_strv_get_n(void) {
+        log_info("/* %s */", __func__);
+
         const char *_env[] = {
                 "FOO=NO NO NO",
                 "FOO=BAR BAR",
@@ -127,6 +137,8 @@ static void test_env_strv_get_n(void) {
 }
 
 static void test_replace_env(bool braceless) {
+        log_info("/* %s(braceless=%s) */", __func__, yes_no(braceless));
+
         const char *env[] = {
                 "FOO=BAR BAR",
                 "BAR=waldo",
@@ -152,6 +164,8 @@ static void test_replace_env(bool braceless) {
 }
 
 static void test_replace_env2(bool extended) {
+        log_info("/* %s(extended=%s) */", __func__, yes_no(extended));
+
         const char *env[] = {
                 "FOO=foo",
                 "BAR=bar",
@@ -180,6 +194,8 @@ static void test_replace_env2(bool extended) {
 }
 
 static void test_replace_env_argv(void) {
+        log_info("/* %s */", __func__);
+
         const char *env[] = {
                 "FOO=BAR BAR",
                 "BAR=waldo",
@@ -230,24 +246,26 @@ static void test_replace_env_argv(void) {
 }
 
 static void test_env_clean(void) {
-        _cleanup_strv_free_ char **e;
-
-        e = strv_new("FOOBAR=WALDO",
-                     "FOOBAR=WALDO",
-                     "FOOBAR",
-                     "F",
-                     "X=",
-                     "F=F",
-                     "=",
-                     "=F",
-                     "",
-                     "0000=000",
-                     "äöüß=abcd",
-                     "abcd=äöüß",
-                     "xyz\n=xyz",
-                     "xyz=xyz\n",
-                     "another=one",
-                     "another=final one");
+        log_info("/* %s */", __func__);
+
+        _cleanup_strv_free_ char **e = strv_new("FOOBAR=WALDO",
+                                                "FOOBAR=WALDO",
+                                                "FOOBAR",
+                                                "F",
+                                                "X=",
+                                                "F=F",
+                                                "=",
+                                                "=F",
+                                                "",
+                                                "0000=000",
+                                                "äöüß=abcd",
+                                                "abcd=äöüß",
+                                                "xyz\n=xyz",
+                                                "xyz=xyz\n",
+                                                "another=one",
+                                                "another=final one",
+                                                "CRLF=\r\n",
+                                                "BASH_FUNC_foo%%=() {  echo foo\n}");
         assert_se(e);
         assert_se(!strv_env_is_valid(e));
         assert_se(strv_env_clean(e) == e);
@@ -263,6 +281,8 @@ static void test_env_clean(void) {
 }
 
 static void test_env_name_is_valid(void) {
+        log_info("/* %s */", __func__);
+
         assert_se(env_name_is_valid("test"));
 
         assert_se(!env_name_is_valid(NULL));
@@ -275,14 +295,20 @@ static void test_env_name_is_valid(void) {
 }
 
 static void test_env_value_is_valid(void) {
+        log_info("/* %s */", __func__);
+
         assert_se(env_value_is_valid(""));
         assert_se(env_value_is_valid("głąb kapuściany"));
         assert_se(env_value_is_valid("printf \"\\x1b]0;<mock-chroot>\\x07<mock-chroot>\""));
         assert_se(env_value_is_valid("tab\tcharacter"));
         assert_se(env_value_is_valid("new\nline"));
+        assert_se(!env_value_is_valid("Show this?\rNope. Show that!"));
+        assert_se(!env_value_is_valid("new DOS\r\nline"));
 }
 
 static void test_env_assignment_is_valid(void) {
+        log_info("/* %s */", __func__);
+
         assert_se(env_assignment_is_valid("a="));
         assert_se(env_assignment_is_valid("b=głąb kapuściany"));
         assert_se(env_assignment_is_valid("c=\\007\\009\\011"));
index 699747fcc3cae4945d6c5b7b97d34cd650d4f345..3e410ca299ed7af3c2ac0a5c2afbf2a95b8d10aa 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "escape.h"
index f5d640a69037976e2e6513cb047faf2bcae05865..e9e8e21040527e903b427438f23eb7cb5bb67c9e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sys/stat.h>
@@ -372,10 +372,7 @@ static void test_environment_gathering(void) {
         assert_se(streq(strv_env_get(env, "PATH"), DEFAULT_PATH ":/no/such/file"));
 
         /* reset environ PATH */
-        if (old)
-                (void) setenv("PATH", old, 1);
-        else
-                (void) unsetenv("PATH");
+        assert_se(set_unset_env("PATH", old, true) == 0);
 }
 
 static void test_error_catching(void) {
index c18d68683e1684a3ef74b3934cefc1b0a1dfac94..3b6a4be26028f7cf4bfcd05bad511f0aa104423c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 #include <sys/prctl.h>
@@ -36,11 +36,6 @@ static int cld_dumped_to_killed(int code) {
         return code == CLD_DUMPED ? CLD_KILLED : code;
 }
 
-_unused_ static bool is_run_on_travis_ci(void) {
-        /* https://docs.travis-ci.com/user/environment-variables#default-environment-variables */
-        return streq_ptr(getenv("TRAVIS"), "true");
-}
-
 static void wait_for_service_finish(Manager *m, Unit *unit) {
         Service *service = NULL;
         usec_t ts;
@@ -897,17 +892,17 @@ int main(int argc, char *argv[]) {
         test_setup_logging(LOG_DEBUG);
 
 #if HAS_FEATURE_ADDRESS_SANITIZER
-        if (is_run_on_travis_ci()) {
+        if (strstr_ptr(ci_environment(), "travis")) {
                 log_notice("Running on TravisCI under ASan, skipping, see https://github.com/systemd/systemd/issues/10696");
                 return EXIT_TEST_SKIP;
         }
 #endif
 
-        (void) unsetenv("USER");
-        (void) unsetenv("LOGNAME");
-        (void) unsetenv("SHELL");
-        (void) unsetenv("HOME");
-        (void) unsetenv("TMPDIR");
+        assert_se(unsetenv("USER") == 0);
+        assert_se(unsetenv("LOGNAME") == 0);
+        assert_se(unsetenv("SHELL") == 0);
+        assert_se(unsetenv("HOME") == 0);
+        assert_se(unsetenv("TMPDIR") == 0);
 
         can_unshare = have_namespaces();
 
index e90375f6bd864873fecda8c4989effca2b143c9e..4dc197301d1124a084ab5c7be013ad0d69a9df9a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "exit-status.h"
 #include "string-util.h"
index cc1f29385f31a502343fb431660d83274a2720ee..56b516fe40af2ada77fec8f3302e4b09240fd94a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdlib.h>
index 5351fdb9e9db048b74cb20c47570332ba6d4af44..bece89aef25bdd221a2201e26cfee2632d811b4d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <unistd.h>
index 212fe0dbd4703383991c8b37862abe1fb5d86935..c77d7ffe83c2e754fb78faf5e1684a0cc082c69a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <unistd.h>
index ce5af43db5796d5cd3fc08fea6facc9ef84af99b..a5834eba364a0812ed89a9e4b31950eb2bc19cd7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <limits.h>
@@ -15,6 +15,7 @@
 #include "io-util.h"
 #include "parse-util.h"
 #include "process-util.h"
+#include "random-util.h"
 #include "rm-rf.h"
 #include "socket-util.h"
 #include "string-util.h"
@@ -863,7 +864,7 @@ static void test_read_nul_string(void) {
 static void test_read_full_file_socket(void) {
         _cleanup_(rm_rf_physical_and_freep) char *z = NULL;
         _cleanup_close_ int listener = -1;
-        _cleanup_free_ char *data = NULL;
+        _cleanup_free_ char *data = NULL, *clientname = NULL;
         union sockaddr_union sa;
         const char *j;
         size_t size;
@@ -883,23 +884,35 @@ static void test_read_full_file_socket(void) {
         assert_se(bind(listener, &sa.sa, SOCKADDR_UN_LEN(sa.un)) >= 0);
         assert_se(listen(listener, 1) >= 0);
 
+        /* Bind the *client* socket to some randomized name, to verify that this works correctly. */
+        assert_se(asprintf(&clientname, "@%" PRIx64 "/test-bindname", random_u64()) >= 0);
+
         r = safe_fork("(server)", FORK_DEATHSIG|FORK_LOG, &pid);
         assert_se(r >= 0);
         if (r == 0) {
+                union sockaddr_union peer = {};
+                socklen_t peerlen = sizeof(peer);
                 _cleanup_close_ int rfd = -1;
                 /* child */
 
                 rfd = accept4(listener, NULL, 0, SOCK_CLOEXEC);
                 assert_se(rfd >= 0);
 
+                assert_se(getpeername(rfd, &peer.sa, &peerlen) >= 0);
+
+                assert_se(peer.un.sun_family == AF_UNIX);
+                assert_se(peerlen > offsetof(struct sockaddr_un, sun_path));
+                assert_se(peer.un.sun_path[0] == 0);
+                assert_se(streq(peer.un.sun_path + 1, clientname + 1));
+
 #define TEST_STR "This is a test\nreally."
 
                 assert_se(write(rfd, TEST_STR, strlen(TEST_STR)) == strlen(TEST_STR));
                 _exit(EXIT_SUCCESS);
         }
 
-        assert_se(read_full_file_full(AT_FDCWD, j, 0, &data, &size) == -ENXIO);
-        assert_se(read_full_file_full(AT_FDCWD, j, READ_FULL_FILE_CONNECT_SOCKET, &data, &size) >= 0);
+        assert_se(read_full_file_full(AT_FDCWD, j, UINT64_MAX, SIZE_MAX, 0, NULL, &data, &size) == -ENXIO);
+        assert_se(read_full_file_full(AT_FDCWD, j, UINT64_MAX, SIZE_MAX, READ_FULL_FILE_CONNECT_SOCKET, clientname, &data, &size) >= 0);
         assert_se(size == strlen(TEST_STR));
         assert_se(streq(data, TEST_STR));
 
@@ -907,6 +920,50 @@ static void test_read_full_file_socket(void) {
 #undef TEST_STR
 }
 
+static void test_read_full_file_offset_size(void) {
+        _cleanup_fclose_ FILE *f = NULL;
+        _cleanup_(unlink_and_freep) char *fn = NULL;
+        _cleanup_free_ char *rbuf = NULL;
+        size_t rbuf_size;
+        uint8_t buf[4711];
+
+        random_bytes(buf, sizeof(buf));
+
+        assert_se(tempfn_random_child(NULL, NULL, &fn) >= 0);
+        assert_se(f = fopen(fn, "we"));
+        assert_se(fwrite(buf, 1, sizeof(buf), f) == sizeof(buf));
+        assert_se(fflush_and_check(f) >= 0);
+
+        assert_se(read_full_file_full(AT_FDCWD, fn, UINT64_MAX, SIZE_MAX, 0, NULL, &rbuf, &rbuf_size) >= 0);
+        assert_se(rbuf_size == sizeof(buf));
+        assert_se(memcmp(buf, rbuf, rbuf_size) == 0);
+        rbuf = mfree(rbuf);
+
+        assert_se(read_full_file_full(AT_FDCWD, fn, UINT64_MAX, 128, 0, NULL, &rbuf, &rbuf_size) >= 0);
+        assert_se(rbuf_size == 128);
+        assert_se(memcmp(buf, rbuf, rbuf_size) == 0);
+        rbuf = mfree(rbuf);
+
+        assert_se(read_full_file_full(AT_FDCWD, fn, 1234, SIZE_MAX, 0, NULL, &rbuf, &rbuf_size) >= 0);
+        assert_se(rbuf_size == sizeof(buf) - 1234);
+        assert_se(memcmp(buf + 1234, rbuf, rbuf_size) == 0);
+        rbuf = mfree(rbuf);
+
+        assert_se(read_full_file_full(AT_FDCWD, fn, 2345, 777, 0, NULL, &rbuf, &rbuf_size) >= 0);
+        assert_se(rbuf_size == 777);
+        assert_se(memcmp(buf + 2345, rbuf, rbuf_size) == 0);
+        rbuf = mfree(rbuf);
+
+        assert_se(read_full_file_full(AT_FDCWD, fn, 4700, 20, 0, NULL, &rbuf, &rbuf_size) >= 0);
+        assert_se(rbuf_size == 11);
+        assert_se(memcmp(buf + 4700, rbuf, rbuf_size) == 0);
+        rbuf = mfree(rbuf);
+
+        assert_se(read_full_file_full(AT_FDCWD, fn, 10000, 99, 0, NULL, &rbuf, &rbuf_size) >= 0);
+        assert_se(rbuf_size == 0);
+        rbuf = mfree(rbuf);
+}
+
 int main(int argc, char *argv[]) {
         test_setup_logging(LOG_DEBUG);
 
@@ -933,6 +990,7 @@ int main(int argc, char *argv[]) {
         test_read_line4();
         test_read_nul_string();
         test_read_full_file_socket();
+        test_read_full_file_offset_size();
 
         return 0;
 }
index 1788e8d1ca8c262a5d50c894037ab8abc6e26c2d..25c5a6cbf5d013b5ea327dd160386e579ba5dcf6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "firewall-util.h"
 #include "log.h"
@@ -10,31 +10,31 @@ int main(int argc, char *argv[]) {
         int r;
         test_setup_logging(LOG_DEBUG);
 
-        r = fw_add_masquerade(true, AF_INET, 0, NULL, 0, "foobar", NULL, 0);
+        r = fw_add_masquerade(true, AF_INET, NULL, 0);
         if (r < 0)
                 log_error_errno(r, "Failed to modify firewall: %m");
 
-        r = fw_add_masquerade(true, AF_INET, 0, NULL, 0, "foobar", NULL, 0);
+        r = fw_add_masquerade(true, AF_INET, NULL, 0);
         if (r < 0)
                 log_error_errno(r, "Failed to modify firewall: %m");
 
-        r = fw_add_masquerade(false, AF_INET, 0, NULL, 0, "foobar", NULL, 0);
+        r = fw_add_masquerade(false, AF_INET, NULL, 0);
         if (r < 0)
                 log_error_errno(r, "Failed to modify firewall: %m");
 
-        r = fw_add_local_dnat(true, AF_INET, IPPROTO_TCP, NULL, NULL, 0, NULL, 0, 4711, &MAKE_IN_ADDR_UNION(1, 2, 3, 4), 815, NULL);
+        r = fw_add_local_dnat(true, AF_INET, IPPROTO_TCP, 4711, &MAKE_IN_ADDR_UNION(1, 2, 3, 4), 815, NULL);
         if (r < 0)
                 log_error_errno(r, "Failed to modify firewall: %m");
 
-        r = fw_add_local_dnat(true, AF_INET, IPPROTO_TCP, NULL, NULL, 0, NULL, 0, 4711, &MAKE_IN_ADDR_UNION(1, 2, 3, 4), 815, NULL);
+        r = fw_add_local_dnat(true, AF_INET, IPPROTO_TCP, 4711, &MAKE_IN_ADDR_UNION(1, 2, 3, 4), 815, NULL);
         if (r < 0)
                 log_error_errno(r, "Failed to modify firewall: %m");
 
-        r = fw_add_local_dnat(true, AF_INET, IPPROTO_TCP, NULL, NULL, 0, NULL, 0, 4711, &MAKE_IN_ADDR_UNION(1, 2, 3, 5), 815, &MAKE_IN_ADDR_UNION(1, 2, 3, 4));
+        r = fw_add_local_dnat(true, AF_INET, IPPROTO_TCP, 4711, &MAKE_IN_ADDR_UNION(1, 2, 3, 5), 815, &MAKE_IN_ADDR_UNION(1, 2, 3, 4));
         if (r < 0)
                 log_error_errno(r, "Failed to modify firewall: %m");
 
-        r = fw_add_local_dnat(false, AF_INET, IPPROTO_TCP, NULL, NULL, 0, NULL, 0, 4711, &MAKE_IN_ADDR_UNION(1, 2, 3, 5), 815, NULL);
+        r = fw_add_local_dnat(false, AF_INET, IPPROTO_TCP, 4711, &MAKE_IN_ADDR_UNION(1, 2, 3, 5), 815, NULL);
         if (r < 0)
                 log_error_errno(r, "Failed to modify firewall: %m");
 
index 283cf157babb8a258ef5f1a7fde19a19d028745e..24ee1df953af26081d07a2b77b374adc02ac0051 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
@@ -12,6 +12,8 @@ static void test_issue_9549(void) {
         _cleanup_(table_unrefp) Table *table = NULL;
         _cleanup_free_ char *formatted = NULL;
 
+        log_info("/* %s */", __func__);
+
         assert_se(table = table_new("name", "type", "ro", "usage", "created", "modified"));
         assert_se(table_set_align_percent(table, TABLE_HEADER_CELL(3), 100) >= 0);
         assert_se(table_add_many(table,
@@ -36,6 +38,8 @@ static void test_multiline(void) {
         _cleanup_(table_unrefp) Table *table = NULL;
         _cleanup_free_ char *formatted = NULL;
 
+        log_info("/* %s */", __func__);
+
         assert_se(table = table_new("foo", "bar"));
 
         assert_se(table_set_align_percent(table, TABLE_HEADER_CELL(1), 100) >= 0);
@@ -148,6 +152,8 @@ static void test_strv(void) {
         _cleanup_(table_unrefp) Table *table = NULL;
         _cleanup_free_ char *formatted = NULL;
 
+        log_info("/* %s */", __func__);
+
         assert_se(table = table_new("foo", "bar"));
 
         assert_se(table_set_align_percent(table, TABLE_HEADER_CELL(1), 100) >= 0);
@@ -256,8 +262,111 @@ static void test_strv(void) {
         formatted = mfree(formatted);
 }
 
-int main(int argc, char *argv[]) {
+static void test_strv_wrapped(void) {
+        _cleanup_(table_unrefp) Table *table = NULL;
+        _cleanup_free_ char *formatted = NULL;
+
+        log_info("/* %s */", __func__);
+
+        assert_se(table = table_new("foo", "bar"));
+
+        assert_se(table_set_align_percent(table, TABLE_HEADER_CELL(1), 100) >= 0);
+
+        assert_se(table_add_many(table,
+                                 TABLE_STRV_WRAPPED, STRV_MAKE("three", "different", "lines"),
+                                 TABLE_STRV_WRAPPED, STRV_MAKE("two", "lines")) >= 0);
+
+        table_set_cell_height_max(table, 1);
+        assert_se(table_format(table, &formatted) >= 0);
+        fputs(formatted, stdout);
+        assert_se(streq(formatted,
+                        "FOO                         BAR\n"
+                        "three different lines two lines\n"));
+        formatted = mfree(formatted);
+
+        table_set_cell_height_max(table, 2);
+        assert_se(table_format(table, &formatted) >= 0);
+        fputs(formatted, stdout);
+        assert_se(streq(formatted,
+                        "FOO                         BAR\n"
+                        "three different lines two lines\n"));
+        formatted = mfree(formatted);
+
+        table_set_cell_height_max(table, 3);
+        assert_se(table_format(table, &formatted) >= 0);
+        fputs(formatted, stdout);
+        assert_se(streq(formatted,
+                        "FOO                         BAR\n"
+                        "three different lines two lines\n"));
+        formatted = mfree(formatted);
+
+        table_set_cell_height_max(table, (size_t) -1);
+        assert_se(table_format(table, &formatted) >= 0);
+        fputs(formatted, stdout);
+        assert_se(streq(formatted,
+                        "FOO                         BAR\n"
+                        "three different lines two lines\n"));
+        formatted = mfree(formatted);
+
+        assert_se(table_add_many(table,
+                                 TABLE_STRING, "short",
+                                 TABLE_STRV_WRAPPED, STRV_MAKE("a", "pair")) >= 0);
+
+        assert_se(table_add_many(table,
+                                 TABLE_STRV_WRAPPED, STRV_MAKE("short2"),
+                                 TABLE_STRV_WRAPPED, STRV_MAKE("a", "eight", "line", "ćęłł",
+                                                               "___5___", "___6___", "___7___", "___8___")) >= 0);
+
+        table_set_cell_height_max(table, 1);
+        assert_se(table_format(table, &formatted) >= 0);
+        fputs(formatted, stdout);
+        assert_se(streq(formatted,
+                        "FOO                             BAR\n"
+                        "three different…          two lines\n"
+                        "short                        a pair\n"
+                        "short2           a eight line ćęłł…\n"));
+        formatted = mfree(formatted);
+
+        table_set_cell_height_max(table, 2);
+        assert_se(table_format(table, &formatted) >= 0);
+        fputs(formatted, stdout);
+        assert_se(streq(formatted,
+                        "FOO                           BAR\n"
+                        "three different         two lines\n"
+                        "lines                            \n"
+                        "short                      a pair\n"
+                        "short2          a eight line ćęłł\n"
+                        "                 ___5___ ___6___…\n"));
+        formatted = mfree(formatted);
+
+        table_set_cell_height_max(table, 3);
+        assert_se(table_format(table, &formatted) >= 0);
+        fputs(formatted, stdout);
+        assert_se(streq(formatted,
+                        "FOO                           BAR\n"
+                        "three different         two lines\n"
+                        "lines                            \n"
+                        "short                      a pair\n"
+                        "short2          a eight line ćęłł\n"
+                        "                  ___5___ ___6___\n"
+                        "                  ___7___ ___8___\n"));
+        formatted = mfree(formatted);
 
+        table_set_cell_height_max(table, (size_t) -1);
+        assert_se(table_format(table, &formatted) >= 0);
+        fputs(formatted, stdout);
+        assert_se(streq(formatted,
+                        "FOO                           BAR\n"
+                        "three different         two lines\n"
+                        "lines                            \n"
+                        "short                      a pair\n"
+                        "short2          a eight line ćęłł\n"
+                        "                  ___5___ ___6___\n"
+                        "                  ___7___ ___8___\n"));
+        formatted = mfree(formatted);
+}
+
+int main(int argc, char *argv[]) {
         _cleanup_(table_unrefp) Table *t = NULL;
         _cleanup_free_ char *formatted = NULL;
 
@@ -399,6 +508,7 @@ int main(int argc, char *argv[]) {
         test_issue_9549();
         test_multiline();
         test_strv();
+        test_strv_wrapped();
 
         return 0;
 }
index 6558ee2b0a6f2b9ece864569405cbc34596bbdee..5562ac8761ca5bb0bbec2bbcfdc24624074558b6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "format-util.h"
 #include "macro.h"
index f63b1f5d5faea844bd70d363856a3de400f25523..e0ef8257bdd1c2f8904249226fae34d1f58d21c8 100644 (file)
@@ -1,9 +1,11 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
 #include "alloc-util.h"
+#include "copy.h"
 #include "fd-util.h"
+#include "fileio.h"
 #include "fs-util.h"
 #include "id128-util.h"
 #include "macro.h"
@@ -834,6 +836,51 @@ static void test_path_is_encrypted(void) {
         test_path_is_encrypted_one("/dev", booted > 0 ? false : -1);
 }
 
+static void test_conservative_rename(void) {
+        _cleanup_(unlink_and_freep) char *p = NULL;
+        _cleanup_free_ char *q = NULL;
+
+        assert_se(tempfn_random_child(NULL, NULL, &p) >= 0);
+        assert_se(write_string_file(p, "this is a test", WRITE_STRING_FILE_CREATE) >= 0);
+
+        assert_se(tempfn_random_child(NULL, NULL, &q) >= 0);
+
+        /* Check that the hardlinked "copy" is detected */
+        assert_se(link(p, q) >= 0);
+        assert_se(conservative_rename(AT_FDCWD, q, AT_FDCWD, p) == 0);
+        assert_se(access(q, F_OK) < 0 && errno == ENOENT);
+
+        /* Check that a manual copy is detected */
+        assert_se(copy_file(p, q, 0, (mode_t) -1, 0, 0, COPY_REFLINK) >= 0);
+        assert_se(conservative_rename(AT_FDCWD, q, AT_FDCWD, p) == 0);
+        assert_se(access(q, F_OK) < 0 && errno == ENOENT);
+
+        /* Check that a manual new writeout is also detected */
+        assert_se(write_string_file(q, "this is a test", WRITE_STRING_FILE_CREATE) >= 0);
+        assert_se(conservative_rename(AT_FDCWD, q, AT_FDCWD, p) == 0);
+        assert_se(access(q, F_OK) < 0 && errno == ENOENT);
+
+        /* Check that a minimally changed version is detected */
+        assert_se(write_string_file(q, "this is a_test", WRITE_STRING_FILE_CREATE) >= 0);
+        assert_se(conservative_rename(AT_FDCWD, q, AT_FDCWD, p) > 0);
+        assert_se(access(q, F_OK) < 0 && errno == ENOENT);
+
+        /* Check that this really is new updated version */
+        assert_se(write_string_file(q, "this is a_test", WRITE_STRING_FILE_CREATE) >= 0);
+        assert_se(conservative_rename(AT_FDCWD, q, AT_FDCWD, p) == 0);
+        assert_se(access(q, F_OK) < 0 && errno == ENOENT);
+
+        /* Make sure we detect extended files */
+        assert_se(write_string_file(q, "this is a_testx", WRITE_STRING_FILE_CREATE) >= 0);
+        assert_se(conservative_rename(AT_FDCWD, q, AT_FDCWD, p) > 0);
+        assert_se(access(q, F_OK) < 0 && errno == ENOENT);
+
+        /* Make sure we detect truncated files */
+        assert_se(write_string_file(q, "this is a_test", WRITE_STRING_FILE_CREATE) >= 0);
+        assert_se(conservative_rename(AT_FDCWD, q, AT_FDCWD, p) > 0);
+        assert_se(access(q, F_OK) < 0 && errno == ENOENT);
+}
+
 int main(int argc, char *argv[]) {
         test_setup_logging(LOG_INFO);
 
@@ -852,6 +899,7 @@ int main(int argc, char *argv[]) {
         test_rename_noreplace();
         test_chmod_and_chown();
         test_path_is_encrypted();
+        test_conservative_rename();
 
         return 0;
 }
index f3506045a1f2634deb6e23179e363e43bbd464d4..222ffbb2a75b6b487d0c2ff11353d54b57cef67d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 
index b28b4eb5a25488e4fad5b6a66e203f2dae91d6f5..2af040b63a5d56518e629757bdbe2ea2c00b8676 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "gcrypt-util.h"
index 667d15335fbf19c31df1d66e4b6756e82c6256e0..df6444c43384c3e8954114cb80691089b5f1447c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/stat.h>
index 44d1044bf37fe96eb6054853f6a1d51634f4ac18..270fcd0df4076419ec48160aae2ea4a5ba92704b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdio.h>
index 5ff5d096a63048e353413ce694a8906f5a6e1d3e..9ed6bee9da178c7db1c37f1e65db424852404b05 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "hashmap.h"
index 852712844f41f3fce691c3cc2e59dc9c577c1fe5..20bc97ce58376ac7cba776668d3c380cfdfbd87c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "hashmap.h"
 #include "string-util.h"
index 52217429b1541e9d0de87ba3752acf0c0509e249..f0f96797690439d0477968c228ddb16fd9cb6c0f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index 5ab82bba618e7162a172f5eefb0c0d608338d8fe..73839b3115197bc2160ad4ad65d4334fa9d5e54e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
index 710c0572e668db28b3ab2b99af4126ad7458a0d1..1a925f253c18e47571c8085835e391949d0eef71 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "hostname-setup.h"
 #include "util.h"
index 66eedddce83afd6efe986c8edd970198605ab073..a0649b9deb08a453d1ea4b27fe188056eab86fd9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/types.h>
index a9ecd0627bf6340715f3f0160b5a84e8ff9277af..2b6364566bfae4df0ee128350db126ffdffb474b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fnmatch.h>
 #include <netinet/in.h>
index 6fb2fd42987905aee9fa774f53de9f03b72a6062..aedec54a7f898ab83ee37c47f4be4d897daa1c33 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
index f1423fb635569e236caa7b9cf920e10f13a2c1c4..7cd91efcb7f75993693e0ceea001e6b3a9fe6a42 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 #include <string.h>
index 42e632a8a29e90cb1d49fa0ee62d8df151da54f3..104c022cb4ab7c48e9bde80b0cd5744887cdfc11 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <stdlib.h>
index 79390e52891cc3fed718e976f0e71551afd5ddc4..15bbbdeb727c5b379eb32335aad3cfc563d3f82c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <netinet/in.h>
 
index 4b658a0bdbbc70787ad154a5f6c0ba0ba2e06776..238f0bf6669872765325161c1e5407207c1dc0f4 100644 (file)
@@ -1,11 +1,12 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "clean-ipc.h"
-#include "user-util.h"
+#include "errno-util.h"
+#include "main-func.h"
 #include "tests.h"
-#include "util.h"
+#include "user-util.h"
 
-int main(int argc, char *argv[]) {
+static int run(int argc, char *argv[]) {
         uid_t uid;
         int r;
         const char* name = argv[1] ?: NOBODY_USER_NAME;
@@ -15,11 +16,14 @@ int main(int argc, char *argv[]) {
         r = get_user_creds(&name, &uid, NULL, NULL, NULL, 0);
         if (r == -ESRCH)
                 return log_tests_skipped("Failed to resolve user");
-        if (r < 0) {
-                log_error_errno(r, "Failed to resolve \"%s\": %m", name);
-                return EXIT_FAILURE;
-        }
+        if (r < 0)
+                return log_error_errno(r, "Failed to resolve \"%s\": %m", name);
 
         r = clean_ipc_by_uid(uid);
-        return  r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
+        if (ERRNO_IS_PRIVILEGE(r))
+                return log_tests_skipped("No privileges");
+
+        return r;
 }
+
+DEFINE_MAIN_FUNCTION_WITH_POSITIVE_FAILURE(run);
index 33a95c6b52ebfa104f706b97e2b0139793887918..024d976a75646cd80099de085e613072dd5b4905 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 
index 488335695618429ff73ff3c7a650f4087e14c3e2..da266d92ac34372be9c3f65041034c26c821a6d1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/types.h>
 #include <sys/stat.h>
index 6da93d6aed6291844b26c7313ec71a6a20f603c1..1d4b11945ec4c39de87150b8dd29b34e049b7f69 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <math.h>
 
index 58b83b686638b15e0d0d147e5ffb3863b8f75f00..cd296d698e1c5b2b9b5a16c5754335ffbd5455d5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #if HAVE_CRYPT_H
 #  include <crypt.h>
index c3395493d460b038c2f25996331a9be8384f97dc..bd2381f38e01fff9674f435521cd7358c24dc593 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "fd-util.h"
index 2cc679f42e1abfd5a0cfc36c840ccdddddc1f846..d162abaea0adb10bb6a6f01d2bad5222251d638a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <getopt.h>
index ca5361adb9d599f45abd0c059998c1a2c73ffa1c..fc6e1c8cd1068cdc9c15009d034645950a8add8f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2013 Jan Janssen
 ***/
index 799ac6a51a263f2fd8f2fdd135cc1f0a427e0e39..40c1fd053269a96e7850892949c394adcbf23fb0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <stddef.h>
@@ -748,26 +748,25 @@ static void test_config_parse_pass_environ(void) {
         _cleanup_strv_free_ char **passenv = NULL;
 
         r = config_parse_pass_environ(NULL, "fake", 1, "section", 1,
-                              "PassEnvironment", 0, "A B",
-                              &passenv, NULL);
+                                      "PassEnvironment", 0, "A B",
+                                      &passenv, NULL);
         assert_se(r >= 0);
         assert_se(strv_length(passenv) == 2);
         assert_se(streq(passenv[0], "A"));
         assert_se(streq(passenv[1], "B"));
 
         r = config_parse_pass_environ(NULL, "fake", 1, "section", 1,
-                              "PassEnvironment", 0, "",
-                              &passenv, NULL);
+                                      "PassEnvironment", 0, "",
+                                      &passenv, NULL);
         assert_se(r >= 0);
         assert_se(strv_isempty(passenv));
 
         r = config_parse_pass_environ(NULL, "fake", 1, "section", 1,
-                              "PassEnvironment", 0, "'invalid name' 'normal_name' A=1 \\",
-                              &passenv, NULL);
+                                      "PassEnvironment", 0, "'invalid name' 'normal_name' A=1 'special_name$$' \\",
+                                      &passenv, NULL);
         assert_se(r >= 0);
         assert_se(strv_length(passenv) == 1);
         assert_se(streq(passenv[0], "normal_name"));
-
 }
 
 static void test_unit_dump_config_items(void) {
index 37505ea7837828e1f610afdf477fca17d516f7f9..7eeddd28f44e418b8ffe24d8fe8abbaa86ff7828 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 
index 347982dd5240f7c9e310d9a4f6ed0c2259fa91ac..62f82200a0b3e0f4f888a5259bee1bfe28828c03 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "kbd-util.h"
 #include "locale-util.h"
index c1f2f8b09dd2a735e54a75737f053dcd3accb69c..a2a53730efcaddbc019c2115b28508156c486be6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stddef.h>
 #include <unistd.h>
diff --git a/src/test/test-loop-block.c b/src/test/test-loop-block.c
new file mode 100644 (file)
index 0000000..298ded9
--- /dev/null
@@ -0,0 +1,250 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#include <fcntl.h>
+#include <linux/loop.h>
+#include <pthread.h>
+
+#include "alloc-util.h"
+#include "dissect-image.h"
+#include "fd-util.h"
+#include "fileio.h"
+#include "fs-util.h"
+#include "gpt.h"
+#include "missing_loop.h"
+#include "mkfs-util.h"
+#include "mount-util.h"
+#include "namespace-util.h"
+#include "string-util.h"
+#include "strv.h"
+#include "tests.h"
+#include "tmpfile-util.h"
+#include "user-util.h"
+#include "virt.h"
+
+#define N_THREADS 5
+#define N_ITERATIONS 3
+
+static usec_t end = 0;
+
+static void* thread_func(void *ptr) {
+        int fd = PTR_TO_FD(ptr);
+        int r;
+
+        for (unsigned i = 0; i < N_ITERATIONS; i++) {
+                _cleanup_(loop_device_unrefp) LoopDevice *loop = NULL;
+                _cleanup_(umount_and_rmdir_and_freep) char *mounted = NULL;
+                _cleanup_(dissected_image_unrefp) DissectedImage *dissected = NULL;
+
+                if (now(CLOCK_MONOTONIC) >= end) {
+                        log_notice("Time's up, exiting thread's loop");
+                        break;
+                }
+
+                log_notice("> Thread iteration #%u.", i);
+
+                assert_se(mkdtemp_malloc(NULL, &mounted) >= 0);
+
+                r = loop_device_make(fd, O_RDONLY, 0, UINT64_MAX, LO_FLAGS_PARTSCAN, &loop);
+                if (r < 0)
+                        log_error_errno(r, "Failed to allocate loopback device: %m");
+                assert_se(r >= 0);
+
+                log_notice("Acquired loop device %s, will mount on %s", loop->node, mounted);
+
+                r = dissect_image(loop->fd, NULL, NULL, DISSECT_IMAGE_READ_ONLY, &dissected);
+                if (r < 0)
+                        log_error_errno(r, "Failed dissect loopback device %s: %m", loop->node);
+                assert_se(r >= 0);
+
+                log_info("Dissected loop device %s", loop->node);
+
+                for (PartitionDesignator d = 0; d < _PARTITION_DESIGNATOR_MAX; d++) {
+                        if (!dissected->partitions[d].found)
+                                continue;
+
+                        log_notice("Found node %s fstype %s designator %s",
+                                   dissected->partitions[d].node,
+                                   dissected->partitions[d].fstype,
+                                   partition_designator_to_string(d));
+                }
+
+                assert_se(dissected->partitions[PARTITION_ESP].found);
+                assert_se(dissected->partitions[PARTITION_ESP].node);
+                assert_se(dissected->partitions[PARTITION_XBOOTLDR].found);
+                assert_se(dissected->partitions[PARTITION_XBOOTLDR].node);
+                assert_se(dissected->partitions[PARTITION_ROOT].found);
+                assert_se(dissected->partitions[PARTITION_ROOT].node);
+                assert_se(dissected->partitions[PARTITION_HOME].found);
+                assert_se(dissected->partitions[PARTITION_HOME].node);
+
+                r = dissected_image_mount(dissected, mounted, UID_INVALID, DISSECT_IMAGE_READ_ONLY);
+                log_notice_errno(r, "Mounted %s → %s: %m", loop->node, mounted);
+                assert_se(r >= 0);
+
+                log_notice("Unmounting %s", mounted);
+                mounted = umount_and_rmdir_and_free(mounted);
+
+                log_notice("Unmounted.");
+
+                dissected = dissected_image_unref(dissected);
+
+                log_notice("Detaching loop device %s", loop->node);
+                loop = loop_device_unref(loop);
+                log_notice("Detached loop device.");
+        }
+
+        log_notice("Leaving thread");
+
+        return NULL;
+}
+
+static bool have_root_gpt_type(void) {
+#ifdef GPT_ROOT_NATIVE
+        return true;
+#else
+        return false;
+#endif
+}
+
+int main(int argc, char *argv[]) {
+        _cleanup_free_ char *p = NULL, *cmd = NULL;
+        _cleanup_(pclosep) FILE *sfdisk = NULL;
+        _cleanup_(loop_device_unrefp) LoopDevice *loop = NULL;
+        _cleanup_close_ int fd = -1;
+        _cleanup_(dissected_image_unrefp) DissectedImage *dissected = NULL;
+        _cleanup_(umount_and_rmdir_and_freep) char *mounted = NULL;
+        pthread_t threads[N_THREADS];
+        const char *fs;
+        sd_id128_t id;
+        int r;
+
+        test_setup_logging(LOG_DEBUG);
+        log_show_tid(true);
+        log_show_time(true);
+
+        if (!have_root_gpt_type()) {
+                log_tests_skipped("No root partition GPT defined for this architecture, exiting.");
+                return EXIT_TEST_SKIP;
+        }
+
+        if (detect_container() > 0) {
+                log_tests_skipped("Test not supported in a container, requires udev/uevent notifications.");
+                return EXIT_TEST_SKIP;
+        }
+
+        if (strstr_ptr(ci_environment(), "autopkgtest")) {
+                // FIXME: we should reenable this one day
+                log_tests_skipped("Skipping test on Ubuntu autopkgtest CI, test too slow and installed udev too flakey.");
+                return EXIT_TEST_SKIP;
+        }
+
+        /* This is a test for the loopback block device setup code and it's use by the image dissection
+         * logic: since the kernel APIs are hard use and prone to races, let's test this in a heavy duty
+         * test: we open a bunch of threads and repeatedly allocate and deallocate loopback block devices in
+         * them in parallel, with an image file with a number of partitions. */
+
+        r = detach_mount_namespace();
+        if (ERRNO_IS_PRIVILEGE(r)) {
+                log_tests_skipped("Lacking privileges");
+                return EXIT_TEST_SKIP;
+        }
+
+        FOREACH_STRING(fs, "vfat", "ext4") {
+                r = mkfs_exists(fs);
+                assert_se(r >= 0);
+                if (!r) {
+                        log_tests_skipped("mkfs.{vfat|ext4} not installed");
+                        return EXIT_TEST_SKIP;
+                }
+        }
+
+        assert_se(r >= 0);
+
+        assert_se(tempfn_random_child("/var/tmp", "sfdisk", &p) >= 0);
+        fd = open(p, O_CREAT|O_EXCL|O_RDWR|O_CLOEXEC|O_NOFOLLOW, 0666);
+        assert_se(fd >= 0);
+        assert_se(ftruncate(fd, 256*1024*1024) >= 0);
+
+        assert_se(cmd = strjoin("sfdisk ", p));
+        assert_se(sfdisk = popen(cmd, "we"));
+
+        /* A reasonably complex partition table that fits on a 64K disk */
+        fputs("label: gpt\n"
+              "size=32M, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B\n"
+              "size=32M, type=BC13C2FF-59E6-4262-A352-B275FD6F7172\n"
+              "size=32M, type=0657FD6D-A4AB-43C4-84E5-0933C84B4F4F\n"
+              "size=32M, type=", sfdisk);
+
+#ifdef GPT_ROOT_NATIVE
+        fprintf(sfdisk, SD_ID128_UUID_FORMAT_STR, SD_ID128_FORMAT_VAL(GPT_ROOT_NATIVE));
+#else
+        fprintf(sfdisk, SD_ID128_UUID_FORMAT_STR, SD_ID128_FORMAT_VAL(GPT_ROOT_X86_64));
+#endif
+
+        fputs("\n"
+              "size=32M, type=933AC7E1-2EB4-4F13-B844-0E14E2AEF915\n", sfdisk);
+
+        assert_se(pclose(sfdisk) == 0);
+        sfdisk = NULL;
+
+        assert_se(loop_device_make(fd, O_RDWR, 0, UINT64_MAX, LO_FLAGS_PARTSCAN, &loop) >= 0);
+        assert_se(dissect_image(loop->fd, NULL, NULL, 0, &dissected) >= 0);
+
+        assert_se(dissected->partitions[PARTITION_ESP].found);
+        assert_se(dissected->partitions[PARTITION_ESP].node);
+        assert_se(dissected->partitions[PARTITION_XBOOTLDR].found);
+        assert_se(dissected->partitions[PARTITION_XBOOTLDR].node);
+        assert_se(dissected->partitions[PARTITION_ROOT].found);
+        assert_se(dissected->partitions[PARTITION_ROOT].node);
+        assert_se(dissected->partitions[PARTITION_HOME].found);
+        assert_se(dissected->partitions[PARTITION_HOME].node);
+
+        assert_se(sd_id128_randomize(&id) >= 0);
+        assert_se(make_filesystem(dissected->partitions[PARTITION_ESP].node, "vfat", "EFI", id, true) >= 0);
+
+        assert_se(sd_id128_randomize(&id) >= 0);
+        assert_se(make_filesystem(dissected->partitions[PARTITION_XBOOTLDR].node, "vfat", "xbootldr", id, true) >= 0);
+
+        assert_se(sd_id128_randomize(&id) >= 0);
+        assert_se(make_filesystem(dissected->partitions[PARTITION_ROOT].node, "ext4", "root", id, true) >= 0);
+
+        assert_se(sd_id128_randomize(&id) >= 0);
+        assert_se(make_filesystem(dissected->partitions[PARTITION_HOME].node, "ext4", "home", id, true) >= 0);
+
+        dissected = dissected_image_unref(dissected);
+        assert_se(dissect_image(loop->fd, NULL, NULL, 0, &dissected) >= 0);
+
+        assert_se(mkdtemp_malloc(NULL, &mounted) >= 0);
+
+        /* This first (writable) mount will initialize the mount point dirs, so that the subsequent read-only ones can work */
+        assert_se(dissected_image_mount(dissected, mounted, UID_INVALID, 0) >= 0);
+
+        assert_se(umount_recursive(mounted, 0) >= 0);
+        loop = loop_device_unref(loop);
+
+        log_notice("Threads are being started now");
+
+        /* Let's make sure we run for 10s on slow systems at max */
+        end = usec_add(now(CLOCK_MONOTONIC),
+                       slow_tests_enabled() ? 5 * USEC_PER_SEC :
+                       1 * USEC_PER_SEC);
+
+        for (unsigned i = 0; i < N_THREADS; i++)
+                assert_se(pthread_create(threads + i, NULL, thread_func, FD_TO_PTR(fd)) == 0);
+
+        log_notice("All threads started now.");
+
+        for (unsigned i = 0; i < N_THREADS; i++) {
+                log_notice("Joining thread #%u.", i);
+
+                void *k;
+                assert_se(pthread_join(threads[i], &k) == 0);
+                assert_se(k == NULL);
+
+                log_notice("Joined thread #%u.", i);
+        }
+
+        log_notice("Threads are all terminated now.");
+
+        return 0;
+}
index 89b760fae436d2ed53b5951b34cf96f4d7c87618..58d8c29dbb0b49006efccb8f5c3d43c1782388ca 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 #include <string.h>
index 6986405dc6c89f685195f2c5ca54185bc76d9ddd..41df5588d082948a11a15a1951c1fa6a6ba8bcbc 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/mount.h>
 
index 30b00ae4d8b72c747442babf4e928d33b8b8f869..287488b7c133e6682e9aed0ad9ce7403c7d7a815 100644 (file)
@@ -1,5 +1,6 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include <sched.h>
 #include <sys/mount.h>
 #include <unistd.h>
 
@@ -258,6 +259,16 @@ static void test_path_is_mount_point(void) {
 int main(int argc, char *argv[]) {
         test_setup_logging(LOG_DEBUG);
 
+        /* let's move into our own mount namespace with all propagation from the host turned off, so that
+         * /proc/self/mountinfo is static and constant for the whole time our test runs. */
+        if (unshare(CLONE_NEWNS) < 0) {
+                if (!ERRNO_IS_PRIVILEGE(errno))
+                        return log_error_errno(errno, "Failed to detach mount namespace: %m");
+
+                log_notice("Lacking privilege to create separate mount namespace, proceeding in originating mount namespace.");
+        } else
+                assert_se(mount(NULL, "/", NULL, MS_PRIVATE | MS_REC, NULL) >= 0);
+
         test_mount_propagation_flags("shared", 0, MS_SHARED);
         test_mount_propagation_flags("slave", 0, MS_SLAVE);
         test_mount_propagation_flags("private", 0, MS_PRIVATE);
index 7571e609a26fe8236a4c691881b00a9a6c91a9ca..e234f54deee8ed03d89c705e22a936e1507cc2ea 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/socket.h>
index a734524eebd403ed3ddd7667b89f91f499545884..49aca68c49bc3670c27a1a8a4d3439c633be95c3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <arpa/inet.h>
 #include <linux/if_tunnel.h>
index 5d7931f619e1d6eab68547db7c79bbc4c098b6ba..6ec1cff28ad2ee82393415718353d573d53d24fb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdlib.h>
index 97c219596d1b876a28304ec1a46a2ba07dc83fe6..1a5a8082f3ca88b27a554f8a72df2f4775745343 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "main-func.h"
 #include "nscd-flush.h"
index 293d7a8468b2b342daafbae536a11bff6d7a0576..2e9414d16d54eea127f5baf5dd34a743bc3f65f7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <dlfcn.h>
 #include <net/if.h>
index 5933ec28a3241e0142270c58d2662605d5a14cb6..1a961d125bbdde3e250224b343d660ca306cf79a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 
index 268c54fccc78ab54cc81cc52e5331135c63b3390..0fbdd9706f69590d3e8d9cad74fe38f73d4df28b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 
index c215a2e99e945787d730d83c6cd19e5f9d2b1bff..ef630269459be777baf1e1b42e22b94571a2700b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
index 3806c3f8cf92db7f3490242b86b973e4325a8db5..1c969091ef7052bd108bb56c1f3bb635be3a99b7 100644 (file)
@@ -1,6 +1,7 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
+#include <linux/loadavg.h>
 #include <locale.h>
 #include <math.h>
 #include <sys/socket.h>
@@ -929,6 +930,42 @@ static void test_parse_mtu(void) {
         assert_se(parse_mtu(AF_UNSPEC, "", &mtu) == -EINVAL);
 }
 
+static void test_parse_loadavg_fixed_point(void) {
+        loadavg_t fp;
+
+        assert_se(parse_loadavg_fixed_point("1.23", &fp) == 0);
+        assert_se(LOAD_INT(fp) == 1);
+        assert_se(LOAD_FRAC(fp) == 23);
+
+        assert_se(parse_loadavg_fixed_point("1.80", &fp) == 0);
+        assert_se(LOAD_INT(fp) == 1);
+        assert_se(LOAD_FRAC(fp) == 80);
+
+        assert_se(parse_loadavg_fixed_point("0.07", &fp) == 0);
+        assert_se(LOAD_INT(fp) == 0);
+        assert_se(LOAD_FRAC(fp) == 7);
+
+        assert_se(parse_loadavg_fixed_point("0.00", &fp) == 0);
+        assert_se(LOAD_INT(fp) == 0);
+        assert_se(LOAD_FRAC(fp) == 0);
+
+        assert_se(parse_loadavg_fixed_point("4096.57", &fp) == 0);
+        assert_se(LOAD_INT(fp) == 4096);
+        assert_se(LOAD_FRAC(fp) == 57);
+
+        /* Caps out at 2 digit fracs */
+        assert_se(parse_loadavg_fixed_point("1.100", &fp) == -ERANGE);
+
+        assert_se(parse_loadavg_fixed_point("4096.4096", &fp) == -ERANGE);
+        assert_se(parse_loadavg_fixed_point("-4000.5", &fp) == -ERANGE);
+        assert_se(parse_loadavg_fixed_point("18446744073709551615.5", &fp) == -ERANGE);
+        assert_se(parse_loadavg_fixed_point("foobar", &fp) == -EINVAL);
+        assert_se(parse_loadavg_fixed_point("3333", &fp) == -EINVAL);
+        assert_se(parse_loadavg_fixed_point("1.2.3", &fp) == -EINVAL);
+        assert_se(parse_loadavg_fixed_point(".", &fp) == -EINVAL);
+        assert_se(parse_loadavg_fixed_point("", &fp) == -EINVAL);
+}
+
 int main(int argc, char *argv[]) {
         log_parse_environment();
         log_open();
@@ -955,6 +992,7 @@ int main(int argc, char *argv[]) {
         test_parse_errno();
         test_parse_syscall_and_errno();
         test_parse_mtu();
+        test_parse_loadavg_fixed_point();
 
         return 0;
 }
index b9111e9259eff6c047e19a84ab63cde7d090f17b..da146aac2a0cb5ce45a7e5dabd7b679e99ca10a8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdlib.h>
 #include <sys/stat.h>
index c05a5d5b4a9cd755e099ddeb13cfc86c8373801b..874bab8f9405c6c21c882c91528711cfbd9f040f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 #include <unistd.h>
@@ -186,7 +186,7 @@ static void test_find_executable_full(void) {
         if (p)
                 assert_se(oldpath = strdup(p));
 
-        assert_se(unsetenv("PATH") >= 0);
+        assert_se(unsetenv("PATH") == 0);
 
         assert_se(find_executable_full("sh", true, &p, NULL) == 0);
         puts(p);
@@ -386,7 +386,7 @@ static void test_fsck_exists(void) {
         log_info("/* %s */", __func__);
 
         /* Ensure we use a sane default for PATH. */
-        unsetenv("PATH");
+        assert_se(unsetenv("PATH") == 0);
 
         /* fsck.minix is provided by util-linux and will probably exist. */
         assert_se(fsck_exists("minix") == 1);
index cf89d89482fdcf8db05c7028b3ed779d7303bdab..490fb136a7604b6185371f36587297a87d9390e0 100644 (file)
@@ -1,7 +1,6 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdbool.h>
-#include <stdio.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 
@@ -78,32 +77,52 @@ static Service *service_for_path(Manager *m, Path *path, const char *service_nam
         return SERVICE(service_unit);
 }
 
-static void check_states(Manager *m, Path *path, Service *service, PathState path_state, ServiceState service_state) {
+static int _check_states(unsigned line,
+                         Manager *m, Path *path, Service *service, PathState path_state, ServiceState service_state) {
         assert_se(m);
         assert_se(service);
 
         usec_t end = now(CLOCK_MONOTONIC) + 30 * USEC_PER_SEC;
 
-        while (path->result != PATH_SUCCESS || service->result != SERVICE_SUCCESS ||
-               path->state != path_state || service->state != service_state) {
+        while (path->state != path_state || service->state != service_state ||
+               path->result != PATH_SUCCESS || service->result != SERVICE_SUCCESS) {
 
                 assert_se(sd_event_run(m->event, 100 * USEC_PER_MSEC) >= 0);
 
-                printf("%s: state = %s; result = %s \n",
-                                UNIT(path)->id,
-                                path_state_to_string(path->state),
-                                path_result_to_string(path->result));
-                printf("%s: state = %s; result = %s \n",
-                                UNIT(service)->id,
-                                service_state_to_string(service->state),
-                                service_result_to_string(service->result));
-
-                if (now(CLOCK_MONOTONIC) >= end) {
+                usec_t n = now(CLOCK_MONOTONIC);
+                log_info("line %u: %s: state = %s; result = %s (left: %" PRIi64 ")",
+                         line,
+                         UNIT(path)->id,
+                         path_state_to_string(path->state),
+                         path_result_to_string(path->result),
+                         end - n);
+                log_info("line %u: %s: state = %s; result = %s",
+                         line,
+                         UNIT(service)->id,
+                         service_state_to_string(service->state),
+                         service_result_to_string(service->result));
+
+                if (service->state == SERVICE_FAILED &&
+                    service->main_exec_status.status == EXIT_CGROUP &&
+                    !ci_environment())
+                        /* On a general purpose system we may fail to start the service for reasons which are
+                         * not under our control: permission limits, resource exhaustion, etc. Let's skip the
+                         * test in those cases. On developer machines we require proper setup. */
+                        return log_notice_errno(SYNTHETIC_ERRNO(ECANCELED),
+                                                "Failed to start service %s, aborting test: %s/%s",
+                                                UNIT(service)->id,
+                                                service_state_to_string(service->state),
+                                                service_result_to_string(service->result));
+
+                if (n >= end) {
                         log_error("Test timeout when testing %s", UNIT(path)->id);
                         exit(EXIT_FAILURE);
                 }
         }
+
+        return 0;
 }
+#define check_states(...) _check_states(__LINE__, __VA_ARGS__)
 
 static void test_path_exists(Manager *m) {
         const char *test_path = "/tmp/test-path_exists";
@@ -119,18 +138,22 @@ static void test_path_exists(Manager *m) {
         service = service_for_path(m, path, NULL);
 
         assert_se(unit_start(unit) >= 0);
-        check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+        if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+                return;
 
         assert_se(touch(test_path) >= 0);
-        check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+        if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+                return;
 
         /* Service restarts if file still exists */
         assert_se(unit_stop(UNIT(service)) >= 0);
-        check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+        if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+                return;
 
         assert_se(rm_rf(test_path, REMOVE_ROOT|REMOVE_PHYSICAL) == 0);
         assert_se(unit_stop(UNIT(service)) >= 0);
-        check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+        if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+                return;
 
         assert_se(unit_stop(unit) >= 0);
 }
@@ -149,18 +172,22 @@ static void test_path_existsglob(Manager *m) {
         service = service_for_path(m, path, NULL);
 
         assert_se(unit_start(unit) >= 0);
-        check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+        if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+                return;
 
         assert_se(touch(test_path) >= 0);
-        check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+        if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+                return;
 
         /* Service restarts if file still exists */
         assert_se(unit_stop(UNIT(service)) >= 0);
-        check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+        if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+                return;
 
         assert_se(rm_rf(test_path, REMOVE_ROOT|REMOVE_PHYSICAL) == 0);
         assert_se(unit_stop(UNIT(service)) >= 0);
-        check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+        if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+                return;
 
         assert_se(unit_stop(unit) >= 0);
 }
@@ -180,23 +207,28 @@ static void test_path_changed(Manager *m) {
         service = service_for_path(m, path, NULL);
 
         assert_se(unit_start(unit) >= 0);
-        check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+        if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+                return;
 
         assert_se(touch(test_path) >= 0);
-        check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+        if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+                return;
 
         /* Service does not restart if file still exists */
         assert_se(unit_stop(UNIT(service)) >= 0);
-        check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+        if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+                return;
 
         f = fopen(test_path, "w");
         assert_se(f);
         fclose(f);
 
-        check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+        if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+                return;
 
         assert_se(unit_stop(UNIT(service)) >= 0);
-        check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+        if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+                return;
 
         (void) rm_rf(test_path, REMOVE_ROOT|REMOVE_PHYSICAL);
         assert_se(unit_stop(unit) >= 0);
@@ -217,23 +249,28 @@ static void test_path_modified(Manager *m) {
         service = service_for_path(m, path, NULL);
 
         assert_se(unit_start(unit) >= 0);
-        check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+        if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+                return;
 
         assert_se(touch(test_path) >= 0);
-        check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+        if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+                return;
 
         /* Service does not restart if file still exists */
         assert_se(unit_stop(UNIT(service)) >= 0);
-        check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+        if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+                return;
 
         f = fopen(test_path, "w");
         assert_se(f);
         fputs("test", f);
 
-        check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+        if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+                return;
 
         assert_se(unit_stop(UNIT(service)) >= 0);
-        check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+        if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+                return;
 
         (void) rm_rf(test_path, REMOVE_ROOT|REMOVE_PHYSICAL);
         assert_se(unit_stop(unit) >= 0);
@@ -253,14 +290,17 @@ static void test_path_unit(Manager *m) {
         service = service_for_path(m, path, "path-mycustomunit.service");
 
         assert_se(unit_start(unit) >= 0);
-        check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+        if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+                return;
 
         assert_se(touch(test_path) >= 0);
-        check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+        if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+                return;
 
         assert_se(rm_rf(test_path, REMOVE_ROOT|REMOVE_PHYSICAL) == 0);
         assert_se(unit_stop(UNIT(service)) >= 0);
-        check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+        if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+                return;
 
         assert_se(unit_stop(unit) >= 0);
 }
@@ -281,22 +321,26 @@ static void test_path_directorynotempty(Manager *m) {
         assert_se(access(test_path, F_OK) < 0);
 
         assert_se(unit_start(unit) >= 0);
-        check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+        if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+                return;
 
         /* MakeDirectory default to no */
         assert_se(access(test_path, F_OK) < 0);
 
         assert_se(mkdir_p(test_path, 0755) >= 0);
         assert_se(touch(strjoina(test_path, "test_file")) >= 0);
-        check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+        if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+                return;
 
         /* Service restarts if directory is still not empty */
         assert_se(unit_stop(UNIT(service)) >= 0);
-        check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING);
+        if (check_states(m, path, service, PATH_RUNNING, SERVICE_RUNNING) < 0)
+                return;
 
         assert_se(rm_rf(test_path, REMOVE_ROOT|REMOVE_PHYSICAL) == 0);
         assert_se(unit_stop(UNIT(service)) >= 0);
-        check_states(m, path, service, PATH_WAITING, SERVICE_DEAD);
+        if (check_states(m, path, service, PATH_WAITING, SERVICE_DEAD) < 0)
+                return;
 
         assert_se(unit_stop(unit) >= 0);
 }
index 9236eb131581c7a33762d50a9c5c5c05bec1e878..dbae34e73e490a28ec2595d93c2a815ac24c70c8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 #include <sys/stat.h>
index 50f66cb970b280f49d62e2d2bb768cbdd8f1bdff..4bfa18195e5abccd1f2b38a9db903de5c4f18733 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdlib.h>
 
index 4a9b111a20ab5bc0bfd56c60de3fa197ca813618..1f5ee7d768d994f4c55a519d3cdc4e094f052eb0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "env-util.h"
index b00dd4a980df747ccdeecb13044cd760cf06b817..a87cdf8747a96506f009197b545ff9f2ca294c3b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/mount.h>
index 61434578b0b87865a5cfd02d447552a1f8605c46..b2679e30fb24b17794b81fab7546895323998202 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 
diff --git a/src/test/test-psi-util.c b/src/test/test-psi-util.c
new file mode 100644 (file)
index 0000000..0b5a30c
--- /dev/null
@@ -0,0 +1,80 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#include <linux/loadavg.h>
+
+#include "alloc-util.h"
+#include "fileio.h"
+#include "fs-util.h"
+#include "psi-util.h"
+#include "tests.h"
+
+static void test_read_mem_pressure(void) {
+        _cleanup_(unlink_tempfilep) char path[] = "/tmp/pressurereadtestXXXXXX";
+        ResourcePressure rp;
+
+        if (geteuid() != 0)
+                return (void) log_tests_skipped("not root");
+
+        assert_se(mkstemp(path));
+
+        assert_se(read_resource_pressure("/verylikelynonexistentpath", PRESSURE_TYPE_SOME, &rp) < 0);
+        assert_se(read_resource_pressure(path, PRESSURE_TYPE_SOME, &rp) < 0);
+
+        assert_se(write_string_file(path, "herpdederp\n", WRITE_STRING_FILE_CREATE) == 0);
+        assert_se(read_resource_pressure(path, PRESSURE_TYPE_SOME, &rp) < 0);
+
+        /* Pressure file with some invalid values*/
+        assert_se(write_string_file(path, "some avg10=0.22=55 avg60=0.17=8 avg300=1.11=00 total=58761459\n"
+                                          "full avg10=0.23=55 avg60=0.16=8 avg300=1.08=00 total=58464525", WRITE_STRING_FILE_CREATE) == 0);
+        assert_se(read_resource_pressure(path, PRESSURE_TYPE_SOME, &rp) < 0);
+
+        /* Same pressure valid values as below but with duplicate avg60 field */
+        assert_se(write_string_file(path, "some avg10=0.22 avg60=0.17 avg60=0.18 avg300=1.11 total=58761459\n"
+                                          "full avg10=0.23 avg60=0.16 avg300=1.08 total=58464525", WRITE_STRING_FILE_CREATE) == 0);
+        assert_se(read_resource_pressure(path, PRESSURE_TYPE_SOME, &rp) < 0);
+
+        assert_se(write_string_file(path, "some avg10=0.22 avg60=0.17 avg300=1.11 total=58761459\n"
+                                          "full avg10=0.23 avg60=0.16 avg300=1.08 total=58464525", WRITE_STRING_FILE_CREATE) == 0);
+        assert_se(read_resource_pressure(path, PRESSURE_TYPE_SOME, &rp) == 0);
+        assert_se(LOAD_INT(rp.avg10) == 0);
+        assert_se(LOAD_FRAC(rp.avg10) == 22);
+        assert_se(LOAD_INT(rp.avg60) == 0);
+        assert_se(LOAD_FRAC(rp.avg60) == 17);
+        assert_se(LOAD_INT(rp.avg300) == 1);
+        assert_se(LOAD_FRAC(rp.avg300) == 11);
+        assert_se(rp.total == 58761459);
+        assert(read_resource_pressure(path, PRESSURE_TYPE_FULL, &rp) == 0);
+        assert_se(LOAD_INT(rp.avg10) == 0);
+        assert_se(LOAD_FRAC(rp.avg10) == 23);
+        assert_se(LOAD_INT(rp.avg60) == 0);
+        assert_se(LOAD_FRAC(rp.avg60) == 16);
+        assert_se(LOAD_INT(rp.avg300) == 1);
+        assert_se(LOAD_FRAC(rp.avg300) == 8);
+        assert_se(rp.total == 58464525);
+
+        /* Pressure file with extra unsupported fields */
+        assert_se(write_string_file(path, "some avg5=0.55 avg10=0.22 avg60=0.17 avg300=1.11 total=58761459\n"
+                                          "full avg10=0.23 avg60=0.16 avg300=1.08 avg600=2.00 total=58464525", WRITE_STRING_FILE_CREATE) == 0);
+        assert_se(read_resource_pressure(path, PRESSURE_TYPE_SOME, &rp) == 0);
+        assert_se(LOAD_INT(rp.avg10) == 0);
+        assert_se(LOAD_FRAC(rp.avg10) == 22);
+        assert_se(LOAD_INT(rp.avg60) == 0);
+        assert_se(LOAD_FRAC(rp.avg60) == 17);
+        assert_se(LOAD_INT(rp.avg300) == 1);
+        assert_se(LOAD_FRAC(rp.avg300) == 11);
+        assert_se(rp.total == 58761459);
+        assert(read_resource_pressure(path, PRESSURE_TYPE_FULL, &rp) == 0);
+        assert_se(LOAD_INT(rp.avg10) == 0);
+        assert_se(LOAD_FRAC(rp.avg10) == 23);
+        assert_se(LOAD_INT(rp.avg60) == 0);
+        assert_se(LOAD_FRAC(rp.avg60) == 16);
+        assert_se(LOAD_INT(rp.avg300) == 1);
+        assert_se(LOAD_FRAC(rp.avg300) == 8);
+        assert_se(rp.total == 58464525);
+}
+
+int main(void) {
+        test_setup_logging(LOG_DEBUG);
+        test_read_mem_pressure();
+        return 0;
+}
diff --git a/src/test/test-qrcode-util.c b/src/test/test-qrcode-util.c
new file mode 100644 (file)
index 0000000..221ad85
--- /dev/null
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#include "locale-util.h"
+#include "main-func.h"
+#include "qrcode-util.h"
+#include "tests.h"
+
+static int run(int argc, char **argv) {
+        int r;
+
+        test_setup_logging(LOG_DEBUG);
+
+        assert_se(setenv("SYSTEMD_COLORS", "1", 1) == 0); /* Force the qrcode to be printed */
+
+        r = print_qrcode(stdout, "This should say \"TEST\"", "TEST");
+        if (r == -EOPNOTSUPP)
+                return log_tests_skipped("not supported");
+        if (r < 0)
+                return log_error_errno(r, "Failed to print QR code: %m");
+        return 0;
+}
+
+DEFINE_MAIN_FUNCTION(run);
index ad5bc72a4e138c0e1e3ca68155a3b47765130541..02a73ecdb269621be12ebe50a129406078db81cc 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "hexdecoct.h"
 #include "random-util.h"
index 56a6fa2d76617d714f366a933457fec704575f3a..af60572e050bc007b0c7b946c8e36b1546062d7b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
index 8620e72b2b736e83f8895e17d0297c629cf7b1b0..4d699b92f088aaf53a16f44adce407e7b64e4803 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 
index 90eda96a738a6d4c4a1a30058107330ed081b8b5..057ae6b2bce34e38906855e22bb2a5371bdac3e8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/resource.h>
 
index d6e426c0fbec1159e40faca36157c14bdcbdc400..38aa100e0bbab2d8cd96d119d9c49186d8a509e7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
index da6d2a21e66cf14f2a506df086542c7e4ec69e68..1f125b1d1e23035b0d90921a187923961e25cfa9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2012 Holger Hans Peter Freyther
 ***/
index eb34d8eab2d83cfaf286b5e7e25abedcd03085bd..7e1512a97dc6b0c6a313e5ad1c33108d45d1d94a 100644 (file)
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
 #include "sd-hwdb.h"
 
 #include "alloc-util.h"
index 9260db5aceefd9df3a9868e73d179424939a6210..75436ab1ced62d4ef52139df7c4f8a8875b654ef 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-path.h"
 
index 8831d87fe781c46592192c8cefb78b3e59e6e47e..10393b6a7cf8989653e52f5c26e5d309c36d0d5a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <poll.h>
@@ -10,6 +10,9 @@
 #include <sys/syscall.h>
 #include <sys/types.h>
 #include <unistd.h>
+#if HAVE_VALGRIND_VALGRIND_H
+#include <valgrind/valgrind.h>
+#endif
 
 #include "alloc-util.h"
 #include "fd-util.h"
@@ -30,7 +33,7 @@
 #include "virt.h"
 
 /* __NR_socket may be invalid due to libseccomp */
-#if !defined(__NR_socket) || __NR_socket < 0 || defined(__i386__) || defined(__s390x__) || defined(__s390__)
+#if !defined(__NR_socket) || __NR_socket < 0 || defined(__i386__) || defined(__s390x__) || defined(__s390__) || defined(__powerpc64__) || defined(__powerpc__)
 /* On these archs, socket() is implemented via the socketcall() syscall multiplexer,
  * and we can't restrict it hence via seccomp. */
 #  define SECCOMP_RESTRICT_ADDRESS_FAMILIES_BROKEN 1
@@ -115,6 +118,21 @@ static void test_filter_sets(void) {
         for (unsigned i = 0; i < _SYSCALL_FILTER_SET_MAX; i++) {
                 pid_t pid;
 
+#if HAVE_VALGRIND_VALGRIND_H
+                if (RUNNING_ON_VALGRIND && IN_SET(i, SYSCALL_FILTER_SET_DEFAULT, SYSCALL_FILTER_SET_BASIC_IO, SYSCALL_FILTER_SET_SIGNAL)) {
+                        /* valgrind at least requires rt_sigprocmask(), read(), write(). */
+                        log_info("Running on valgrind, skipping %s", syscall_filter_sets[i].name);
+                        continue;
+                }
+#endif
+#if HAS_FEATURE_ADDRESS_SANITIZER
+                if (IN_SET(i, SYSCALL_FILTER_SET_DEFAULT, SYSCALL_FILTER_SET_BASIC_IO, SYSCALL_FILTER_SET_SIGNAL)) {
+                        /* ASAN at least requires sigaltstack(), read(), write(). */
+                        log_info("Running on address sanitizer, skipping %s", syscall_filter_sets[i].name);
+                        continue;
+                }
+#endif
+
                 log_info("Testing %s", syscall_filter_sets[i].name);
 
                 pid = fork();
@@ -323,6 +341,13 @@ static void test_protect_sysctl(void) {
 
                 assert_se(seccomp_protect_sysctl() >= 0);
 
+#if HAVE_VALGRIND_VALGRIND_H
+                if (RUNNING_ON_VALGRIND) {
+                        log_info("Running on valgrind, skipping syscall/EPERM test");
+                        _exit(EXIT_SUCCESS);
+                }
+#endif
+
 #if defined __NR__sysctl && __NR__sysctl >= 0
                 assert_se(syscall(__NR__sysctl, 0, 0, 0) < 0);
                 assert_se(errno == EPERM);
@@ -525,6 +550,16 @@ static void test_memory_deny_write_execute_mmap(void) {
                 log_notice("Not root, skipping %s", __func__);
                 return;
         }
+#if HAVE_VALGRIND_VALGRIND_H
+        if (RUNNING_ON_VALGRIND) {
+                log_notice("Running on valgrind, skipping %s", __func__);
+                return;
+        }
+#endif
+#if HAS_FEATURE_ADDRESS_SANITIZER
+        log_notice("Running on address sanitizer, skipping %s", __func__);
+        return;
+#endif
 
         pid = fork();
         assert_se(pid >= 0);
@@ -585,6 +620,16 @@ static void test_memory_deny_write_execute_shmat(void) {
                 log_notice("Not root, skipping %s", __func__);
                 return;
         }
+#if HAVE_VALGRIND_VALGRIND_H
+        if (RUNNING_ON_VALGRIND) {
+                log_notice("Running on valgrind, skipping %s", __func__);
+                return;
+        }
+#endif
+#if HAS_FEATURE_ADDRESS_SANITIZER
+        log_notice("Running on address sanitizer, skipping %s", __func__);
+        return;
+#endif
 
         shmid = shmget(IPC_PRIVATE, page_size(), 0);
         assert_se(shmid >= 0);
index 59b4f719466ec4b02cd5b0bbc43699387f38a65c..3eb7ad30cf5e66daa631876733adfe202ce98612 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/stat.h>
 
index a57d5db2b10c4242082f3a24bf906731d9192c7f..7bd53a861dad3c1f1849240a743ec67f1627207e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "escape.h"
 #include "fd-util.h"
index aea83d2679c53e7e9b67b5628169db435a58dabd..ae36fac10296566803cbf0fe9b3b0f2fe6b74311 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <pthread.h>
 
index d3e6de79789c685b3a4ef06914ecab3f96792dce..16314d051b6d1f529137ab01b0e5fe9fe8830247 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "set.h"
 #include "strv.h"
index f753e3836ed687fa0745c968770d4a70e076bffb..d141735320a2f3a169b1a9a94f5610ea8c48656a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <sys/mman.h>
index 1a8c60ad4204fdec4dfa3102393e55c75d1edb85..e5096a8c00c4629b352c63a7f044c5a81f10c942 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 
index 6ae272fa94233fd3fc643f2ec57cb08652ce5f9d..4a1672fb950fe7b9c3ebbeac2f4da483dddd4aeb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "memory-util.h"
 #include "siphash24.h"
index 6dee2022e8f0d9e2c599aca7838e3326cc539878..3c9dc180fa455281486d57d555b7cd8eb3fc3a32 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sched.h>
 #include <stdio.h>
index 8b4fa82640b443f660c149609fbd843c72f69828..d916254cc9b7a8318f8e58307f8ac21f149159ba 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <inttypes.h>
index afb7038621445d62758f0b82abb370c173286d3c..704cc01e6f39e0b864ef8520bfcd320af5dc9f7c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "missing_network.h"
index 1bb186655dea2b295821ef01fd841f655ad34ecc..4ff7d714f8f79cf2f261e71a4d3c4fb6d9844243 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <grp.h>
index e81b12b418a63fb0e170e62b5f8464cb29599bb5..2648c1c3f516377835358e5bfb1cb3f64bc6f60b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "log.h"
@@ -47,25 +47,12 @@ static void test_specifier_escape_strv(void) {
 
 /* Any specifier functions which don't need an argument. */
 static const Specifier specifier_table[] = {
-        { 'm', specifier_machine_id,      NULL },
-        { 'b', specifier_boot_id,         NULL },
-        { 'H', specifier_host_name,       NULL },
-        { 'l', specifier_short_host_name, NULL },
-        { 'v', specifier_kernel_release,  NULL },
-        { 'a', specifier_architecture,    NULL },
-        { 'o', specifier_os_id,           NULL },
-        { 'w', specifier_os_version_id,   NULL },
-        { 'B', specifier_os_build_id,     NULL },
-        { 'W', specifier_os_variant_id,   NULL },
-
-        { 'g', specifier_group_name,      NULL },
-        { 'G', specifier_group_id,        NULL },
-        { 'U', specifier_user_id,         NULL },
-        { 'u', specifier_user_name,       NULL },
+        COMMON_SYSTEM_SPECIFIERS,
+
+        COMMON_CREDS_SPECIFIERS,
         { 'h', specifier_user_home,       NULL },
 
-        { 'T', specifier_tmp_dir,         NULL },
-        { 'V', specifier_var_tmp_dir,     NULL },
+        COMMON_TMP_SPECIFIERS,
         {}
 };
 
index 13a66dfb173d463a07a2caf2ff56be5902c6e2b7..9aca09c4defa359f59a1bd6567a4e0f6bd2768b9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <linux/magic.h>
index eb0523d87ae62a199d475224d638b139aaaeb6f0..904a9bbf5de10b19e015d223840666c969730d7d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "static-destruct.h"
index 483ba44caa1394691d3ce7995f67e53b6bc5b405..867be19c86025df108cce59e8acccf05bcba1f25 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdlib.h>
 
index 196c96aa8cdd033e33a3b8c20b77883c00b6d09e..b74eb180f3fbeaffb29cfb4f00eb144176d11488 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "locale-util.h"
index 8e305f3791269d25ef24904807bede47b31ff3ba..be54b0d4d62482070092100a0079ab6a820ea706 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 
index f681795ebe656dd681495480d49d4f23a7009beb..6b5005f9fc9cedf6a90d556e48d4585e36a76117 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "escape.h"
@@ -11,15 +11,7 @@ static void test_specifier_printf(void) {
         static const Specifier table[] = {
                 { 'X', specifier_string,         (char*) "AAAA" },
                 { 'Y', specifier_string,         (char*) "BBBB" },
-                { 'm', specifier_machine_id,     NULL },
-                { 'b', specifier_boot_id,        NULL },
-                { 'H', specifier_host_name,      NULL },
-                { 'v', specifier_kernel_release, NULL },
-                { 'a', specifier_architecture,   NULL },
-                { 'o', specifier_os_id,          NULL },
-                { 'w', specifier_os_version_id,  NULL },
-                { 'B', specifier_os_build_id,    NULL },
-                { 'W', specifier_os_variant_id,  NULL },
+                COMMON_SYSTEM_SPECIFIERS,
                 {}
         };
 
index 749aa46d75f2debcee1c4e242e983c95567a921d..4b6d8ebce30d4c3196c11e9abcb097281648dc89 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 
index 2b957dd4d6c233d3ca7ffea9b183593b8b3c1fa3..a6f449b76478ad88d147025742a02e11d67ea375 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "strv.h"
 #include "sysctl-util.h"
index 7f4af38940e7d9b6e28861cd3d502b71d94a9d29..255922d05b04c5043fefe77c089de03a8cfae67e 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # systemd is free software; you can redistribute it and/or modify it
 # under the terms of the GNU Lesser General Public License as published by
index 59f90b76ec4ac71ded12201008a1a64e7018b7d7..e25cf9e5d91287727ad6da85d4c76557ca0955ac 100644 (file)
@@ -1,8 +1,9 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "architecture.h"
 #include "automount.h"
 #include "cgroup.h"
+#include "cgroup-util.h"
 #include "compress.h"
 #include "condition.h"
 #include "device-private.h"
@@ -71,6 +72,7 @@ int main(int argc, char **argv) {
         test_table(locale_variable, VARIABLE_LC);
         test_table(log_target, LOG_TARGET);
         test_table(mac_address_policy, MAC_ADDRESS_POLICY);
+        test_table(managed_oom_mode, MANAGED_OOM_MODE);
         test_table(manager_state, MANAGER_STATE);
         test_table(manager_timestamp, MANAGER_TIMESTAMP);
         test_table(mount_exec_command, MOUNT_EXEC_COMMAND);
index 003257111afd393dbebb26823cb38bf35e5b42b2..508f0c03ee332909ad60858a5c8939598937fc40 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <stdbool.h>
index 64242951acac11740545fea29788b071b03151af..cc391e81a051ff91e7134e48ffb1c64c7c769266 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "random-util.h"
 #include "serialize.h"
@@ -480,7 +480,7 @@ static void test_in_utc_timezone(void) {
         assert_se(streq(tzname[0], "CET"));
         assert_se(streq(tzname[1], "CEST"));
 
-        assert_se(unsetenv("TZ") >= 0);
+        assert_se(unsetenv("TZ") == 0);
 }
 
 static void test_map_clock_usec(void) {
index b5268716554bbc981975a2c7b2ad2d2a6a2f3809..4c3389af8c5aedc4dfcfe582df689a87b73ca0c6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <stdio.h>
diff --git a/src/test/test-udev-util.c b/src/test/test-udev-util.c
new file mode 100644 (file)
index 0000000..b0213f8
--- /dev/null
@@ -0,0 +1,202 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "macro.h"
+#include "string-util.h"
+#include "udev-util.h"
+
+static void test_udev_rule_parse_value_one(const char *in, const char *expected_value, int expected_retval) {
+        _cleanup_free_ char *str = NULL;
+        char *value = UINT_TO_PTR(0x12345678U);
+        char *endpos = UINT_TO_PTR(0x87654321U);
+
+        assert_se(str = strdup(in));
+        assert_se(udev_rule_parse_value(str, &value, &endpos) == expected_retval);
+        if (expected_retval < 0) {
+                /* not modified on failure */
+                assert_se(value == UINT_TO_PTR(0x12345678U));
+                assert_se(endpos == UINT_TO_PTR(0x87654321U));
+        } else {
+                assert_se(streq_ptr(value, expected_value));
+                assert_se(endpos == str + strlen(in));
+        }
+}
+
+static void test_parse_value(void) {
+        /* input: "valid operand"
+         * parsed: valid operand
+         * use the following command to help generate textual C strings:
+         * python3 -c 'import json; print(json.dumps(input()))' */
+        test_udev_rule_parse_value_one(
+                "\"valid operand\"",
+                "valid operand",
+                0
+        );
+}
+
+static void test_parse_value_with_backslashes(void) {
+        /* input: "va'l\'id\"op\"erand"
+         * parsed: va'l\'id"op"erand */
+        test_udev_rule_parse_value_one(
+                "\"va'l\\'id\\\"op\\\"erand\"",
+                "va'l\\'id\"op\"erand",
+                0
+        );
+}
+
+static void test_parse_value_no_quotes(void) {
+        test_udev_rule_parse_value_one(
+                "no quotes",
+                0,
+                -EINVAL
+        );
+}
+
+static void test_parse_value_noescape(void) {
+        test_udev_rule_parse_value_one(
+                "\"\\\\a\\b\\x\\y\"",
+                "\\\\a\\b\\x\\y",
+                0
+        );
+}
+
+static void test_parse_value_nul(void) {
+        test_udev_rule_parse_value_one(
+                "\"reject\0nul\"",
+                0,
+                -EINVAL
+        );
+}
+
+static void test_parse_value_escape_nothing(void) {
+        /* input: e"" */
+        test_udev_rule_parse_value_one(
+                "e\"\"",
+                "",
+                0
+        );
+}
+
+static void test_parse_value_escape_nothing2(void) {
+        /* input: e"1234" */
+        test_udev_rule_parse_value_one(
+                "e\"1234\"",
+                "1234",
+                0
+        );
+}
+
+static void test_parse_value_escape_double_quote(void) {
+        /* input: e"\"" */
+        test_udev_rule_parse_value_one(
+                "e\"\\\"\"",
+                "\"",
+                0
+        );
+}
+
+static void test_parse_value_escape_backslash(void) {
+        /* input: e"\ */
+        test_udev_rule_parse_value_one(
+                "e\"\\",
+                0,
+                -EINVAL
+        );
+        /* input: e"\" */
+        test_udev_rule_parse_value_one(
+                "e\"\\\"",
+                0,
+                -EINVAL
+        );
+        /* input: e"\\" */
+        test_udev_rule_parse_value_one(
+                "e\"\\\\\"",
+                "\\",
+                0
+        );
+        /* input: e"\\\" */
+        test_udev_rule_parse_value_one(
+                "e\"\\\\\\\"",
+                0,
+                -EINVAL
+        );
+        /* input: e"\\\"" */
+        test_udev_rule_parse_value_one(
+                "e\"\\\\\\\"\"",
+                "\\\"",
+                0
+        );
+        /* input: e"\\\\" */
+        test_udev_rule_parse_value_one(
+                "e\"\\\\\\\\\"",
+                "\\\\",
+                0
+        );
+}
+
+static void test_parse_value_newline(void) {
+        /* input: e"operand with newline\n" */
+        test_udev_rule_parse_value_one(
+                "e\"operand with newline\\n\"",
+                "operand with newline\n",
+                0
+        );
+}
+
+static void test_parse_value_escaped(void) {
+        /* input: e"single\rcharacter\t\aescape\bsequence" */
+        test_udev_rule_parse_value_one(
+                "e\"single\\rcharacter\\t\\aescape\\bsequence\"",
+                "single\rcharacter\t\aescape\bsequence",
+                0
+        );
+}
+
+static void test_parse_value_invalid_escape(void) {
+        /* input: e"reject\invalid escape sequence" */
+        test_udev_rule_parse_value_one(
+                "e\"reject\\invalid escape sequence",
+                0,
+                -EINVAL
+        );
+}
+
+static void test_parse_value_invalid_termination(void) {
+        /* input: e"\ */
+        test_udev_rule_parse_value_one(
+                "e\"\\",
+                0,
+                -EINVAL
+        );
+}
+
+static void test_parse_value_unicode(void) {
+        /* input: "s\u1d1c\u1d04\u029c \u1d1c\u0274\u026a\u1d04\u1d0f\u1d05\u1d07 \U0001d568\U0001d560\U0001d568" */
+        test_udev_rule_parse_value_one(
+                "e\"s\\u1d1c\\u1d04\\u029c \\u1d1c\\u0274\\u026a\\u1d04\\u1d0f\\u1d05\\u1d07 \\U0001d568\\U0001d560\\U0001d568\"",
+                "s\xe1\xb4\x9c\xe1\xb4\x84\xca\x9c \xe1\xb4\x9c\xc9\xb4\xc9\xaa\xe1\xb4\x84\xe1\xb4\x8f\xe1\xb4\x85\xe1\xb4\x87 \xf0\x9d\x95\xa8\xf0\x9d\x95\xa0\xf0\x9d\x95\xa8",
+                0
+        );
+}
+
+int main(int argc, char **argv) {
+        test_parse_value();
+        test_parse_value_with_backslashes();
+        test_parse_value_no_quotes();
+        test_parse_value_nul();
+        test_parse_value_noescape();
+
+        test_parse_value_escape_nothing();
+        test_parse_value_escape_nothing2();
+        test_parse_value_escape_double_quote();
+        test_parse_value_escape_backslash();
+        test_parse_value_newline();
+        test_parse_value_escaped();
+        test_parse_value_invalid_escape();
+        test_parse_value_invalid_termination();
+        test_parse_value_unicode();
+
+        return EXIT_SUCCESS;
+}
index 00cab7bb45c988cae8da088c782ad3b389df80a5..8acf86da37785f4d57c787f0c8dc63c7d2ac4fb8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2003-2004 Greg Kroah-Hartman <greg@kroah.com>
 ***/
index 65a556c9c61c5cd459a9f62f64807e908354f84a..16cbab07d605f7b6896fbe171f6798f08a9fc5b9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stddef.h>
 
index 27f6b565413075560edec1e6b228b3e7f9c725a8..df3ae98f5050238f5bf0c58e08d3c9db29d85a5b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "tests.h"
 #include "umask-util.h"
index 02852bc089e2aa11f3541250bfc4387098bc429f..676c6dd862a7e1211a6ce131467c607eb3f7f4bd 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "errno-util.h"
index 3d6f9a03b4415b587991a5bcf75c9ec8f52b5b93..b4d380b5292f31a868fdcb4c97f574573b308807 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "memory-util.h"
 #include "sparse-endian.h"
index d1f85a7f26a4c2fc8e50cbc4e9a411471889214c..8f9679051daaca6c3990bbb651537f3803c440f2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "path-lookup.h"
 #include "set.h"
index 0d524f9a5626dd13511f028159f361eddd5d5f67..ece78aa5486b21c2efe1ec028b3dd19f9b3ed22d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdio.h>
 #include <stdlib.h>
index d623706648b8ae6e95db2b21dd7ac53909c5f2cb..c9182e382bda184f48fcf372d47bf212f1e938d3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <unistd.h>
 #include <sys/types.h>
index 306d08a2824cb9640075a6ed385da9796da19610..8924b5f95a16b354a9367a1124b0c5ccad21708f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "format-util.h"
index 66003ac13eb112ff65f1df903f98f14d23be4554..c7b6d8dd534ec427e4bf68c39fcd683d6de4c149 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "string-util.h"
index cfbafcc5ca630d1bf4ca665731639543d247d066..0fe7a381c708ee6e827f17a5f3955e799a0c9d75 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sys/wait.h>
index fbfc72cd81a76d742a4875b217baf3e2f24ba622..9a5fbc6c8e280f8ba449f019660c059de6f933d8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <poll.h>
index 24593c75d9e72dffd2f7741c3bee003f318b6dea..b7a0cbf5273919c0d83758d679cc9a659feec7b5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 
index 28ecffb0c0bb187adf7b063fe8c8d2d18617e7fe..4afc46f10f04a58e55a7d0800b5454662f83753d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "log.h"
 #include "manager.h"
index ab66d5c49d83f5757df32961ac86401b3960b819..cbef75fe07ff7f73399c1d254ba2b34a193dcc48 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <string.h>
 #include <unistd.h>
index dd1df8c247b4fb987d38f864dbf1e353ee0bcf8a..853ea9c2919cc4426327e66496e77660d7ecfe81 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "macro.h"
 #include "web-util.h"
index 3e6df96c5df5f51917b015990be365f04845f658..f93aca68f083a2d9582518dcbcef10fdae00942c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 70287b3c554f7901ea44fcb65e239d74439b5e59..a437e2cfedda3d5bd5da87e6a6bf81a35581f3b3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "fd-util.h"
index 63e7a10e7b1d11447c04011c55d140cee34c2bf5..e69d6d0fe4bc25e7655f3d7c0777d4d45398f7b0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdarg.h>
 
index 96072445f6efe4b9eac9250cf6a3d94e4dc52e47..df34541bf702ce6bf45912cab726afd251cfb0e3 100644 (file)
@@ -1,11 +1,5 @@
-/*
- * systemd service to wait until kernel realtime clock is synchronized
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/* systemd service to wait until kernel realtime clock is synchronized */
 
 #include <errno.h>
 #include <stdbool.h>
index 46c7360da3e50f5a14a9ee6d62851b436abbc427..6eb9607e084615441c8b61c622f6c205fe9aa7c1 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 if conf.get('ENABLE_TIMEDATED') == 1
         install_data('org.freedesktop.timedate1.conf',
index 53f6c8435d7f54f0fb497e6a4f19db4c43868073..4567082281d2842e2f73b3dbbe1ddf2384a7314b 100644 (file)
@@ -3,7 +3,7 @@
         "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   This file is part of systemd.
 
index b6303ba1dd20739268a0c166fb2754e9f47c5e01..c4e71b075308209ac5853816bd0e6ab50ab49d25 100644 (file)
@@ -3,7 +3,7 @@
         "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
 
 <!--
-  SPDX-License-Identifier: LGPL-2.1+
+  SPDX-License-Identifier: LGPL-2.1-or-later
 
   This file is part of systemd.
 
index d5f3a6e30d941f65f07c3d323c9b183a460a1dc7..6b82d700f96e9faeb488eb88fd03b125547129ca 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 0131bbed8cff0acb98e3f005b9532349f00b088c..abc792a4525fc05f05516c0afff07bd5a2cf443f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 #include <locale.h>
@@ -12,6 +12,7 @@
 #include "bus-locator.h"
 #include "bus-map-properties.h"
 #include "bus-print-properties.h"
+#include "env-util.h"
 #include "format-table.h"
 #include "in-addr-util.h"
 #include "main-func.h"
@@ -139,12 +140,9 @@ static int print_status_info(const StatusInfo *i) {
 
 
         /* Restore the $TZ */
-        if (old_tz)
-                r = setenv("TZ", old_tz, true);
-        else
-                r = unsetenv("TZ");
+        r = set_unset_env("TZ", old_tz, true);
         if (r < 0)
-                log_warning_errno(errno, "Failed to set TZ environment variable, ignoring: %m");
+                log_warning_errno(r, "Failed to set TZ environment variable, ignoring: %m");
         else
                 tzset();
 
index c467b854775aa9be022c00aeb0ef13ffc456aac5..8bfcfd5cdc3a114d9e1c67167457452c1dcd1c32 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sys/stat.h>
@@ -763,10 +763,7 @@ static int method_set_local_rtc(sd_bus_message *m, void *userdata, sd_bus_error
                 struct tm tm;
 
                 /* Sync system clock from RTC; first, initialize the timezone fields of struct tm. */
-                if (c->local_rtc)
-                        localtime_r(&ts.tv_sec, &tm);
-                else
-                        gmtime_r(&ts.tv_sec, &tm);
+                localtime_or_gmtime_r(&ts.tv_sec, &tm, !c->local_rtc);
 
                 /* Override the main fields of struct tm, but not the timezone fields */
                 r = clock_get_hwclock(&tm);
@@ -774,10 +771,7 @@ static int method_set_local_rtc(sd_bus_message *m, void *userdata, sd_bus_error
                         log_debug_errno(r, "Failed to get hardware clock, ignoring: %m");
                 else {
                         /* And set the system clock with this */
-                        if (c->local_rtc)
-                                ts.tv_sec = mktime(&tm);
-                        else
-                                ts.tv_sec = timegm(&tm);
+                        mktime_or_timegm(&tm, !c->local_rtc);
 
                         if (clock_settime(CLOCK_REALTIME, &ts) < 0)
                                 log_debug_errno(errno, "Failed to update system clock, ignoring: %m");
@@ -787,10 +781,7 @@ static int method_set_local_rtc(sd_bus_message *m, void *userdata, sd_bus_error
                 struct tm tm;
 
                 /* Sync RTC from system clock */
-                if (c->local_rtc)
-                        localtime_r(&ts.tv_sec, &tm);
-                else
-                        gmtime_r(&ts.tv_sec, &tm);
+                localtime_or_gmtime_r(&ts.tv_sec, &tm, !c->local_rtc);
 
                 r = clock_set_hwclock(&tm);
                 if (r < 0)
@@ -884,10 +875,7 @@ static int method_set_time(sd_bus_message *m, void *userdata, sd_bus_error *erro
         }
 
         /* Sync down to RTC */
-        if (c->local_rtc)
-                localtime_r(&ts.tv_sec, &tm);
-        else
-                gmtime_r(&ts.tv_sec, &tm);
+        localtime_or_gmtime_r(&ts.tv_sec, &tm, !c->local_rtc);
 
         r = clock_set_hwclock(&tm);
         if (r < 0)
index e5c118c8db7b1cc1cd91391317ddb317f77714a6..571e3fc7efc745d1fa0fee3a2ba4c015acb164e5 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 systemd_timesyncd_sources = files('''
         timesyncd.c
@@ -26,8 +26,10 @@ if conf.get('ENABLE_TIMESYNCD') == 1
                 input : 'timesyncd.conf.in',
                 output : 'timesyncd.conf',
                 configuration : substs)
-        install_data(timesyncd_conf,
-                     install_dir : pkgsysconfdir)
+        if install_sysconfdir
+                install_data(timesyncd_conf,
+                             install_dir : pkgsysconfdir)
+        endif
         install_data('org.freedesktop.timesync1.conf',
                      install_dir : dbuspolicydir)
         install_data('org.freedesktop.timesync1.service',
index 84b4b4f973f8f849368062ad198f3e19ce915909..98878d6ac900660c4da256b3001f2ff11629eb72 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index bd03a1dd90aca6b37fa7494c56ec395c2d39e577..31e91e7b7b06a6a1ab6a591d41c2b199c192ddb2 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 /* Some unit tests for the helper functions in timesyncd. */
 
index 6effdfc3250fb76aaeae50b525b370643970e236..c5ad5feb958e84ac42b9c56ba2590ec61fe657c9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "sd-bus.h"
 
index 6670ffbc360ab81502e086e1dcdb54739b3a99a9..83db2167e269d6a20555b3241c701bfb15f79520 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "timesyncd-manager.h"
index d7ec94e487b561b252c76b6c6a8fab435056740e..2c3114613bbe1ee3376eabce9fa7b9f5ecd6ec96 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "def.h"
index bbe27cf2ac3b83a357b3c5727145fedbba0119cb..d6b9060401c47d7c627fe5593e7915b30a1628b3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "conf-parser.h"
index 0fab37d78345eb832bfe604c12e277461e41985f..93ba4ef87d49fa068c2f924daa59c9f107a03766 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <math.h>
index d74521c9cf59a64abeca0031bb12c20979eed71b..940a88ed7ba03e90b85b94ff790f82222ee8eae8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include <sys/timex.h>
index 14fba6d2cc084a455596d45bde3d1e90057944be..76ed9ecac609336bb2cac6a9a3e7ba276fc3c325 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sparse-endian.h"
index aadecb6a1cd8a5f2bea3845414f636b8e6631aa7..f7ec317f413df91ed293038d0f532454fcbcb141 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "alloc-util.h"
 #include "timesyncd-server.h"
index d30bd2a3ce31e764e3f1d295caba9a0733877307..8e9e408eccb09781f09f5df42af1a596a8907507 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "list.h"
index 4f514d536d0b73a00e6eecbd359711f394d46ff5..1f59bf14e1aa59bc03dfe5bd74344d61c85a1ae7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/stat.h>
 #include <sys/types.h>
index 434dcf800dbc2f849b5126040bd084e5ac25a60b..2d61568c6642739ae6ae56b70738e4ba72b91a91 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 systemd_tmpfiles_sources = [
         'src/tmpfiles/tmpfiles.c',
index c3c1c6d49af69ad976788f9e999e86f885160fcd..9906c70eefb70ce2c241c645ab861f6ec486b49c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
@@ -188,29 +188,27 @@ static int specifier_machine_id_safe(char specifier, const void *data, const voi
 static int specifier_directory(char specifier, const void *data, const void *userdata, char **ret);
 
 static const Specifier specifier_table[] = {
-        { 'm', specifier_machine_id_safe, NULL },
+        { 'a', specifier_architecture,    NULL },
         { 'b', specifier_boot_id,         NULL },
+        { 'B', specifier_os_build_id,     NULL },
         { 'H', specifier_host_name,       NULL },
         { 'l', specifier_short_host_name, NULL },
-        { 'v', specifier_kernel_release,  NULL },
-        { 'a', specifier_architecture,    NULL },
+        { 'm', specifier_machine_id_safe, NULL },
         { 'o', specifier_os_id,           NULL },
+        { 'v', specifier_kernel_release,  NULL },
         { 'w', specifier_os_version_id,   NULL },
-        { 'B', specifier_os_build_id,     NULL },
         { 'W', specifier_os_variant_id,   NULL },
 
-        { 'g', specifier_group_name,      NULL },
-        { 'G', specifier_group_id,        NULL },
-        { 'U', specifier_user_id,         NULL },
-        { 'u', specifier_user_name,       NULL },
         { 'h', specifier_user_home,       NULL },
 
-        { 't', specifier_directory,       UINT_TO_PTR(DIRECTORY_RUNTIME) },
-        { 'S', specifier_directory,       UINT_TO_PTR(DIRECTORY_STATE) },
         { 'C', specifier_directory,       UINT_TO_PTR(DIRECTORY_CACHE) },
         { 'L', specifier_directory,       UINT_TO_PTR(DIRECTORY_LOGS) },
-        { 'T', specifier_tmp_dir,         NULL },
-        { 'V', specifier_var_tmp_dir,     NULL },
+        { 'S', specifier_directory,       UINT_TO_PTR(DIRECTORY_STATE) },
+        { 't', specifier_directory,       UINT_TO_PTR(DIRECTORY_RUNTIME) },
+
+        COMMON_CREDS_SPECIFIERS,
+
+        COMMON_TMP_SPECIFIERS,
         {}
 };
 
@@ -1063,7 +1061,7 @@ static int parse_acls_from_arg(Item *item) {
         if (r < 0)
                 log_warning_errno(r, "Failed to parse ACL \"%s\": %m. Ignoring", item->argument);
 #else
-        log_warning_errno(SYNTHETIC_ERRNO(ENOSYS), "ACLs are not supported. Ignoring");
+        log_warning("ACLs are not supported. Ignoring.");
 #endif
 
         return 0;
@@ -1104,13 +1102,17 @@ static int path_set_acl(const char *path, const char *pretty, acl_type_t type, a
                   strna(t), pretty);
 
         r = acl_set_file(path, type, dup);
-        if (r < 0)
-                /* Return positive to indicate we already warned */
-                return -log_error_errno(errno,
-                                        "Setting %s ACL \"%s\" on %s failed: %m",
-                                        type == ACL_TYPE_ACCESS ? "access" : "default",
-                                        strna(t), pretty);
-
+        if (r < 0) {
+                if (ERRNO_IS_NOT_SUPPORTED(errno))
+                        /* No error if filesystem doesn't support ACLs. Return negative. */
+                        return -errno;
+                else
+                        /* Return positive to indicate we already warned */
+                        return -log_error_errno(errno,
+                                                "Setting %s ACL \"%s\" on %s failed: %m",
+                                                type == ACL_TYPE_ACCESS ? "access" : "default",
+                                                strna(t), pretty);
+        }
         return 0;
 }
 #endif
@@ -1150,6 +1152,11 @@ static int fd_set_acls(Item *item, int fd, const char *path, const struct stat *
         if (r == 0 && item->acl_default && S_ISDIR(st->st_mode))
                 r = path_set_acl(procfs_path, path, ACL_TYPE_DEFAULT, item->acl_default, item->append_or_force);
 
+        if (ERRNO_IS_NOT_SUPPORTED(r)) {
+                log_debug_errno(r, "ACLs not supported by file system at %s", path);
+                return 0;
+        }
+
         if (r > 0)
                 return -r; /* already warned */
 
@@ -1157,10 +1164,6 @@ static int fd_set_acls(Item *item, int fd, const char *path, const struct stat *
         if (r == -ENOENT && proc_mounted() == 0)
                 r = -ENOSYS;
 
-        if (r == -EOPNOTSUPP) {
-                log_debug_errno(r, "ACLs not supported by file system at %s", path);
-                return 0;
-        }
         if (r < 0)
                 return log_error_errno(r, "ACL operation on \"%s\" failed: %m", path);
 #endif
@@ -3105,11 +3108,15 @@ static int parse_argv(int argc, char *argv[]) {
                         break;
 
                 case ARG_IMAGE:
+#ifdef STANDALONE
+                        return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP),
+                                               "This systemd-tmpfiles version is compiled without support for --image=.");
+#else
                         r = parse_path_argument_and_warn(optarg, /* suppress_root= */ false, &arg_image);
                         if (r < 0)
                                 return r;
-
-                        /* Imply -E here since it makes little sense to create files persistently in the /run mointpoint of a disk image */
+#endif
+                        /* Imply -E here since it makes little sense to create files persistently in the /run mountpoint of a disk image */
                         _fallthrough_;
 
                 case 'E':
@@ -3331,9 +3338,11 @@ DEFINE_PRIVATE_HASH_OPS_WITH_VALUE_DESTRUCTOR(item_array_hash_ops, char, string_
                                               ItemArray, item_array_free);
 
 static int run(int argc, char *argv[]) {
+#ifndef STANDALONE
         _cleanup_(loop_device_unrefp) LoopDevice *loop_device = NULL;
         _cleanup_(decrypted_image_unrefp) DecryptedImage *decrypted_image = NULL;
         _cleanup_(umount_and_rmdir_and_freep) char *unlink_dir = NULL;
+#endif
         _cleanup_strv_free_ char **config_dirs = NULL;
         bool invalid_config = false;
         ItemArray *a;
@@ -3393,6 +3402,7 @@ static int run(int argc, char *argv[]) {
         if (r < 0)
                 return r;
 
+#ifndef STANDALONE
         if (arg_image) {
                 assert(!arg_root);
 
@@ -3409,6 +3419,9 @@ static int run(int argc, char *argv[]) {
                 if (!arg_root)
                         return log_oom();
         }
+#else
+        assert(!arg_image);
+#endif
 
         items = ordered_hashmap_new(&item_array_hash_ops);
         globs = ordered_hashmap_new(&item_array_hash_ops);
index 932f6e18b233689ffc7fc2ac141031fe6f4a1a2a..1940792b9d565243c02ec0c5bfd393d023ec6178 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2015 Werner Fink
 ***/
index b5e14922a25dd8b799d0627ae96bcc71bf9336d1..ce0bf5d24bea145ab4978fd00c07c4932d246c62 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * ata_id - reads product/serial number from ATA drives
  *
index 13b947beb1bc9e491c9790296b4e6579c7d0320b..804cc7c5aa5f9a47c99a3dc733357248370c5caf 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * cdrom_id - optical drive and media information prober
  */
index 83761d72b4534cbd344a93add82ccc6d7cad8b1a..f14b81d30df9354bd1da0854e964036d60575bc8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /*
  * Identifies FIDO CTAP1 ("U2F")/CTAP2 security tokens based on the usage declared in their report
  * descriptor and outputs suitable environment variables.
index bbfcf93709a7c1d4ebb108f87d4c81f7f1a0e405..2dfa759032b768b6f90bf11a108e2d80b43d58a0 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /* Inspired by Andrew Lutomirski's 'u2f-hidraw-policy.c' */
 
 #include <errno.h>
index c813a3a4547a9b0fa1d6acc2252ff601a269f473..57af57e889249ccaf80998fe6d59f321bcc797c3 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #pragma once
 
index 45a4879e82ab89002d9152c8b2ccac03f522745c..44d66df1a04f452f9508df9f53ee3c4018798479 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/hid.h>
 #include <stdbool.h>
index 38eec2bc28d42b64a09cdced73262c5c6a411486..6836bca28d5ef35958dc6f57ee6b46e1766ef15c 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <stdint.h>
 #include <stdlib.h>
index aa23b07090458837902e340682e3948774d18452..d67b459388d5c95660f7e8ff2b5f4c476c84610b 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 udevadm_sources = files('''
         udevadm.c
@@ -185,8 +185,10 @@ foreach prog : [['ata_id/ata_id.c'],
                    install_dir : udevlibexecdir)
 endforeach
 
-install_data('udev.conf',
-             install_dir : join_paths(sysconfdir, 'udev'))
+if install_sysconfdir
+        install_data('udev.conf',
+                     install_dir : join_paths(sysconfdir, 'udev'))
+endif
 
 configure_file(
         input : 'udev.pc.in',
@@ -194,15 +196,16 @@ configure_file(
         configuration : substs,
         install_dir : pkgconfigdatadir == 'no' ? '' : pkgconfigdatadir)
 
-meson.add_install_script('sh', '-c',
-                         mkdir_p.format(join_paths(sysconfdir, 'udev/rules.d')))
+if install_sysconfdir
+        meson.add_install_script('sh', '-c',
+                                 mkdir_p.format(join_paths(sysconfdir, 'udev/rules.d')))
+endif
 
 fuzzers += [
         [['src/udev/net/fuzz-link-parser.c',
           'src/fuzz/fuzz.h'],
          [libudev_core,
           libudev_static,
-          libsystemd_network,
           libshared],
          [threads,
           libacl]],
index f47b13378c5c335cae26d35ebd375f02c16a94ed..df1f1c173a31f67d0c5669b9ce4a446b12bf0394 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * Copyright © 2010 - Maxim Levitsky
  *
index 1d8c93b7fd6809e0f75020ac897ca2456579a148..ae03a7d2f7ec33325472276a9df354e3317fa508 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 #pragma once
 
 /*
index f8e1b140f526a63d65cf1e5c27bf9145d4b31e87..f4612ba4f9cf4ece1911268afe103d89004603c8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * Copyright © 2010 - Maxim Levitsky
  *
index e0dacc732a18d1a3d536f1bc379bb952b6b6e649..6f3469c5b87fe17384ff6ce8c121782546bc44b5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "fd-util.h"
 #include "fs-util.h"
index 20f5d7e5a45bbcb848d9b23f28c77c03692edb1b..dc107170cce39753ea37406ff8f4ca181d8b0f23 100644 (file)
@@ -6,7 +6,7 @@ _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"")
 #include "conf-parser.h"
 #include "ethtool-util.h"
 #include "link-config.h"
-#include "network-internal.h"
+#include "net-condition.h"
 #include "socket-util.h"
 %}
 struct ConfigPerfItem;
@@ -20,13 +20,13 @@ struct ConfigPerfItem;
 %struct-type
 %includes
 %%
-Match.MACAddress,                config_parse_hwaddrs,                  0,                             offsetof(link_config, match_mac)
-Match.PermanentMACAddress,       config_parse_hwaddrs,                  0,                             offsetof(link_config, match_permanent_mac)
-Match.OriginalName,              config_parse_match_ifnames,            0,                             offsetof(link_config, match_name)
-Match.Path,                      config_parse_match_strv,               0,                             offsetof(link_config, match_path)
-Match.Driver,                    config_parse_match_strv,               0,                             offsetof(link_config, match_driver)
-Match.Type,                      config_parse_match_strv,               0,                             offsetof(link_config, match_type)
-Match.Property,                  config_parse_match_property,           0,                             offsetof(link_config, match_property)
+Match.MACAddress,                config_parse_hwaddrs,                  0,                             offsetof(link_config, match.mac)
+Match.PermanentMACAddress,       config_parse_hwaddrs,                  0,                             offsetof(link_config, match.permanent_mac)
+Match.OriginalName,              config_parse_match_ifnames,            0,                             offsetof(link_config, match.ifname)
+Match.Path,                      config_parse_match_strv,               0,                             offsetof(link_config, match.path)
+Match.Driver,                    config_parse_match_strv,               0,                             offsetof(link_config, match.driver)
+Match.Type,                      config_parse_match_strv,               0,                             offsetof(link_config, match.iftype)
+Match.Property,                  config_parse_match_property,           0,                             offsetof(link_config, match.property)
 Match.Host,                      config_parse_net_condition,            CONDITION_HOST,                offsetof(link_config, conditions)
 Match.Virtualization,            config_parse_net_condition,            CONDITION_VIRTUALIZATION,      offsetof(link_config, conditions)
 Match.KernelCommandLine,         config_parse_net_condition,            CONDITION_KERNEL_COMMAND_LINE, offsetof(link_config, conditions)
index c23c2bdd2057624f4ed66d6b5f63d02ee6983552..cbeaad9ccc77d62a8993decd62a5ca9043536096 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <linux/netdevice.h>
 #include <netinet/ether.h>
 #include "link-config.h"
 #include "log.h"
 #include "memory-util.h"
+#include "net-condition.h"
 #include "netif-naming-scheme.h"
 #include "netlink-util.h"
-#include "network-internal.h"
+#include "network-util.h"
 #include "parse-util.h"
 #include "path-lookup.h"
 #include "path-util.h"
@@ -30,6 +31,7 @@
 #include "string-table.h"
 #include "string-util.h"
 #include "strv.h"
+#include "utf8.h"
 
 struct link_config_ctx {
         LIST_HEAD(link_config, links);
@@ -49,13 +51,7 @@ static void link_config_free(link_config *link) {
 
         free(link->filename);
 
-        set_free_free(link->match_mac);
-        set_free_free(link->match_permanent_mac);
-        strv_free(link->match_path);
-        strv_free(link->match_driver);
-        strv_free(link->match_type);
-        strv_free(link->match_name);
-        strv_free(link->match_property);
+        net_match_clear(&link->match);
         condition_free_list(link->conditions);
 
         free(link->description);
@@ -167,9 +163,7 @@ int link_load_one(link_config_ctx *ctx, const char *filename) {
         if (r < 0)
                 return r;
 
-        if (set_isempty(link->match_mac) && set_isempty(link->match_permanent_mac) &&
-            strv_isempty(link->match_path) && strv_isempty(link->match_driver) && strv_isempty(link->match_type) &&
-            strv_isempty(link->match_name) && strv_isempty(link->match_property) && !link->conditions) {
+        if (net_match_is_empty(&link->match) && !link->conditions) {
                 log_warning("%s: No valid settings found in the [Match] section, ignoring file. "
                             "To match all interfaces, add OriginalName=* in the [Match] section.",
                             filename);
@@ -181,6 +175,13 @@ int link_load_one(link_config_ctx *ctx, const char *filename) {
                 return 0;
         }
 
+        if (IN_SET(link->mac_address_policy, MAC_ADDRESS_POLICY_PERSISTENT, MAC_ADDRESS_POLICY_RANDOM) && link->mac) {
+                log_warning("%s: MACAddress= in [Link] section will be ignored when MACAddressPolicy= "
+                            "is set to \"persistent\" or \"random\".",
+                            filename);
+                link->mac = mfree(link->mac);
+        }
+
         log_debug("Parsed configuration file %s", filename);
 
         LIST_PREPEND(links, ctx->links, TAKE_PTR(link));
@@ -272,11 +273,8 @@ int link_config_get(link_config_ctx *ctx, sd_device *device, link_config **ret)
         (void) link_unsigned_attribute(device, "name_assign_type", &name_assign_type);
 
         LIST_FOREACH(links, link, ctx->links) {
-                if (net_match_config(link->match_mac, link->match_permanent_mac, link->match_path, link->match_driver,
-                                     link->match_type, link->match_name, link->match_property, NULL, NULL, NULL,
-                                     device, NULL, &permanent_mac, NULL, iftype, NULL, NULL, 0, NULL, NULL)) {
-
-                        if (link->match_name && !strv_contains(link->match_name, "*") && name_assign_type == NET_NAME_ENUM)
+                if (net_match_config(&link->match, device, NULL, &permanent_mac, NULL, iftype, NULL, NULL, 0, NULL, NULL)) {
+                        if (link->match.ifname && !strv_contains(link->match.ifname, "*") && name_assign_type == NET_NAME_ENUM)
                                 log_device_warning(device, "Config file %s is applied to device based on potentially unpredictable interface name.",
                                                    link->filename);
                         else
@@ -661,6 +659,48 @@ int link_get_driver(link_config_ctx *ctx, sd_device *device, char **ret) {
         return 0;
 }
 
+int config_parse_ifalias(
+                const char *unit,
+                const char *filename,
+                unsigned line,
+                const char *section,
+                unsigned section_line,
+                const char *lvalue,
+                int ltype,
+                const char *rvalue,
+                void *data,
+                void *userdata) {
+
+        char **s = data;
+
+        assert(filename);
+        assert(lvalue);
+        assert(rvalue);
+        assert(data);
+
+        if (!isempty(rvalue)) {
+                *s = mfree(*s);
+                return 0;
+        }
+
+        if (!ascii_is_valid(rvalue)) {
+                log_syntax(unit, LOG_WARNING, filename, line, 0,
+                           "Interface alias is not ASCII clean, ignoring assignment: %s", rvalue);
+                return 0;
+        }
+
+        if (strlen(rvalue) >= IFALIASZ) {
+                log_syntax(unit, LOG_WARNING, filename, line, 0,
+                           "Interface alias is too long, ignoring assignment: %s", rvalue);
+                return 0;
+        }
+
+        if (free_and_strdup(s, rvalue) < 0)
+                return log_oom();
+
+        return 0;
+}
+
 static const char* const mac_address_policy_table[_MAC_ADDRESS_POLICY_MAX] = {
         [MAC_ADDRESS_POLICY_PERSISTENT] = "persistent",
         [MAC_ADDRESS_POLICY_RANDOM] = "random",
@@ -668,8 +708,12 @@ static const char* const mac_address_policy_table[_MAC_ADDRESS_POLICY_MAX] = {
 };
 
 DEFINE_STRING_TABLE_LOOKUP(mac_address_policy, MACAddressPolicy);
-DEFINE_CONFIG_PARSE_ENUM(config_parse_mac_address_policy, mac_address_policy, MACAddressPolicy,
-                         "Failed to parse MAC address policy");
+DEFINE_CONFIG_PARSE_ENUM_WITH_DEFAULT(
+        config_parse_mac_address_policy,
+        mac_address_policy,
+        MACAddressPolicy,
+        MAC_ADDRESS_POLICY_NONE,
+        "Failed to parse MAC address policy");
 
 static const char* const name_policy_table[_NAMEPOLICY_MAX] = {
         [NAMEPOLICY_KERNEL] = "kernel",
index 8b5801c003fd15070099b64df7dab10980fd0021..1beecb10ea5d126ac45f0c39bdbc884ff0af292f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-device.h"
@@ -7,7 +7,7 @@
 #include "conf-parser.h"
 #include "ethtool-util.h"
 #include "list.h"
-#include "set.h"
+#include "net-condition.h"
 
 typedef struct link_config_ctx link_config_ctx;
 typedef struct link_config link_config;
@@ -35,13 +35,7 @@ typedef enum NamePolicy {
 struct link_config {
         char *filename;
 
-        Set *match_mac;
-        Set *match_permanent_mac;
-        char **match_path;
-        char **match_driver;
-        char **match_type;
-        char **match_name;
-        char **match_property;
+        NetMatch match;
         LIST_HEAD(Condition, conditions);
 
         char *description;
@@ -93,6 +87,7 @@ MACAddressPolicy mac_address_policy_from_string(const char *p) _pure_;
 /* gperf lookup function */
 const struct ConfigPerfItem* link_config_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
 
+CONFIG_PARSER_PROTOTYPE(config_parse_ifalias);
 CONFIG_PARSER_PROTOTYPE(config_parse_mac_address_policy);
 CONFIG_PARSER_PROTOTYPE(config_parse_name_policy);
 CONFIG_PARSER_PROTOTYPE(config_parse_alternative_names_policy);
index 208b3e72ab6b4673e6affd09529e54bbf5e17186..ee3e401b7a98cc42b4ba4943bf667faf3f49fca7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 #pragma once
 
 /*
index 9c33a560a8ccbfc0dc3f1399f36be8fd5e1d5501..57202564da5c155221689fd29ecb530f773b54ff 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * Copyright © IBM Corp. 2003
  * Copyright © SUSE Linux Products GmbH, 2006
index 70e804fb75de157946bb71c03962d408270a896f..2fe64f45f255d91514865e293bfe7c3f9c2beb90 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 #pragma once
 
 /*
index 7f25824df3d646d85da205368382bfce9830a832..4fe725477f53f48387cba87c7d14cb1f5bbd7c77 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * Copyright © IBM Corp. 2003
  *
index 1df41dab36bc34d9a21cbb491a9e5cd5cbd141f8..3f64548ad076a7df3717233619b65923815c43fb 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * probe disks for filesystems and partitions
  *
index 1f0073e5cde74a510f80094f2788ff2c23360148..9079d1b8e97207c89125ce36b15da53fc791c29d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <fcntl.h>
 #include <linux/btrfs.h>
index 59ae6c7ad44ee3449235f6cecc08eaa9385e9d9d..78835185b07345d12c4509a30f4a25b2438c1490 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fnmatch.h>
index 81dd03e4c50db79652f32b39e5c0bdc436cc562b..6a4911ca348771959e18abac5606836b88d5db9a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * expose input properties via udev
  *
index 48146105e043a916f8df37ed5681cc5735828826..cd766a8b6a5c76f0c2d7e358b2b50dfb66539cdc 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index b3daddcdd5465c29ba2f04c2520b4b456c93f33e..3be8bd56f4648b19e0716c17cd81af193536bd74 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * load kernel modules
  *
index f070c1dc9cecfa206a81435e1eabf229352067d6..d06a8c71560dd3436d0612a0624a8e3299f2ebc8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 /*
  * Predictable network interface device names based on:
@@ -243,9 +243,29 @@ static bool is_pci_ari_enabled(sd_device *dev) {
         return streq(a, "1");
 }
 
+static bool is_pci_bridge(sd_device *dev) {
+        const char *v, *p;
+
+        if (sd_device_get_sysattr_value(dev, "modalias", &v) < 0)
+                return false;
+
+        if (!startswith(v, "pci:"))
+                return false;
+
+        p = strrchr(v, 's');
+        if (!p)
+                return false;
+        if (p[1] != 'c')
+                return false;
+
+        /* PCI device subclass 04 corresponds to PCI bridge */
+        return strneq(p + 2, "04", 2);
+}
+
 static int dev_pci_slot(sd_device *dev, struct netnames *names) {
         unsigned long dev_port = 0;
-        unsigned domain, bus, slot, func, hotplug_slot = 0;
+        unsigned domain, bus, slot, func;
+        int hotplug_slot = -1;
         size_t l;
         char *s;
         const char *sysname, *attr, *port_name = NULL, *syspath;
@@ -326,14 +346,14 @@ static int dev_pci_slot(sd_device *dev, struct netnames *names) {
                         continue;
 
                 FOREACH_DIRENT_ALL(dent, dir, break) {
-                        unsigned i;
+                        int i;
                         char str[PATH_MAX];
                         _cleanup_free_ char *address = NULL;
 
                         if (dot_or_dot_dot(dent->d_name))
                                 continue;
 
-                        r = safe_atou_full(dent->d_name, 10, &i);
+                        r = safe_atoi(dent->d_name, &i);
                         if (r < 0 || i <= 0)
                                 continue;
 
@@ -342,10 +362,18 @@ static int dev_pci_slot(sd_device *dev, struct netnames *names) {
                             read_one_line_file(str, &address) >= 0 &&
                             startswith(sysname, address)) {
                                 hotplug_slot = i;
+
+                                /* We found the match between PCI device and slot. However, we won't use the
+                                 * slot index if the device is a PCI bridge, because it can have other child
+                                 * devices that will try to claim the same index and that would create name
+                                 * collision. */
+                                if (naming_scheme_has(NAMING_BRIDGE_NO_SLOT) && is_pci_bridge(hotplug_slot_dev))
+                                        hotplug_slot = 0;
+
                                 break;
                         }
                 }
-                if (hotplug_slot > 0)
+                if (hotplug_slot >= 0)
                         break;
                 if (sd_device_get_parent_with_subsystem_devtype(hotplug_slot_dev, "pci", NULL, &hotplug_slot_dev) < 0)
                         break;
index ee3ca9fa38469c6c118376e182afe724f7c623ae..cb12b943fe7d95d04b1e561229be87540a08cc6d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "device-util.h"
 #include "alloc-util.h"
@@ -19,7 +19,10 @@ static int builtin_net_setup_link(sd_device *dev, int argc, char **argv, bool te
                 return log_device_error_errno(dev, SYNTHETIC_ERRNO(EINVAL), "This program takes no arguments.");
 
         r = link_get_driver(ctx, dev, &driver);
-        if (r >= 0)
+        if (r < 0)
+                log_device_full_errno(dev, r == -EOPNOTSUPP ? LOG_DEBUG : LOG_WARNING,
+                                      r, "Failed to query device driver: %m");
+        else
                 udev_builtin_add_property(dev, test, "ID_NET_DRIVER", driver);
 
         r = link_config_get(ctx, dev, &link);
index 6c020ac0ed0037db2ebdb928f0994f7833a6947b..0da59e2c756e589570aa2431ca0fd87da2ecc810 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * compose persistent device path
  *
index d552316eee07cd319d11eab01d5500a023fa5593..cfdf130f12773ca466043896d1163d00973535a6 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * manage device node user ACL
  */
index 758b5ed7e215a3efa7236b07aea4e2a59efe89cd..fa554e740f3dae6cde09c4274dca181b070fa651 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * USB device properties and persistent device path
  *
index b13c1bffe5c8e128b66b8ce84f1c84664dec2c5f..80d17662b20670ac199f87215019a6352ceb7865 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 #include <stdio.h>
index 99af505551452bdc6ca18d607b1f1282c6c49bb3..14d6406d2b1dffa4fb5f14f9ebcc2b91f5848813 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 #pragma once
 
 #include <stdbool.h>
index 9deb3864b5a85fd71fcd95f568ad0d321a38c722..48355aa50c865d15a6d1d6a70137fe95269bbace 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+
+/* SPDX-License-Identifier: LGPL-2.1-or-later
  *
  * libudev - interface to udev device information
  *
@@ -58,7 +58,6 @@ struct udev_ctrl {
 int udev_ctrl_new_from_fd(struct udev_ctrl **ret, int fd) {
         _cleanup_close_ int sock = -1;
         struct udev_ctrl *uctrl;
-        int r;
 
         assert(ret);
 
@@ -79,14 +78,6 @@ int udev_ctrl_new_from_fd(struct udev_ctrl **ret, int fd) {
                 .bound = fd >= 0,
         };
 
-        /*
-         * FIXME: remove it as soon as we can depend on this:
-         *   http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=90c6bd34f884cd9cee21f1d152baf6c18bcac949
-         */
-        r = setsockopt_int(uctrl->sock, SOL_SOCKET, SO_PASSCRED, true);
-        if (r < 0)
-                log_warning_errno(r, "Failed to set SO_PASSCRED: %m");
-
         uctrl->saddr.un = (struct sockaddr_un) {
                 .sun_family = AF_UNIX,
                 .sun_path = "/run/udev/control",
index 2c84a8b16d8ae7703045143b22d2397df94ee2d9..680fbf7bff1de84d4712f63e95ca358198a13200 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 #pragma once
 
 #include "sd-event.h"
index ede8e3aef72ae3fa840c87ec9eba53186bb599ec..5159d19a3825d6d6b58e09642eb02b058b615403 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 
 #include <ctype.h>
 #include <errno.h>
@@ -960,7 +960,7 @@ static int copy_all_tags(sd_device *d, sd_device *s) {
         if (!s)
                 return 0;
 
-        for (tag = sd_device_get_tag_first(s); tag; tag = sd_device_get_tag_next(s)) {
+        FOREACH_DEVICE_TAG(s, tag) {
                 r = device_add_tag(d, tag, false);
                 if (r < 0)
                         return r;
@@ -1041,6 +1041,13 @@ int udev_event_execute_rules(UdevEvent *event,
         if (r < 0)
                 return log_device_debug_errno(dev, r, "Failed to update database under /run/udev/data/: %m");
 
+        /* Yes, we run update_devnode() twice, because in the first invocation, that is before update of udev database,
+         * it could happen that two contenders are replacing each other's symlink. Hence we run it again to make sure
+         * symlinks point to devices that claim them with the highest priority. */
+        r = update_devnode(event);
+        if (r < 0)
+                return r;
+
         device_set_is_initialized(dev);
 
         return 0;
index a0193ffef350c54972ef8b2f11fed615452fd3ca..864782822cd9671a05f79eb4a0e2b8abc38bbdd7 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 #pragma once
 
 /*
index 2cc26d29fa64957f788caec59a8c564db3f8057f..bde18f756e446695f882a56eee9fad186a53d533 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
 #include "path-util.h"
 #include "selinux-util.h"
 #include "smack-util.h"
+#include "stat-util.h"
 #include "stdio-util.h"
 #include "string-util.h"
 #include "strxcpyx.h"
 #include "udev-node.h"
 #include "user-util.h"
 
+#define LINK_UPDATE_MAX_RETRIES 128
+
 static int node_symlink(sd_device *dev, const char *node, const char *slink) {
         _cleanup_free_ char *slink_dirname = NULL, *target = NULL;
         const char *id_filename, *slink_tmp;
@@ -99,7 +102,9 @@ static int node_symlink(sd_device *dev, const char *node, const char *slink) {
         if (rename(slink_tmp, slink) < 0) {
                 r = log_device_error_errno(dev, errno, "Failed to rename '%s' to '%s': %m", slink_tmp, slink);
                 (void) unlink(slink_tmp);
-        }
+        } else
+                /* Tell caller that we replaced already existing symlink. */
+                r = 1;
 
         return r;
 }
@@ -192,7 +197,7 @@ static int link_update(sd_device *dev, const char *slink, bool add) {
         _cleanup_free_ char *target = NULL, *filename = NULL, *dirname = NULL;
         char name_enc[PATH_MAX];
         const char *id_filename;
-        int r;
+        int i, r, retries;
 
         assert(dev);
         assert(slink);
@@ -212,14 +217,6 @@ static int link_update(sd_device *dev, const char *slink, bool add) {
         if (!add && unlink(filename) == 0)
                 (void) rmdir(dirname);
 
-        r = link_find_prioritized(dev, add, dirname, &target);
-        if (r < 0) {
-                log_device_debug(dev, "No reference left, removing '%s'", slink);
-                if (unlink(slink) == 0)
-                        (void) rmdir_parents(slink, "/");
-        } else
-                (void) node_symlink(dev, target, slink);
-
         if (add)
                 do {
                         _cleanup_close_ int fd = -1;
@@ -232,7 +229,49 @@ static int link_update(sd_device *dev, const char *slink, bool add) {
                                 r = -errno;
                 } while (r == -ENOENT);
 
-        return r;
+        /* If the database entry is not written yet we will just do one iteration and possibly wrong symlink
+         * will be fixed in the second invocation. */
+        retries = sd_device_get_is_initialized(dev) > 0 ? LINK_UPDATE_MAX_RETRIES : 1;
+
+        for (i = 0; i < retries; i++) {
+                struct stat st1 = {}, st2 = {};
+
+                r = stat(dirname, &st1);
+                if (r < 0 && errno != ENOENT)
+                        return -errno;
+
+                r = link_find_prioritized(dev, add, dirname, &target);
+                if (r == -ENOENT) {
+                        log_device_debug(dev, "No reference left, removing '%s'", slink);
+                        if (unlink(slink) == 0)
+                                (void) rmdir_parents(slink, "/");
+
+                        break;
+                } else if (r < 0)
+                        return log_device_error_errno(dev, r, "Failed to determine highest priority symlink: %m");
+
+                r = node_symlink(dev, target, slink);
+                if (r < 0) {
+                        (void) unlink(filename);
+                        break;
+                } else if (r == 1)
+                        /* We have replaced already existing symlink, possibly there is some other device trying
+                         * to claim the same symlink. Let's do one more iteration to give us a chance to fix
+                         * the error if other device actually claims the symlink with higher priority. */
+                        continue;
+
+                /* Skip the second stat() if the first failed, stat_inode_unmodified() would return false regardless. */
+                if ((st1.st_mode & S_IFMT) != 0) {
+                        r = stat(dirname, &st2);
+                        if (r < 0 && errno != ENOENT)
+                                return -errno;
+
+                        if (stat_inode_unmodified(&st1, &st2))
+                                break;
+                }
+        }
+
+        return i < LINK_UPDATE_MAX_RETRIES ? 0 : -ELOOP;
 }
 
 int udev_node_update_old_links(sd_device *dev, sd_device *dev_old) {
@@ -451,8 +490,11 @@ int udev_node_add(sd_device *dev, bool apply,
         (void) node_symlink(dev, devnode, filename);
 
         /* create/update symlinks, add symlinks to name index */
-        FOREACH_DEVICE_DEVLINK(dev, devlink)
-                (void) link_update(dev, devlink, true);
+        FOREACH_DEVICE_DEVLINK(dev, devlink) {
+                r = link_update(dev, devlink, true);
+                if (r < 0)
+                        log_device_info_errno(dev, r, "Failed to update device symlinks: %m");
+        }
 
         return 0;
 }
@@ -465,8 +507,11 @@ int udev_node_remove(sd_device *dev) {
         assert(dev);
 
         /* remove/update symlinks, remove symlinks from name index */
-        FOREACH_DEVICE_DEVLINK(dev, devlink)
-                (void) link_update(dev, devlink, false);
+        FOREACH_DEVICE_DEVLINK(dev, devlink) {
+                r = link_update(dev, devlink, false);
+                if (r < 0)
+                        log_device_info_errno(dev, r, "Failed to update device symlinks: %m");
+        }
 
         r = xsprintf_dev_num_path_from_sd_device(dev, &filename);
         if (r < 0)
index 5ae816d66f12c3a27a960f39f1d3693838bdb98d..84c7e4567fa34296749f3066af07ed900ac18166 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 #pragma once
 
 #include <stdbool.h>
index 437429a3e0b09cf0b6ca88682e776657dc4d18f6..ef6a0c112cb1f8c33c0cb7da7d8a538c171e7f20 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 
 #include <ctype.h>
 
@@ -480,7 +480,7 @@ static int rule_line_add_token(UdevRuleLine *rule_line, UdevRuleTokenType type,
                 if (len > 0 && !isspace(value[len - 1]))
                         remove_trailing_whitespace = true;
 
-                subst_type = rule_get_substitution_type((const char*) data);
+                subst_type = rule_get_substitution_type(data);
         }
 
         token = new(UdevRuleToken, 1);
@@ -990,8 +990,9 @@ static UdevRuleOperatorType parse_operator(const char *op) {
 }
 
 static int parse_line(char **line, char **ret_key, char **ret_attr, UdevRuleOperatorType *ret_op, char **ret_value) {
-        char *key_begin, *key_end, *attr, *tmp, *value, *i, *j;
+        char *key_begin, *key_end, *attr, *tmp;
         UdevRuleOperatorType op;
+        int r;
 
         assert(line);
         assert(*line);
@@ -1031,30 +1032,14 @@ static int parse_line(char **line, char **ret_key, char **ret_attr, UdevRuleOper
         key_end[0] = '\0';
 
         tmp += op == OP_ASSIGN ? 1 : 2;
-        value = skip_leading_chars(tmp, NULL);
-
-        /* value must be double quotated */
-        if (value[0] != '"')
-                return -EINVAL;
-        value++;
-
-        /* unescape double quotation '\"' -> '"' */
-        for (i = j = value; ; i++, j++) {
-                if (*i == '"')
-                        break;
-                if (*i == '\0')
-                        return -EINVAL;
-                if (i[0] == '\\' && i[1] == '"')
-                        i++;
-                *j = *i;
-        }
-        j[0] = '\0';
+        tmp = skip_leading_chars(tmp, NULL);
+        r = udev_rule_parse_value(tmp, ret_value, line);
+        if (r < 0)
+                return r;
 
-        *line = i+1;
         *ret_key = key_begin;
         *ret_attr = attr;
         *ret_op = op;
-        *ret_value = value;
         return 1;
 }
 
@@ -1386,7 +1371,7 @@ static bool token_match_attr(UdevRuleToken *token, sd_device *dev, UdevEvent *ev
         assert(dev);
         assert(event);
 
-        name = (const char*) token->data;
+        name = token->data;
 
         switch (token->attr_subst_type) {
         case SUBST_TYPE_FORMAT:
@@ -1585,7 +1570,7 @@ static int udev_rule_apply_token_to_event(
         case TK_M_NAME:
                 return token_match_string(token, event->name);
         case TK_M_ENV:
-                if (sd_device_get_property_value(dev, (const char*) token->data, &val) < 0)
+                if (sd_device_get_property_value(dev, token->data, &val) < 0)
                         val = hashmap_get(properties_list, token->data);
 
                 return token_match_string(token, val);
@@ -1630,7 +1615,7 @@ static int udev_rule_apply_token_to_event(
         case TK_M_SYSCTL: {
                 _cleanup_free_ char *value = NULL;
 
-                (void) udev_event_apply_format(event, (const char*) token->data, buf, sizeof(buf), false);
+                (void) udev_event_apply_format(event, token->data, buf, sizeof(buf), false);
                 r = sysctl_read(sysctl_normalize(buf), &value);
                 if (r < 0 && r != -ENOENT)
                         return log_rule_error_errno(dev, rules, r, "Failed to read sysctl '%s': %m", buf);
@@ -1957,7 +1942,7 @@ static int udev_rule_apply_token_to_event(
                 _cleanup_free_ char *name = NULL, *label = NULL;
                 char label_str[UTIL_LINE_SIZE] = {};
 
-                name = strdup((const char*) token->data);
+                name = strdup(token->data);
                 if (!name)
                         return log_oom();
 
@@ -1984,7 +1969,7 @@ static int udev_rule_apply_token_to_event(
                 break;
         }
         case TK_A_ENV: {
-                const char *name = (const char*) token->data;
+                const char *name = token->data;
                 char value_new[UTIL_NAME_SIZE], *p = value_new;
                 size_t l = sizeof(value_new);
 
@@ -2097,7 +2082,7 @@ static int udev_rule_apply_token_to_event(
                 break;
         }
         case TK_A_ATTR: {
-                const char *key_name = (const char*) token->data;
+                const char *key_name = token->data;
                 char value[UTIL_NAME_SIZE];
 
                 if (util_resolve_subsys_kernel(key_name, buf, sizeof(buf), false) < 0 &&
@@ -2120,7 +2105,7 @@ static int udev_rule_apply_token_to_event(
         case TK_A_SYSCTL: {
                 char value[UTIL_NAME_SIZE];
 
-                (void) udev_event_apply_format(event, (const char*) token->data, buf, sizeof(buf), false);
+                (void) udev_event_apply_format(event, token->data, buf, sizeof(buf), false);
                 (void) udev_event_apply_format(event, token->value, value, sizeof(value), false);
                 sysctl_normalize(buf);
                 log_rule_debug(dev, rules, "SYSCTL '%s' writing '%s'", buf, value);
index cdb98e8ceccf4bc3be58f9791b0dafde73e73401..3f40a5395ec332e0b6c0ba4b270a33f20eb726ae 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 #pragma once
 
 #include "hashmap.h"
index d87a43537cff14792d68f42dc81f2854f7fd6bf1..8656fb0076dc4b7c39553bc0a55f8633b929a43a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * Copyright © 2009 Canonical Ltd.
  * Copyright © 2009 Scott James Remnant <scott@netsplit.com>
index 24a136d26114d325a922c1bdc1d3c97da3c7d8af..a15fa2767e836379fca6e5df6fea43d7ce355c79 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 #pragma once
 
 #include "sd-device.h"
index 6096dcbe781bcc0622c162ae2131aef4ebe391da..ef23a6c9f65d43159a5c45b40126d8ba80ba6e9f 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
index 7f8960f549f96df889d89097951d1b823735b84f..3d219222b9d46081a1e1361f5d6be2d1d2fad219 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 
index ae6d8caf54e02c39c4b5f4245b5523cc9713eb97..5ff6256dfa5d54dc56f5145368fdfe44249c87d8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 
 #include <ctype.h>
 #include <errno.h>
@@ -493,7 +493,11 @@ int info_main(int argc, char *argv[], void *userdata) {
                 if (arg_wait_for_initialization_timeout > 0) {
                         sd_device *d;
 
-                        r = device_wait_for_initialization(device, NULL, arg_wait_for_initialization_timeout, &d);
+                        r = device_wait_for_initialization(
+                                        device,
+                                        NULL,
+                                        usec_add(now(CLOCK_MONOTONIC), arg_wait_for_initialization_timeout),
+                                        &d);
                         if (r < 0)
                                 return r;
 
index 52f27ed941600e4de8cb8feb651b8955537c4fe8..cae7f1bbb85d38dfa9cae8da72e907cef8b8960d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 
 #include <errno.h>
 #include <getopt.h>
index 66c7103d783ac729756319fa251518d3b06e8ec9..2bd5853553784b433fdf74b10ade0562311149a8 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * Copyright © 2009 Canonical Ltd.
  * Copyright © 2009 Scott James Remnant <scott@netsplit.com>
index eb5d3e2b905f66c5d0d644771198e72827b20870..8995e5ccaebaea2f061047a77b8416df60e1d23a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 
 #include <errno.h>
 #include <getopt.h>
index 0d84b31ff02eb81e69074fe61bb936aca985c8bb..a029622af9dab240491dbb1beb9badb1e4ec6094 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * Copyright © 2003-2004 Greg Kroah-Hartman <greg@kroah.com>
  */
index a588d18fd117b1637af09f7729adf66b902072f5..5c74184c33620785dfe8883eaf75acf681098725 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 
 #include <errno.h>
 #include <getopt.h>
index 557982b23dfa896b9c5681c17e2edda0110bb936..39d0c7eb3f142206c5bbdf885a097fa23572ee68 100644 (file)
@@ -1,13 +1,75 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 
 #include <errno.h>
 
 #include "alloc-util.h"
+#include "bus-error.h"
+#include "bus-util.h"
 #include "device-private.h"
 #include "path-util.h"
 #include "udevadm-util.h"
 #include "unit-name.h"
 
+static int find_device_from_path(const char *path, sd_device **ret) {
+        if (path_startswith(path, "/sys/"))
+                return sd_device_new_from_syspath(ret, path);
+
+        if (path_startswith(path, "/dev/")) {
+                struct stat st;
+
+                if (stat(path, &st) < 0)
+                        return -errno;
+
+                return device_new_from_stat_rdev(ret, &st);
+        }
+
+        return -EINVAL;
+}
+
+static int find_device_from_unit(const char *unit_name, sd_device **ret) {
+        _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
+        _cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
+        _cleanup_free_ char *unit_path = NULL, *syspath = NULL;
+        int r;
+
+        if (!unit_name_is_valid(unit_name, UNIT_NAME_PLAIN))
+                return -EINVAL;
+
+        if (unit_name_to_type(unit_name) != UNIT_DEVICE)
+                return -EINVAL;
+
+        r = bus_connect_system_systemd(&bus);
+        if (r < 0) {
+                _cleanup_free_ char *path = NULL;
+
+                log_debug_errno(r, "Failed to open connection to systemd, using unit name as syspath: %m");
+
+                r = unit_name_to_path(unit_name, &path);
+                if (r < 0)
+                        return log_debug_errno(r, "Failed to convert \"%s\" to a device path: %m", unit_name);
+
+                return find_device_from_path(path, ret);
+        }
+
+        unit_path = unit_dbus_path_from_name(unit_name);
+        if (!unit_path)
+                return -ENOMEM;
+
+        r = sd_bus_get_property_string(
+                        bus,
+                        "org.freedesktop.systemd1",
+                        unit_path,
+                        "org.freedesktop.systemd1.Device",
+                        "SysFSPath",
+                        &error,
+                        &syspath);
+        if (r < 0)
+                return log_debug_errno(r, "Failed to get SysFSPath= dbus property for %s: %s",
+                                       unit_name, bus_error_message(&error, r));
+
+        return sd_device_new_from_syspath(ret, syspath);
+}
+
 int find_device(const char *id, const char *prefix, sd_device **ret) {
         _cleanup_free_ char *path = NULL;
         int r;
@@ -24,26 +86,10 @@ int find_device(const char *id, const char *prefix, sd_device **ret) {
         } else {
                 /* In cases where the argument is generic (no prefix specified),
                  * check if the argument looks like a device unit name. */
-                if (unit_name_is_valid(id, UNIT_NAME_PLAIN) &&
-                    unit_name_to_type(id) == UNIT_DEVICE) {
-                        r = unit_name_to_path(id, &path);
-                        if (r < 0)
-                                return log_debug_errno(r, "Failed to convert \"%s\" to a device path: %m", id);
-                        id = path;
-                }
+                r = find_device_from_unit(id, ret);
+                if (r >= 0)
+                        return r;
         }
 
-        if (path_startswith(id, "/sys/"))
-                return sd_device_new_from_syspath(ret, id);
-
-        if (path_startswith(id, "/dev/")) {
-                struct stat st;
-
-                if (stat(id, &st) < 0)
-                        return -errno;
-
-                return device_new_from_stat_rdev(ret, &st);
-        }
-
-        return -EINVAL;
+        return find_device_from_path(id, ret);
 }
index 59e89022a06d3267e721b27c162fd2e5aa330444..91587c5492ad9fc1cb44292da30d69390f1051f5 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 #pragma once
 
 #include "sd-device.h"
index e476f88f00812db5a3abc907493291683c737a0a..408e4a34676ad2c06223c43150ae2dfe074d9ce4 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 
 #include <errno.h>
 #include <getopt.h>
index 86b24af086d07854681c0bd063d600b639e74408..162bbb9a43616154ab162a1ce06d57fc3d10383b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 #pragma once
 
 #include <stdio.h>
index 18079d363d8476e93d0f749d39b735ee9c41ee71..d24b8d43985babfdf9683723cea846e8be509518 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * Copyright © 2004 Chris Friesen <chris_friesen@sympatico.ca>
  * Copyright © 2009 Canonical Ltd.
@@ -565,7 +565,7 @@ static int worker_main(Manager *_manager, sd_device_monitor *monitor, sd_device
         assert(monitor);
         assert(dev);
 
-        unsetenv("NOTIFY_SOCKET");
+        assert_se(unsetenv("NOTIFY_SOCKET") == 0);
 
         assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, -1) >= 0);
 
index 848ffc245b43f78d1de83a96d90d3d714076d7e7..583e8952255b9e3acd776904c111e1024205cf42 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 #pragma once
 
 int run_udevd(int argc, char *argv[]);
index 5de26b8062377ce96c34eaa5a74a30fa47affb93..932446b766dadfef611c5d6b3f09d735531490fd 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
 /*
  * Copyright (c) 2009 Filippo Argiolas <filippo.argiolas@gmail.com>
  *
index e9d589e0e53045eaae06b213b39f1b0ce21c182c..212892527e6ad55a13e5c1e0944f9b87e57e7c84 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -31,8 +31,8 @@ static int apply_timestamp(const char *path, struct timespec *ts) {
 
         r = write_string_file_atomic_label_ts(path, message, ts);
         if (r == -EROFS)
-                return log_debug_errno(r, "Cannot create \"%s\", file system is read-only.", path);
-        if (r < 0)
+                log_debug_errno(r, "Cannot create \"%s\", file system is read-only.", path);
+        else if (r < 0)
                 return log_error_errno(r, "Failed to write \"%s\": %m", path);
         return 0;
 }
index 4ab90a63ed8def2a8bed4733b51d54da1f69d85a..59c49f2a8019c5e9cc5aba4071ca086df116011a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sys/stat.h>
@@ -133,10 +133,8 @@ static int on_reboot(Context *c) {
         t = get_startup_time(c);
 
         q = utmp_put_reboot(t);
-        if (q < 0) {
-                log_error_errno(q, "Failed to write utmp record: %m");
-                r = q;
-        }
+        if (q < 0)
+                r = log_error_errno(q, "Failed to write utmp record: %m");
 
         return r;
 }
@@ -157,10 +155,8 @@ static int on_shutdown(Context *c) {
 #endif
 
         q = utmp_put_shutdown();
-        if (q < 0) {
-                log_error_errno(q, "Failed to write utmp record: %m");
-                r = q;
-        }
+        if (q < 0)
+                r = log_error_errno(q, "Failed to write utmp record: %m");
 
         return r;
 }
index cd92b696c0c20733599deea4c37ecce3fa587f52..d1b8176714ed8b8a90525408904087be17ead65d 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <fcntl.h>
index 2f7e1accbf90d6c9704e9a1fc03f4c0413880ed5..3a6225e01eaae6c9ea9ebc6ee00357ec10533fff 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 systemd_userwork_sources = files('''
         userwork.c
index 0c135fae149ebdc0628ade44c8bc368648a23a66..a0e22dff559ee5b0916de88ce5c5ebc3f1747b93 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <getopt.h>
 #include <utmp.h>
@@ -780,10 +780,8 @@ static int run(int argc, char *argv[]) {
                         return log_error_errno(r, "Failed to set $SYSTEMD_ONLY_USERDB: %m");
 
                 log_info("Enabled services: %s", e);
-        } else {
-                if (unsetenv("SYSTEMD_ONLY_USERDB") < 0)
-                        return log_error_errno(r, "Failed to unset $SYSTEMD_ONLY_USERDB: %m");
-        }
+        } else
+                assert_se(unsetenv("SYSTEMD_ONLY_USERDB") == 0);
 
         return dispatch_verb(argc, argv, verbs, NULL);
 }
index 060285783f1135d40a74933c81f11509a9d24959..f8d315ce2de3b2d6015dcaa9b6f76a4073390b4b 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/wait.h>
 
index 0bf67fe55b4431fd142c69688cbe79382e7d35e3..b81615aca1139f6c5dc433947a3e111777bf6927 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "sd-bus.h"
index e456104dd7453765e59607e971bac2bdf6847ba7..6f2c8078432bb20be0ccbe5f988606eacb9e0fb1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/stat.h>
 #include <sys/types.h>
index a68011b3fcad43f17f50a4afbc84adc041d5de88..d525a6e05afad2d9817c9d7d982f5df672d2dcea 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <poll.h>
 #include <sys/wait.h>
index 70679b6dd256786d40b9680ab81a52557e623e4f..a16988c38c3122d2e3c1b1d3da8d235b25cf159a 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 03065ec26c7205489c8d0e3175fee84e2ee5fd4a..695ef0239ddc926e9807daa135cbc803a8587e7d 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 if conf.get('ENABLE_VCONSOLE') == 1
         vconsole_rules = configure_file(
index a2fe7e909976cd86c08a157a984c4a04bd8cc4cb..b28e2853e10b16ff7ebd313767696a85c9faae84 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /***
   Copyright © 2016 Michal Soltys <soltys@ziu.info>
 ***/
index ea1d056600de1d5a4d784ad9eb59da92bdc6354c..4682a7b04ce22049dfd92493e11e1b71af06ff2e 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdbool.h>
index 829495175924895602823a88dd8a15fa8bc1da68..9b8bca11f2cb5faa7f91487895f251fb23156206 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdio.h>
@@ -100,7 +100,11 @@ static int run(int argc, char *argv[]) {
                                 if (r < 0)
                                         return log_error_errno(r, "Failed to parse root hash signature '%s': %m", argv[6]);
                         } else {
-                                r = read_full_file_full(AT_FDCWD, argv[6], READ_FULL_FILE_CONNECT_SOCKET, &hash_sig, &hash_sig_size);
+                                r = read_full_file_full(
+                                                AT_FDCWD, argv[6], UINT64_MAX, SIZE_MAX,
+                                                READ_FULL_FILE_CONNECT_SOCKET,
+                                                NULL,
+                                                &hash_sig, &hash_sig_size);
                                 if (r < 0)
                                         return log_error_errno(r, "Failed to read root hash signature: %m");
                         }
index 04c371077a8317e1b46e92a6777d142944638c07..ee3532cc02a0a0bfd57927615d106c64dfd05207 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <sys/mount.h>
 
index 84a3561654e6d19c42f5a140e9b969c51efb2a02..c4485cf6256fb2a96632b4fdb2abd8919e8104f9 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "main-func.h"
 #include "strv.h"
index 6cec28e6226a7713f54d71a7adf2283839b7b2ff..7b441a9a12b7a4ca27453681553f3f6e2480ce01 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdio.h>
index 9317e9d028937c4b09352d73ec998ee1a8af8f9d..671d16d2d9efb06b1d6d82c608fbff980886226a 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <stdio.h>
@@ -604,7 +604,7 @@ int xdg_autostart_service_generate_unit(
 
         fprintf(f,
                 "\n[Service]\n"
-                "Type=simple\n"
+                "Type=exec\n"
                 "ExecStart=:%s\n"
                 "Restart=no\n"
                 "TimeoutSec=5s\n"
index 8cf07ef64a5f7b57ece236bd5f0067d6707cb78b..2641718899c8c9d716a066aa96c774ad725cdbf1 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
 #include "macro.h"
index 3f072e3db77cd85af37a7cec9d04f1c41024eee8..e8d8fc8c53b2d77a166d42dddd5b31da7a866127 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 install_data(
         '50-default.conf',
@@ -26,5 +26,7 @@ foreach file : in_files
                      install_dir : sysctldir)
 endforeach
 
-meson.add_install_script('sh', '-c',
-                         mkdir_p.format(join_paths(sysconfdir, 'sysctl.d')))
+if install_sysconfdir
+        meson.add_install_script('sh', '-c',
+                                 mkdir_p.format(join_paths(sysconfdir, 'sysctl.d')))
+endif
index 146f922bed0ec1dd0579a62c4039cba2dacc9ddb..93a61f0d9a892606e5f7b23f2dbd95e245d86db5 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 in_files = ['basic.conf']
 
index ef5a3cb6198ca0f6ba2866085ceb8e751060da92..fdfdcf553c3fa622982a1758bd12188ec8323d66 100644 (file)
@@ -9,6 +9,9 @@ g systemd-journal   - -
 m4_ifdef(`ENABLE_NETWORKD',
 u systemd-network   - "systemd Network Management"
 )m4_dnl
+m4_ifdef(`ENABLE_OOMD',
+u systemd-oom       - "systemd Userspace OOM Killer"
+)m4_dnl
 m4_ifdef(`ENABLE_RESOLVE',
 u systemd-resolve   - "systemd Resolver"
 )m4_dnl
index 34c7ab3f7de6082c1f04ac37ddfbea541925ffd5..5d9e498c51a0fb2b501a6edac65b8eccea15a357 100644 (file)
@@ -120,3 +120,12 @@ https://wiki.debian.org/ArchitectureSpecificsMemo
 
 For PRs that fix a currently deny-listed test, the PR should include removal
 of the deny-list file.
+
+In case a test fails, the full set of artifacts, including the journal of the
+failed run, can be downloaded from the artifacts.tar.gz archive which will be
+reachable in the same URL parent directory as the logs.gz that gets linked on
+the Github CI status.
+
+To add new dependencies or new binaries to the packages used during the tests,
+a merge request can be sent to: https://salsa.debian.org/systemd-team/systemd
+targeting the 'upstream-ci' branch.
index f274b73522b54a957ed3250e8fbb737b4668c4e9..073ca8c31b91bada4eb57dc138ee3207fc9d95ac 100755 (executable)
@@ -37,7 +37,7 @@ test_create_image() {
         )
         oldinitdir=$initdir
         export initdir=$TESTDIR/minimal
-        mkdir -p $initdir
+        mkdir -p $initdir/usr/lib $initdir/etc
         setup_basic_dirs
         install_basic_tools
         cp $os_release $initdir/usr/lib/os-release
diff --git a/test/TEST-56-OOMD/Makefile b/test/TEST-56-OOMD/Makefile
new file mode 120000 (symlink)
index 0000000..e9f93b1
--- /dev/null
@@ -0,0 +1 @@
+../TEST-01-BASIC/Makefile
\ No newline at end of file
diff --git a/test/TEST-56-OOMD/test.sh b/test/TEST-56-OOMD/test.sh
new file mode 100755 (executable)
index 0000000..55b0d1d
--- /dev/null
@@ -0,0 +1,48 @@
+#!/usr/bin/env bash
+set -e
+TEST_DESCRIPTION="systemd-oomd Memory Pressure Test"
+
+. $TEST_BASE_DIR/test-functions
+
+check_result_nspawn() {
+    local ret=1
+    local journald_report=""
+    local pids=""
+    [[ -e $1/testok ]] && ret=0
+    if [[ -e $1/skipped ]]; then
+        echo "TEST-56-OOMD was skipped:"
+        cat $1/skipped
+        ret=0
+    fi
+    [[ -f $1/failed ]] && cp -a $1/failed $TESTDIR
+    save_journal $1/var/log/journal
+    [[ -f $TESTDIR/failed ]] && cat $TESTDIR/failed
+    echo $JOURNAL_LIST
+    test -s $TESTDIR/failed && ret=$(($ret+1))
+    [ -n "$TIMED_OUT" ] && ret=$(($ret+1))
+    check_asan_reports "$1" || ret=$(($ret+1))
+    _umount_dir $initdir
+    return $ret
+}
+
+check_result_qemu() {
+    local ret=1
+    mount_initdir
+    [[ -e $initdir/testok ]] && ret=0
+    if [[ -e $initdir/skipped ]]; then
+        echo "TEST-56-OOMD was skipped:"
+        cat $initdir/skipped
+        ret=0
+    fi
+    [[ -f $initdir/failed ]] && cp -a $initdir/failed $TESTDIR
+    save_journal $initdir/var/log/journal
+    check_asan_reports "$initdir" || ret=$(($ret+1))
+    _umount_dir $initdir
+    [[ -f $TESTDIR/failed ]] && cat $TESTDIR/failed
+    echo $JOURNAL_LIST
+    test -s $TESTDIR/failed && ret=$(($ret+1))
+    [ -n "$TIMED_OUT" ] && ret=$(($ret+1))
+    return $ret
+}
+
+do_test "$@" 56
index d03ca2cbf97ac9c1c2f5c12d240ee0ede3517f7c..11ed185de071b66fc279717ed972132983da93e4 100755 (executable)
@@ -1,8 +1,8 @@
 #!/usr/bin/env python3
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 OUTFILE_HEADER = """#!/usr/bin/env python3
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # create-sys-script.py
 #
index 901541fd327c09df1af07894db24f7bda8f4979e..043627c739df77cf1dcee56c0d747ba9e1078e83 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 # Message catalog for systemd's own messages
 # Polish translation
@@ -92,7 +92,7 @@ gdb(1) będą ostrzegały o skróceniu pliku.
 Subject: Utworzono nową sesję @SESSION_ID@ dla użytkownika @USER_ID@
 Defined-By: systemd
 Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Nowa sesja o identyfikatorze @SESSION_ID@ została utworzona dla użytkownika
 @USER_ID@.
@@ -103,7 +103,7 @@ Proces prowadzący sesji: @LEADER@.
 Subject: Zakończono sesję @SESSION_ID@
 Defined-By: systemd
 Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Sesja o identyfikatorze @SESSION_ID@ została zakończona.
 
@@ -111,7 +111,7 @@ Sesja o identyfikatorze @SESSION_ID@ została zakończona.
 Subject: Dostępne jest nowe stanowisko @SEAT_ID@
 Defined-By: systemd
 Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Nowe stanowisko @SEAT_ID@ zostało skonfigurowane i jest teraz dostępne.
 
@@ -119,7 +119,7 @@ Nowe stanowisko @SEAT_ID@ zostało skonfigurowane i jest teraz dostępne.
 Subject: Usunięto stanowisko @SEAT_ID@
 Defined-By: systemd
 Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-Documentation: https://www.freedesktop.org/wiki/Software/systemd/multiseat
+Documentation: sd-login(3)
 
 Stanowisko @SEAT_ID@ zostało usunięte i nie jest już dostępne.
 
index 92fcbe83eab91751854094023ff4d9c602378c98..feb5b1fbb05b82186dfb22bf2f3a5665eb901a59 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index a7aa76f4985bfda27a3cddeeafff9434c8fd533b..f1813400738ef4a723ee29d98f8f7eb11f0424df 100644 (file)
@@ -4,6 +4,7 @@ LooseBinding=
 ReorderHeader=
 Id=
 GVRP=
+Protocol=
 [MACVLAN]
 Mode=
 SourceMACAddress=
index 1494daa0c1b0e6854d6cbdb0ecd7d2e73a11d9ac..cb0c3205a0d3749da00814ed42800ff692cd8933 100644 (file)
@@ -137,6 +137,7 @@ SendVendorOption=
 RouteMetric=
 [DHCPv6PrefixDelegation]
 SubnetId=
+Announce=
 Assign=
 Token=
 [Route]
@@ -190,6 +191,7 @@ DNSOverTLS=
 Bond=
 IPv6ProxyNDP=
 DNS=
+DNSDefaultRoute=
 ActiveSlave=
 LLMNR=
 DNSSEC=
@@ -207,6 +209,7 @@ ConfigureWithoutCarrier=
 NTP=
 DHCP=
 Domains=
+IPv6SendRA=
 IPv6PrefixDelegation=
 VLAN=
 DHCPServer=
@@ -214,6 +217,7 @@ BindCarrier=
 VRF=
 IgnoreCarrierLoss=
 KeepConfiguration=
+DHCPv6PrefixDelegation=
 [IPv6Prefix]
 Prefix=
 OnLink=
@@ -270,11 +274,20 @@ InvertRule=
 Family=
 SuppressPrefixLength=
 User=
+[IPv6SendRA]
+RouterPreference=
+DNSLifetimeSec=
+DNS=
+RouterLifetimeSec=
+Domains=
+EmitDNS=
+EmitDomains=
+Managed=
+OtherInformation=
 [IPv6PrefixDelegation]
 RouterPreference=
 DNSLifetimeSec=
 DNS=
-DNSDefaultRoute=
 RouterLifetimeSec=
 Domains=
 EmitDNS=
index 6ae98981033d7f082213ce8f3753b1f6b1309bee..b6a5c5ad552026048933620991fd9e2eaf8b9474 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index eebc89f5c2391c296625eff7c038c6d2ebcbdca7..464496e25753607edb88bfcbfc07847f95682684 100644 (file)
@@ -175,6 +175,7 @@ PipeSize=
 Priority=
 PropagatesReloadTo=
 RandomizedDelaySec=
+FixedRandomDelay=
 RebootArgument=
 ReceiveBuffer=
 RefuseManualStart=
@@ -373,6 +374,7 @@ Bond=
 Bridge=
 Broadcast=
 Cache=
+CacheFromLocalhost=
 ClientIdentifier=
 ConfigureWithoutCarrier=
 CopyDSCP=
index bf8c6bfc3ec819f86c8dbc04a4f929387d0919a6..3fad2da42ede73066b4f2a5f79b9cca8924e3ff3 100644 (file)
@@ -1,5 +1,5 @@
 slice
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 777a123ef4102f18c2f6d5e5fdef077b392843a4..371469d8326e54e91eddacd8151d466ac007c08e 100644 (file)
@@ -1,5 +1,5 @@
 automount
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 2eb316fcaa6676803ba710b3affb733c4a46e53b..969ee428fa856b5815c3916bbc9ebd0d05dd4974 100644 (file)
@@ -1,5 +1,5 @@
 socket
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 3e12c752de3ba931d4874b998a35097dc454515c..7eca92d2193ac5782814815de9bd2cb426fd1184 100644 (file)
@@ -1,5 +1,5 @@
 path
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 79ee9861d8e657d189759df3b6d2524cc709cf84..45c64bae1cdc5e725bce32264191473035bf2152 100644 (file)
@@ -1,5 +1,5 @@
 service
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 0854c5f841f30ced99dc9e9194caf725155bd81c..42c5c9a0676aaeaaabacf8bb936cb669f381320d 100644 (file)
@@ -1,5 +1,5 @@
 service
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 7db361cd69b74bad928f47850297f713865196a9..5bf91b9f4cd13bd6ae16b2ea472db86ea7e4a23c 100644 (file)
@@ -1,5 +1,5 @@
 timer
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 [Unit]
 Description=Daily Cleanup of Temporary Directories
 Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
@@ -32,6 +32,7 @@ OnCalendar=Fri 2012-11-23 11:12:13
 Persistent=true
 AccuracySec=24h
 RandomizedDelaySec=234234234
+FixedRandomDelay=true
 
 Persistent=no
 Unit=foo.service
index 171226c6809aa6432c225108e70384bb41d4679f..29d04c0f4cd3ff30e31d1dc00bcac3cefd0db9cf 100644 (file)
@@ -1,5 +1,5 @@
 target
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 9c257d1191be6393a4e0c614b1d2f716e9865dc3..b2a491d447eccd52cd33873ca265ebebac164627 100644 (file)
@@ -1,5 +1,5 @@
 mount
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 99584c144b153f610badc41242579e14bb6e68c3..7a83961d11cb5571c161d4d517a508bfd919e87a 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 # The 'optimization' option was introduced in meson 0.48.0, so let's keep
 # the code compatible with older versions as well
@@ -15,7 +15,7 @@ sanitize_address_undefined = custom_target(
                    project_source_root,
                    '@OUTPUT@',
                    'fuzzers',
-                   '-Db_lundef=false -Db_sanitize=address,undefined @0@'.format(optimization),
+                   '-Dfuzz-tests=true -Db_lundef=false -Db_sanitize=address,undefined @0@'.format(optimization),
                    ' '.join(cc.cmd_array()),
                    cxx_cmd])
 
index 8b909f7d80996f17842c1d801d79779544a179cb..2b54a0e70fcf0652dc8086d7a4a631ca785ed998 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Call built systemd-hwdb update on our hwdb files to ensure that they parse
 # without error
index d9ff25f829c8d1ce09bf493b4839dc75f79ff773..799d74c7ae820240c1e600eb4e833b0fd7770541 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 if install_tests
         testdata_dir = testsdir + '/testdata/'
index c4fa569d41ff59fdac8b66e21a7052eab8ba191d..e728e16aa575b6d13f1fd079ee5a1478573c2126 100644 (file)
@@ -8,7 +8,7 @@
 
 [Distribution]
 Distribution=fedora
-Release=32
+Release=33
 
 [Output]
 Format=raw_btrfs
@@ -57,6 +57,8 @@ BuildPackages=
         ninja-build
         pam-devel
         pcre2-devel
+        perl(IPC::SysV)
+        perl(Time::HiRes)
         pkgconfig
         python3-devel
         python3-lxml
index 4116995f8c5fd0477ad7fe8525168eb262a973e1..8496ec881cee036e56dfe013c4542b3db3f2797d 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # networkd integration test
 # This uses temporary configuration in /run and temporary veth devices, and
index 658b9459a90a984fb64e2d1f33c4430542b04572..9a9e4d1658542e2e5cc538a391013c4af9d3932b 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # Simple udev rules syntax checker
 #
diff --git a/test/sd-script.py b/test/sd-script.py
new file mode 100644 (file)
index 0000000..c695c2e
--- /dev/null
@@ -0,0 +1,342 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# sd-script.py: create LOTS of sd device entries in fake sysfs
+#
+# (C) 2018 Martin Wilck, SUSE Linux GmbH
+#
+# Run after sys-script.py
+# Usage: sd-script.py <directory> <num>
+# <num> is the number of device nodes (disks + partititions)
+# to create in addition to what sys-script.py already did.
+# The script can be run several times in a row if <num> is increased,
+# adding yet more device entries.
+# Tested up to 1000 entries, more are possible.
+# Note that sys-script.py already creates 10 sd device nodes
+# (sda+sdb and partitions). This script starts with sdc.
+
+import re
+import os
+import errno
+import sys
+
+def d(path, mode):
+    os.mkdir(path, mode)
+
+def l(path, src):
+    os.symlink(src, path)
+
+def f(path, mode, contents):
+    with open(path, "wb") as f:
+        f.write(contents)
+    os.chmod(path, mode)
+
+class SD(object):
+
+    sd_major = [8] + list(range(65, 72)) + list(range(128, 136))
+    _name_re = re.compile(r'sd(?P<f>[a-z]*)$')
+
+    def _init_from_name(self, name):
+        mt = self._name_re.match(name)
+        if mt is None:
+            raise RuntimeError("invalid name %s" % name)
+        nm = mt.group("f")
+        base = 1
+        ls = nm[-1]
+        nm = nm[:-1]
+        n = base * (ord(ls)-ord('a'))
+        while len(nm) > 0:
+            ls = nm[-1]
+            nm = nm[:-1]
+            base *= 26
+            n += base * (1 + ord(ls)-ord('a'))
+        self._num = n
+
+    def _init_from_dev(self, dev):
+        maj, min = dev.split(":")
+        maj = self.sd_major.index(int(maj, 10))
+        min = int(min, 10)
+        num = int(min / 16)
+        self._num = 16*maj + num%16 + 256*int(num/16)
+
+    @staticmethod
+    def _disk_num(a, b):
+        n = ord(a)-ord('a')
+        if b != '':
+            n = 26 * (n+1) + ord(b)-ord('a')
+        return n
+
+    @staticmethod
+    def _get_major(n):
+        return SD.sd_major[(n%256)//16]
+    @staticmethod
+    def _get_minor(n):
+        return 16 * (n % 16 + 16 * n//256)
+
+    @staticmethod
+    def _get_name(n):
+        # see sd_format_disk_name() (sd.c)
+        s = chr(n % 26 + ord('a'))
+        n = n // 26 - 1
+        while n >= 0:
+            s = chr(n % 26 + ord('a')) + s
+            n = n // 26 - 1
+        return "sd" + s
+
+    @staticmethod
+    def _get_dev_t(n):
+        maj = SD._get_major(n)
+        min = SD._get_minor(n)
+        return (maj << 20) + min
+
+    def __init__(self, arg):
+        if type(arg) is type(0):
+            self._num = arg
+        elif arg.startswith("sd"):
+            self._init_from_name(arg)
+        else:
+            self._init_from_dev(arg)
+
+    def __cmp__(self, other):
+        return cmp(self._num, other._num)
+
+    def __hash__(self):
+        return hash(self._num)
+
+    def __str__(self):
+        return "%s/%s" % (
+            self.devstr(),
+            self._get_name(self._num))
+
+    def major(self):
+        return self._get_major(self._num)
+
+    def minor(self):
+        return self._get_minor(self._num)
+
+    def devstr(self):
+        return "%d:%d" % (self._get_major(self._num),
+                          self._get_minor(self._num))
+
+    def namestr(self):
+        return self._get_name(self._num)
+
+    def longstr(self):
+        return "%d\t%s\t%s\t%08x" % (self._num,
+                                     self.devstr(),
+                                     self.namestr(),
+                                     self._get_dev_t(self._num))
+
+class MySD(SD):
+    def subst(self, first_sg):
+        disk = {
+            "lun": self._num,
+            "major": self.major(),
+            "devnode": self.namestr(),
+            "disk_minor": self.minor(),
+            "sg_minor": first_sg + self._num,
+        }
+        return disk
+
+disk_template = r"""\
+l('sys/bus/scsi/drivers/sd/7:0:0:{lun}', '../../../../devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}')
+l('sys/bus/scsi/devices/7:0:0:{lun}', '../../../devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}')
+l('sys/dev/char/254:{sg_minor}', '../../devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/bsg/7:0:0:{lun}')
+l('sys/dev/char/21:{sg_minor}', '../../devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_generic/sg{sg_minor}')
+l('sys/class/scsi_disk/7:0:0:{lun}', '../../devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_disk/7:0:0:{lun}')
+l('sys/class/scsi_generic/sg{sg_minor}', '../../devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_generic/sg{sg_minor}')
+l('sys/class/bsg/7:0:0:{lun}', '../../devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/bsg/7:0:0:{lun}')
+l('sys/class/scsi_device/7:0:0:{lun}', '../../devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_device/7:0:0:{lun}')
+d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}', 0o755)
+l('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/generic', 'scsi_generic/sg{sg_minor}')
+l('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/subsystem', '../../../../../../../../../bus/scsi')
+l('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/driver', '../../../../../../../../../bus/scsi/drivers/sd')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/iodone_cnt', 0o644, b'0xc3\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/device_blocked', 0o644, b'0\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/max_sectors', 0o644, b'240\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/modalias', 0o644, b'scsi:t-0x00\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_level', 0o644, b'3\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/queue_depth', 0o644, b'1\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/rev', 0o644, b'1.00\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/type', 0o644, b'0\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/iocounterbits', 0o644, b'32\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/vendor', 0o644, b'Generic \n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/state', 0o644, b'running\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/queue_type', 0o644, b'none\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/iorequest_cnt', 0o644, b'0xc3\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/evt_media_change', 0o644, b'0\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/model', 0o644, b'USB Flash Drive \n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/ioerr_cnt', 0o644, b'0x2\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/uevent', 0o644, b'''DEVTYPE=scsi_device
+DRIVER=sd
+MODALIAS=scsi:t-0x00
+''')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/timeout', 0o644, b'60\n')
+d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_disk', 0o755)
+d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_disk/7:0:0:{lun}', 0o755)
+l('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_disk/7:0:0:{lun}/subsystem', '../../../../../../../../../../../class/scsi_disk')
+l('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_disk/7:0:0:{lun}/device', '../../../7:0:0:{lun}')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_disk/7:0:0:{lun}/app_tag_own', 0o644, b'0\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_disk/7:0:0:{lun}/FUA', 0o644, b'0\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_disk/7:0:0:{lun}/cache_type', 0o644, b'write through\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_disk/7:0:0:{lun}/protection_type', 0o644, b'0\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_disk/7:0:0:{lun}/manage_start_stop', 0o644, b'0\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_disk/7:0:0:{lun}/allow_restart', 0o644, b'1\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_disk/7:0:0:{lun}/uevent', 0o644, b'')
+d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_disk/7:0:0:{lun}/power', 0o755)
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_disk/7:0:0:{lun}/power/wakeup', 0o644, b'\n')
+d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/power', 0o755)
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/power/wakeup', 0o644, b'\n')
+d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_generic', 0o755)
+d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_generic/sg{sg_minor}', 0o755)
+l('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_generic/sg{sg_minor}/subsystem', '../../../../../../../../../../../class/scsi_generic')
+l('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_generic/sg{sg_minor}/device', '../../../7:0:0:{lun}')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_generic/sg{sg_minor}/dev', 0o644, b'21:{sg_minor}\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_generic/sg{sg_minor}/uevent', 0o644, b'''MAJOR=21
+MINOR={sg_minor}
+''')
+d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_generic/sg{sg_minor}/power', 0o755)
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_generic/sg{sg_minor}/power/wakeup', 0o644, b'\n')
+d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/bsg', 0o755)
+d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/bsg/7:0:0:{lun}', 0o755)
+l('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/bsg/7:0:0:{lun}/subsystem', '../../../../../../../../../../../class/bsg')
+l('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/bsg/7:0:0:{lun}/device', '../../../7:0:0:{lun}')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/bsg/7:0:0:{lun}/dev', 0o644, b'254:{sg_minor}\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/bsg/7:0:0:{lun}/uevent', 0o644, b'''MAJOR=254
+MINOR={sg_minor}
+''')
+d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/bsg/7:0:0:{lun}/power', 0o755)
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/bsg/7:0:0:{lun}/power/wakeup', 0o644, b'\n')
+d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block', 0o755)
+d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_device', 0o755)
+d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_device/7:0:0:{lun}', 0o755)
+l('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_device/7:0:0:{lun}/subsystem', '../../../../../../../../../../../class/scsi_device')
+l('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_device/7:0:0:{lun}/device', '../../../7:0:0:{lun}')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_device/7:0:0:{lun}/uevent', 0o644, b'')
+d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_device/7:0:0:{lun}/power', 0o755)
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/scsi_device/7:0:0:{lun}/power/wakeup', 0o644, b'\n')
+l('sys/dev/block/{major}:{disk_minor}', '../../devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}')
+l('sys/class/block/{devnode}', '../../devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}')
+l('sys/block/{devnode}', '../devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}')
+d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}', 0o755)
+l('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/subsystem', '../../../../../../../../../../../class/block')
+l('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/bdi', '../../../../../../../../../../virtual/bdi/{major}:{disk_minor}')
+l('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/device', '../../../7:0:0:{lun}')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/capability', 0o644, b'13\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/ro', 0o644, b'0\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/make-it-fail', 0o644, b'0\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/size', 0o644, b'257024\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/dev', 0o644, b'{major}:{disk_minor}\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/range', 0o644, b'16\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/removable', 0o644, b'1\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/stat', 0o644, b'     117      409     2103      272        0        0        0        0        0      194      272\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/uevent', 0o644, b'''MAJOR={major}
+MINOR={disk_minor}
+DEVTYPE=disk
+DEVNAME={devnode}
+''')
+d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/queue', 0o755)
+l('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/queue/bsg', '../../../bsg/7:0:0:{lun}')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/queue/nr_requests', 0o644, b'128\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/queue/nomerges', 0o644, b'0\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/queue/scheduler', 0o644, b'noop anticipatory deadline [cfq] \n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/queue/hw_sector_size', 0o644, b'512\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/queue/max_hw_sectors_kb', 0o644, b'120\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/queue/read_ahead_kb', 0o644, b'128\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/queue/max_sectors_kb', 0o644, b'120\n')
+d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/queue/iosched', 0o755)
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/queue/iosched/slice_async_rq', 0o644, b'2\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/queue/iosched/back_seek_max', 0o644, b'16384\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/queue/iosched/slice_sync', 0o644, b'100\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/queue/iosched/slice_async', 0o644, b'40\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/queue/iosched/fifo_expire_sync', 0o644, b'125\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/queue/iosched/slice_idle', 0o644, b'8\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/queue/iosched/back_seek_penalty', 0o644, b'2\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/queue/iosched/fifo_expire_async', 0o644, b'250\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/queue/iosched/quantum', 0o644, b'4\n')
+d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/power', 0o755)
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/power/wakeup', 0o644, b'\n')
+"""
+
+part_template = r"""\
+l('sys/dev/block/{major}:{part_minor}', '../../devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/{devnode}{part_num}')
+l('sys/class/block/{devnode}{part_num}', '../../devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/{devnode}{part_num}')
+d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/{devnode}{part_num}', 0o755)
+l('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/{devnode}{part_num}/subsystem', '../../../../../../../../../../../../class/block')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/{devnode}{part_num}/start', 0o644, b'32\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/{devnode}{part_num}/make-it-fail', 0o644, b'0\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/{devnode}{part_num}/size', 0o644, b'256992\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/{devnode}{part_num}/dev', 0o644, b'{major}:{part_minor}\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/{devnode}{part_num}/stat', 0o644, b'     109      392     1903      246        0        0        0        0        0      169      246\n')
+f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:{lun}/block/{devnode}/{devnode}{part_num}/uevent', 0o644, b'''MAJOR={major}
+MINOR={part_minor}
+DEVTYPE=partition
+DEVNAME={devnode}{part_num}
+''')
+"""
+
+if len(sys.argv) != 3:
+    exit("Usage: {} <target dir> <number>".format(sys.argv[0]))
+
+if not os.path.isdir(sys.argv[1]):
+    exit("Target dir {} not found".format(sys.argv[1]))
+
+def create_part_sysfs(disk, sd, prt):
+    part = disk
+    part.update ({
+        "part_num": prt,
+        "part_minor": disk["disk_minor"] + prt,
+    })
+
+    try:
+        exec(part_template.format(**part))
+    except OSError:
+        si = sys.exc_info()[1]
+        if (si.errno == errno.EEXIST):
+            print("sysfs structures for %s%d exist" % (sd.namestr(), prt))
+        else:
+            print("error for %s%d: %s" % (sd.namestr(), prt, si[1]))
+            raise
+    else:
+        print("sysfs structures for %s%d created" % (sd.namestr(), prt))
+
+def create_disk_sysfs(dsk, first_sg, n):
+    sd = MySD(dsk)
+    disk = sd.subst(first_sg)
+
+    try:
+        exec(disk_template.format(**disk))
+    except OSError:
+        si = sys.exc_info()[1]
+        if (si.errno == errno.EEXIST):
+            print("sysfs structures for %s exist" % sd.namestr())
+        elif (si.errno == errno.ENOENT):
+            print("error for %s: %s - have you run sys-script py first?" %
+                  (sd.namestr(), si.strerror))
+            return -1
+        else:
+            print("error for %s: %s" % (sd.namestr(), si.strerror))
+            raise
+    else:
+        print("sysfs structures for %s created" % sd.namestr())
+
+    n += 1
+    if n >= last:
+        return n
+
+    for prt in range(1, 16):
+        create_part_sysfs(disk, sd, prt)
+        n += 1
+        if n >= last:
+            return n
+
+    return n
+
+os.chdir(sys.argv[1])
+n = 0
+last = int(sys.argv[2])
+first_sg = 2
+for dsk in range(2, 1000):
+    n = create_disk_sysfs(dsk, first_sg, n)
+    if n >= last or n == -1:
+        break
index a51112603e9eceb1c1dff71d42329b9276405b3d..e9ce6653135258449560d62ce0f50db3b4d5cb79 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # sys-script.py
 #
@@ -11677,6 +11677,7 @@ f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:
 f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:0/block/sdb/uevent', 0o644, b'''MAJOR=8
 MINOR=16
 DEVTYPE=disk
+DEVNAME=sdb
 ''')
 d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:0/block/sdb/queue', 0o755)
 l('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:0/block/sdb/queue/bsg', '../../../bsg/7:0:0:0')
@@ -11709,6 +11710,7 @@ f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:
 f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb1/uevent', 0o644, b'''MAJOR=8
 MINOR=17
 DEVTYPE=partition
+DEVNAME=sdb1
 ''')
 d('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb1/power', 0o755)
 f('sys/devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host7/target7:0:0/7:0:0:0/block/sdb/sdb1/power/wakeup', 0o644, b'\n')
@@ -13150,6 +13152,7 @@ f('sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10
 f('sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10/uevent', 0o644, b'''MAJOR=8
 MINOR=10
 DEVTYPE=partition
+DEVNAME=sda10
 ''')
 d('sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10/power', 0o755)
 f('sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10/power/wakeup', 0o644, b'\n')
@@ -13163,6 +13166,7 @@ f('sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9/
 f('sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9/uevent', 0o644, b'''MAJOR=8
 MINOR=9
 DEVTYPE=partition
+DEVNAME=sda9
 ''')
 d('sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9/holders', 0o755)
 l('sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9/holders/md0', '../../../../../../../../../virtual/block/md0')
@@ -13178,6 +13182,7 @@ f('sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7/
 f('sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7/uevent', 0o644, b'''MAJOR=8
 MINOR=7
 DEVTYPE=partition
+DEVNAME=sda7
 ''')
 d('sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7/power', 0o755)
 f('sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7/power/wakeup', 0o644, b'\n')
@@ -13205,6 +13210,7 @@ f('sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8/
 f('sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8/uevent', 0o644, b'''MAJOR=8
 MINOR=8
 DEVTYPE=partition
+DEVNAME=sda8
 ''')
 d('sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8/power', 0o755)
 f('sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8/power/wakeup', 0o644, b'\n')
@@ -13232,6 +13238,7 @@ f('sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6/
 f('sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6/uevent', 0o644, b'''MAJOR=8
 MINOR=6
 DEVTYPE=partition
+DEVNAME=sda6
 ''')
 d('sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6/power', 0o755)
 f('sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6/power/wakeup', 0o644, b'\n')
index 3d9c1ddb8782e1925b34653692a53527d6597ddf..484b610a02ec3ebad327cda96a8a6e56a9ab3824 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # systemd-sysv-generator integration test
 #
index 8aa16fb7f94838201d1e82bb6d9a31e046965409..9491e4081e4191002b94ec00ba8cfa09f1086280 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  Copyright © 2017 Michal Sekletar <msekleta@redhat.com>
 
index 9893864bcd197f0e4b031ddd51dfd0dd93123525..d5da8e0ea5e621d3078e8e3cd1ab1c5faa10c273 100644 (file)
@@ -65,6 +65,7 @@ BASICTOOLS=(
     echo
     env
     false
+    getconf
     getent
     getfacl
     grep
@@ -1057,7 +1058,9 @@ install_pam() {
     else
         find /lib*/security -xtype f
     fi
-    find /etc/pam.d /etc/security -xtype f
+    for d in /etc/pam.d /etc/security /usr/lib/pam.d; do
+        [ -d "$d" ] && find $d -xtype f
+    done
     ) | while read file; do
         inst $file
     done
@@ -1066,9 +1069,6 @@ install_pam() {
     # see http://www.linux-pam.org/Linux-PAM-html/sag-pam_unix.html
     dracut_install -o unix_chkpwd
 
-    [[ "$LOOKS_LIKE_DEBIAN" ]] &&
-        cp /etc/pam.d/systemd-user $initdir/etc/pam.d/
-
     # set empty root password for easy debugging
     sed -i 's/^root:x:/root::/' $initdir/etc/passwd
 }
index 7e6f6b33e01e929e44b60c9c86914ca9d25202cc..de43c16d118799396f9dc1feca8267148b678d23 100644 (file)
@@ -6,5 +6,5 @@ DHCP=ipv4
 IPv6AcceptRA=no
 
 [Route]
-Gateway=_dhcp
+Gateway=_dhcp4
 Destination=10.0.0.0/8
index ce708e7da9a609663717f68f734650780d9fd1b2..604a953b5811364b0bc8e647f2532b2e76017fcf 100644 (file)
@@ -5,5 +5,5 @@ Name=veth99
 DHCP=ipv6
 
 [Route]
-Gateway=_dhcp
+Gateway=_ipv6ra
 Destination=2001:1234:5:9fff:ff:ff:ff:ff/128
index bb1d2e09c5e148e8545659119a90781b89e7c630..a277d5ecbf15be8c412b11d91d6ae2106f49b895 100644 (file)
@@ -4,5 +4,4 @@ Name=veth99
 [Network]
 DHCP=yes
 IPv6AcceptRA=yes
-LinkLocalAddressing=yes
 VRF=vrf99
diff --git a/test/test-network/conf/dhcp-client-with-ipv4ll-fallback-without-dhcp-server.network b/test/test-network/conf/dhcp-client-with-ipv4ll-fallback-without-dhcp-server.network
deleted file mode 100644 (file)
index 5489c62..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-[Match]
-Name=veth99
-
-[Network]
-DHCP=ipv4
-LinkLocalAddressing=fallback
-IPv6AcceptRA=no
-
-[DHCPv4]
-MaxAttempts=1
similarity index 66%
rename from test/test-network/conf/dhcp-client-with-ipv4ll-fallback-with-dhcp-server.network
rename to test/test-network/conf/dhcp-client-with-ipv4ll.network
index 9ebdbb4f8db680c816e84b8c54b27197881f34e5..0455e09b4c7be79b8285914d81d3cac91e4b76c9 100644 (file)
@@ -3,5 +3,5 @@ Name=veth99
 
 [Network]
 DHCP=ipv4
-LinkLocalAddressing=fallback
+LinkLocalAddressing=yes
 IPv6AcceptRA=no
index 3d2acecde2a24ad788c2e9a569c3fd2163df6866..609692f97aef29c34fe66ae8bf82271dce4724b9 100644 (file)
@@ -3,3 +3,6 @@ Name=veth99
 
 [Network]
 IPv6AcceptRA=true
+
+[IPv6AcceptRA]
+UseDomains=yes
index 9de0e3147bc3539b4e97f954f3f3a18c8da203e8..7813c2c1ba71056375316a363151248a2caaca94 100644 (file)
@@ -2,11 +2,12 @@
 Name=veth-peer
 
 [Network]
-IPv6PrefixDelegation=yes
+IPv6SendRA=yes
 
-[IPv6PrefixDelegation]
+[IPv6SendRA]
 DNS=_link_local 2002:da8:1:0::1
 DNSLifetimeSec=1min
+Domains=hogehoge.test
 
 [IPv6Prefix]
 Prefix=2002:da8:1:0::/64
index 9dc32cb4da016c544104d3b262d210ce60f59306..a0ac1e45379c7f854b0e0d9a9eaa7a30ecfcf5f8 100644 (file)
@@ -3,7 +3,7 @@ Name=veth99
 
 [Network]
 DHCP=no
-IPv6PrefixDelegation=yes
+IPv6SendRA=yes
 
 [IPv6Prefix]
 Prefix=2001:db8:0:1::/64
index 3189302655a136c5cfc60ecd3dc6b264a24e8e53..3c288fc6eebe3a0e471c382329682a47cea65864 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 # systemd-networkd tests
 
 import argparse
@@ -589,8 +589,18 @@ class Utilities():
             output = check_output(f'ip {ipv} address show dev {link} scope {scope}')
             if re.search(address_regex, output) and 'tentative' not in output:
                 break
-        else:
-            self.assertRegex(output, address_regex)
+
+        self.assertRegex(output, address_regex)
+
+    def wait_address_dropped(self, link, address_regex, scope='global', ipv='', timeout_sec=100):
+        for i in range(timeout_sec):
+            if i > 0:
+                time.sleep(1)
+            output = check_output(f'ip {ipv} address show dev {link} scope {scope}')
+            if not re.search(address_regex, output):
+                break
+
+        self.assertNotRegex(output, address_regex)
 
 class NetworkctlTests(unittest.TestCase, Utilities):
 
@@ -2230,6 +2240,66 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         self.assertRegex(output, 'via 2001:1234:5:8fff:ff:ff:ff:ff dev dummy98')
         self.assertRegex(output, 'via 2001:1234:5:9fff:ff:ff:ff:ff dev dummy98')
 
+        copy_unit_to_networkd_unit_path('25-address-static.network')
+        check_output(*networkctl_cmd, 'reload', env=env)
+        self.wait_online(['dummy98:routable'])
+
+        # check all routes managed by Manager are removed
+        print('### ip route show type blackhole')
+        output = check_output('ip route show type blackhole')
+        print(output)
+        self.assertEqual(output, '')
+
+        print('### ip route show type unreachable')
+        output = check_output('ip route show type unreachable')
+        print(output)
+        self.assertEqual(output, '')
+
+        print('### ip route show type prohibit')
+        output = check_output('ip route show type prohibit')
+        print(output)
+        self.assertEqual(output, '')
+
+        remove_unit_from_networkd_path(['25-address-static.network'])
+        check_output(*networkctl_cmd, 'reload', env=env)
+        self.wait_online(['dummy98:routable'])
+
+        # check all routes managed by Manager are reconfigured
+        print('### ip route show type blackhole')
+        output = check_output('ip route show type blackhole')
+        print(output)
+        self.assertRegex(output, 'blackhole 202.54.1.2 proto static')
+
+        print('### ip route show type unreachable')
+        output = check_output('ip route show type unreachable')
+        print(output)
+        self.assertRegex(output, 'unreachable 202.54.1.3 proto static')
+
+        print('### ip route show type prohibit')
+        output = check_output('ip route show type prohibit')
+        print(output)
+        self.assertRegex(output, 'prohibit 202.54.1.4 proto static')
+
+        rc = call("ip link del dummy98")
+        self.assertEqual(rc, 0)
+        time.sleep(2)
+
+        # check all routes managed by Manager are removed
+        print('### ip route show type blackhole')
+        output = check_output('ip route show type blackhole')
+        print(output)
+        self.assertEqual(output, '')
+
+        print('### ip route show type unreachable')
+        output = check_output('ip route show type unreachable')
+        print(output)
+        self.assertEqual(output, '')
+
+        print('### ip route show type prohibit')
+        output = check_output('ip route show type prohibit')
+        print(output)
+        self.assertEqual(output, '')
+
     @expectedFailureIfRTA_VIAIsNotSupported()
     def test_route_via_ipv6(self):
         copy_unit_to_networkd_unit_path('25-route-via-ipv6.network', '12-dummy.netdev')
@@ -2831,7 +2901,6 @@ class NetworkdStateFileTests(unittest.TestCase, Utilities):
             self.assertRegex(data, r'LLMNR=no')
             self.assertRegex(data, r'MDNS=yes')
             self.assertRegex(data, r'DNSSEC=no')
-            self.assertRegex(data, r'ADDRESSES=192.168.(10.10|12.12)/24 192.168.(12.12|10.10)/24')
 
         check_output(*resolvectl_cmd, 'dns', 'dummy98', '10.10.10.12#ccc.com', '10.10.10.13', '1111:2222::3333', env=env)
         check_output(*resolvectl_cmd, 'domain', 'dummy98', 'hogehogehoge', '~foofoofoo', env=env)
@@ -3254,6 +3323,10 @@ class NetworkdRATests(unittest.TestCase, Utilities):
         self.assertRegex(output, 'fe80::')
         self.assertRegex(output, '2002:da8:1::1')
 
+        output = check_output(*resolvectl_cmd, 'domain', 'veth99', env=env)
+        print(output)
+        self.assertIn('hogehoge.test', output)
+
         output = check_output(*networkctl_cmd, '-n', '0', 'status', 'veth99', env=env)
         print(output)
         self.assertRegex(output, '2002:da8:1:0')
@@ -3365,8 +3438,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         'dhcp-client-use-dns-yes.network',
         'dhcp-client-use-domains.network',
         'dhcp-client-vrf.network',
-        'dhcp-client-with-ipv4ll-fallback-with-dhcp-server.network',
-        'dhcp-client-with-ipv4ll-fallback-without-dhcp-server.network',
+        'dhcp-client-with-ipv4ll.network',
         'dhcp-client-with-static-address.network',
         'dhcp-client.network',
         'dhcp-server-decline.network',
@@ -3862,7 +3934,6 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         print('## ip address show vrf vrf99')
         output = check_output('ip address show vrf vrf99')
         print(output)
-        self.assertRegex(output, 'inet 169.254.[0-9]*.[0-9]*/16 brd 169.254.255.255 scope link veth99')
         self.assertRegex(output, 'inet 192.168.5.[0-9]*/24 brd 192.168.5.255 scope global dynamic veth99')
         self.assertRegex(output, 'inet6 2600::[0-9a-f]*/128 scope global (dynamic noprefixroute|noprefixroute dynamic)')
         self.assertRegex(output, 'inet6 .* scope link')
@@ -3870,7 +3941,6 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         print('## ip address show dev veth99')
         output = check_output('ip address show dev veth99')
         print(output)
-        self.assertRegex(output, 'inet 169.254.[0-9]*.[0-9]*/16 brd 169.254.255.255 scope link veth99')
         self.assertRegex(output, 'inet 192.168.5.[0-9]*/24 brd 192.168.5.255 scope global dynamic veth99')
         self.assertRegex(output, 'inet6 2600::[0-9a-f]*/128 scope global (dynamic noprefixroute|noprefixroute dynamic)')
         self.assertRegex(output, 'inet6 .* scope link')
@@ -3879,7 +3949,6 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         output = check_output('ip route show vrf vrf99')
         print(output)
         self.assertRegex(output, 'default via 192.168.5.1 dev veth99 proto dhcp src 192.168.5.')
-        self.assertRegex(output, '169.254.0.0/16 dev veth99 proto kernel scope link src 169.254')
         self.assertRegex(output, '192.168.5.0/24 dev veth99 proto kernel scope link src 192.168.5')
         self.assertRegex(output, '192.168.5.0/24 via 192.168.5.5 dev veth99 proto dhcp')
         self.assertRegex(output, '192.168.5.1 dev veth99 proto dhcp scope link src 192.168.5')
@@ -3899,7 +3968,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
 
         output = check_output('ip route list dev veth99 10.0.0.0/8')
         print(output)
-        self.assertRegex(output, '10.0.0.0/8 via 192.168.5.1 proto static')
+        self.assertRegex(output, '10.0.0.0/8 via 192.168.5.1 proto dhcp')
 
     def test_dhcp_client_gateway_ipv6(self):
         copy_unit_to_networkd_unit_path('25-veth.netdev', 'dhcp-server-veth-peer.network',
@@ -3932,9 +4001,9 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         print(output)
         self.assertRegex(output, 'onlink')
 
-    def test_dhcp_client_with_ipv4ll_fallback_with_dhcp_server(self):
+    def test_dhcp_client_with_ipv4ll_with_dhcp_server(self):
         copy_unit_to_networkd_unit_path('25-veth.netdev', 'dhcp-server-veth-peer.network',
-                                        'dhcp-client-with-ipv4ll-fallback-with-dhcp-server.network')
+                                        'dhcp-client-with-ipv4ll.network')
         start_networkd()
         self.wait_online(['veth-peer:carrier'])
         start_dnsmasq(lease_time='2m')
@@ -3944,13 +4013,13 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         print(output)
 
         output = check_output('ip -6 address show dev veth99 scope global dynamic')
-        self.assertNotRegex(output, 'inet6 2600::[0-9a-f]*/128 scope global dynamic')
+        self.assertNotRegex(output, r'inet6 2600::[0-9a-f]+/128 scope global dynamic')
         output = check_output('ip -6 address show dev veth99 scope link')
-        self.assertRegex(output, 'inet6 .* scope link')
+        self.assertRegex(output, r'inet6 .* scope link')
         output = check_output('ip -4 address show dev veth99 scope global dynamic')
-        self.assertRegex(output, 'inet 192.168.5.[0-9]*/24 brd 192.168.5.255 scope global dynamic veth99')
+        self.assertRegex(output, r'inet 192\.168\.5\.\d+/24 brd 192\.168\.5\.255 scope global dynamic veth99')
         output = check_output('ip -4 address show dev veth99 scope link')
-        self.assertNotRegex(output, 'inet .* scope link')
+        self.assertNotRegex(output, r'inet 169\.254\.\d+\.\d+/16 brd 169\.254\.255\.255 scope link')
 
         print('Wait for the dynamic address to be expired')
         time.sleep(130)
@@ -3959,19 +4028,19 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         print(output)
 
         output = check_output('ip -6 address show dev veth99 scope global dynamic')
-        self.assertNotRegex(output, 'inet6 2600::[0-9a-f]*/128 scope global dynamic')
+        self.assertNotRegex(output, r'inet6 2600::[0-9a-f]+/128 scope global dynamic')
         output = check_output('ip -6 address show dev veth99 scope link')
-        self.assertRegex(output, 'inet6 .* scope link')
+        self.assertRegex(output, r'inet6 .* scope link')
         output = check_output('ip -4 address show dev veth99 scope global dynamic')
-        self.assertRegex(output, 'inet 192.168.5.[0-9]*/24 brd 192.168.5.255 scope global dynamic veth99')
+        self.assertRegex(output, r'inet 192\.168\.5\.\d+/24 brd 192\.168\.5\.255 scope global dynamic veth99')
         output = check_output('ip -4 address show dev veth99 scope link')
-        self.assertNotRegex(output, 'inet .* scope link')
+        self.assertNotRegex(output, r'inet 169\.254\.\d+\.\d+/16 brd 169\.254\.255\.255 scope link')
 
         search_words_in_dnsmasq_log('DHCPOFFER', show_all=True)
 
-    def test_dhcp_client_with_ipv4ll_fallback_without_dhcp_server(self):
+    def test_dhcp_client_with_ipv4ll_without_dhcp_server(self):
         copy_unit_to_networkd_unit_path('25-veth.netdev', 'dhcp-server-veth-peer.network',
-                                        'dhcp-client-with-ipv4ll-fallback-without-dhcp-server.network')
+                                        'dhcp-client-with-ipv4ll.network')
         start_networkd()
         self.wait_online(['veth99:degraded', 'veth-peer:routable'])
 
@@ -3979,13 +4048,17 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities):
         print(output)
 
         output = check_output('ip -6 address show dev veth99 scope global dynamic')
-        self.assertNotRegex(output, 'inet6 2600::[0-9a-f]*/128 scope global dynamic')
+        self.assertNotRegex(output, r'inet6 2600::[0-9a-f]+/128 scope global dynamic')
         output = check_output('ip -6 address show dev veth99 scope link')
-        self.assertRegex(output, 'inet6 .* scope link')
+        self.assertRegex(output, r'inet6 .* scope link')
         output = check_output('ip -4 address show dev veth99 scope global dynamic')
-        self.assertNotRegex(output, 'inet 192.168.5.[0-9]*/24 brd 192.168.5.255 scope global dynamic veth99')
+        self.assertNotRegex(output, r'inet 192\.168\.5\.\d+/24 brd 192\.168\.5\.255 scope global dynamic veth99')
         output = check_output('ip -4 address show dev veth99 scope link')
-        self.assertRegex(output, 'inet .* scope link')
+        self.assertRegex(output, r'inet 169\.254\.\d+\.\d+/16 brd 169\.254\.255\.255 scope link')
+
+        start_dnsmasq(lease_time='2m')
+        self.wait_address('veth99', r'inet 192\.168\.5\.\d+/24 brd 192\.168\.5\.255 scope global dynamic', ipv='-4')
+        self.wait_address_dropped('veth99', r'inet 169\.254\.\d+\.\d+/16 brd 169\.255\.255\.255 scope link', scope='link', ipv='-4')
 
     def test_dhcp_client_route_remove_on_renew(self):
         copy_unit_to_networkd_unit_path('25-veth.netdev', 'dhcp-server-veth-peer.network',
index 4f44292249405339fe4568885f4bb84291c1a558..d8cdd5ac14dc7748199d691bc01422007df889b7 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index fb465d76bbca5eed338988ecc969f57addbb1884..1246ec2ee73273b2fd38fe89d0fccbf13564a8fe 100644 (file)
@@ -2,6 +2,6 @@
 Description=Service Test for Path units
 
 [Service]
-ExecStart=/bin/true
-Type=simple
+ExecStart=sleep infinity
+Type=exec
 RemainAfterExit=true
index fb465d76bbca5eed338988ecc969f57addbb1884..1246ec2ee73273b2fd38fe89d0fccbf13564a8fe 100644 (file)
@@ -2,6 +2,6 @@
 Description=Service Test for Path units
 
 [Service]
-ExecStart=/bin/true
-Type=simple
+ExecStart=sleep infinity
+Type=exec
 RemainAfterExit=true
index fb465d76bbca5eed338988ecc969f57addbb1884..1246ec2ee73273b2fd38fe89d0fccbf13564a8fe 100644 (file)
@@ -2,6 +2,6 @@
 Description=Service Test for Path units
 
 [Service]
-ExecStart=/bin/true
-Type=simple
+ExecStart=sleep infinity
+Type=exec
 RemainAfterExit=true
index fb465d76bbca5eed338988ecc969f57addbb1884..1246ec2ee73273b2fd38fe89d0fccbf13564a8fe 100644 (file)
@@ -2,6 +2,6 @@
 Description=Service Test for Path units
 
 [Service]
-ExecStart=/bin/true
-Type=simple
+ExecStart=sleep infinity
+Type=exec
 RemainAfterExit=true
index fb465d76bbca5eed338988ecc969f57addbb1884..1246ec2ee73273b2fd38fe89d0fccbf13564a8fe 100644 (file)
@@ -2,6 +2,6 @@
 Description=Service Test for Path units
 
 [Service]
-ExecStart=/bin/true
-Type=simple
+ExecStart=sleep infinity
+Type=exec
 RemainAfterExit=true
index fb465d76bbca5eed338988ecc969f57addbb1884..1246ec2ee73273b2fd38fe89d0fccbf13564a8fe 100644 (file)
@@ -2,6 +2,6 @@
 Description=Service Test for Path units
 
 [Service]
-ExecStart=/bin/true
-Type=simple
+ExecStart=sleep infinity
+Type=exec
 RemainAfterExit=true
index bcdafe4f3072967bb0c6d0eee853aef9e3fc3952..6a9bac09cdc274cd2a1ad7d92adcf5ed3793ab71 100644 (file)
@@ -2,6 +2,6 @@
 Description=Service Test Path Unit
 
 [Service]
-ExecStart=/bin/true
-Type=simple
+ExecStart=sleep infinity
+Type=exec
 RemainAfterExit=true
diff --git a/test/test-path/path-service.service b/test/test-path/path-service.service
deleted file mode 100644 (file)
index f8499ec..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-[Unit]
-Description=Service Test for Path units
-
-[Service]
-ExecStart=/bin/true
-Type=oneshot
index 9b6ed1c13feec452f236b8314fea492b89d62337..1bec148bee8a794be1eedec909a29484d4052fd6 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index b6c16a14120f88f817470a0669a5f32406c06872..eed3d16b458519b1ef6ecc99d24d4795538dc1b9 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index a0dc095688685cb44f2452b9228b151d1389af59..278145285c1caa703e31947e06322ffa469ca70a 100644 (file)
@@ -2,5 +2,5 @@
 Description=ForeverPrintHola service
 
 [Service]
-Type=simple
+Type=exec
 ExecStart=sh -x -c 'while :; do printf "Hola\n" || touch /i-lose-my-logs; sleep 1; done'
index 9264f151f31b9d1849eddd318bbc5d1e3a4630f6..6832cb241c4eb283c30ea9bfe290783cc5bcb8df 100644 (file)
@@ -4,6 +4,6 @@ StartLimitIntervalSec=1m
 StartLimitBurst=3
 
 [Service]
-Type=simple
+Type=exec
 ExecStart=false
 Restart=always
index 1ab6828d713ab4c62806aedc52c56f4e4d1eaa0b..5b1e33504e0efc50b342e423106976faed5b0151 100755 (executable)
 use warnings;
 use strict;
 
+BEGIN {
+    my $EXIT_TEST_SKIP = 77;
+
+    unless (eval "use POSIX qw(WIFEXITED WEXITSTATUS);
+                  use Cwd qw(getcwd abs_path);
+                  use IPC::Semaphore;
+                  use IPC::SysV qw(IPC_PRIVATE S_IRUSR S_IWUSR IPC_CREAT);
+                  use Time::HiRes qw(usleep); 1") {
+        warn "Failed to import dependencies, skipping the test: $@";
+        exit($EXIT_TEST_SKIP);
+    }
+}
+
 my $udev_bin            = "./test-udev";
 my $valgrind            = 0;
 my $gdb                 = 0;
@@ -45,20 +58,73 @@ for (my $i = 1; $i < 10000; ++$i) {
 }
 $rules_10k_tags_continuation .= "TAG+=\"test10000\"\\n";
 
+# Create a device list with all block devices under /sys
+# (except virtual devices and cd-roms)
+# the optional argument exp_func returns expected and non-expected
+# symlinks for the device.
+sub all_block_devs {
+        my ($exp_func) = @_;
+        my @devices;
+
+        foreach my $bd (glob "$udev_sys/dev/block/*") {
+                my $tgt = readlink($bd);
+                my ($exp, $notexp) = (undef, undef);
+
+                next if ($tgt =~ m!/virtual/! || $tgt =~ m!/sr[0-9]*$!);
+
+                $tgt =~ s!^\.\./\.\.!!;
+                ($exp, $notexp) = $exp_func->($tgt) if defined($exp_func);
+                my $device = {
+                        devpath => $tgt,
+                        exp_links => $exp,
+                        not_exp_links => $notexp,
+                };
+                push(@devices, $device);
+        }
+        return \@devices;
+}
+
+# This generator returns a suitable exp_func for use with
+# all_block_devs().
+sub expect_for_some {
+        my ($pattern, $links, $donot) = @_;
+        my $_expect = sub {
+                my ($name) = @_;
+
+                if ($name =~ /$pattern/) {
+                        return ($links, undef);
+                } elsif ($donot) {
+                        return (undef, $links);
+                } else {
+                        return (undef, undef);
+                }
+        };
+        return $_expect;
+}
+
 my @tests = (
         {
                 desc            => "no rules",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "sda",
-                exp_rem_error   => "yes",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_rem_error   => "yes",
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_rem_error   => "yes",
+                        }],
                 rules           => <<EOF
 #
 EOF
         },
         {
                 desc            => "label test of scsi disc",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "boot_disk",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["boot_disk"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", SYMLINK+="boot_disk%n"
 KERNEL=="ttyACM0", SYMLINK+="modem"
@@ -66,8 +132,11 @@ EOF
         },
         {
                 desc            => "label test of scsi disc",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "boot_disk",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["boot_disk"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", SYMLINK+="boot_disk%n"
 KERNEL=="ttyACM0", SYMLINK+="modem"
@@ -75,8 +144,11 @@ EOF
         },
         {
                 desc            => "label test of scsi disc",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "boot_disk",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["boot_disk"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", SYMLINK+="boot_disk%n"
 KERNEL=="ttyACM0", SYMLINK+="modem"
@@ -84,27 +156,40 @@ EOF
         },
         {
                 desc            => "label test of scsi partition",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "boot_disk1",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["boot_disk1"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", SYMLINK+="boot_disk%n"
 EOF
         },
         {
                 desc            => "label test of pattern match",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "boot_disk1",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["boot_disk1", "boot_disk1-4", "boot_disk1-5"],
+                                not_exp_links   => ["boot_disk1-1", "boot_disk1-2", "boot_disk1-3"]
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", ATTRS{vendor}=="?ATA", SYMLINK+="boot_disk%n-1"
 SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA?", SYMLINK+="boot_disk%n-2"
 SUBSYSTEMS=="scsi", ATTRS{vendor}=="A??", SYMLINK+="boot_disk%n"
 SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATAS", SYMLINK+="boot_disk%n-3"
+SUBSYSTEMS=="scsi", ATTRS{vendor}=="AT?", SYMLINK+="boot_disk%n-4"
+SUBSYSTEMS=="scsi", ATTRS{vendor}=="??A", SYMLINK+="boot_disk%n-5"
 EOF
         },
         {
                 desc            => "label test of multiple sysfs files",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "boot_disk1",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["boot_disk1"],
+                                not_exp_links   => ["boot_diskX1"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", ATTRS{model}=="ST910021AS X ", SYMLINK+="boot_diskX%n"
 SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", ATTRS{model}=="ST910021AS", SYMLINK+="boot_disk%n"
@@ -112,25 +197,39 @@ EOF
         },
         {
                 desc            => "label test of max sysfs files (skip invalid rule)",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "boot_disk1",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["boot_disk1", "boot_diskXY1"],
+                                not_exp_links   => ["boot_diskXX1"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", ATTRS{model}=="ST910021AS", ATTRS{scsi_level}=="6", ATTRS{rev}=="4.06", ATTRS{type}=="0", ATTRS{queue_depth}=="32", SYMLINK+="boot_diskXX%n"
+SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", ATTRS{model}=="ST910021AS", ATTRS{scsi_level}=="6", ATTRS{rev}=="4.06", ATTRS{type}=="0", ATTRS{queue_depth}=="1", SYMLINK+="boot_diskXY%n"
 SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", ATTRS{model}=="ST910021AS", ATTRS{scsi_level}=="6", ATTRS{rev}=="4.06", ATTRS{type}=="0", SYMLINK+="boot_disk%n"
 EOF
         },
         {
                 desc            => "catch device by *",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "modem/0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["modem/0", "catch-all"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM*", SYMLINK+="modem/%n"
+KERNEL=="*", SYMLINK+="catch-all"
 EOF
         },
+        # 10
         {
                 desc            => "catch device by * - take 2",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "modem/0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["modem/0"],
+                                not_exp_links   => ["bad"],
+                        }],
                 rules           => <<EOF
 KERNEL=="*ACM1", SYMLINK+="bad"
 KERNEL=="*ACM0", SYMLINK+="modem/%n"
@@ -138,8 +237,12 @@ EOF
         },
         {
                 desc            => "catch device by ?",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "modem/0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["modem/0"],
+                                not_exp_links   => ["modem/0-1", "modem/0-2"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM??*", SYMLINK+="modem/%n-1"
 KERNEL=="ttyACM??", SYMLINK+="modem/%n-2"
@@ -148,8 +251,12 @@ EOF
         },
         {
                 desc            => "catch device by character class",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "modem/0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["modem/0"],
+                                not_exp_links   => ["modem/0-1", "modem/0-2"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM[A-Z]*", SYMLINK+="modem/%n-1"
 KERNEL=="ttyACM?[0-9]", SYMLINK+="modem/%n-2"
@@ -157,17 +264,23 @@ KERNEL=="ttyACM[0-9]*", SYMLINK+="modem/%n"
 EOF
         },
         {
-                desc            => "replace kernel name",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "modem",
+                desc            => "don't replace kernel name",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["modem"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM0", SYMLINK+="modem"
 EOF
         },
         {
-                desc            => "Handle comment lines in config file (and replace kernel name)",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "modem",
+                desc            => "Handle comment lines in config file (and don't replace kernel name)",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["modem"],
+                        }],
                 rules           => <<EOF
 # this is a comment
 KERNEL=="ttyACM0", SYMLINK+="modem"
@@ -175,9 +288,12 @@ KERNEL=="ttyACM0", SYMLINK+="modem"
 EOF
         },
         {
-                desc            => "Handle comment lines in config file with whitespace (and replace kernel name)",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "modem",
+                desc            => "Handle comment lines in config file with whitespace (and don't replace kernel name)",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["modem"],
+                        }],
                 rules           => <<EOF
  # this is a comment with whitespace before the comment
 KERNEL=="ttyACM0", SYMLINK+="modem"
@@ -185,9 +301,12 @@ KERNEL=="ttyACM0", SYMLINK+="modem"
 EOF
         },
         {
-                desc            => "Handle whitespace only lines (and replace kernel name)",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "whitespace",
+                desc            => "Handle whitespace only lines (and don't replace kernel name)",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["whitespace"],
+                        }],
                 rules           => <<EOF
 
 
@@ -200,9 +319,12 @@ KERNEL=="ttyACM0", SYMLINK+="whitespace"
 EOF
         },
         {
-                desc            => "Handle empty lines in config file (and replace kernel name)",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "modem",
+                desc            => "Handle empty lines in config file (and don't replace kernel name)",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["modem"],
+                        }],
                 rules           => <<EOF
 
 KERNEL=="ttyACM0", SYMLINK+="modem"
@@ -210,9 +332,12 @@ KERNEL=="ttyACM0", SYMLINK+="modem"
 EOF
         },
         {
-                desc            => "Handle backslashed multi lines in config file (and replace kernel name)",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "modem",
+                desc            => "Handle backslashed multi lines in config file (and don't replace kernel name)",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["modem"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM0", \\
 SYMLINK+="modem"
@@ -221,16 +346,23 @@ EOF
         },
         {
                 desc            => "preserve backslashes, if they are not for a newline",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "aaa",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["aaa"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM0", PROGRAM=="/bin/echo -e \\101", RESULT=="A", SYMLINK+="aaa"
 EOF
         },
+        # 20
         {
-                desc            => "Handle stupid backslashed multi lines in config file (and replace kernel name)",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "modem",
+                desc            => "Handle stupid backslashed multi lines in config file (and don't replace kernel name)",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["modem"],
+                        }],
                 rules           => <<EOF
 
 #
@@ -247,32 +379,44 @@ EOF
         },
         {
                 desc            => "subdirectory handling",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "sub/direct/ory/modem",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["sub/direct/ory/modem"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM0", SYMLINK+="sub/direct/ory/modem"
 EOF
         },
         {
                 desc            => "parent device name match of scsi partition",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
-                exp_name        => "first_disk5",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["first_disk5"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNELS=="0:0:0:0", SYMLINK+="first_disk%n"
 EOF
         },
         {
                 desc            => "test substitution chars",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
-                exp_name        => "Major:8:minor:5:kernelnumber:5:id:0:0:0:0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["Major:8:minor:5:kernelnumber:5:id:0:0:0:0"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNELS=="0:0:0:0", SYMLINK+="Major:%M:minor:%m:kernelnumber:%n:id:%b"
 EOF
         },
         {
                 desc            => "import of shell-value returned from program",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "node12345678",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["node12345678"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", IMPORT{program}="/bin/echo -e \' TEST_KEY=12345678\\n  TEST_key2=98765\'", SYMLINK+="node\$env{TEST_KEY}"
 KERNEL=="ttyACM0", SYMLINK+="modem"
@@ -280,8 +424,12 @@ EOF
         },
         {
                 desc            => "substitution of sysfs value (%s{file})",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "disk-ATA-sda",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["disk-ATA-sda"],
+                                not_exp_links   => ["modem"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", SYMLINK+="disk-%s{vendor}-%k"
 KERNEL=="ttyACM0", SYMLINK+="modem"
@@ -289,9 +437,12 @@ EOF
         },
         {
                 desc            => "program result substitution",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
-                exp_name        => "special-device-5",
-                not_exp_name    => "not",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["special-device-5"],
+                                not_exp_links   => ["not"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n special-device", RESULT=="-special-*", SYMLINK+="not"
 SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n special-device", RESULT=="special-*", SYMLINK+="%c-%n"
@@ -299,128 +450,184 @@ EOF
         },
         {
                 desc            => "program result substitution (newline removal)",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
-                exp_name        => "newline_removed",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["newline_removed"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo test", RESULT=="test", SYMLINK+="newline_removed"
 EOF
         },
         {
                 desc            => "program result substitution",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
-                exp_name        => "test-0:0:0:0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["test-0:0:0:0"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n test-%b", RESULT=="test-0:0*", SYMLINK+="%c"
 EOF
         },
         {
                 desc            => "program with lots of arguments",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
-                exp_name        => "foo9",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["foo9"],
+                                not_exp_links   => ["foo3", "foo4", "foo5", "foo6", "foo7", "foo8"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n foo3 foo4 foo5 foo6 foo7 foo8 foo9", KERNEL=="sda5", SYMLINK+="%c{7}"
 EOF
         },
         {
                 desc            => "program with subshell",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
-                exp_name        => "bar9",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["bar9"],
+                                not_exp_links   => ["foo3", "foo4", "foo5", "foo6", "foo7", "foo8"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", PROGRAM=="/bin/sh -c 'echo foo3 foo4 foo5 foo6 foo7 foo8 foo9 | sed  s/foo9/bar9/'", KERNEL=="sda5", SYMLINK+="%c{7}"
 EOF
         },
         {
                 desc            => "program arguments combined with apostrophes",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
-                exp_name        => "foo7",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["foo7"],
+                                not_exp_links   => ["foo3", "foo4", "foo5", "foo6", "foo8"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n 'foo3 foo4'   'foo5   foo6   foo7 foo8'", KERNEL=="sda5", SYMLINK+="%c{5}"
 EOF
         },
         {
                 desc            => "program arguments combined with escaped double quotes, part 1",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
-                exp_name        => "foo2",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["foo2"],
+                                not_exp_links   => ["foo1"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", PROGRAM=="/bin/sh -c 'printf %%s \\\"foo1 foo2\\\" | grep \\\"foo1 foo2\\\"'", KERNEL=="sda5", SYMLINK+="%c{2}"
 EOF
         },
         {
                 desc            => "program arguments combined with escaped double quotes, part 2",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
-                exp_name        => "foo2",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["foo2"],
+                                not_exp_links   => ["foo1"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", PROGRAM=="/bin/sh -c \\\"printf %%s 'foo1 foo2' | grep 'foo1 foo2'\\\"", KERNEL=="sda5", SYMLINK+="%c{2}"
 EOF
         },
         {
                 desc            => "program arguments combined with escaped double quotes, part 3",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
-                exp_name        => "foo2",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["foo2"],
+                                not_exp_links   => ["foo1", "foo3"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", PROGRAM=="/bin/sh -c 'printf \\\"%%s %%s\\\" \\\"foo1 foo2\\\" \\\"foo3\\\"| grep \\\"foo1 foo2\\\"'", KERNEL=="sda5", SYMLINK+="%c{2}"
 EOF
         },
         {
                 desc            => "characters before the %c{N} substitution",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
-                exp_name        => "my-foo9",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["my-foo9"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n foo3 foo4 foo5 foo6 foo7 foo8 foo9", KERNEL=="sda5", SYMLINK+="my-%c{7}"
 EOF
         },
         {
                 desc            => "substitute the second to last argument",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
-                exp_name        => "my-foo8",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["my-foo8"],
+                                not_exp_links   => ["my-foo3", "my-foo4", "my-foo5", "my-foo6", "my-foo7", "my-foo9"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n foo3 foo4 foo5 foo6 foo7 foo8 foo9", KERNEL=="sda5", SYMLINK+="my-%c{6}"
 EOF
         },
         {
                 desc            => "test substitution by variable name",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
-                exp_name        => "Major:8-minor:5-kernelnumber:5-id:0:0:0:0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["Major:8-minor:5-kernelnumber:5-id:0:0:0:0"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNELS=="0:0:0:0", SYMLINK+="Major:\$major-minor:\$minor-kernelnumber:\$number-id:\$id"
 EOF
         },
         {
                 desc            => "test substitution by variable name 2",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
-                exp_name        => "Major:8-minor:5-kernelnumber:5-id:0:0:0:0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["Major:8-minor:5-kernelnumber:5-id:0:0:0:0"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNELS=="0:0:0:0", DEVPATH=="*/sda/*", SYMLINK+="Major:\$major-minor:%m-kernelnumber:\$number-id:\$id"
 EOF
         },
         {
                 desc            => "test substitution by variable name 3",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
-                exp_name        => "850:0:0:05",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["850:0:0:05"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNELS=="0:0:0:0", DEVPATH=="*/sda/*", SYMLINK+="%M%m%b%n"
 EOF
         },
         {
                 desc            => "test substitution by variable name 4",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
-                exp_name        => "855",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["855"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNELS=="0:0:0:0", DEVPATH=="*/sda/*", SYMLINK+="\$major\$minor\$number"
 EOF
         },
         {
                 desc            => "test substitution by variable name 5",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
-                exp_name        => "8550:0:0:0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["8550:0:0:0"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNELS=="0:0:0:0", DEVPATH=="*/sda/*", SYMLINK+="\$major%m%n\$id"
 EOF
         },
         {
                 desc            => "non matching SUBSYSTEMS for device with no parent",
-                devpath         => "/devices/virtual/tty/console",
-                exp_name        => "TTY",
+                devices => [
+                        {
+                                devpath         => "/devices/virtual/tty/console",
+                                exp_links       => ["TTY"],
+                                not_exp_links   => ["foo"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n foo", RESULT=="foo", SYMLINK+="foo"
 KERNEL=="console", SYMLINK+="TTY"
@@ -428,8 +635,12 @@ EOF
         },
         {
                 desc            => "non matching SUBSYSTEMS",
-                devpath         => "/devices/virtual/tty/console",
-                exp_name        => "TTY",
+                devices => [
+                        {
+                                devpath         => "/devices/virtual/tty/console",
+                                exp_links       => ["TTY"],
+                                not_exp_links   => ["foo"],
+                        }],
                 rules                => <<EOF
 SUBSYSTEMS=="foo", ATTRS{dev}=="5:1", SYMLINK+="foo"
 KERNEL=="console", SYMLINK+="TTY"
@@ -437,8 +648,11 @@ EOF
         },
         {
                 desc            => "ATTRS match",
-                devpath         => "/devices/virtual/tty/console",
-                exp_name        => "foo",
+                devices => [
+                        {
+                                devpath         => "/devices/virtual/tty/console",
+                                exp_links       => ["foo", "TTY"],
+                        }],
                 rules           => <<EOF
 KERNEL=="console", SYMLINK+="TTY"
 ATTRS{dev}=="5:1", SYMLINK+="foo"
@@ -446,8 +660,12 @@ EOF
         },
         {
                 desc            => "ATTR (empty file)",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "empty",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["empty", "not-something"],
+                                not_exp_links   => ["something", "not-empty"],
+                        }],
                 rules           => <<EOF
 KERNEL=="sda", ATTR{test_empty_file}=="?*", SYMLINK+="something"
 KERNEL=="sda", ATTR{test_empty_file}!="", SYMLINK+="not-empty"
@@ -457,8 +675,13 @@ EOF
         },
         {
                 desc            => "ATTR (non-existent file)",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "non-existent",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["non-existent", "wrong"],
+                                not_exp_links   => ["something", "empty", "not-empty",
+                                                    "not-something", "something"],
+                        }],
                 rules           => <<EOF
 KERNEL=="sda", ATTR{nofile}=="?*", SYMLINK+="something"
 KERNEL=="sda", ATTR{nofile}!="", SYMLINK+="not-empty"
@@ -470,8 +693,11 @@ EOF
         },
         {
                 desc            => "program and bus type match",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "scsi-0:0:0:0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["scsi-0:0:0:0"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="usb", PROGRAM=="/bin/echo -n usb-%b", SYMLINK+="%c"
 SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n scsi-%b", SYMLINK+="%c"
@@ -480,16 +706,24 @@ EOF
         },
         {
                 desc            => "sysfs parent hierarchy",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "modem",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["modem"],
+                        }],
                 rules           => <<EOF
 ATTRS{idProduct}=="007b", SYMLINK+="modem"
 EOF
         },
         {
                 desc            => "name test with ! in the name",
-                devpath         => "/devices/virtual/block/fake!blockdev0",
-                exp_name        => "is/a/fake/blockdev0",
+                devices => [
+                        {
+                                devpath         => "/devices/virtual/block/fake!blockdev0",
+                                devnode         => "fake/blockdev0",
+                                exp_links       => ["is/a/fake/blockdev0"],
+                                not_exp_links       => ["is/not/a/fake/blockdev0", "modem"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", SYMLINK+="is/not/a/%k"
 SUBSYSTEM=="block", SYMLINK+="is/a/%k"
@@ -498,17 +732,24 @@ EOF
         },
         {
                 desc            => "name test with ! in the name, but no matching rule",
-                devpath         => "/devices/virtual/block/fake!blockdev0",
-                exp_name        => "fake/blockdev0",
-                exp_rem_error   => "yes",
+                devices => [
+                        {
+                                devpath         => "/devices/virtual/block/fake!blockdev0",
+                                devnode         => "fake/blockdev0",
+                                not_exp_links       => ["modem"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM0", SYMLINK+="modem"
 EOF
         },
         {
                 desc            => "KERNELS rule",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "scsi-0:0:0:0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["scsi-0:0:0:0"],
+                                not_exp_links       => ["no-match", "short-id", "not-scsi"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="usb", KERNELS=="0:0:0:0", SYMLINK+="not-scsi"
 SUBSYSTEMS=="scsi", KERNELS=="0:0:0:1", SYMLINK+="no-match"
@@ -519,8 +760,12 @@ EOF
         },
         {
                 desc            => "KERNELS wildcard all",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "scsi-0:0:0:0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["scsi-0:0:0:0"],
+                                not_exp_links   => ["no-match", "before"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNELS=="*:1", SYMLINK+="no-match"
 SUBSYSTEMS=="scsi", KERNELS=="*:0:1", SYMLINK+="no-match"
@@ -531,8 +776,11 @@ EOF
         },
         {
                 desc            => "KERNELS wildcard partial",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "scsi-0:0:0:0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["scsi-0:0:0:0", "before"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNELS=="0:0:0:0", SYMLINK+="before"
 SUBSYSTEMS=="scsi", KERNELS=="*:0", SYMLINK+="scsi-0:0:0:0"
@@ -540,41 +788,57 @@ EOF
         },
         {
                 desc            => "KERNELS wildcard partial 2",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "scsi-0:0:0:0",
-                rules           => <<EOF
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["scsi-0:0:0:0", "before"],
+                        }],
+                rules                => <<EOF
 SUBSYSTEMS=="scsi", KERNELS=="0:0:0:0", SYMLINK+="before"
 SUBSYSTEMS=="scsi", KERNELS=="*:0:0:0", SYMLINK+="scsi-0:0:0:0"
 EOF
         },
         {
                 desc            => "substitute attr with link target value (first match)",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "driver-is-sd",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["driver-is-sd"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", SYMLINK+="driver-is-\$attr{driver}"
 EOF
         },
         {
                 desc            => "substitute attr with link target value (currently selected device)",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "driver-is-ahci",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["driver-is-ahci"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="pci", SYMLINK+="driver-is-\$attr{driver}"
 EOF
         },
         {
                 desc            => "ignore ATTRS attribute whitespace",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "ignored",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["ignored"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", ATTRS{whitespace_test}=="WHITE  SPACE", SYMLINK+="ignored"
 EOF
         },
         {
                 desc            => "do not ignore ATTRS attribute whitespace",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "matched-with-space",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["matched-with-space"],
+                                not_exp_links   => ["wrong-to-ignore"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", ATTRS{whitespace_test}=="WHITE  SPACE ", SYMLINK+="wrong-to-ignore"
 SUBSYSTEMS=="scsi", ATTRS{whitespace_test}=="WHITE  SPACE   ", SYMLINK+="matched-with-space"
@@ -582,117 +846,150 @@ EOF
         },
         {
                 desc            => "permissions USER=bad GROUP=name",
-                devpath         => "/devices/virtual/tty/tty33",
-                exp_name        => "tty33",
-                exp_perms       => "0:0:0600",
+                devices => [
+                        {
+                                devpath         => "/devices/virtual/tty/tty33",
+                                exp_perms       => "0:0:0600",
+                        }],
                 rules           => <<EOF
 KERNEL=="tty33", OWNER="bad", GROUP="name"
 EOF
         },
         {
                 desc            => "permissions OWNER=1",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "node",
-                exp_perms       => "1::0600",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["node"],
+                                exp_perms       => "1::0600",
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="node", OWNER="1"
 EOF
         },
         {
                 desc            => "permissions GROUP=1",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "node",
-                exp_perms       => ":1:0660",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["node"],
+                                exp_perms       => ":1:0660",
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="node", GROUP="1"
 EOF
         },
         {
                 desc            => "textual user id",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "node",
-                exp_perms       => "daemon::0600",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["node"],
+                                exp_perms       => "daemon::0600",
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="node", OWNER="daemon"
 EOF
         },
         {
                 desc            => "textual group id",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "node",
-                exp_perms       => ":daemon:0660",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["node"],
+                                exp_perms       => ":daemon:0660",
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="node", GROUP="daemon"
 EOF
         },
         {
                 desc            => "textual user/group id",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "node",
-                exp_perms       => "root:audio:0660",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["node"],
+                                exp_perms       => "root:audio:0660",
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="node", OWNER="root", GROUP="audio"
 EOF
         },
         {
                 desc            => "permissions MODE=0777",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "node",
-                exp_perms       => "::0777",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["node"],
+                                exp_perms       => "::0777",
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="node", MODE="0777"
 EOF
         },
         {
                 desc            => "permissions OWNER=1 GROUP=1 MODE=0777",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "node",
-                exp_perms       => "1:1:0777",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["node"],
+                                exp_perms       => "1:1:0777",
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="node", OWNER="1", GROUP="1", MODE="0777"
 EOF
         },
         {
                 desc            => "permissions OWNER to 1",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "ttyACM0",
-                exp_perms       => "1::",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_perms       => "1::",
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM[0-9]*", SYMLINK+="ttyACM%n", OWNER="1"
 EOF
         },
         {
                 desc            => "permissions GROUP to 1",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "ttyACM0",
-                exp_perms       => ":1:0660",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_perms       => ":1:0660",
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM[0-9]*", SYMLINK+="ttyACM%n", GROUP="1"
 EOF
         },
         {
                 desc            => "permissions MODE to 0060",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "ttyACM0",
-                exp_perms       => "::0060",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_perms       => "::0060",
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM[0-9]*", SYMLINK+="ttyACM%n", MODE="0060"
 EOF
         },
         {
                 desc            => "permissions OWNER, GROUP, MODE",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "ttyACM0",
-                exp_perms       => "1:1:0777",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_perms       => "1:1:0777",
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM[0-9]*", SYMLINK+="ttyACM%n", OWNER="1", GROUP="1", MODE="0777"
 EOF
         },
         {
                 desc            => "permissions only rule",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "ttyACM0",
-                exp_perms       => "1:1:0777",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_perms       => "1:1:0777",
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM[0-9]*", OWNER="1", GROUP="1", MODE="0777"
 KERNEL=="ttyUSX[0-9]*", OWNER="2", GROUP="2", MODE="0444"
@@ -701,9 +998,11 @@ EOF
         },
         {
                 desc            => "multiple permissions only rule",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "ttyACM0",
-                exp_perms       => "1:1:0777",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_perms       => "1:1:0777",
+                        }],
                 rules           => <<EOF
 SUBSYSTEM=="tty", OWNER="1"
 SUBSYSTEM=="tty", GROUP="1"
@@ -714,9 +1013,11 @@ EOF
         },
         {
                 desc            => "permissions only rule with override at SYMLINK+ rule",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "ttyACM0",
-                exp_perms       => "1:2:0777",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_perms       => "1:2:0777",
+                        }],
                 rules           => <<EOF
 SUBSYSTEM=="tty", OWNER="1"
 SUBSYSTEM=="tty", GROUP="1"
@@ -727,53 +1028,71 @@ EOF
         },
         {
                 desc            => "major/minor number test",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "node",
-                exp_majorminor  => "8:0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["node"],
+                                exp_majorminor  => "8:0",
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="node"
 EOF
         },
         {
                 desc            => "big major number test",
-                devpath         => "/devices/virtual/misc/misc-fake1",
-                exp_name        => "node",
-                exp_majorminor  => "4095:1",
-                rules           => <<EOF
+                devices => [
+                        {
+                                devpath         => "/devices/virtual/misc/misc-fake1",
+                                exp_links       => ["node"],
+                                exp_majorminor  => "4095:1",
+                        }],
+                rules                => <<EOF
 KERNEL=="misc-fake1", SYMLINK+="node"
 EOF
         },
         {
                 desc            => "big major and big minor number test",
-                devpath         => "/devices/virtual/misc/misc-fake89999",
-                exp_name        => "node",
-                exp_majorminor  => "4095:89999",
+                devices => [
+                        {
+                                devpath         => "/devices/virtual/misc/misc-fake89999",
+                                exp_links       => ["node"],
+                                exp_majorminor  => "4095:89999",
+                        }],
                 rules           => <<EOF
 KERNEL=="misc-fake89999", SYMLINK+="node"
 EOF
         },
         {
                 desc            => "multiple symlinks with format char",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "symlink2-ttyACM0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["symlink1-0", "symlink2-ttyACM0", "symlink3-"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM[0-9]*", SYMLINK="symlink1-%n symlink2-%k symlink3-%b"
 EOF
         },
         {
                 desc            => "multiple symlinks with a lot of s p a c e s",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "one",
-                not_exp_name    => " ",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["one", "two"],
+                                not_exp_links       => [" "],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM[0-9]*", SYMLINK="  one     two        "
 EOF
         },
         {
                 desc            => "symlink with spaces in substituted variable",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "name-one_two_three-end",
-                not_exp_name    => " ",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["name-one_two_three-end"],
+                                not_exp_links   => [" "],
+                        }],
                 rules           => <<EOF
 ENV{WITH_WS}="one two three"
 SYMLINK="name-\$env{WITH_WS}-end"
@@ -781,9 +1100,12 @@ EOF
         },
         {
                 desc            => "symlink with leading space in substituted variable",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "name-one_two_three-end",
-                not_exp_name    => " ",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["name-one_two_three-end"],
+                                not_exp_links   => [" "],
+                        }],
                 rules           => <<EOF
 ENV{WITH_WS}="   one two three"
 SYMLINK="name-\$env{WITH_WS}-end"
@@ -791,9 +1113,12 @@ EOF
         },
         {
                 desc            => "symlink with trailing space in substituted variable",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "name-one_two_three-end",
-                not_exp_name    => " ",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["name-one_two_three-end"],
+                                not_exp_links   => [" "],
+                        }],
                 rules           => <<EOF
 ENV{WITH_WS}="one two three   "
 SYMLINK="name-\$env{WITH_WS}-end"
@@ -801,9 +1126,12 @@ EOF
         },
         {
                 desc            => "symlink with lots of space in substituted variable",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "name-one_two_three-end",
-                not_exp_name    => " ",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["name-one_two_three-end"],
+                                not_exp_links   => [" "],
+                        }],
                 rules           => <<EOF
 ENV{WITH_WS}="   one two three   "
 SYMLINK="name-\$env{WITH_WS}-end"
@@ -811,39 +1139,26 @@ EOF
         },
         {
                 desc            => "symlink with multiple spaces in substituted variable",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "name-one_two_three-end",
-                not_exp_name    => " ",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["name-one_two_three-end"],
+                                not_exp_links   => [" "],
+                        }],
                 rules           => <<EOF
 ENV{WITH_WS}="   one  two  three   "
 SYMLINK="name-\$env{WITH_WS}-end"
 EOF
         },
         {
-                desc            => "symlink with space and var with space, part 1",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "first",
-                not_exp_name    => " ",
-                rules           => <<EOF
-ENV{WITH_WS}="   one  two  three   "
-SYMLINK="  first  name-\$env{WITH_WS}-end another_symlink a b c "
-EOF
-        },
-        {
-                desc            => "symlink with space and var with space, part 2",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "name-one_two_three-end",
-                not_exp_name    => " ",
-                rules           => <<EOF
-ENV{WITH_WS}="   one  two  three   "
-SYMLINK="  first  name-\$env{WITH_WS}-end another_symlink a b c "
-EOF
-        },
-        {
-                desc            => "symlink with space and var with space, part 3",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "another_symlink",
-                not_exp_name    => " ",
+                desc            => "symlink with space and var with space",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["first", "name-one_two_three-end",
+                                                    "another_symlink", "a", "b", "c"],
+                                not_exp_links   => [" "],
+                        }],
                 rules           => <<EOF
 ENV{WITH_WS}="   one  two  three   "
 SYMLINK="  first  name-\$env{WITH_WS}-end another_symlink a b c "
@@ -851,133 +1166,187 @@ EOF
         },
         {
                 desc            => "symlink creation (same directory)",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "modem0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["modem0"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM[0-9]*", SYMLINK+="ttyACM%n", SYMLINK="modem%n"
 EOF
         },
         {
                 desc            => "multiple symlinks",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "second-0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["first-0", "second-0", "third-0"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM0", SYMLINK="first-%n second-%n third-%n"
 EOF
         },
         {
                 desc            => "symlink name '.'",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => ".",
-                exp_add_error   => "yes",
-                exp_rem_error   => "yes",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["."],
+                                exp_add_error        => "yes",
+                                exp_rem_error        => "yes",
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="."
 EOF
         },
         {
                 desc            => "symlink node to itself",
-                devpath         => "/devices/virtual/tty/tty0",
-                exp_name        => "link",
-                exp_add_error   => "yes",
-                exp_rem_error   => "yes",
-                option          => "clean",
+                devices => [
+                        {
+                                devpath         => "/devices/virtual/tty/tty0",
+                                exp_links       => ["link"],
+                                exp_add_error        => "yes",
+                                exp_rem_error        => "yes",
+                        }],
+                option                => "clean",
                 rules           => <<EOF
 KERNEL=="tty0", SYMLINK+="tty0"
 EOF
         },
         {
                 desc            => "symlink %n substitution",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "symlink0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["symlink0"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM[0-9]*", SYMLINK+="ttyACM%n", SYMLINK+="symlink%n"
 EOF
         },
         {
                 desc            => "symlink %k substitution",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "symlink-ttyACM0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["symlink-ttyACM0"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM[0-9]*", SYMLINK+="ttyACM%n", SYMLINK+="symlink-%k"
 EOF
         },
         {
                 desc            => "symlink %M:%m substitution",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "major-166:0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["major-166:0"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM[0-9]*", SYMLINK+="ttyACM%n", SYMLINK+="major-%M:%m"
 EOF
         },
         {
                 desc            => "symlink %b substitution",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "symlink-0:0:0:0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["symlink-0:0:0:0"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="symlink-%b"
 EOF
         },
         {
                 desc            => "symlink %c substitution",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "test",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["test"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM[0-9]*", PROGRAM=="/bin/echo test", SYMLINK+="%c"
 EOF
         },
         {
                 desc            => "symlink %c{N} substitution",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "test",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["test"],
+                                not_exp_links   => ["symlink", "this"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM[0-9]*", PROGRAM=="/bin/echo symlink test this", SYMLINK+="%c{2}"
 EOF
         },
         {
                 desc            => "symlink %c{N+} substitution",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "this",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["test", "this"],
+                                not_exp_links   => ["symlink"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM[0-9]*", PROGRAM=="/bin/echo symlink test this", SYMLINK+="%c{2+}"
 EOF
         },
         {
                 desc            => "symlink only rule with %c{N+}",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "test",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["test", "this"],
+                                not_exp_links   => ["symlink"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda", PROGRAM=="/bin/echo link test this" SYMLINK+="%c{2+}"
 EOF
         },
         {
                 desc            => "symlink %s{filename} substitution",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "166:0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["166:0"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM[0-9]*", SYMLINK+="%s{dev}"
 EOF
         },
         {
                 desc            => "program result substitution (numbered part of)",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
-                exp_name        => "link1",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["link1", "link2"],
+                                not_exp_links   => ["node"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n node link1 link2", RESULT=="node *", SYMLINK+="%c{2} %c{3}"
 EOF
         },
         {
                 desc            => "program result substitution (numbered part of+)",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
-                exp_name        => "link4",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["link1", "link2", "link3", "link4"],
+                                not_exp_links   => ["node"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", PROGRAM=="/bin/echo -n node link1 link2 link3 link4", RESULT=="node *", SYMLINK+="%c{2+}"
 EOF
         },
         {
                 desc            => "SUBSYSTEM match test",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "node",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["node"],
+                                not_exp_links   => ["should_not_match", "should_not_match2"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="should_not_match", SUBSYSTEM=="vc"
 SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="node", SUBSYSTEM=="block"
@@ -986,8 +1355,12 @@ EOF
         },
         {
                 desc            => "DRIVERS match test",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "node",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["node"],
+                                not_exp_links   => ["should_not_match"]
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="should_not_match", DRIVERS=="sd-wrong"
 SUBSYSTEMS=="scsi", KERNEL=="sda", SYMLINK+="node", DRIVERS=="sd"
@@ -995,32 +1368,47 @@ EOF
         },
         {
                 desc            => "devnode substitution test",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "node",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["node"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda", PROGRAM=="/usr/bin/test -b %N" SYMLINK+="node"
 EOF
         },
         {
                 desc            => "parent node name substitution test",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "sda-part-1",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["sda-part-1"],
+                        }],
                 rules           => <<EOF
-SUBSYSTEMS=="scsi", KERNEL=="sda1", SYMLINK+="%P-part-1"
+SUBSYSTEMS=="scsi", KERNEL=="sda1", SYMLINK+="%P-part-%n"
 EOF
         },
         {
                 desc            => "udev_root substitution",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "start-/dev-end",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["start-/dev-end"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda1", SYMLINK+="start-%r-end"
 EOF
         },
         {
+                # This is not supported any more
                 desc            => "last_rule option",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "last",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["last"],
+                                not_exp_links   => ["very-last"],
+                                exp_nodev_error => "yes",
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda1", SYMLINK+="last", OPTIONS="last_rule"
 SUBSYSTEMS=="scsi", KERNEL=="sda1", SYMLINK+="very-last"
@@ -1028,8 +1416,12 @@ EOF
         },
         {
                 desc            => "negation KERNEL!=",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "match",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["match", "before"],
+                                not_exp_links   => ["matches-but-is-negated"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL!="sda1", SYMLINK+="matches-but-is-negated"
 SUBSYSTEMS=="scsi", KERNEL=="sda1", SYMLINK+="before"
@@ -1038,8 +1430,12 @@ EOF
         },
         {
                 desc            => "negation SUBSYSTEM!=",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "not-anything",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["before", "not-anything"],
+                                not_exp_links   => ["matches-but-is-negated"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", SUBSYSTEM=="block", KERNEL!="sda1", SYMLINK+="matches-but-is-negated"
 SUBSYSTEMS=="scsi", KERNEL=="sda1", SYMLINK+="before"
@@ -1048,8 +1444,11 @@ EOF
         },
         {
                 desc            => "negation PROGRAM!= exit code",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "nonzero-program",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["before", "nonzero-program"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda1", SYMLINK+="before"
 KERNEL=="sda1", PROGRAM!="/bin/false", SYMLINK+="nonzero-program"
@@ -1057,8 +1456,12 @@ EOF
         },
         {
                 desc            => "ENV{} test",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "true",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["true"],
+                                not_exp_links   => ["bad", "wrong"],
+                        }],
                 rules           => <<EOF
 ENV{ENV_KEY_TEST}="test"
 SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ENV_KEY_TEST}=="go", SYMLINK+="wrong"
@@ -1068,8 +1471,12 @@ EOF
         },
         {
                 desc            => "ENV{} test",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "true",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["true"],
+                                not_exp_links   => ["bad", "wrong", "no"],
+                        }],
                 rules           => <<EOF
 ENV{ENV_KEY_TEST}="test"
 SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ENV_KEY_TEST}=="go", SYMLINK+="wrong"
@@ -1080,8 +1487,12 @@ EOF
         },
         {
                 desc            => "ENV{} test (assign)",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "true",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["true", "before"],
+                                not_exp_links   => ["no"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ASSIGN}="true"
 SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ASSIGN}=="yes", SYMLINK+="no"
@@ -1091,20 +1502,35 @@ EOF
         },
         {
                 desc            => "ENV{} test (assign 2 times)",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "true",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["true", "before"],
+                                not_exp_links   => ["no", "bad"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ASSIGN}="true"
 SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ASSIGN}="absolutely-\$env{ASSIGN}"
 SUBSYSTEMS=="scsi", KERNEL=="sda1", SYMLINK+="before"
 SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ASSIGN}=="yes", SYMLINK+="no"
+SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ASSIGN}=="true", SYMLINK+="bad"
 SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ASSIGN}=="absolutely-true", SYMLINK+="true"
 EOF
         },
         {
                 desc            => "ENV{} test (assign2)",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "part",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["part"],
+                                not_exp_links   => ["disk"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["disk"],
+                                not_exp_links   => ["part"],
+                        },
+                    ],
                 rules           => <<EOF
 SUBSYSTEM=="block", KERNEL=="*[0-9]", ENV{PARTITION}="true", ENV{MAINDEVICE}="false"
 SUBSYSTEM=="block", KERNEL=="*[!0-9]", ENV{PARTITION}="false", ENV{MAINDEVICE}="true"
@@ -1115,40 +1541,56 @@ EOF
         },
         {
                 desc            => "untrusted string sanitize",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "sane",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["sane"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda1", PROGRAM=="/bin/echo -e name; (/usr/bin/badprogram)", RESULT=="name_ _/usr/bin/badprogram_", SYMLINK+="sane"
 EOF
         },
         {
                 desc            => "untrusted string sanitize (don't replace utf8)",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "uber",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["uber"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda1", PROGRAM=="/bin/echo -e \\xc3\\xbcber" RESULT=="\xc3\xbcber", SYMLINK+="uber"
 EOF
         },
         {
                 desc            => "untrusted string sanitize (replace invalid utf8)",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "replaced",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["replaced"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", KERNEL=="sda1", PROGRAM=="/bin/echo -e \\xef\\xe8garbage", RESULT=="__garbage", SYMLINK+="replaced"
 EOF
         },
         {
                 desc            => "read sysfs value from parent device",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "serial-354172020305000",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["serial-354172020305000"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM*", ATTRS{serial}=="?*", SYMLINK+="serial-%s{serial}"
 EOF
         },
         {
                 desc            => "match against empty key string",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "ok",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["ok"],
+                                not_exp_links   => ["not-1-ok", "not-2-ok", "not-3-ok"],
+                        }],
                 rules           => <<EOF
 KERNEL=="sda", ATTRS{nothing}!="", SYMLINK+="not-1-ok"
 KERNEL=="sda", ATTRS{nothing}=="", SYMLINK+="not-2-ok"
@@ -1158,8 +1600,12 @@ EOF
         },
         {
                 desc            => "check ACTION value",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "ok",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["ok"],
+                                not_exp_links   => ["unknown-not-ok"],
+                        }],
                 rules           => <<EOF
 ACTION=="unknown", KERNEL=="sda", SYMLINK+="unknown-not-ok"
 ACTION=="add", KERNEL=="sda", SYMLINK+="ok"
@@ -1167,38 +1613,50 @@ EOF
         },
         {
                 desc            => "final assignment",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "ok",
-                exp_perms       => "root:tty:0640",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["ok"],
+                                exp_perms       => "root:tty:0640",
+                        }],
                 rules           => <<EOF
 KERNEL=="sda", GROUP:="tty"
-KERNEL=="sda", GROUP="not-ok", MODE="0640", SYMLINK+="ok"
+KERNEL=="sda", GROUP="root", MODE="0640", SYMLINK+="ok"
 EOF
         },
         {
                 desc            => "final assignment 2",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "ok",
-                exp_perms       => "root:tty:0640",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["ok"],
+                                exp_perms       => "root:tty:0640",
+                        }],
                 rules           => <<EOF
 KERNEL=="sda", GROUP:="tty"
 SUBSYSTEM=="block", MODE:="640"
-KERNEL=="sda", GROUP="not-ok", MODE="0666", SYMLINK+="ok"
+KERNEL=="sda", GROUP="root", MODE="0666", SYMLINK+="ok"
 EOF
         },
         {
                 desc            => "env substitution",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "node-add-me",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["node-add-me"],
+                        }],
                 rules           => <<EOF
 KERNEL=="sda", MODE="0666", SYMLINK+="node-\$env{ACTION}-me"
 EOF
         },
         {
                 desc            => "reset list to current value",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "three",
-                not_exp_name    => "two",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["three"],
+                                not_exp_links   => ["two", "one"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM[0-9]*", SYMLINK+="one"
 KERNEL=="ttyACM[0-9]*", SYMLINK+="two"
@@ -1207,9 +1665,12 @@ EOF
         },
         {
                 desc            => "test empty SYMLINK+ (empty override)",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "right",
-                not_exp_name    => "wrong",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["right"],
+                                not_exp_links   => ["wrong"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM[0-9]*", SYMLINK+="wrong"
 KERNEL=="ttyACM[0-9]*", SYMLINK=""
@@ -1218,8 +1679,11 @@ EOF
         },
         {
                 desc            => "test multi matches",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "right",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["right", "before"],
+                        }],
                 rules           => <<EOF
 KERNEL=="ttyACM*", SYMLINK+="before"
 KERNEL=="ttyACM*|nothing", SYMLINK+="right"
@@ -1227,8 +1691,12 @@ EOF
         },
         {
                 desc            => "test multi matches 2",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "right",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["right", "before"],
+                                not_exp_links   => ["nomatch"],
+                        }],
                 rules           => <<EOF
 KERNEL=="dontknow*|*nothing", SYMLINK+="nomatch"
 KERNEL=="ttyACM*", SYMLINK+="before"
@@ -1237,8 +1705,12 @@ EOF
         },
         {
                 desc            => "test multi matches 3",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "right",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["right"],
+                                not_exp_links   => ["nomatch", "wrong1", "wrong2"],
+                        }],
                 rules           => <<EOF
 KERNEL=="dontknow|nothing", SYMLINK+="nomatch"
 KERNEL=="dontknow|ttyACM0a|nothing|attyACM0", SYMLINK+="wrong1"
@@ -1248,8 +1720,12 @@ EOF
         },
         {
                 desc            => "test multi matches 4",
-                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
-                exp_name        => "right",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+                                exp_links       => ["right"],
+                                not_exp_links   => ["nomatch", "wrong1", "wrong2", "wrong3"],
+                        }],
                 rules           => <<EOF
 KERNEL=="dontknow|nothing", SYMLINK+="nomatch"
 KERNEL=="dontknow|ttyACM0a|nothing|attyACM0", SYMLINK+="wrong1"
@@ -1259,10 +1735,13 @@ KERNEL=="ttyACM0a|nothing", SYMLINK+="wrong3"
 EOF
         },
         {
-                desc            => "test multi matches 5",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "found",
-                not_exp_name    => "bad",
+               desc            => "test multi matches 5",
+               devices => [
+                       {
+                               devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                               exp_links       => ["found"],
+                               not_exp_name    => "bad",
+                       }],
                 rules           => <<EOF
 KERNEL=="sda", TAG="foo"
 TAGS=="|foo", SYMLINK+="found"
@@ -1271,9 +1750,12 @@ EOF
         },
         {
                 desc            => "test multi matches 6",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "found",
-                not_exp_name    => "bad",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["found"],
+                                not_exp_name    => "bad",
+                       }],
                 rules           => <<EOF
 KERNEL=="sda", TAG=""
 TAGS=="|foo", SYMLINK+="found"
@@ -1282,9 +1764,12 @@ EOF
         },
         {
                 desc            => "test multi matches 7",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "found",
-                not_exp_name    => "bad",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["found"],
+                                not_exp_name    => "bad",
+                        }],
                 rules           => <<EOF
 KERNEL=="sda", TAG="foo"
 TAGS=="foo||bar", SYMLINK+="found"
@@ -1293,9 +1778,12 @@ EOF
         },
         {
                 desc            => "test multi matches 8",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "found",
-                not_exp_name    => "bad",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["found"],
+                                not_exp_name    => "bad",
+                        }],
                 rules           => <<EOF
 KERNEL=="sda", TAG=""
 TAGS=="foo||bar", SYMLINK+="found"
@@ -1304,9 +1792,12 @@ EOF
         },
         {
                 desc            => "test multi matches 9",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "found",
-                not_exp_name    => "bad",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["found"],
+                                not_exp_name    => "bad",
+                        }],
                 rules           => <<EOF
 KERNEL=="sda", TAG="foo"
 TAGS=="foo|", SYMLINK+="found"
@@ -1315,9 +1806,12 @@ EOF
         },
         {
                 desc            => "test multi matches 10",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "found",
-                not_exp_name    => "bad",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["found"],
+                                not_exp_name    => "bad",
+                        }],
                 rules           => <<EOF
 KERNEL=="sda", TAG=""
 TAGS=="foo|", SYMLINK+="found"
@@ -1326,9 +1820,12 @@ EOF
         },
         {
                 desc            => "test multi matches 11",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "found",
-                not_exp_name    => "bad",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["found"],
+                                not_exp_name    => "bad",
+                        }],
                 rules           => <<EOF
 KERNEL=="sda", TAG="c"
 TAGS=="foo||bar||c", SYMLINK+="found"
@@ -1336,28 +1833,31 @@ TAGS=="aaa||bbb||ccc", SYMLINK+="bad"
 EOF
         },
         {
-                desc            => "IMPORT parent test sequence 1/2 (keep)",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "parent",
-                option          => "keep",
+                desc            => "IMPORT parent test",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["parent"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["parentenv-parent_right"],
+                        }],
+                sleep_us        => 500000,  # Serialized! We need to sleep here after adding sda
                 rules           => <<EOF
+KERNEL=="sda1", IMPORT{parent}="PARENT*", SYMLINK+="parentenv-\$env{PARENT_KEY}\$env{WRONG_PARENT_KEY}"
 KERNEL=="sda", IMPORT{program}="/bin/echo -e \'PARENT_KEY=parent_right\\nWRONG_PARENT_KEY=parent_wrong'"
 KERNEL=="sda", SYMLINK+="parent"
-EOF
-        },
-        {
-                desc            => "IMPORT parent test sequence 2/2 (keep)",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "parentenv-parent_right",
-                option          => "clean",
-                rules           => <<EOF
-KERNEL=="sda1", IMPORT{parent}="PARENT*", SYMLINK+="parentenv-\$env{PARENT_KEY}\$env{WRONG_PARENT_KEY}"
 EOF
         },
         {
                 desc            => "GOTO test",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "right",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["right"],
+                                not_exp_test    => ["wrong", "wrong2"],
+                        }],
                 rules           => <<EOF
 KERNEL=="sda1", GOTO="TEST"
 KERNEL=="sda1", SYMLINK+="wrong"
@@ -1370,8 +1870,11 @@ EOF
         },
         {
                 desc            => "GOTO label does not exist",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "right",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["right"],
+                        }],
                 rules           => <<EOF
 KERNEL=="sda1", GOTO="does-not-exist"
 KERNEL=="sda1", SYMLINK+="right",
@@ -1380,9 +1883,12 @@ EOF
         },
         {
                 desc            => "SYMLINK+ compare test",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "right",
-                not_exp_name    => "wrong",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["right", "link"],
+                                not_exp_links   => ["wrong"],
+                        }],
                 rules           => <<EOF
 KERNEL=="sda1", SYMLINK+="link"
 KERNEL=="sda1", SYMLINK=="link*", SYMLINK+="right"
@@ -1391,8 +1897,12 @@ EOF
         },
         {
                 desc            => "invalid key operation",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "yes",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["yes"],
+                                not_exp_links   => ["no"],
+                        }],
                 rules           => <<EOF
 KERNEL="sda1", SYMLINK+="no"
 KERNEL=="sda1", SYMLINK+="yes"
@@ -1400,16 +1910,23 @@ EOF
         },
         {
                 desc            => "operator chars in attribute",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "yes",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["yes"],
+                        }],
                 rules           => <<EOF
 KERNEL=="sda", ATTR{test:colon+plus}=="?*", SYMLINK+="yes"
 EOF
         },
         {
                 desc            => "overlong comment line",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
-                exp_name        => "yes",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["yes"],
+                                not_exp_links   => ["no"],
+                        }],
                 rules           => <<EOF
 # 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
    # 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
@@ -1419,16 +1936,23 @@ EOF
         },
         {
                 desc            => "magic subsys/kernel lookup",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "00:16:41:e2:8d:ff",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["00:16:41:e2:8d:ff"],
+                        }],
                 rules           => <<EOF
 KERNEL=="sda", SYMLINK+="\$attr{[net/eth0]address}"
 EOF
         },
         {
                 desc            => "TEST absolute path",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "there",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["there"],
+                                not_exp_links   => ["notthere"],
+                        }],
                 rules           => <<EOF
 TEST=="/etc/machine-id", SYMLINK+="there"
 TEST!="/etc/machine-id", SYMLINK+="notthere"
@@ -1436,44 +1960,56 @@ EOF
         },
         {
                 desc            => "TEST subsys/kernel lookup",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "yes",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["yes"],
+                        }],
                 rules           => <<EOF
 KERNEL=="sda", TEST=="[net/eth0]", SYMLINK+="yes"
 EOF
         },
         {
                 desc            => "TEST relative path",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "relative",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["relative"],
+                        }],
                 rules           => <<EOF
 KERNEL=="sda", TEST=="size", SYMLINK+="relative"
 EOF
         },
         {
                 desc            => "TEST wildcard substitution (find queue/nr_requests)",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "found-subdir",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["found-subdir"],
+                        }],
                 rules           => <<EOF
 KERNEL=="sda", TEST=="*/nr_requests", SYMLINK+="found-subdir"
 EOF
         },
         {
                 desc            => "TEST MODE=0000",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "sda",
-                exp_perms       => "0:0:0000",
-                exp_rem_error   => "yes",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_perms       => "0:0:0000",
+                                exp_rem_error   => "yes",
+                        }],
                 rules           => <<EOF
 KERNEL=="sda", MODE="0000"
 EOF
         },
         {
                 desc            => "TEST PROGRAM feeds OWNER, GROUP, MODE",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "sda",
-                exp_perms       => "1:1:0400",
-                exp_rem_error   => "yes",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_perms       => "1:1:0400",
+                        }],
                 rules           => <<EOF
 KERNEL=="sda", MODE="666"
 KERNEL=="sda", PROGRAM=="/bin/echo 1 1 0400", OWNER="%c{1}", GROUP="%c{2}", MODE="%c{3}"
@@ -1481,10 +2017,12 @@ EOF
         },
         {
                 desc            => "TEST PROGRAM feeds MODE with overflow",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "sda",
-                exp_perms       => "0:0:0440",
-                exp_rem_error   => "yes",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_perms       => "0:0:0440",
+                                exp_rem_error   => "yes",
+                        }],
                 rules           => <<EOF
 KERNEL=="sda", MODE="440"
 KERNEL=="sda", PROGRAM=="/bin/echo 0 0 0400letsdoabuffferoverflow0123456789012345789012345678901234567890", OWNER="%c{1}", GROUP="%c{2}", MODE="%c{3}"
@@ -1492,19 +2030,23 @@ EOF
         },
         {
                 desc            => "magic [subsys/sysname] attribute substitution",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "sda-8741C4G-end",
-                exp_perms       => "0:0:0600",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["sda-8741C4G-end"],
+                                exp_perms       => "0:0:0600",
+                        }],
                 rules           => <<EOF
-KERNEL=="sda", PROGRAM="/bin/true create-envp"
-KERNEL=="sda", ENV{TESTENV}="change-envp"
 KERNEL=="sda", SYMLINK+="%k-%s{[dmi/id]product_name}-end"
 EOF
         },
         {
                 desc            => "builtin path_id",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0"],
+                        }],
                 rules           => <<EOF
 KERNEL=="sda", IMPORT{builtin}="path_id"
 KERNEL=="sda", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/\$env{ID_PATH}"
@@ -1512,9 +2054,12 @@ EOF
         },
         {
                 desc            => "add and match tag",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "found",
-                not_exp_name    => "bad",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["found"],
+                                not_exp_links   => ["bad"],
+                        }],
                 rules           => <<EOF
 SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", TAG+="green"
 TAGS=="green", SYMLINK+="found"
@@ -1523,17 +2068,23 @@ EOF
         },
         {
                 desc            => "don't crash with lots of tags",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "found",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["found"],
+                        }],
                 rules           => $rules_10k_tags . <<EOF
 TAGS=="test1", TAGS=="test500", TAGS=="test1234", TAGS=="test9999", TAGS=="test10000", SYMLINK+="found"
 EOF
         },
         {
                 desc            => "continuations",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "found",
-                not_exp_name    => "bad",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["found"],
+                                not_exp_name    => "bad",
+                        }],
                 rules           => $rules_10k_tags_continuation . <<EOF
 TAGS=="test1", TAGS=="test500", TAGS=="test1234", TAGS=="test9999", TAGS=="test10000", SYMLINK+="bad"
 KERNEL=="sda",\\
@@ -1551,9 +2102,13 @@ EOF
         },
         {
                 desc            => "continuations with empty line",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "found",
-                not_exp_name    => "bad",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["found"],
+                                not_exp_name    => "bad",
+
+                        }],
                 rules           => <<EOF
 # empty line finishes continuation
 KERNEL=="sda", TAG+="foo" \\
@@ -1563,13 +2118,16 @@ KERNEL=="sda", TAG+="aaa" \\
 KERNEL=="sdb", TAG+="bbb"
 TAGS=="foo", SYMLINK+="found"
 TAGS=="aaa", SYMLINK+="bad"
-EOF
+                    EOF
         },
         {
                 desc            => "continuations with white only line",
-                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
-                exp_name        => "found",
-                not_exp_name    => "bad",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                                exp_links       => ["found"],
+                                not_exp_name    => "bad",
+                        }],
                 rules           => <<EOF
 # space only line finishes continuation
 KERNEL=="sda", TAG+="foo" \\
@@ -1581,16 +2139,199 @@ TAGS=="foo", SYMLINK+="found"
 TAGS=="aaa", SYMLINK+="bad"
 EOF
         },
+        {
+                desc            => "multiple devices",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["part-1"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["part-5"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6",
+                                exp_links       => ["part-6"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7",
+                                exp_links       => ["part-7"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8",
+                                exp_links       => ["part-8"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9",
+                                exp_links       => ["part-9"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10",
+                                exp_links       => ["part-10"],
+                        },
+                    ],
+                rules          => <<EOF
+SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="part-%n"
+EOF
+        },
+        {
+                desc            => "multiple devices, same link name, positive prio",
+                repeat          => 100,
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["part-1"],
+                                not_exp_links   => ["partition"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["part-5"],
+                                not_exp_links   => ["partition"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6",
+                                not_exp_links   => ["partition"],
+                                exp_links       => ["part-6"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7",
+                                exp_links       => ["part-7", "partition"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8",
+                                not_exp_links   => ["partition"],
+                                exp_links       => ["part-8"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9",
+                                not_exp_links   => ["partition"],
+                                exp_links       => ["part-9"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10",
+                                not_exp_links   => ["partition"],
+                                exp_links       => ["part-10"],
+                        },
+                    ],
+                rules          => <<EOF
+SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="part-%n"
+SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="partition"
+KERNEL=="*7", OPTIONS+="link_priority=10"
+EOF
+        },
+        {
+                desc            => "multiple devices, same link name, negative prio",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["part-1"],
+                                not_exp_links   => ["partition"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["part-5"],
+                                not_exp_links   => ["partition"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6",
+                                not_exp_links   => ["partition"],
+                                exp_links       => ["part-6"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7",
+                                exp_links       => ["part-7", "partition"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8",
+                                not_exp_links   => ["partition"],
+                                exp_links       => ["part-8"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9",
+                                not_exp_links   => ["partition"],
+                                exp_links       => ["part-9"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10",
+                                not_exp_links   => ["partition"],
+                                exp_links       => ["part-10"],
+                        },
+                    ],
+                rules          => <<EOF
+SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="part-%n"
+SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="partition"
+KERNEL!="*7", OPTIONS+="link_priority=-10"
+EOF
+        },
+        {
+                desc            => "multiple devices, same link name, positive prio, sleep",
+                devices => [
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
+                                exp_links       => ["part-1"],
+                                not_exp_links   => ["partition"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
+                                exp_links       => ["part-5"],
+                                not_exp_links   => ["partition"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6",
+                                not_exp_links   => ["partition"],
+                                exp_links       => ["part-6"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7",
+                                exp_links       => ["part-7", "partition"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8",
+                                not_exp_links   => ["partition"],
+                                exp_links       => ["part-8"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9",
+                                not_exp_links   => ["partition"],
+                                exp_links       => ["part-9"],
+                        },
+                        {
+                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10",
+                                not_exp_links   => ["partition"],
+                                exp_links       => ["part-10"],
+                        },
+                    ],
+                sleep_us       => 10000,
+                rules          => <<EOF
+SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="part-%n"
+SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="partition"
+KERNEL=="*7", OPTIONS+="link_priority=10"
+EOF
+        },
+        {
+                desc           => 'all_block_devs',
+                generator      => expect_for_some("\\/sda6\$", ["blockdev"]),
+                repeat         => 10,
+                rules          => <<EOF
+SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sd*", SYMLINK+="blockdev"
+KERNEL=="sda6", OPTIONS+="link_priority=10"
+EOF
+        }
 );
 
-sub udev {
-        my ($action, $devpath, $rules) = @_;
+sub create_rules {
+        my ($rules) = @_;
 
         # create temporary rules
         system("mkdir", "-p", "$udev_rules_dir");
         open CONF, ">$udev_rules" || die "unable to create rules file: $udev_rules";
         print CONF $$rules;
         close CONF;
+}
+
+sub udev {
+        my ($action, $devpath) = @_;
 
         if ($valgrind > 0) {
                 return system("$udev_bin_valgrind $action $devpath");
@@ -1604,6 +2345,8 @@ sub udev {
 }
 
 my $error = 0;
+my $good = 0;
+my $exp_good = 0;
 
 sub permissions_test {
         my($rules, $uid, $gid, $mode) = @_;
@@ -1634,6 +2377,7 @@ sub permissions_test {
         }
         if ($wrong == 0) {
                 print "permissions: ok\n";
+                $good++;
         } else {
                 printf "  expected permissions are: %s:%s:%#o\n", $1, $2, oct($3);
                 printf "  created permissions are : %i:%i:%#o\n", $uid, $gid, $mode & 07777;
@@ -1659,6 +2403,7 @@ sub major_minor_test {
         }
         if ($wrong == 0) {
                 print "major:minor: ok\n";
+                $good++;
         } else {
                 printf "  expected major:minor is: %i:%i\n", $1, $2;
                 printf "  created major:minor is : %i:%i\n", $major, $minor;
@@ -1669,7 +2414,7 @@ sub major_minor_test {
 }
 
 sub udev_setup {
-        system("umount", $udev_tmpfs);
+        system("umount \"$udev_tmpfs\" 2>/dev/null");
         rmdir($udev_tmpfs);
         mkdir($udev_tmpfs) || die "unable to create udev_tmpfs: $udev_tmpfs\n";
 
@@ -1709,44 +2454,77 @@ sub udev_setup {
         return 1;
 }
 
-sub run_test {
-        my ($rules, $number) = @_;
-        my $rc;
+sub get_devnode {
+        my ($device) = @_;
+        my $devnode;
 
-        print "TEST $number: $rules->{desc}\n";
-        print "device \'$rules->{devpath}\' expecting node/link \'$rules->{exp_name}\'\n";
+        if (defined($device->{devnode})) {
+                $devnode = "$udev_dev/$device->{devnode}";
+        } else {
+                $devnode = "$device->{devpath}";
+                $devnode =~ s!.*/!$udev_dev/!;
+        }
+        return $devnode;
+}
 
-        $rc = udev("add", $rules->{devpath}, \$rules->{rules});
-        if ($rc != 0) {
-                print "$udev_bin add failed with code $rc\n";
+sub check_devnode {
+        my ($device) = @_;
+        my $devnode = get_devnode($device);
+
+        my @st = lstat("$devnode");
+        if (! (-b _  || -c _)) {
+                print "add $devnode:         error\n";
+                system("tree", "$udev_dev");
                 $error++;
+                return undef;
         }
-        if (defined($rules->{not_exp_name})) {
-                if ((-e "$udev_dev/$rules->{not_exp_name}") ||
-                    (-l "$udev_dev/$rules->{not_exp_name}")) {
-                        print "nonexistent: error \'$rules->{not_exp_name}\' not expected to be there\n";
-                        $error++;
-                        sleep(1);
-                }
+
+        my ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size,
+            $atime, $mtime, $ctime, $blksize, $blocks) = @st;
+
+        if (defined($device->{exp_perms})) {
+                permissions_test($device, $uid, $gid, $mode);
         }
+        if (defined($device->{exp_majorminor})) {
+                major_minor_test($device, $rdev);
+        }
+        print "add $devnode:         ok\n";
+        $good++;
+        return $devnode;
+}
 
-        if ((-e "$udev_dev/$rules->{exp_name}") ||
-            (-l "$udev_dev/$rules->{exp_name}")) {
+sub get_link_target {
+        my ($link) = @_;
 
-                my ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size,
-                    $atime, $mtime, $ctime, $blksize, $blocks) = stat("$udev_dev/$rules->{exp_name}");
+        my $cwd = getcwd();
+        my $dir = "$udev_dev/$link";
+        my $tgt = readlink("$udev_dev/$link");
+        $dir =~ s!/[^/]*$!!;
+        $tgt = abs_path("$dir/$tgt");
+        $tgt =~ s!^$cwd/!!;
+        return $tgt;
+}
 
-                if (defined($rules->{exp_perms})) {
-                        permissions_test($rules, $uid, $gid, $mode);
-                }
-                if (defined($rules->{exp_majorminor})) {
-                        major_minor_test($rules, $rdev);
+sub check_link_add {
+        my ($link, $devnode, $err_expected) = @_;
+
+        my @st = lstat("$udev_dev/$link");
+        if (-l _) {
+                my $tgt = get_link_target($link);
+
+                if ($tgt ne $devnode) {
+                        print "symlink $link:         error, found -> $tgt\n";
+                        $error++;
+                        system("tree", "$udev_dev");
+                } else {
+                        print "symlink $link:         ok\n";
+                        $good++;
                 }
-                print "add:         ok\n";
         } else {
-                print "add:         error";
-                if ($rules->{exp_add_error}) {
+                print "symlink $link:         error";
+                if ($err_expected) {
                         print " as expected\n";
+                        $good++;
                 } else {
                         print "\n";
                         system("tree", "$udev_dev");
@@ -1755,22 +2533,80 @@ sub run_test {
                         sleep(1);
                 }
         }
+}
 
-        if (defined($rules->{option}) && $rules->{option} eq "keep") {
-                print "\n\n";
-                return;
+sub check_link_nonexistent {
+        my ($link, $devnode, $err_expected) = @_;
+
+        if ((-e "$udev_dev/$link") || (-l "$udev_dev/$link")) {
+                my $tgt = get_link_target($link);
+
+                if ($tgt ne $devnode) {
+                        print "nonexistent: '$link' points to other device (ok)\n";
+                        $good++;
+                } else {
+                        print "nonexistent: error \'$link\' should not be there";
+                        if ($err_expected) {
+                                print " (as expected)\n";
+                                $good++;
+                        } else {
+                                print "\n";
+                                system("tree", "$udev_dev");
+                                print "\n";
+                                $error++;
+                                sleep(1);
+                        }
+                }
+        } else {
+                print "nonexistent $link:         ok\n";
+                $good++;
+        }
+}
+
+sub check_add {
+        my ($device) = @_;
+        my $devnode = check_devnode($device);
+
+        if (defined($device->{exp_links})) {
+                foreach my $link (@{$device->{exp_links}}) {
+                        check_link_add($link, $devnode,
+                                       $device->{exp_add_error});
+                }
+        }
+        if (defined $device->{not_exp_links}) {
+                foreach my $link (@{$device->{not_exp_links}}) {
+                        check_link_nonexistent($link, $devnode,
+                                               $device->{exp_nodev_error});
+                }
         }
+}
 
-        $rc = udev("remove", $rules->{devpath}, \$rules->{rules});
-        if ($rc != 0) {
-                print "$udev_bin remove failed with code $rc\n";
+sub check_remove_devnode {
+        my ($device) = @_;
+        my $devnode = get_devnode($device);
+
+        if (-e "$devnode") {
+                print "remove  $devnode:      error";
+                print "\n";
+                system("tree", "$udev_dev");
+                print "\n";
                 $error++;
+                sleep(1);
+        } else {
+                print "remove $devnode:         ok\n";
+                $good++;
         }
-        if ((-e "$udev_dev/$rules->{exp_name}") ||
-            (-l "$udev_dev/$rules->{exp_name}")) {
-                print "remove:      error";
-                if ($rules->{exp_rem_error}) {
+}
+
+sub check_link_remove {
+        my ($link, $err_expected) = @_;
+
+        if ((-e "$udev_dev/$link") ||
+            (-l "$udev_dev/$link")) {
+                print "remove  $link:      error";
+                if ($err_expected) {
                         print " as expected\n";
+                        $good++;
                 } else {
                         print "\n";
                         system("tree", "$udev_dev");
@@ -1779,10 +2615,132 @@ sub run_test {
                         sleep(1);
                 }
         } else {
-                print "remove:      ok\n";
+                print "remove  $link:      ok\n";
+                $good++;
+        }
+}
+
+sub check_remove {
+        my ($device) = @_;
+
+        check_remove_devnode($device);
+
+        return if (!defined($device->{exp_links}));
+
+        foreach my $link (@{$device->{exp_links}}) {
+                check_link_remove($link, $device->{exp_rem_error});
+        }
+}
+
+sub run_udev {
+        my ($action, $dev, $sleep_us, $sema) = @_;
+
+        # Notify main process that this worker has started
+        $sema->op(0, 1, 0);
+
+        # Wait for start
+        $sema->op(0, 0, 0);
+        usleep($sleep_us) if defined ($sleep_us);
+        my $rc = udev($action, $dev->{devpath});
+        exit $rc;
+}
+
+sub fork_and_run_udev {
+        my ($action, $rules, $sema) = @_;
+        my @devices = @{$rules->{devices}};
+        my $dev;
+        my $k = 0;
+
+        $sema->setval(0, 1);
+        foreach $dev (@devices) {
+                my $pid = fork();
+
+                if (!$pid) {
+                        run_udev($action, $dev,
+                                 defined($rules->{sleep_us}) ? $k * $rules->{sleep_us} : undef,
+                                 $sema);
+                } else {
+                        $dev->{pid} = $pid;
+                }
+                $k++;
+        }
+
+        # This operation waits for all workers to become ready, and
+        # starts them off when that's the case.
+        $sema->op(0, -($#devices + 2), 0);
+
+        foreach $dev (@devices) {
+                my $rc;
+                my $pid;
+
+                $pid = waitpid($dev->{pid}, 0);
+                if ($pid == -1) {
+                        print "error waiting for pid dev->{pid}\n";
+                }
+                if (WIFEXITED($?)) {
+                        $rc = WEXITSTATUS($?);
+
+                        if ($rc) {
+                                print "$udev_bin $action for $dev->{devpath} failed with code $rc\n";
+                                $error += 1;
+                        } else {
+                                $good++;
+                        }
+                }
+        }
+}
+
+sub run_test {
+        my ($rules, $number, $sema) = @_;
+        my $rc;
+        my @devices;
+        my $ntests;
+        my $cur_good = $good;
+        my $cur_error = $error;
+
+        if (!defined $rules->{devices}) {
+                $rules->{devices} = all_block_devs($rules->{generator});
+        }
+        @devices = @{$rules->{devices}};
+        # For each device: exit status and devnode test for add & remove
+        $ntests += 4 * ($#devices + 1);
+
+        foreach my $dev (@devices) {
+                $ntests += 2 * ($#{$dev->{exp_links}} + 1)
+                    + ($#{$dev->{not_exp_links}} + 1)
+                    + (defined $dev->{exp_perms} ? 1 : 0)
+                    + (defined $dev->{exp_majorminor} ? 1 : 0);
+        }
+        if (defined $rules->{repeat}) {
+                $ntests *= $rules->{repeat};
+        }
+        $exp_good += $ntests;
+        print "TEST $number: $rules->{desc}\n";
+        create_rules(\$rules->{rules});
+
+      REPEAT:
+        fork_and_run_udev("add", $rules, $sema);
+
+        foreach my $dev (@devices) {
+                check_add($dev);
+        }
+
+        if (defined($rules->{option}) && $rules->{option} eq "keep") {
+                print "\n\n";
+                return;
         }
 
-        print "\n";
+        fork_and_run_udev("remove", $rules, $sema);
+
+        foreach my $dev (@devices) {
+                check_remove($dev);
+        }
+
+        if (defined($rules->{repeat}) && --($rules->{repeat}) > 0) {
+                goto REPEAT;
+        }
+        printf "TEST $number: errors: %d good: %d/%d\n\n", $error-$cur_error,
+            $good-$cur_good, $ntests;
 
         if (defined($rules->{option}) && $rules->{option} eq "clean") {
                 udev_setup();
@@ -1839,12 +2797,13 @@ foreach my $arg (@ARGV) {
                 push(@list, $arg);
         }
 }
+my $sema = IPC::Semaphore->new(IPC_PRIVATE, 1, S_IRUSR | S_IWUSR | IPC_CREAT);
 
 if ($list[0]) {
         foreach my $arg (@list) {
                 if (defined($tests[$arg-1]->{desc})) {
                         print "udev-test will run test number $arg:\n\n";
-                        run_test($tests[$arg-1], $arg);
+                        run_test($tests[$arg-1], $arg, $sema);
                 } else {
                         print "test does not exist.\n";
                 }
@@ -1854,12 +2813,13 @@ if ($list[0]) {
         print "\nudev-test will run ".($#tests + 1)." tests:\n\n";
 
         foreach my $rules (@tests) {
-                run_test($rules, $test_num);
+                run_test($rules, $test_num, $sema);
                 $test_num++;
         }
 }
 
-print "$error errors occurred\n\n";
+$sema->remove;
+print "$error errors occurred. $good/$exp_good good results.\n\n";
 
 cleanup();
 
index 4f44292249405339fe4568885f4bb84291c1a558..d8cdd5ac14dc7748199d691bc01422007df889b7 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index d48e6d6494275b02b606f4265d9fc6414b3eb048..582ae6ba275ee71461e29150239d27c7b4ec8ebd 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 9af67fdb1faaf729249f3d989c02714d4633c429..c6e20d77609fb4f0b1c056b5c01f5cd859f62bee 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index b6c16a14120f88f817470a0669a5f32406c06872..eed3d16b458519b1ef6ecc99d24d4795538dc1b9 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index b44baad91a650134b8b5a825c8fdf900d55d8792..34e89ff7527af75af70cc45fa250582b534284bb 100644 (file)
@@ -13,7 +13,7 @@ StopWhenUnneeded=yes
 
 [Service]
 ExecStartPre=rm -f /failed /testok
-Type=simple
+Type=exec
 TimeoutStartSec=infinity
 ExecStartPre=/usr/lib/systemd/tests/testdata/units/%N.sh
 ExecStart=true
index 68e556124518c5e1bb390c0ac7a001dab72cfcd1..8388ef7a5d2e3682032235dda5d4e9fc280cdec7 100755 (executable)
@@ -37,7 +37,7 @@ wait_for success_runtime
 wait_for success_stop
 
 # These ensure that EXTEND_TIMEOUT_USEC will still timeout in the
-# approprate stage, after the stage limit, when the EXTEND_TIMEOUT_USEC
+# appropriate stage, after the stage limit, when the EXTEND_TIMEOUT_USEC
 # message isn't sent within the extend timeout interval.
 
 wait_for fail_start startfail
index 883c83b8b7e8596e037db13d8646d5f756c9fa00..d615ac2ea7e5d636e36cbe4553aaf608f30ef8ad 100755 (executable)
@@ -74,18 +74,27 @@ machine="$(uname -m)"
 if [ "${machine}" = "x86_64" ]; then
     root_guid=4f68bce3-e8cd-4db1-96e7-fbcaf984b709
     verity_guid=2c7357ed-ebd2-46d9-aec1-23d437ec2bf5
+    architecture="x86-64"
 elif [ "${machine}" = "i386" ] || [ "${machine}" = "i686" ] || [ "${machine}" = "x86" ]; then
     root_guid=44479540-f297-41b2-9af7-d131d5f0458a
     verity_guid=d13c5d3b-b5d1-422a-b29f-9454fdc89d76
+    architecture="x86"
 elif [ "${machine}" = "aarch64" ] || [ "${machine}" = "aarch64_be" ] || [ "${machine}" = "armv8b" ] || [ "${machine}" = "armv8l" ]; then
     root_guid=b921b045-1df0-41c3-af44-4c6f280d3fae
     verity_guid=df3300ce-d69f-4c92-978c-9bfb0f38d820
+    architecture="arm64"
 elif [ "${machine}" = "arm" ]; then
     root_guid=69dad710-2ce4-4e3c-b16c-21a1d49abed3
     verity_guid=7386cdf2-203c-47a9-a498-f2ecce45a2d6
+    architecture="arm"
 elif [ "${machine}" = "ia64" ]; then
     root_guid=993d8d3d-f80e-4225-855a-9daf8ed7ea97
     verity_guid=86ed10d5-b607-45bb-8957-d350f23d0571
+    architecture="ia64"
+elif [ "${machine}" = "ppc64le" ]; then
+    # There's no support of PPC in the discoverable partitions specification yet, so skip the rest for now
+    echo OK >/testok
+    exit 0
 else
     echo "Unexpected uname -m: ${machine} in testsuite-50.sh, please fix me"
     exit 1
@@ -102,7 +111,7 @@ if [ ${root_size} -ge 1024 ]; then
 else
     root_size="${root_size}KiB"
 fi
-verity_size="${verity_size}KiB"
+verity_size="$((${verity_size} * 2))KiB"
 uuid="$(head -c 32 ${image}.roothash | cut -c -8)-$(head -c 32 ${image}.roothash | cut -c 9-12)-$(head -c 32 ${image}.roothash | cut -c 13-16)-$(head -c 32 ${image}.roothash | cut -c 17-20)-$(head -c 32 ${image}.roothash | cut -c 21-)"
 echo -e "label: gpt\nsize=${root_size}, type=${root_guid}, uuid=${uuid}" | sfdisk ${image}.gpt
 uuid="$(tail -c 32 ${image}.roothash | cut -c -8)-$(tail -c 32 ${image}.roothash | cut -c 9-12)-$(tail -c 32 ${image}.roothash | cut -c 13-16)-$(tail -c 32 ${image}.roothash | cut -c 17-20)-$(tail -c 32 ${image}.roothash | cut -c 21-)"
@@ -118,8 +127,8 @@ losetup -d ${loop}
 ROOT_UUID=$(systemd-id128 -u show $(head -c 32 ${image}.roothash) -u | tail -n 1 | cut -b 6-)
 VERITY_UUID=$(systemd-id128 -u show $(tail -c 32 ${image}.roothash) -u | tail -n 1 | cut -b 6-)
 
-systemd-dissect --json=short --root-hash ${roothash} ${image}.gpt | grep -q '{"rw":"ro","designator":"root","partition_uuid":"'$ROOT_UUID'","fstype":"squashfs","architecture":"x86-64","verity":"yes","node":'
-systemd-dissect --json=short --root-hash ${roothash} ${image}.gpt | grep -q '{"rw":"ro","designator":"root-verity","partition_uuid":"'$VERITY_UUID'","fstype":"DM_verity_hash","architecture":"x86-64","verity":null,"node":'
+systemd-dissect --json=short --root-hash ${roothash} ${image}.gpt | grep -q '{"rw":"ro","designator":"root","partition_uuid":"'$ROOT_UUID'","fstype":"squashfs","architecture":"'$architecture'","verity":"yes","node":'
+systemd-dissect --json=short --root-hash ${roothash} ${image}.gpt | grep -q '{"rw":"ro","designator":"root-verity","partition_uuid":"'$VERITY_UUID'","fstype":"DM_verity_hash","architecture":"'$architecture'","verity":null,"node":'
 systemd-dissect --root-hash ${roothash} ${image}.gpt | grep -q -F "MARKER=1"
 systemd-dissect --root-hash ${roothash} ${image}.gpt | grep -q -F -f $os_release
 
diff --git a/test/units/testsuite-56-slowgrowth.sh b/test/units/testsuite-56-slowgrowth.sh
new file mode 100755 (executable)
index 0000000..ff5a747
--- /dev/null
@@ -0,0 +1,34 @@
+#!/usr/bin/env bash
+set -eu -o pipefail
+
+PAGE_SIZE=$(getconf PAGE_SIZE)
+BLOAT_ITERATION_TARGET=$(( 100 << 20 )) # 100 MB
+BLOAT_HOLDER=()
+PID="$$"
+
+function bloat {
+        local set_size=$(cat "/proc/$PID/statm" | cut -d " " -f2)
+        local mem_usage=$(( "$set_size" * "$PAGE_SIZE" ))
+        local target_mem_size=$(( "$mem_usage" + "$1" ))
+
+        BLOAT_HOLDER=()
+        while [[ "$mem_usage" -lt "$target_mem_size" ]]; do
+                echo "target $target_mem_size"
+                echo "mem usage $mem_usage"
+                BLOAT_HOLDER+=( $(printf "%0.sg" {1..1000000}) )
+                set_size=$(cat "/proc/$PID/statm" | cut -d " " -f2)
+                mem_usage=$(( "$set_size" * "$PAGE_SIZE" ))
+        done
+}
+
+function run {
+        local arr=()
+
+        while [[ true ]]; do
+                bloat "$BLOAT_ITERATION_TARGET"
+                arr+=( "$BLOAT_HOLDER" )
+                sleep 1
+        done
+}
+
+run
diff --git a/test/units/testsuite-56-testbloat.service b/test/units/testsuite-56-testbloat.service
new file mode 100644 (file)
index 0000000..40cf5a9
--- /dev/null
@@ -0,0 +1,9 @@
+[Unit]
+Description=Create a lot of memory pressure
+
+[Service]
+# A very small memory.high will cause the script (trying to use a lot of memory)
+# to throttle and be put under heavy pressure
+MemoryHigh=2M
+Slice=testsuite-56-workload.slice
+ExecStart=/usr/lib/systemd/tests/testdata/units/testsuite-56-slowgrowth.sh
diff --git a/test/units/testsuite-56-testchill.service b/test/units/testsuite-56-testchill.service
new file mode 100644 (file)
index 0000000..6cae3d8
--- /dev/null
@@ -0,0 +1,6 @@
+[Unit]
+Description=No memory pressure
+
+[Service]
+Slice=testsuite-56-workload.slice
+ExecStart=sleep infinity
diff --git a/test/units/testsuite-56-workload.slice b/test/units/testsuite-56-workload.slice
new file mode 100644 (file)
index 0000000..3d542ec
--- /dev/null
@@ -0,0 +1,10 @@
+[Unit]
+Description=Test slice for memory pressure kills
+
+[Slice]
+CPUAccounting=true
+MemoryAccounting=true
+IOAccounting=true
+TasksAccounting=true
+ManagedOOMMemoryPressure=kill
+ManagedOOMMemoryPressureLimitPercent=50%
diff --git a/test/units/testsuite-56.service b/test/units/testsuite-56.service
new file mode 100644 (file)
index 0000000..b53b090
--- /dev/null
@@ -0,0 +1,7 @@
+[Unit]
+Description=TESTSUITE-56-OOMD
+
+[Service]
+ExecStartPre=rm -f /failed /skipped /testok
+ExecStart=/usr/lib/systemd/tests/testdata/units/%N.sh
+Type=oneshot
diff --git a/test/units/testsuite-56.sh b/test/units/testsuite-56.sh
new file mode 100755 (executable)
index 0000000..37d62d9
--- /dev/null
@@ -0,0 +1,42 @@
+#!/usr/bin/env bash
+set -ex
+set -o pipefail
+
+systemd-analyze log-level debug
+systemd-analyze log-target console
+
+# Loose checks to ensure the environment has the necessary features for systemd-oomd
+[[ "$( awk '/SwapTotal/ { print $2 }' /proc/meminfo )" != "0" ]] || echo "no swap" >> /skipped
+[[ -e /proc/pressure ]] || echo "no PSI" >> /skipped
+cgroup_type=$(stat -fc %T /sys/fs/cgroup/)
+if [[ "$cgroup_type" != *"cgroup2"* ]] && [[ "$cgroup_type" != *"0x63677270"* ]]; then
+    echo "no cgroup2" >> /skipped
+fi
+[[ -e /skipped ]] && exit 0 || true
+
+systemctl start testsuite-56-testbloat.service
+systemctl start testsuite-56-testchill.service
+
+# Verify systemd-oomd is monitoring the expected units
+oomctl | grep "/testsuite-56-workload.slice"
+oomctl | grep "50%"
+
+# systemd-oomd watches for elevated pressure for 30 seconds before acting.
+# It can take time to build up pressure so either wait 5 minutes or for the service to fail.
+timeout=$(date -ud "5 minutes" +%s)
+while [[ $(date -u +%s) -le $timeout ]]; do
+    if ! systemctl status testsuite-56-testbloat.service; then
+        break
+    fi
+    sleep 15
+done
+
+# testbloat should be killed and testchill should be fine
+if systemctl status testsuite-56-testbloat.service; then exit 42; fi
+if ! systemctl status testsuite-56-testchill.service; then exit 24; fi
+
+systemd-analyze log-level info
+
+echo OK > /testok
+
+exit 0
index b1aa8c797ccdb3124e53b63a6f40f2e3fa595357..99f82e3b809e149e0a375dbdd30903cb018e9673 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 0a9582d8b96456d7c0d19b55769fe1efd603915b..7322460dbaeea529885fd73edd186049e11b8df3 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 enable_tmpfiles = conf.get('ENABLE_TMPFILES') == 1
 
@@ -55,7 +55,7 @@ foreach file : m4_files
         endif
 endforeach
 
-if enable_tmpfiles
+if enable_tmpfiles and install_sysconfdir
         meson.add_install_script(
                 'sh', '-c',
                 mkdir_p.format(join_paths(sysconfdir, 'tmpfiles.d')))
index b8ddf7f4b770939f9658f3ad2f29ee2771ed0a53..3fd0c7d3024e5da4903d684ef9ab3fb60121e09d 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 # See tmpfiles.d(5) for details
 
 Q /var/lib/portables 0700
index 8b6a1dafc322709b4d022e6a2f7345240010375a..e6540b5de4701e31776a830ea840babf324d6609 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # The systemd-pstore.service(1) archives the contents of /sys/fs/pstore
 # upon boot so that there is room for a subsequent dump. This service
 # control writes into pstore.
 #
 # The crash_kexec_post_notifiers parameter enables the kernel to write
-# dmesg (including stack trace) into pstore upon a panic, and
-# printk.always_kmsg_dump parameter enables the kernel to write dmesg
+# dmesg (including stack trace) into pstore upon a panic even if kdump
+# is loaded, only needed if you want to use pstore with kdump. Without
+# this parameter, kdump could block writing to pstore for stability
+# reason. Note this increases the risk of kdump failure even if pstore
+# is not available.
+#
+# The printk.always_kmsg_dump parameter enables the kernel to write dmesg
 # upon a normal shutdown (shutdown, reboot, halt).
 #
 # To configure the kernel parameters, uncomment the appropriate
@@ -26,4 +31,4 @@
 
 d /var/lib/systemd/pstore 0755 root root 14d
 #w- /sys/module/printk/parameters/always_kmsg_dump - - - - Y
-w- /sys/module/kernel/parameters/crash_kexec_post_notifiers - - - - Y
+#w- /sys/module/kernel/parameters/crash_kexec_post_notifiers - - - - Y
index 41e6cc95862bef8b68b0538675f87e91ac273ec6..8bb25a1ccfc839dadf70333fbf91f7bb031b2d79 100644 (file)
@@ -134,6 +134,8 @@ USB_IDS += [
     '12d1:15bb',
     # Fibocom (L850-GL) (coral, nautilus, sarien)
     '2cb7:0007',
+    # Fibocom (NL668, NL652)
+    '2cb7:01a0',
 ]
 
 # Mass Storage
@@ -226,6 +228,8 @@ PCI_IDS += [
     '8086:02a4',
     # USB controller
     '8086:02ed',
+    # Volteer xHCI controller
+    '8086:a0ed',
     # Graphics
     '8086:9b41',
     # DSP
index 51204eb7c9052dc625362cb9476634dfaa7ce2ed..7ea6de8311154cdc9218b7ffbdc22a99626ebf1f 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 TOP=`git rev-parse --show-toplevel`
 
index 95249f9c9cdc760640dd2d0a6f5c57a1962fe11a..54d922975c3d0e9cb6945aac8ee0369767bec7bf 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 TOP=`git rev-parse --show-toplevel`
 
index 66018a54fd4b6fe9d4ae35bd012023948e4bd8e0..d2388b71715a9b4d2c9e9f1ed7d3d70c8a2f482a 100644 (file)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 import gdb
 
index 5392df0ebbbb2105f3cac4f9fc183949e0b24c07..d240b2c383d9341f5a0860649a80138dc85364e7 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 """
 Generate %-from-name.gperf from %-list.txt
index cc0f99169c9c136c320148cb88fec68367e2c28a..f6fccd60462b65d2f06e769c4b52793fcd64a056 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 set -eu
 
-git shortlog -s `git describe --abbrev=0`.. | \
+git shortlog -s `git describe --abbrev=0 --match 'v[0-9][0-9][0-9]'`.. | \
     awk '{ $1=""; print $0 "," }' | \
     sort -u
index a20edc0f341d673534c828d03f732f4b2dff5469..633b7711d14f5c7e71d2f5e83362b087938e01f8 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 # Generate autosuspend rules for devices that have been tested to work properly
 # with autosuspend by the Chromium OS team. Based on
index b04281490d6089ee4726ca6af5397f21659ffd4c..bbdc5572f53a968ae41ecf5bbb8d5c6275628846 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 import sys
 import collections
index 37c708d81dc0953df4bcc2183a49331838da6ae9..bae36fbabf90ff7eb53d28a4c47286e3330c4fe6 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 import collections
 import sys
index 5b8690b687fe199d8e8dd121aab3f06129068f43..491246b32ba1970724c01169a37fb6c08ba5290e 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env bash
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 set -ex
 
index 14ae30f33c4827252c94f8697240a7db2c0cf14e..8fea0b8a0071113090dad09cfd362125c3d6d987 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 import argparse
 import collections
@@ -125,8 +125,7 @@ def document_has_elem_with_text(document, elem, item_repr):
     for loc in document.findall(predicate):
         if loc.text == item_repr:
             return True
-    else:
-        return False
+    return False
 
 def check_documented(document, declarations, stats):
     missing = []
index f5db691f3ef857d5ed6dd24ffbd39cfd286f7a09..9e1660c1238e1cbf0b92f45bdc31f8019bfc7660 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 from __future__ import print_function
 import collections
index f399e7493ca2461647a3ccf2f76002376dd5d8ab..0361358bec27ce06fa8d11e804b2fa140990e444 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 from lxml import etree as tree
 
index ab8a5b5fb8a0879553afc4f31532fe10e96927c7..558a55a0a1439bfbf58ec92011dc305450688015 100755 (executable)
@@ -61,7 +61,7 @@ for phase in "${PHASES[@]}"; do
                 ENV_VARS="-e CC=clang -e CXX=clang++"
                 MESON_ARGS="--optimization=1"
             fi
-            docker exec $ENV_VARS -it $CONT_NAME meson --werror -Dtests=unsafe -Dslow-tests=true -Dsplit-usr=true -Dman=true $MESON_ARGS build
+            docker exec $ENV_VARS -it $CONT_NAME meson --werror -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true -Dsplit-usr=true -Dman=true $MESON_ARGS build
             $DOCKER_EXEC ninja -v -C build
             docker exec -e "TRAVIS=$TRAVIS" -it $CONT_NAME ninja -C build test
             ;;
index 3a917564ed103b07432aad533f584caca40c8d5c..463696a32e8c219bb02f764b66d7fceee4a92ecd 100755 (executable)
@@ -83,12 +83,12 @@ for phase in "${PHASES[@]}"; do
         RUN)
             info "Run phase"
             # Build systemd
-            $DOCKER_EXEC meson --werror -Dtests=unsafe -Dslow-tests=true build
+            $DOCKER_EXEC meson --werror -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true build
             $DOCKER_EXEC ninja -v -C build
             $DOCKER_EXEC ninja -C build test
             ;;
         RUN_CLANG)
-            docker exec -e CC=clang -e CXX=clang++ -it $CONT_NAME meson --werror -Dtests=unsafe -Dslow-tests=true -Dman=true build
+            docker exec -e CC=clang -e CXX=clang++ -it $CONT_NAME meson --werror -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true -Dman=true build
             $DOCKER_EXEC ninja -v -C build
             $DOCKER_EXEC ninja -C build test
             ;;
index 4f44292249405339fe4568885f4bb84291c1a558..d8cdd5ac14dc7748199d691bc01422007df889b7 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 22a9a5bb2bf922c87d8dec6cd13d390ff3950702..ddc85bf8909a837cfeb90701ad5cb91c2cd3d3b1 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 62407d363e4ab4af3b368593ea9c5a7643399fde..8333c2332fc8f5f0c2b5077d8e99a48a95a848d7 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index f0b9e57e7c4801bf180293bae26669d8bf215a6e..f302384dc489729bafbedc8b0bd28aac28b85fb5 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 7c3992e8e03031157ef7cc70d06cc31b2e34721e..d61a490be3241c36646c16c9ec2dd4db28a66b11 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index e4f9ae57916c882ac8eb4cd4ff5eb0f290b77f4f..92307a3ccb556f05abfd6cc84053a3c91ecc630d 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 12e4107f607f89d11751639b3b3ccfc2634af7ea..6bb8ff75cc77164a4b7a121c5ee0e9490fdaca87 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index fdb572bc70c201276733aed037f8a1ea3ed08840..b8eecbdcc185027dec6c058950c5fe773ae354f4 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 9f3868e1060fbab911e633f3d681e695a847fbcd..5b4de84eaca2f6b4474c6b4cfae70c7425081a85 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 278ed9b6109994f84a1a1fcb8c5aa837cf085fce..517437784ceb80821c129fbc2eb24f4ddc2584ad 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 0114ad31f0f6f2b8d087faf46da56a96c625b8ca..02683a9e1effa2b4fb85c24bcefcf12f98c76026 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 180d9e6a57c9b7a42cd7916396f0552bf98c9285..9418f5e7173d4cc89e6f845dfcc7ff085b2a22ca 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index a4e954e8572a06078eb19f4ac6cd9cb6f0c2d8b4..e7f34beb3e06ec78de0103f092ea8b75a54fef74 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 0a79533a9e9f673ee28d2f1d4df8c0b11142e31b..d7a1472a2bf26f0bbadeab9705c0256e41a6ec85 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 0e12386d4dc232d3cfb33578db74d48f2203c566..34f6069dd13c058fd1fc7e7059bc6b975e7f8749 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
diff --git a/units/first-boot-complete.target b/units/first-boot-complete.target
new file mode 100644 (file)
index 0000000..b971496
--- /dev/null
@@ -0,0 +1,14 @@
+#  SPDX-License-Identifier: LGPL-2.1-or-later
+#
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=First Boot Complete
+Documentation=man:systemd.special(7)
+RefuseManualStart=yes
+ConditionFirstBoot=yes
index adb98bf92c3f7d8a3ebe6a8bac012c56161b04ae..5cf0875faee86840d042af9a3ba996bbdfe3390c 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index b3110179bf1c07e7502ab5e5d7e07ef7ac8ac4e3..7e9aac2023cb93dc60536654fa71e4f8abb4c8c9 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 087d68666605047678ad3b34caa34496ed41585a..4c21002619eb2754e8cd418be270f2b609290ddb 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index f3e30e9756be859b63125b9eacf40a9cef7de382..4b2087fa1b76d22386bc27dd2f127beb19c81993 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 87c33745f2020cd8973c4bbad396a82fcd8c0014..b06758bf9591cb66aac2cc6da74b51096d885f02 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 8580c658e6a60433cc271a78b3ec920a7e90ed7e..9ec6f2a6b1f875c76660ebf7244d7d18dde8c096 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index e5e22b8187b4b7b8fce5813e3e0c33690ba918d4..4ed0b35146509735e8ce20af41c4612011fd0c22 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 1120ef3effeaaffb328ca3010eaab5e3728e6d5e..08ab5039627fc693abfd4d500f88baac5ebc5879 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 49577c364f3a8f30c270c68aee3170d35152d5bd..8c6bdf35f56177941230ceb71abe37ea271cb68d 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 94a9719b502c3500d0191d5dae413669508c6cd4..38df7283558fd0861bc0a52b21526345dd1a67e7 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index bcb69093203d0e6013fcb444f969d98b6aba0dfc..f3c3d79a2bf30876782871d358c161c84d84c547 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index f5a8855b6c6a848e4be3fc3fb97d7b5ac97d54c1..4037ac41260cb1703edc70050f0aa2facc04e1e3 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 682b8af875b805806bd5696b34e1fedce2f0de77..e3d692671126068fdbead9bb18cbea997706c57e 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 32ff40a3f6840f51ede1dfde8a550c73f77e29b2..1e32ec57dd5eb1eff53d8fdbbd042a1cfdc97a02 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 0d66080de73d1a63255eac62e78e3a9097d5266f..bc444736fdfaed0701ec7ef76d4de1b9ff6be5fb 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index bfd497ecc3099b0edb919774fd0ba4d72cbc4912..655158a58bca3daa98d5d95f878f1cd75030effb 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 706cd7065c3d7551b8e787f2ace1425e6ec15d18..5d8f8cdc52d2c5d04d67d9ae538bab790d7f320c 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 0971edf9ec4263cc0bf4d7b29d6b1645085d2a73..f4170d6a99f90974c0b14c58a0c1829612d0c72e 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 3c3cbf5607e92c8158835dde50e867861be5c533..33824d4d4f28e2348a25210fd85a3dffa6548ce8 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 9aca15b95381f9d1dc011cfd56d53c42c37a1ca6..bffa7e95dd870d1ab16e660287826cf4ba51197b 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 6ba49300870be220296c337ee4832b43af29a390..02797953a5bea974c6c1d75cb4180cf905df58e2 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index b4e4c17d88ab796cedd1414d8eb00569cc9fe42a..501d3530c02fe1d9037da56338403872da9370f1 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 224765aa905b658dba9aa10603f375558d5f1be8..165839aeb17fb1b68cafe192c081a1c3c81dfb9c 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 08c39c99b343cc41f3944b32a59bab633d75b0dc..ba60eb7fc12140dd8047291986ed84f0578ef881 100644 (file)
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 with_runlevels = conf.get('HAVE_SYSV_COMPAT') == 1
 
@@ -17,11 +17,12 @@ units = [
         ['emergency.target',                    ''],
         ['exit.target',                         ''],
         ['final.target',                        ''],
+        ['first-boot-complete.target',          ''],
         ['getty.target',                        '',
          'multi-user.target.wants/'],
         ['getty-pre.target',                    ''],
         ['graphical.target',                    '',
-         (with_runlevels ? 'runlevel5.target default.target' : 'default.target')],
+         'default.target' + (with_runlevels ? ' runlevel5.target' : '')],
         ['halt.target',                         ''],
         ['hibernate.target',                    'ENABLE_HIBERNATE'],
         ['hybrid-sleep.target',                 'ENABLE_HIBERNATE'],
@@ -58,8 +59,9 @@ units = [
          'sysinit.target.wants/'],
         ['proc-sys-fs-binfmt_misc.mount',       'ENABLE_BINFMT'],
         ['reboot.target',                       '',
-         (with_runlevels ? 'runlevel6.target ctrl-alt-del.target' : 'ctrl-alt-del.target')],
-        ['remote-cryptsetup.target',            'HAVE_LIBCRYPTSETUP'],
+         'ctrl-alt-del.target' + (with_runlevels ? ' runlevel6.target' : '')],
+        ['remote-cryptsetup.target',            'HAVE_LIBCRYPTSETUP',
+         'initrd-root-device.target.wants/'],
         ['remote-fs-pre.target',                ''],
         ['remote-fs.target',                    ''],
         ['rescue.target',                       '',
@@ -201,6 +203,7 @@ in_units = [
         ['systemd-networkd.service',             'ENABLE_NETWORKD'],
         ['systemd-networkd-wait-online.service', 'ENABLE_NETWORKD'],
         ['systemd-nspawn@.service',              ''],
+        ['systemd-oomd.service',                 'ENABLE_OOMD'],
         ['systemd-portabled.service',            'ENABLE_PORTABLED',
          'dbus-org.freedesktop.portable1.service'],
         ['systemd-userdbd.service',              'ENABLE_USERDB'],
@@ -323,9 +326,11 @@ install_data('user-.slice.d/10-defaults.conf',
 
 ############################################################
 
-meson.add_install_script(meson_make_symlink,
-                         join_paths(pkgsysconfdir, 'user'),
-                         join_paths(sysconfdir, 'xdg/systemd/user'))
+if install_sysconfdir
+        meson.add_install_script(meson_make_symlink,
+                                 join_paths(pkgsysconfdir, 'user'),
+                                 join_paths(sysconfdir, 'xdg/systemd/user'))
+endif
 meson.add_install_script(meson_make_symlink,
                          join_paths(dbussystemservicedir, 'org.freedesktop.systemd1.service'),
                          join_paths(dbussessionservicedir, 'org.freedesktop.systemd1.service'))
index 34a0557735f18f648105ecdc83884c65de1ce55d..cf8baf608463a1f1a2249b4a6f6fd4bea2148fec 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
@@ -13,7 +13,6 @@ DefaultDependencies=no
 Before=sysinit.target
 Documentation=man:modprobe(8)
 ConditionCapability=CAP_SYS_MODULE
-ConditionPathExists=!/sys/module/%I
 
 [Service]
 Type=oneshot
index 386e1b547d836c61039b73ddeebfe07c631b73c4..53eb2b7ed0b83b38aaa9cf412d4509ec7cb9a40a 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 8b8c7851e20a6acf32125bcdeb4a1d1d9c296d82..c3edfeb4f91e3f8b8a804116f3228adddd8ad56b 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 806eb720f810a08c98eb185c6854cd0110046eda..70279dacdbdce4e0605abf8434330e8d8c58b00c 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 3e4fdff14464016419d21b5073ed8f052a44edb6..08baf126b4ff61014b163ee4a736e1b1cda6b867 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 8d56c8ea368f3a410bc4e6f9a717cf6f1a9c09f6..53e7a31d0eb608224c9c4d887d6fe74d46fe811f 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 7436b6c80d7595ea35020360561c0eaebd7bd503..9f0d6192fbab4cbdc61ebac8ab0675d6fe87e39c 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 9b6ed1c13feec452f236b8314fea492b89d62337..1bec148bee8a794be1eedec909a29484d4052fd6 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 47c109ceed29fe9336343a7f99df8f91eb7c270d..e97f058fdcd50dba6b896d93e7a1c0fe147a4edc 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index e1fb0d4e347573397b6feae24ccd41cf88470e86..c695669c5cc9e46e83914254f283ca45ef0ed11f 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 30a6bc99184411aef7ece169f4a47d7327e03a9a..a71e249976749e53520dff647a342856784070c5 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 1587853e1e23f2d2d9a1e9072cb4a5e22786382e..919271b3e2eb61b9eeb293f52b4f516a0e753884 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 25c747439a19da19e631d0d3894f9a83ab7def7c..fa6b4c823936caab2afb1581ebdb4b34f7f8be9c 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index d4aaaf09d400bbdcdb0daab552bf4f6b140feb18..f7ce98f18ea289087f041a9576280b24141138a9 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index c2782db631733fae1c44da6f9a138ffe147898f4..a900c90dcf5d512afe6630c627a3f8078c8d662b 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 4445d5defeb448e9a4ed0f22956cb70f31b9c0c0..0a689bfa2d2c2d114fba09f2805bc458cf91f834 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 3f22605c8c7c2d48996092c46bf37afa44180bef..bba5e0ce7c79fe5db086fb62138f9b0694c7ec34 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 0d44348e75692a0d882cfe9d3fe17fedad06f2a0..74011d8aece3d48db219b0d2a6b47f9c2cb37521 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 4106e2d9f751a873b16d7f2349bde459757abb41..20185160033b7585eebd608f76b225e8189073a9 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 0e04a94f397853d0831472a5ac3abf5ab7a7ef88..112808358ea846e0f8012022ae5e644207d12aa1 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 801ee4d6ef217dfa6a45093401d92c4f3ce62185..8bd853baa5fda17a672d4ad858b39409391c7bb3 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 4b72bef84e24afbe80622b79cb008ce71c098896..72c1df590dbad67e91ed17e557ec655a2de91041 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index d48e6d6494275b02b606f4265d9fc6414b3eb048..582ae6ba275ee71461e29150239d27c7b4ec8ebd 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 8228541dac56caa087e1eeaa8385e00188a4c076..beda318c34f31bc8cedec7cdf63d501cabf98c94 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 9409dc670744ced89c2ab7bae9559a3e035321eb..a38a4319ff011fd95e24fe56c2c466e0dba55674 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 84a04d638561210a20c45ed6e014ff81670dabc1..4517e35fc57d84b6462799c931f4e425494b838c 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 717ea2311dfcce6709f58984a8d8bece9c5b601e..0c3fe7210e20f00a2ef2485df6c3329dc6ecf4a9 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 9af67fdb1faaf729249f3d989c02714d4633c429..c6e20d77609fb4f0b1c056b5c01f5cd859f62bee 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 19afc2a63735118a005930f2192b454d85ee3ef4..99e68af008920420308413c24566b426269c9a7e 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 999c0a9c86ba3e229083fe41767d32b425e31e4d..e9987633666d202a14dbc7e5b09e6e4194f1fe28 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 1a156b4147b9d78c3b0c21efc1968cea3cae4b86..bf228f933fedaf36ead0c12acbc26b15ca70bdf9 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 8cef5b6489a70621f6ff705ae2251fc256e85d66..bcdd98815b54afed5f8ee03ac41624cbfcedbdac 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 7bbc342be8efe2338dd44a900e24d75d6b20ecf9..ca48fd5f4faac9001ce14ce302c46a36eed09099 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
@@ -15,9 +15,16 @@ DefaultDependencies=no
 ConditionPathExists=/sys/fs/fuse/connections
 ConditionCapability=CAP_SYS_ADMIN
 ConditionVirtualization=!private-users
-After=systemd-modules-load.service
 Before=sysinit.target
 
+# These dependencies are used to make certain that the module is fully
+# loaded. Indeed udev starts this unit when it receives an uevent for the
+# module but the kernel sends it too early, ie before the init() of the module
+# is fully operational and /sys/fs/fuse/connections is created, see issue#17586.
+
+After=modprobe@fuse.service
+Requires=modprobe@fuse.service
+
 [Mount]
 What=fusectl
 Where=/sys/fs/fuse/connections
index e6997884dc91b2507ad3edaa74705584ec580877..b99b4f4b7e5a624758726152ff9352ab99acb605 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
@@ -14,9 +14,16 @@ Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
 DefaultDependencies=no
 ConditionPathExists=/sys/kernel/config
 ConditionCapability=CAP_SYS_RAWIO
-After=systemd-modules-load.service
 Before=sysinit.target
 
+# These dependencies are used to make certain that the module is fully
+# loaded. Indeed udev starts this unit when it receives an uevent for the
+# module but the kernel sends it too early, ie before the init() of the module
+# is fully operational and /sys/kernel/config is created, see issue#17586.
+
+After=modprobe@configfs.service
+Requires=modprobe@configfs.service
+
 [Mount]
 What=configfs
 Where=/sys/kernel/config
index 618270ddae8ab75200d402b4ed9c25f481815517..d03837bafbfbfda18006ced0b283acb2f024e80e 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index e29b258a47c356e0700c0034c2eed91688b3680b..8800c96bcdbac6735fdfb98e7bac539c689dac1c 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index b6c16a14120f88f817470a0669a5f32406c06872..eed3d16b458519b1ef6ecc99d24d4795538dc1b9 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index c4b1cea2d606702bced6dcd346406757321e90cd..ff76bc5a6f45657ee7717be04a66b99a10eb0680 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 83310900a7afa40ea7e992e08a00cec7a33d0c83..9369b73ae27fefc63f6e9a172baad8cfb0f4e9f6 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 41abcd631c5e005eb53db402b1c168b50d4e670e..d0878dcb0bbd93d8896dbfd5651acc78f43bac33 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 163b75c220d273fdbd68966c9cfd615c64a8a8ff..04101389eb7f336f8601eb7405b804092a3ef71c 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 29812edf9272dcf8ce67d9e3e1c7034612c7b074..dcddfc2ea591431fec5b0c423b4a4c30eef324bf 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 248d597540e06e9dfa4c2b368091b19a0b02dd67..a7aac8378785e6c7dbf3f51182cc457efa9a6056 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 6ee4c253a39dafcfe4c294072e7db97598b4f704..d31f3fa70f02d7c73b9994332b85981ef4e4699a 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 193a9b311e0581a36d04b4b940aed4d85fb715d0..c82cfd26c7b440480f73a2477af4cfac6dd8ed00 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 52a3037cd48ff454b2f56d07b99327778e9929ac..6a70b58cef5c9fffcc526a2725c2a40095633e00 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 6f7967fd003f8143f56fa2858ff82743a99f4a32..317aa387455c3ab3d52c6bdbd602845f1d721cf0 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index e54e95e11d5daed387793670c3f850f65277bcb9..ca76750c0a8aace6667fa5f92a37c3cfd7bfd574 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 511d991d3ba0189b1aa22ebb301d4ebc9c7b2966..601588fc6197e05e76510cbdd5a3566fcdd7cc85 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 27e898b85b30cb4a1fb1c08db27e2380491ff85a..1bf74c21291325250f11890fda04c364dde4eb7d 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 8aead02417824ee78e2bea41023a2a38e29344d1..55f05ec8d899706f81e73762a9344d54d54827ad 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index c9971b919921b185d9228e089ef74779b9956944..922358fe5d62fde0b8cdcb9c50b9a70296711ef1 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index d1ece270749e4667fa155839840860bf9e0855da..219f207835383c9c640bbc4a4a0dfc5dd1638996 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 773c400b476c8916212e939ce55b31eddcab7153..df6e671e841b44575fb2119d52f9c8d04b185ea4 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 9f5c7101cd50d846e0978a895245b74599383231..2fea88384f62ccafb3b3dc9049332055288e7384 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
@@ -13,7 +13,8 @@ Documentation=man:systemd-firstboot(1)
 DefaultDependencies=no
 Conflicts=shutdown.target
 After=systemd-remount-fs.service
-Before=systemd-sysusers.service sysinit.target shutdown.target
+Before=systemd-sysusers.service sysinit.target first-boot-complete.target shutdown.target
+Wants=first-boot-complete.target
 ConditionPathIsReadWrite=/etc
 ConditionFirstBoot=yes
 
index 042081cceeb0456ca3b05190df4e393b59cb4bc4..c4a2948120b0dc387d522d3279abc955bd7c89ec 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 332208352d40c6a057dca9ba4d1716263ea62c79..6d9c9aba695c845685c4ca197456eea0bd33c56b 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index cd16d1de202a827e0f380d94f287b6ebcfc83a58..37bfe285c03850daf26f55cea2da7d3081b145b4 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index a2db06b031dfefbb68f2ef7d1017c6c643650a47..85e0c88169ad3345f3111eb79234a8f8423d3e23 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 963b257ab8dd88c83f41d6b4070c14a352c9d3d4..30965411ff3acf33dcf06f40e475aec25bb9c52f 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 3a5057d3aaf8b17578e8ece758da41df0f6f3da0..b16fedb4ce9d6f40a27cfd9cf93a43738be5eb9b 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 4b6a91c9846e130a3fcf01b06479e41346ebc396..5ac53ca9dc530d2e87a5ff4bedfdd0516bcea442 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 017441f9dadfb825a7538417478b1e1f70112ba1..d3d0efebd0a839bec97267f34e64e6b370d1f8b3 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 9887018a1f23631a3ca7e2cfd0f9f8b935054fee..57398e521473869e5099ff050e7930c02dd0b194 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 466ade974cff1b5bcb13745a291df0876f2f9a9d..6fe37daacd36d3725aa265f0aa809aea47de13a5 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 58a7b472599078568eafcee8c745251a24cdd7c2..afe395687ddf5f0552c921b6ea95e7e50454fb85 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index c276283908486b49ec6459088063ad8f1875f8c3..6367433682b902615a46b140c28c57ace34b608e 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 9d975799081e86ac9d2c0e6ee81c3060dd74de21..598a67f0e41c5fe0b8734728697334d52e566b17 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 6db55a5490ff89825e0321dc8d28b5321f5b1d10..477925685a289cb270cef340a96bb91430477a98 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 0f45743fa0a76e9e54c41b6b46a000ab4eda9af0..1a71592b931be0f8f90066221b0d2785971dc55c 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 2436f2a2cf191d668d7f4c4f96e456a959335c43..7944d6fd9aa52d6e444fe28d4c742e1239c92335 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 7c3632b32337b239d152006edba9c08f3c63c8e4..30e74e32239727a1a687cb08a9a674bbb515e07b 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 82befc9912742ac756c3c593d8013046686a8b76..e48df81e70b211e1cde187409e8a16695371eeb7 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 48d0a656babaf9048fa835aa392a15a91c138f28..29568190389dc3552e10b8c2ad5265de9643db68 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 8b9a9ebdfb3a0ca761ed7074be6d76b9e67d541e..ba6b6e73444b0d16a4a3f743f977e2c985c51d40 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index cb8b77496363f58c36b8db8260f1f386de4c220f..f0c0aebc8659d70804927902a989b389b0057901 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 80ad6ac845f473efcd3ef0f712ab0c0d330f1f57..93e8b252b25e744bd812948902a9604b67a2253d 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
@@ -19,12 +19,13 @@ Before=sockets.target
 IgnoreOnIsolate=yes
 
 [Socket]
-Service=systemd-journald.service
 ListenDatagram=/run/systemd/journal/dev-log
-Symlinks=/dev/log
-SocketMode=0666
 PassCredentials=yes
 PassSecurity=yes
+Service=systemd-journald.service
+SocketMode=0666
+Symlinks=/dev/log
+Timestamping=us
 
 # Increase both the send and receive buffer, so that things don't
 # block early. Note that journald internally uses the this socket both
index b6730c2fa5aa6a289d27df0eb41104ef6d8af12f..05d8cf6ce4535e57d24cbeb15f0f6b92440f90f4 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 0cb1bfa3ca7296ab0bb1d696d4a774a65330cc7f..c7432541370944e29afee79161ded70e5f520a0e 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
@@ -16,7 +16,6 @@ After=systemd-journald.socket systemd-journald-dev-log.socket systemd-journald-a
 Before=sysinit.target
 
 [Service]
-CapabilityBoundingSet=CAP_SYS_ADMIN CAP_DAC_OVERRIDE CAP_SYS_PTRACE CAP_SYSLOG CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_CHOWN CAP_DAC_READ_SEARCH CAP_FOWNER CAP_SETUID CAP_SETGID CAP_MAC_OVERRIDE
 DeviceAllow=char-* rw
 ExecStart=@rootlibexecdir@/systemd-journald
 FileDescriptorStoreMax=4224
@@ -42,6 +41,11 @@ SystemCallFilter=@system-service
 Type=notify
 @SERVICE_WATCHDOG@
 
+# In case you're wondering why CAP_SYS_PTRACE is needed, access to
+# /proc/<pid>/exe requires this capability. Thus if this capability is missing
+# the _EXE=/OBJECT_EXE= fields will be missing from the journal entries.
+CapabilityBoundingSet=CAP_SYS_ADMIN CAP_DAC_OVERRIDE CAP_SYS_PTRACE CAP_SYSLOG CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_CHOWN CAP_DAC_READ_SEARCH CAP_FOWNER CAP_SETUID CAP_SETGID CAP_MAC_OVERRIDE
+
 # If there are many split up journal files we need a lot of fds to access them
 # all in parallel.
 LimitNOFILE=@HIGH_RLIMIT_NOFILE@
index c95ae5ab64b8f1bbf8985ae2986d4cf0c87d26e7..ada3520ad15db8cf296392194ed4f6804d0c2df5 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
@@ -19,10 +19,11 @@ Before=sockets.target
 IgnoreOnIsolate=yes
 
 [Socket]
-ListenStream=/run/systemd/journal/stdout
 ListenDatagram=/run/systemd/journal/socket
-SocketMode=0666
+ListenStream=/run/systemd/journal/stdout
 PassCredentials=yes
 PassSecurity=yes
 ReceiveBuffer=8M
 Service=systemd-journald.service
+SocketMode=0666
+Timestamping=us
index e7ea919328081e0660003d9e03584eb8f1bb27ab..14a217d025ff67e0e1f828216e5840eb86adf8c7 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 3badd7842afc467ed59170021f2507dd5a6c3fb8..60c025fcc3b90d27f8ea5ec0e466ee80bd54e838 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 7413e1d6b1a5881c518257cc3fa7f32ce5bd80ba..0aa7933be47691ca680bd82ef8470bd6676ed637 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 47f147956b604db149e2cdc82b101baa8d6237fd..652b956a34095647a5c1b7a206bb9b40c7fe98a9 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index a00c858b6cae4e9f84ce304888bed79560425e7e..f131b60d4fbc490fdd145526a96086ce5a297446 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
@@ -9,10 +9,10 @@
 
 [Unit]
 Description=User Login Management
+Documentation=man:sd-login(3)
 Documentation=man:systemd-logind.service(8)
 Documentation=man:logind.conf(5)
 Documentation=man:org.freedesktop.login1(5)
-Documentation=https://www.freedesktop.org/wiki/Software/systemd/multiseat
 
 Wants=user.slice modprobe@drm.service
 After=nss-user-lookup.target user.slice modprobe@drm.service
index e3acb0f3260bc30ae28d6556296c561fe145c7ec..89e0613955ccce67e8f1e4c76275c7e5d2c1dcb4 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
@@ -12,8 +12,8 @@ Description=Commit a transient machine-id on disk
 Documentation=man:systemd-machine-id-commit.service(8)
 DefaultDependencies=no
 Conflicts=shutdown.target
-Before=sysinit.target shutdown.target
-After=local-fs.target
+Before=shutdown.target
+After=local-fs.target first-boot-complete.target
 ConditionPathIsReadWrite=/etc
 ConditionPathIsMountPoint=/etc/machine-id
 
index 0e452ddcab1886539927823a3072d288227e710e..56c95326594c860525518f238f57e14430000c6b 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 26abe21d1b342bb128f3dd47ffa9d2a2535fa222..fdb5b3a41ea326a2fd5ce1787468404af560d4ee 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 248a8dc64eba736a411875064a5e95da7f67e12f..bda8426191665c2e5d52c5a680dc93d603982132 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 7666e166697b06dcb72bcfc0f74eed4dbcf7f68d..d868e7777555520bb69e76fb6d85c544e168a560 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index c8ff9be3e503fe15fca09c51aa6713a810dcf9b1..9834b06a43844458a2584e8d38a8406d66ed7763 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index bc049e5ade924cae38f72ae6040969e738ac8103..aa9ad7e02c3e85a881e83208422d72d734351ca1 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index c91c92707e060826c9e3fa5ed751de6a4fe248ff..a6551f91527003bf5e57f6aa06dc346da43298e9 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
diff --git a/units/systemd-oomd.service.in b/units/systemd-oomd.service.in
new file mode 100644 (file)
index 0000000..fd7c8d2
--- /dev/null
@@ -0,0 +1,54 @@
+#  SPDX-License-Identifier: LGPL-2.1-or-later
+#
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Userspace Out-Of-Memory (OOM) Killer
+Documentation=man:systemd-oomd.service(8)
+DefaultDependencies=no
+Before=multi-user.target shutdown.target
+Conflicts=shutdown.target
+
+[Service]
+AmbientCapabilities=CAP_KILL CAP_DAC_OVERRIDE
+BusName=org.freedesktop.oom1
+CapabilityBoundingSet=CAP_KILL CAP_DAC_OVERRIDE
+ExecStart=@rootlibexecdir@/systemd-oomd
+IPAddressDeny=any
+LockPersonality=yes
+MemoryDenyWriteExecute=yes
+# Reserve some minimum amount of memory so that systemd-oomd can continue to
+# run in resource starved scenarios.
+MemoryMin=64M
+MemoryLow=64M
+NoNewPrivileges=yes
+OOMScoreAdjust=-900
+PrivateDevices=yes
+PrivateTmp=yes
+ProtectClock=yes
+ProtectHome=yes
+ProtectHostname=yes
+ProtectKernelLogs=yes
+ProtectKernelModules=yes
+ProtectKernelTunables=yes
+ProtectSystem=strict
+Restart=on-failure
+RestrictAddressFamilies=AF_UNIX
+RestrictNamespaces=yes
+RestrictRealtime=yes
+RestrictSUIDSGID=yes
+SystemCallArchitectures=native
+SystemCallErrorNumber=EPERM
+SystemCallFilter=@system-service
+Type=notify
+User=systemd-oom
+@SERVICE_WATCHDOG@
+
+[Install]
+WantedBy=multi-user.target
+Alias=dbus-org.freedesktop.oom1.service
index 3051fbd3d07bf315b776f6d697dbb3f4226c0c36..e00a0065e3928a845d1cf5acb5dd721b6780ad83 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 8d1d54389b9984760e560c7452031b53646507c7..bb2ddb0e7391c8e519d3572fd31f3ae42904dc84 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 6e4827f03c8632f990a3ded3a5cb7649ff26619d..624ee704d53fe7c4070d8fd6b606a7f2440e708b 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 244da0a30718902c3903d1aba18fe17c25448777..3e10378a89e362f4b14ebdc7e91780fdf0efe416 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index f97f99a966aa6edec4316438313d6893ce1dbf62..a7d4acb898ef7e7d9b279123e520adaefe8afd64 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
@@ -14,7 +14,8 @@ DefaultDependencies=no
 RequiresMountsFor=@RANDOM_SEED@
 Conflicts=shutdown.target
 After=systemd-remount-fs.service
-Before=shutdown.target
+Before=first-boot-complete.target shutdown.target
+Wants=first-boot-complete.target
 ConditionVirtualization=!container
 
 [Service]
index 505f60aabf026a1bccc1fb3c982d9fd4886de334..b50a792b0e1744d4a1b148ae89f782c6ea002499 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 4f4304d68e208017885e118eddfe0a546c0d5885..51985a793aad5ce9689f29d75f9efc8f0f436a79 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 9393a64f001f8bfa70503e5f16d79b16e5d22bcf..a5565834ebbe3129e6feb71ad579ebab0abbb1a7 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 513d96b74cfa356a1dc9880fddab45bd1f0b0e59..29adb6bf219b46693020070db6eb4b63604d214e 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index af2042f1e515afbaf71918d0961f6ec3fb42be50..40a80a0b39f0fa36b72c5dd8ca46b86a7f016396 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 9d408903bb3a84b388fcd11b04d7509abcf26d32..4ca8d6fc04d963de5e9e4392284582eced08e629 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 5d6a58273021b27a4f3372966e44b2365c5385b8..3f811e7e1a4f9418cde8511c5a4f0d553ce5c48e 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 11ed383ba9790c6d7df159c7c57de04d36e73437..40cc83e1929743b493075616d5f98b5dd606170c 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 5b0f7f9df4d1fa36d32072c97fa22ebd737ff742..c4a34a81a2095ae755a8bff7d66df917b2d49140 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index da05e0eb1bbe9cb07c0968086ad91c4fda9f9729..ff5b3db82138f70bd5a2c7d45b3e8dba42603fc2 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 475182d6bc4b84a108aa7341fcdac0130cba48c7..212d0e5a1555d1f7cf38187c479cdce2f6af530f 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index f84bd3830b7365f7617b9235df5c3f498c44f787..6f476173b664ecd59943bdc21c5754088a0b47b3 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 08ddb141ba6728882aa398c29d5c05250359915a..62120d819088329bdb0ca10058dee12934caea6f 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index f20bb143ef7a99dded415e8cb24437fbb25fcfc9..e962954f06c0baaa2bc1f47ea51904ceaabb6c47 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 3e3017820fea34e326cd3ec4a1c8586cf527f465..6c6cfe7a08403c070e6b1baa0a943021bc088643 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 1027823859e5974167959cf01d95b71567d6286d..0babe78767a420b78fe77054099dd448fb0fe68b 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 29799ee81caa3cee7542f0027835a3f2fa626263..3f028d25337770ed6bb25b6e1228106bf80037c5 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 9352c6f59890388669fbc7a84ea11048fce49025..994c47fce4b5d3bc0f9c0bd78704c2398a148411 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index cfe8d61c2aff83162e5fb7a911f4d453cfe985a4..8b2d88e1859e13463e56deeca4176cbec4bdedda 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 5b8628c754abddb4da0284b4ab0ca21d446f26ec..a9d5a4d8ca1dd877d92ccafd5ea1d6fc53cf9313 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index b2a65f1a84eb44f40fcd395e0e7761759f0d4a41..f636aebff8211ea98f92a457ce6236eb6f94963b 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 9ada3a6a7418c7a5ab3338896d150a9514afd789..f3458d98e6ce65684a2e345d0d65dbb787aacae3 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
@@ -19,7 +19,7 @@ ConditionPathIsReadWrite=/sys
 DeviceAllow=block-* rwm
 DeviceAllow=char-* rwm
 Type=notify
-# Note that udev also adjusts the OOM score internally and will reset the value internally for its workers
+# Note that udev will reset the value internally for its workers
 OOMScoreAdjust=-1000
 Sockets=systemd-udevd-control.socket systemd-udevd-kernel.socket
 Restart=always
index 6e82ec7474be7bf92c750605f819139bd24efac5..b4aa746673156562a0b7bb07a178c30de54b71f1 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 642d926a316cee742eae717a1a1d57c42c47e2c7..042145cc2cad194933c4e754f8a1bb01d550f7ae 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index b9a668faeb4225e2430e37eceb1db7beb77c3f96..e2fa2d83bab1baf5c00ec8d5d140d433551f3443 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 13de728b1dba361e2bea1475bfc46aec18b7d17a..b15a651682686dcbfc5f954356dbfb5c3b5396b3 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index bbfd83a8f29f5b391ac9944fb977599bea62db5e..9b36a170253c8d5e9825abfe932a68c0b436a3bd 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 2b4bb7a87a5ee446e6ab322b9053a97c16a5cc91..50235dd1ef2851fb22427d5e1659ad5cfa90cf90 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 9042521c9d736f2a442ef62e3f44c232b80288e6..45da05639598d2942b9e300eea5f2abcc5f92305 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index a39e9a4ec2d557034c2488b6ffa5b3b57d2e083b..5ecc702b6d109c3dbe7f04ef7bf40f300dd9b839 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 6b4003352989a46dccb9f9963e162b8f43f0392f..daac8ef04e5ed066da25a17d0e0d7a040e589560 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 9106502e8becf12f820e4ac492f06ecd27339a62..e730bbdbb150e967310db5eae623c5eca2879c66 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index b1aa8c797ccdb3124e53b63a6f40f2e3fa595357..99f82e3b809e149e0a375dbdd30903cb018e9673 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index cf6837852fc2f930ed50e0fe339ecdcf513c9e3a..a8e58516328a9ec2bd8d46b2e0d251f16bc84ba3 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 54fa5aebf271d0aca9ea0ed63d72e7522fb091eb..319b5033cb8478accdc0e1ccd902937423def01f 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index c666683a98a65c73147143851ded7628e702bb54..46de5b8d6284047979a41486a11e01cd45f7a25b 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index c81a00e0502fc82e4eff1876d8a06be99933420c..cb3651b728d245fc79c2d13eb4f0080323cd71e0 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index c168b89f9859247278a946b04d8fe4bcca264bc3..ff23e01af8fe4ba7e7300648a62eeceb31d3e344 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 3f2d98fcdf61a2d0c1c2a14dc6a104d7508fde83..3e4906411d8ea79fffeb8553e2c891eded8c789a 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
diff --git a/units/user/app.slice b/units/user/app.slice
new file mode 100644 (file)
index 0000000..0c73135
--- /dev/null
@@ -0,0 +1,12 @@
+#  SPDX-License-Identifier: LGPL-2.1-or-later
+#
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=User Application Slice
+Documentation=man:systemd.special(7)
diff --git a/units/user/background.slice b/units/user/background.slice
new file mode 100644 (file)
index 0000000..8f2a094
--- /dev/null
@@ -0,0 +1,12 @@
+#  SPDX-License-Identifier: LGPL-2.1-or-later
+#
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=User Background Tasks Slice
+Documentation=man:systemd.special(7)
index 1ae8275c80df8fec9353731079286d77e2cb93f4..6c79304c59f60a12cf2b906d54c77423b99ae0b0 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 62407d363e4ab4af3b368593ea9c5a7643399fde..8333c2332fc8f5f0c2b5077d8e99a48a95a848d7 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index c50638c91832f891932b59b1fcb3a7228e85f1ba..b1824313da2001dbe35b46c851bf7ef2b4776ca0 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 11a6f8eabe698a72e5ed0ade0903ac111f5eabe1..ec2dde2b8eb03bc46e7b2c82bf24414100a663bb 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 3adfc5aaa48af5744a4c4f0c33c4e9a5ae9f6ae9..4b9e3dc67fb9be132bc66f4d3f656b8368438e3a 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index a38eaabbc419446b9446aae5b354e8e6ad26bc98..1f8fafcbe97cb1966e3e64b1a201cad87e21cb8c 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 33732e7d59bac2ad597426ee5afd1772adcd3466..337a92092dbed68be398822feeef0abb31cc2594 100644 (file)
@@ -1,6 +1,8 @@
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 
 units = [
+        'app.slice',
+        'background.slice',
         'basic.target',
         'bluetooth.target',
         'default.target',
@@ -9,6 +11,7 @@ units = [
         'graphical-session.target',
         'paths.target',
         'printer.target',
+        'session.slice',
         'shutdown.target',
         'smartcard.target',
         'sockets.target',
index 9b6ed1c13feec452f236b8314fea492b89d62337..1bec148bee8a794be1eedec909a29484d4052fd6 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index e1fb0d4e347573397b6feae24ccd41cf88470e86..c695669c5cc9e46e83914254f283ca45ef0ed11f 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
diff --git a/units/user/session.slice b/units/user/session.slice
new file mode 100644 (file)
index 0000000..3d99d51
--- /dev/null
@@ -0,0 +1,12 @@
+#  SPDX-License-Identifier: LGPL-2.1-or-later
+#
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=User Core Session Slice
+Documentation=man:systemd.special(7)
index d48e6d6494275b02b606f4265d9fc6414b3eb048..582ae6ba275ee71461e29150239d27c7b4ec8ebd 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 717ea2311dfcce6709f58984a8d8bece9c5b601e..0c3fe7210e20f00a2ef2485df6c3329dc6ecf4a9 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 9af67fdb1faaf729249f3d989c02714d4633c429..c6e20d77609fb4f0b1c056b5c01f5cd859f62bee 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 19afc2a63735118a005930f2192b454d85ee3ef4..99e68af008920420308413c24566b426269c9a7e 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 1d3b61e3ab1e74d7d42dbc73f1db1c2dc1b4d949..18725253bb37a6b35b38b5988fb452cd59906a4b 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
@@ -14,3 +14,7 @@ DefaultDependencies=no
 Requires=shutdown.target
 After=shutdown.target
 SuccessAction=exit-force
+
+[Service]
+# Place into the root slice to not keep another slice unit alive
+Slice=-.slice
index 3be0de5f7ddfcd1b4b80ef8de8c67a41e5dc4b0e..6a937071f762dbc04bb0f57215aa6740fb9d500b 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
@@ -19,3 +19,4 @@ Type=oneshot
 ExecStart=systemd-tmpfiles --user --clean
 SuccessExitStatus=DATAERR
 IOSchedulingClass=idle
+Slice=background.slice
index d1dbad98de5bbe2130e415d15086bf9a4d392c71..f8f6ef4ab97888bb688f84f8195ce6c6c5ed7f12 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index c4b29cbe8ce381cd331e62b2ba5d19c5df47ad9b..156689edcd8655db35db3b32c9005d514b4fe6af 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index b1aa8c797ccdb3124e53b63a6f40f2e3fa595357..99f82e3b809e149e0a375dbdd30903cb018e9673 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 22df5a35d3fa376b6ac4d365542a36e97460e914..1be7c4b8600f7166fcc4f0a1bb831593f33c4934 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index ace24369ddd3c6f95b3cea8f44f3fe30dec94548..8c6c6d1157ccac04834dc4b48e04cb95675b3484 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #
index 3658199cc7e2813ead2252e99df193f8b356c5de..82ebfa5245776508efa59a924f75a853583d5a7a 100644 (file)
@@ -1,4 +1,4 @@
-#  SPDX-License-Identifier: LGPL-2.1+
+#  SPDX-License-Identifier: LGPL-2.1-or-later
 #
 #  This file is part of systemd.
 #