summaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* basic/cap-list: parse/print numerical capabilitiesZbigniew Jędrzejewski-Szmek2020-07-102-4/+10
| | | | | | | | | | | | | | | | | | | We would refuse to print capabilities which were didn't have a name for. The kernel adds new capabilities from time to time, most recently cap_bpf. 'systmectl show -p CapabilityBoundingSet ...' would fail with "Failed to parse bus message: Invalid argument" because capability_set_to_string_alloc() would fail with -EINVAL. So let's print such capabilities in hexadecimal: CapabilityBoundingSet=cap_chown cap_dac_override cap_dac_read_search cap_fowner cap_fsetid cap_kill cap_setgid cap_setuid cap_setpcap cap_linux_immutable cap_net_bind_service cap_net_broadcast cap_net_admin cap_net_raw cap_ipc_lock cap_ipc_owner 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a ... For symmetry, also allow capabilities that we don't know to be specified. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1853736.
* userdb: fix dlopen callZbigniew Jędrzejewski-Szmek2020-07-091-1/+1
| | | | | The call would always fail with: systemd-userwork[780]: Failed to dlopen(libnss_systemd.so.2), ignoring: /usr/lib64libnss_systemd.so.2: cannot open shared object file: No such file or directory
* Merge pull request #15891 from bluca/host_os_releaseZbigniew Jędrzejewski-Szmek2020-07-089-83/+121
|\ | | | | Container Interface: expose the host's os-release metadata to nspawn and portable guests
| * portabled: implement container host os-release interfaceLuca Boccassi2020-06-231-0/+1
| |
| * nspawn: implement container host os-release interfaceLuca Boccassi2020-06-235-14/+80
| |
| * nspawn: use mkdir_p_safe instead of homegrown versionLuca Boccassi2020-06-231-54/+2
| |
| * basic/mkdir: introduce safe recursive variantsLuca Boccassi2020-06-233-16/+39
| | | | | | | | Add mkdir_p_safe and mkdir_parents_safe. Will be used by nspawn.
* | Merge pull request #16405 from sipraga/masterZbigniew Jędrzejewski-Szmek2020-07-086-0/+57
|\ \
| * | network: add support for MACVLAN source modeAlvin Šipraga2020-07-086-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for creating a MACVLAN interface in "source" mode by specifying Mode=source in the [MACVLAN] section of a .netdev file. A list of allowed MAC addresses for the corresponding MACVLAN can also be specified with the SourceMACAddress= option of the [MACVLAN] section. An example .netdev file: [NetDev] Name=macvlan0 Kind=macvlan MACAddress=02:DE:AD:BE:EF:00 [MACVLAN] Mode=source SourceMACAddress=02:AB:AB:AB:AB:01 02:CD:CD:CD:CD:01 SourceMACAddress=02:EF:EF:EF:EF:01 The same keys can also be specified in [MACVTAP] for MACVTAP kinds of interfaces, with the same semantics.
* | | Merge pull request #15955 from anitazha/nulloremptyZbigniew Jędrzejewski-Szmek2020-07-083-10/+41
|\ \ \ | |/ / |/| | core: check null_or_empty_path for masked units instead of /dev/null
| * | shared/install: do not require /dev/null to be present in chrootsZbigniew Jędrzejewski-Szmek2020-07-052-11/+17
| | | | | | | | | | | | | | | | | | | | | This partially undoes the parent commit. We follow the symlink and if it appears to be a symlink to /dev/null, even if /dev/null is not present, we treat it as such. The addition of creation of /dev/null in the test is reverted.
| * | core: check null_or_empty for masked units instead of /dev/nullAnita Zhang2020-07-033-10/+35
| | | | | | | | | | | | | | | | | | | | | | | | There's some inconsistency in the what is considered a masked unit: some places (i.e. load-fragment.c) use `null_or_empty()` while others check if the file path is symlinked to "/dev/null". Since the latter doesn't account for things like non-absolute symlinks to "/dev/null", this commit switches the check for "/dev/null" to use `null_or_empty_path()`
* | | Merge pull request #16385 from JackFangXN/masterLennart Poettering2020-07-0814-29/+35
|\ \ \ | | | | | | | | table add table_log_xx_error()
| * | | table use table_log_print_error() instead of table_log_show_errorfangxiuning2020-07-0814-26/+26
| | | |
| * | | table add table_log_sort_error()fangxiuning2020-07-086-5/+8
| | | |
| * | | table add table_log_show_error()fangxiuning2020-07-0810-14/+17
| | | |
* | | | sd-device: use log_device_debug_errno()Yu Watanabe2020-07-081-1/+1
| | | |
* | | | Merge pull request #16379 from ↵Yu Watanabe2020-07-083-5/+27
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | yuwata/network-dhcp6-delegated-prefix-address-handler network: fix assertion in assigning dhcp6 delegated prefix
| * | | | network: make address_handler() staticYu Watanabe2020-07-072-2/+1
| | | | |
| * | | | network: introduce own address handler for dhcp6 delegated prefixYu Watanabe2020-07-071-3/+26
| | | | | | | | | | | | | | | | | | | | Fixes #16365.
* | | | | Merge pull request #16143 from fbuihuu/fstab-generator-fixZbigniew Jędrzejewski-Szmek2020-07-071-29/+26
|\ \ \ \ \ | | | | | | | | | | | | fstab-generator: make sure explicit deps configured via mount options apply to .mount, not .automount unit
| * | | | | fstab-generator: introduce an helper to write extra dependencies specified ↵Franck Bui2020-07-011-14/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | via the mount options No functional change.
| * | | | | fstab-generator: extra dependencies specified in fstab should be applied to ↵Franck Bui2020-07-011-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the mount unit If an entry in fstab uses "x-systemd.automount" option and also asks for additionnal dependencies via x-systemd.requires or such, then the dependencies were applied to the automount unit. But this unlikely to do the right thing and is inconsistent with what's done for network mounts. Indeed when an fstab entries has "_netdev,x-systemd.automount" options, the dependencies against the network requested by "_netdev" are (correctly) applied to the mount unit only and the automount unit remains ordered against local-fs.target. The same logic should be followed when extra deps are specified via the mount options as automount units should always be ordered against local-fs.target. Note: in general explicit deps specified via mount options should be used with care and should be used to specify dependencies on other mount units only as it can easily create ordering cycles otherwise like it's been seen in https://github.com/systemd/systemd-stable/issues/69. Mount units (as well as automount ones) are ordered before local-fs.target by default which is a low-level target that most other units depend on.
* | | | | | add error message when bind mount src missingAlan Perry2020-07-072-5/+8
| | | | | |
* | | | | | Merge pull request #16301 from poettering/firstboot-imageZbigniew Jędrzejewski-Szmek2020-07-078-25/+163
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add --image= switch to firstboot, similar to --root= but with support for operating on disk image
| * | | | | | firstboot: add option to turn off welcome text displayLennart Poettering2020-07-071-0/+15
| | | | | | |
| * | | | | | firstboot: add --image= switchLennart Poettering2020-07-071-6/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is like --root=, but takes an image file path or device node path and dissects the image directly, mounting it internally.
| * | | | | | mount-util: use UMOUNT_NOFOLLOW in recursive umounterLennart Poettering2020-07-071-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we only want to unmount mount points below some path then it is against our interest to follow symlinks. Hence don't.
| * | | | | | mount-util: add destructor helper that umounts + rmdirs a pathLennart Poettering2020-07-071-0/+11
| | | | | | |
| * | | | | | namespace-util: introduce helper for combining unshare() + MS_SLAVE remountLennart Poettering2020-07-075-16/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have multiple places we do these two non-trivial operations together, let's introduce a unified helper for doing both at once.
* | | | | | | Merge pull request #16388 from keszybz/xdg-desktop-fuzz-caseZbigniew Jędrzejewski-Szmek2020-07-073-29/+56
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | xdg-desktop fuzz case
| * | | | | | | xdg-autostart: ignore all empty entries in multi-string entriesZbigniew Jędrzejewski-Szmek2020-07-072-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The desktop file specification allows entries like ";;;;;;", full of empty strings. But looking at the actual list of supported keys [1], empty entries are meaningless (unless we would allow e.g. the desktop name to be the empty string. But that doesn't seem very useful either). So let's just simplify our life and skip any empty substrings entirely. This would also resolve the fuzzer case: $ valgrind build/fuzz-xdg-desktop test/fuzz/fuzz-xdg-desktop/oss-fuzz-22812 test/fuzz/fuzz-xdg-desktop/oss-fuzz-22812... ok ==2899241== HEAP SUMMARY: ==2899241== in use at exit: 0 bytes in 0 blocks ==2899241== total heap usage: 484,385 allocs, 484,385 frees, 12,411,330 bytes allocated ↓ ==2899650== HEAP SUMMARY: ==2899650== in use at exit: 0 bytes in 0 blocks ==2899650== total heap usage: 1,325 allocs, 1,325 frees, 1,463,602 bytes allocated
| * | | | | | | xdg-autostart: avoid quadratic behaviour in strv parsingZbigniew Jędrzejewski-Szmek2020-07-071-20/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fuzzer test case has a giant line with ";;;;;;;;;;;..." which is turned into a strv of empty strings. Unfortunately, when pushing each string, strv_push() needs to walk the whole array, which leads to quadratic behaviour. So let's use greedy_allocation here and also keep location in the string to avoid iterating. build/fuzz-xdg-desktop test/fuzz/fuzz-xdg-desktop/oss-fuzz-22812 51.10s user 0.01s system 99% cpu 51.295 total ↓ build/fuzz-xdg-desktop test/fuzz/fuzz-xdg-desktop/oss-fuzz-22812 0.07s user 0.01s system 96% cpu 0.083 total Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22812. Other minor changes: - say "was already defined" instead of "defined multiple times" to make it clear that we're ignoring this second definition, and not all definitions of the key - unescaping needs to be done also for the last entry
| * | | | | | | sleep: one spelling unificationZbigniew Jędrzejewski-Szmek2020-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use "writable" everywhere else.
* | | | | | | | journald: minor wording tweak in messageZbigniew Jędrzejewski-Szmek2020-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a user "from the kernel" might be rather unclear.
* | | | | | | | tree-wide: more repeated wordsZbigniew Jędrzejewski-Szmek2020-07-074-6/+6
| | | | | | | |
* | | | | | | | journal/compress: drop "future" code in zstd compressionZbigniew Jędrzejewski-Szmek2020-07-071-7/+0
| |_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We generally don't include stuff that is not used. This can be easily ressurected if ever needed. Fixes CID#1430210.
* | | | | | | networkd: use capitalized "IP" and "TOS" in messagesZbigniew Jędrzejewski-Szmek2020-07-073-16/+16
| | | | | | |
* | | | | | | all: fix minor typosYuri Chornoivan2020-07-076-6/+6
| |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | [thaller@redhat.com: original patch by Yuri, extracted from [1]] [1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/565
* | | | | | core: refresh unit cache when building a transaction if UNIT_NOT_FOUNDLuca Boccassi2020-07-073-5/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a command asks to load a unit directly and it is in state UNIT_NOT_FOUND, and the cache is outdated, we refresh it and attempto to load again. Use the same logic when building up a transaction and a dependency in UNIT_NOT_FOUND state is encountered. Update the unit test to exercise this code path.
* | | | | | Merge pull request #16380 from yuwata/network-dhcp6-update-prefix-routeZbigniew Jędrzejewski-Szmek2020-07-071-37/+15
|\ \ \ \ \ \ | | | | | | | | | | | | | | Network: update acquired dhcp6 prefix routes
| * | | | | | network: always update acquired prefix routeYu Watanabe2020-07-071-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, routes become lifetime 0. Fixes #16356.
| * | | | | | network: decrease indentation levelYu Watanabe2020-07-071-18/+14
| | | | | | |
| * | | | | | network: fix indentationYu Watanabe2020-07-071-1/+1
| | | | | | |
* | | | | | | Merge pull request #16381 from yuwata/dhcp4-renewingZbigniew Jędrzejewski-Szmek2020-07-071-1/+7
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | dhcp4: fixes around renewing address
| * | | | | | | dhcp4: do not try to renew address when client has no leaseYu Watanabe2020-07-071-1/+4
| | | | | | | |
| * | | | | | | dhcp4: do not renew address if client is not running yetYu Watanabe2020-07-071-0/+3
| |/ / / / / /
* | | | | | | Merge pull request #16383 from yuwata/network-dhcp6-radv-update-prefixZbigniew Jędrzejewski-Szmek2020-07-077-42/+47
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | network: do not restart radv engine when adding prefix
| * | | | | | network: do not restart radv engine when adding prefixYu Watanabe2020-07-073-25/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaces d469cea3bde53bc39317c8b433c825bb4790cbe5.
| * | | | | | network: fix indentationYu Watanabe2020-07-071-2/+1
| | | | | | |