summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* rpm: expose $systemd_util_dir also as rpm macroZbigniew Jędrzejewski-Szmek2021-01-151-0/+1
| | | | | | | | | | | | | This variable (a.k.a. rootlibexecdir), was exposed through the .pc file, but not as rpm macro. The .pc file must be located in the package that provides libraries, which pulls in a lot of dependencies. In Fedora, the macros are split out to a separate package so that other packages which need to refer to some systemd path but don't otherwise require it, can only pull in the (much smaller and dependency-less) macros package. zram-generator uses the path to specify the location of systemd-makefs, so by using the rpm macro we'll be able to use a much smaller buildroot.
* fs-util: make laccess() macro follow our usual error propagationLennart Poettering2021-01-151-1/+2
| | | | | | | | | | | | Functions defined by us are supposed to return negative errno-style errors on errors. laccess() is for access() what lstat() is for stat(), but defined by us as a macro. This led to some confusion regarding error handling. Let's return a negative errno code just in case. This means callers can it use either way: like access(), i.e. checking for a negative return value + looking at errno, or like our own code, i.e. using the negative errno code it returns.
* Merge pull request #18254 from keszybz/trivial-cleanupsLuca Boccassi2021-01-152-38/+14
|\ | | | | Assorted small cleanups
| * basic/env-util: modernizationZbigniew Jędrzejewski-Szmek2021-01-151-10/+5
| |
| * nspawn: minor modernizationZbigniew Jędrzejewski-Szmek2021-01-151-28/+9
| |
* | Merge pull request #18244 from anitazha/systemctleditZbigniew Jędrzejewski-Szmek2021-01-151-6/+2
|\ \ | |/ |/| systemctl-edit fixes
| * systemctl-edit: Add missing ret_dropin_paths argument in retry pathAnita Zhang2021-01-141-1/+1
| | | | | | | | | | | | find_paths_to_edit() makes 2 calls to unit_find_paths(), one of which is a retry client-side. ret_dropin_paths should be passed the same in both cases.
| * systemctl-edit: fix abort in find_paths_to_edit()Anita Zhang2021-01-141-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After 85c5d313b5c92115f5c77663e736bcf21e99f02f, if you, for example, create a drop-in for -.slice without a corresponding -.slice file, you will get the following: # put some valid stuff in /etc/systemd/system/-.slice.d/override.conf [root@image ~]# systemctl daemon-reload [root@image ~]# systemctl edit -- -.slice Assertion 'path' failed at src/systemctl/systemctl-edit.c:425, function find_paths_to_edit(). Aborting. Aborted The aforementioned commit sets the ret_dropin_paths argument for unit_find_paths(). Thus, unit_find_paths() returns 1 in the example above because it finds a relevant drop-in. However find_paths_to_edit() was written to expect 1 only if the unit file itself exists (it does not in this example). To make this behave more like the version of `systemctl edit` prior to this commit, add an additional check so the code enters the "unit file not found" code branch.
* | Merge pull request #18124 from ryncsn/initrdLennart Poettering2021-01-151-10/+39
|\ \ | | | | | | initrd: add an env variable to accept non-ramfs rootfs
| * | initrd: do a debug log if /etc/initrd-release doesn't take effectKairui Song2021-01-141-2/+11
| | | | | | | | | | | | Signed-off-by: Kairui Song <kasong@redhat.com>
| * | initrd: do a debug log if failed to detect rootfs typeKairui Song2021-01-141-2/+10
| | |
| * | initrd: extend SYSTEMD_IN_INITRD to accept non-ramfs rootfsKairui Song2021-01-141-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes, non-ramfs initrd root are useful. Eg, for kdump, because initramfs is memory consuming, so mount a compressed image in earlier initrd, chroot into it then let systemd do the rest of job is a good solution. But systemd doesn't recognize the initrd environment if rootfs is not a temporary fs. This is a reasonable check, because switch-root in initrd will wipe the whole rootfs, will be a disaster if there are any misdetect. So extend SYSTEMD_IN_INITRD environment variable, now it accepts boolean value and two extra keyword, "auto" and "lenient". "auto" is same as before, and it's the default value. "lenient" will let systemd bypass the rootfs check.
| * | util: rework in_initrd() to make use of path_is_temporary_fs()Kairui Song2021-01-131-3/+1
| | |
* | | Add truncate: to StandardOutput= etc.Lucas Werkmeister2021-01-156-12/+49
| | | | | | | | | | | | | | | | | | This adds the ability to specify truncate:PATH for StandardOutput= and StandardError=, similar to the existing append:PATH. The code is mostly copied from the related append: code. Fixes #8983.
* | | systemctl: unit_file_find_fragment() doesn't log about errors, hence do it ↵Lennart Poettering2021-01-141-1/+1
| | | | | | | | | | | | in the caller
* | | systemctl: explicitly comment two cases where we don't log on error cases, ↵Lennart Poettering2021-01-141-3/+6
| | | | | | | | | | | | on purpose
* | | systemctl: properly initialize return params in all success casesLennart Poettering2021-01-141-2/+2
| | |
* | | unit-file: downgrade log message to debugLennart Poettering2021-01-141-1/+1
| | | | | | | | | | | | | | | | | | In the other error paths unit_file_find_fragment() doesn't log beyond debug level, i.e. is of the non-logging library-like kind. Make sure this error path is handled the same, so that the caller can log.
* | | unit-file: fix indentationLennart Poettering2021-01-141-1/+1
| | |
* | | Merge pull request #18226 from mrc0mmand/actions-flake-workaroundsLuca Boccassi2021-01-141-2/+2
|\ \ \ | | | | | | | | ci: assorted workarounds for recent flakes
| * | | ci: skip test-execute on GH Actions under ASanFrantisek Sumsal2021-01-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems to suffer from the same issue as on Travis CI, where the test randomly fails due to timeouts in its subtests. See: https://github.com/systemd/systemd/issues/10696#issuecomment-758501797
* | | | Add install-sysconfdir=no-samples option for (non-)installation of sample ↵Josh Triplett2021-01-1412-12/+12
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | configs By default, systemd installs various sample configuration files containing commented-out defaults. Systems seeking to minimize the number of files in /etc may wish to install directories and configuration files that have semantic effects, but not install not commented-out sample configuration files. Turn install-sysconfdir into a multi-valued option, with a "no-samples" value to skip installing sample-only configuration files.
* | | udev: add missing short option nameYu Watanabe2021-01-131-2/+2
| | | | | | | | | | | | | | | | | | Follow-up for 4fcc033b5476039a7a8030e1edc261d42cec028b. Fixes CID#1442307.
* | | Merge pull request #18227 from yuwata/network-dhcp6-pd-manage-temporary-addressLennart Poettering2021-01-134-11/+20
|\ \ \ | | | | | | | | network: introduce ManageTemporaryAddress= setting in [DHCPv6PrefixDelegation] section
| * | | network: introduce ManageTemporaryAddress= setting in ↵Yu Watanabe2021-01-144-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [DHCPv6PrefixDelegation] section The setting is enabled by default, as NDisc also enabled the flag by default. Closes #18208.
| * | | network: drop a function argument which is always constantYu Watanabe2021-01-141-11/+16
| | | |
* | | | Merge pull request #9864 from ximion/masterYu Watanabe2021-01-145-4/+280
|\ \ \ \ | | | | | | | | | | localed: Run locale-gen if available to generate missing locale
| * | | | localed: Run locale-gen if available to generate missing localeMatthias Klumpp2021-01-124-4/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change improves integration with distributions using locale-gen to generate missing locale on-demand, like Debian-based distributions (Debian/Ubuntu/PureOS/Tanglu/...) and Arch Linux. We only ever enable new locales for generation, and never disable them. Furthermore, we only generate UTF-8 locale. This feature is only used if explicitly enabled at compile-time, and will also be inert at runtime if the locale-gen binary is missing.
| * | | | Add helper for case-independent string equality checksMatthias Klumpp2021-01-121-0/+4
| | | | |
* | | | | Merge pull request #18170 from OnkelUlla/udev_introduce_TxQueueLen=_settingYu Watanabe2021-01-145-8/+53
|\ \ \ \ \ | |_|/ / / |/| | | | udev: introduce TxQueueLength= setting
| * | | | udev: introduce TxQueueLength= settingUlrich Ölmann2021-01-135-9/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable udev to set the transmit queue length of a device via a new directive to be used in link files. The kernel stores this parameter as an unsigned 32 bit integer. As typical values currently range in the order of 10 to a few 10,000 packets reduce the domain of valid values for this directive to 0..4294967294 and take the excluded 4294967295 == UINT32_MAX to indicate that the directive is unset.
| * | | | link-config: amend log message for failed application of settingsUlrich Ölmann2021-01-131-1/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | This has been forgotten in pull request #17628 ("udev: Add support to configure Generic Segment Offload"), see [1]. [1] https://github.com/systemd/systemd/pull/17628
* | | | Added option --check-inhibitors for non-tty usageFelix Stupp2021-01-133-10/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As described in #2680, systemctl did ignore inhibitors if it is not attached to a tty to allow scripts to ignore inhibitors automatically. This pull request preserves this behavior but allows scripts to explicit check inhibitors if required. The new parameter '--check-inhibitors=yes' enables this feature. The old parameter '-i'/'--ignore-inhibitors' was deprecated in favor of '--check-inhibitors=no', the default behaviour can be specified with '--check-inhibitors=auto'. The new parameter is also described in the documentations and shell completions found here.
* | | | Merge pull request #18225 from poettering/tmpfiles-argumentYu Watanabe2021-01-132-7/+8
|\ \ \ \ | |/ / / |/| | | tmpfiles: fix documentation about quoting the "argument" field in tmpfiles.d snippets
| * | | tmpfiles: add ANSI highlighting to our help textLennart Poettering2021-01-121-2/+4
| | | | | | | | | | | | | | | | As it is common now in our tools.
| * | | extract-word: don't rely on C's downgrade-to-bool feature for charsLennart Poettering2021-01-121-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | The `quote` char variable ectually contains a character, not a pointer or boolean. hence do an explicit comparison rather than rely on C's downgrade to bool feature, as per our coding style.
* | | | network: reconfigure interface when wifi iftype is updatedYu Watanabe2021-01-131-5/+11
| |/ / |/| | | | | | | | | | | | | | Follow-up for a66a402da471f6230ab8674fd2c1df6d918773b5. Fixes #18059.
* | | import: mangle untarred OS images after pull-tar, tooLennart Poettering2021-01-121-3/+6
|/ / | | | | | | | | | | | | We do this for import-tar and import-fs, we should do it for pull-tar, too. Fixes: #17563
* | Merge pull request #18216 from yuwata/dhcp-user-class-lengthYu Watanabe2021-01-1311-117/+78
|\ \ | | | | | | dhcp: length of each user class field must be positive
| * | network: merge config_parse_dhcp_user_class() and _vendor_class()Yu Watanabe2021-01-133-58/+7
| | |
| * | dhcp6: refuse zero length vendor classYu Watanabe2021-01-134-15/+19
| | | | | | | | | | | | | | | Also, fixes the maximum length of the vendor class to UINT16_MAX. Moreover, a memory leak in sd_dhcp6_client_set_request_vendor_class().
| * | dhcp6: add an assert()Yu Watanabe2021-01-131-2/+1
| | |
| * | dhcp: do not assign value twiceYu Watanabe2021-01-131-4/+4
| | |
| * | dhcp6: refuse zero length dhcp user classYu Watanabe2021-01-134-17/+20
| | | | | | | | | | | | | | | This also fixes a memory leak when sd_dhcp6_client_set_request_user_class() is called multiple times.
| * | network: refuse zero length dhcp user classYu Watanabe2021-01-131-5/+5
| | |
| * | dhcp: length of each user class field must be positiveYu Watanabe2021-01-134-16/+22
| |/ | | | | | | | | This also fixes an memory leak when sd_dhcp_client_set_user_class() is called multiple times.
* | Merge pull request #18157 from ssahani/vlan-qosYu Watanabe2021-01-134-5/+153
|\ \ | | | | | | network: Allow to configure VLan egress qos maps
| * | network: Allow to configure VLan egress qos mapsSusant Sahani2021-01-123-0/+21
| | |
| * | network: Allow to configure VLan egress qos mapsSusant Sahani2021-01-123-0/+120
| | |
| * | sd-netlink: Add VLan QOS map propertiesSusant Sahani2021-01-111-5/+12
| | |