summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* man: document nss-{resolve,myhostname} resolving in the other direction, toov249.2Florian Klink2021-07-232-1/+12
| | | | (cherry picked from commit 946f7ce32cef44d9bfcf2dc594bb193341434f57)
* man: stop recommending putting myhostname after dnsFlorian Klink2021-07-231-10/+6
| | | | | | | | | | | | | | | | | | nss-resolve also looks in /etc/hosts, and has the same local hostname resolving logic as nss-myhostname. We shouldn't recommend another order than nss-resolve uses internally. When nss-resolve is used, there's no possibility to override nss-myhostname hosts via DNS *anyway*. On top of that, it's not a good idea to allow DNS to override local hostnames as all - at least not something we should advertise in the docs. Followup of f918c67d38ba6ccd4eb0dc657f3f3155e5010cae / https://github.com/systemd/systemd/pull/16754. (cherry picked from commit ce266330fc3bd6767451ac3400336cd9acebe9c1)
* pid1: propagate the original command line when reexecutingZbigniew Jędrzejewski-Szmek2021-07-231-10/+53
| | | | | | | | | | | | | | | | | | | | | When we reexec the manager in a container, we lose configuration settings on the kernel command line: $ systemd-nspawn -M rawhide -b systemd.status-unit-format=name systemd.show-status=yes ... # tr '\0' ' ' </proc/1/cmdline /usr/lib/systemd/systemd systemd.status_unit_format=combined systemd.show-status=yes # sudo systemctl daemon-reexec # tr '\0' ' ' </proc/1/cmdline /usr/lib/systemd/systemd --system --deserialize 20 This means that after daemon-reexec, the settings that we gain from the commandline are reset to defaults. So let's reeexecute with the original arguments copied over, modulo some filtering. (cherry picked from commit 846f1da465beda990c1c01346311393f485df467)
* sd-bus: fix missing initializer in SD_BUS_VTABLE_END (#20253)Matthijs van Duin2021-07-231-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When two fields were added to the vtable.x.start struct, no initializers for these were added to SD_BUS_VTABLE_END which also (ab)used that struct (albeit sneakily by using non-designated initialization). While C tolerates this, C++ prohibits these missing initializers, and both g++ and clang++ will complain when using -Wextra. This patch gives SD_BUS_VTABLE_END its own case in the union and clarifies its initialization. I tested the behaviour of g++ 10.2 and clang 11 in various cases. Both will warn (-Wmissing-field-initializers, implied by -Wextra) if you provide initializers for some but not all fields of a struct. Declaring x.end as empty struct or using an empty initializer {} to initialize the union or one of its members is valid C++ but not C, although both gcc and clang accept it without warning (even at -Wall -Wextra -std=c90/c++11) unless you use -pedantic (which requires -std=c99/c++2a to support designated initializers). Interestingly, .x = { .start = { 0, 0, NULL } } is the only initializer I found for the union (among candidates for SD_BUS_VTABLE_END) where gcc doesn't zero-fill it entirely when allocated on stack, it looked like it did in all other cases (I only examined this on 32-bit arm). clang always seems to initialize all bytes of the union. [zjs: test case: $ cat vtable-test.cc #include "sd-bus.h" const sd_bus_vtable vtable[] = { SD_BUS_VTABLE_END }; $ g++ -I src/systemd/ -Wall -Wmissing-field-initializers -c vtable-test.cc vtable-test.cc:5:1: warning: missing initializer for member ‘sd_bus_vtable::<unnamed union>::<unnamed struct>::features’ [-Wmissing-field-initializers] 5 | }; | ^ vtable-test.cc:5:1: warning: missing initializer for member ‘sd_bus_vtable::<unnamed union>::<unnamed struct>::vtable_format_reference’ [-Wmissing-field-initializers] $ clang++ -I src/systemd/ -Wmissing-field-initializers -c vtable-test.cc vtable-test.cc:4:4: warning: missing field 'features' initializer [-Wmissing-field-initializers] SD_BUS_VTABLE_END ^ src/systemd/sd-bus-vtable.h:188:28: note: expanded from macro 'SD_BUS_VTABLE_END' .x = { { 0 } }, \ ^ 1 warning generated. Both warnings are gone with the patch.] (cherry picked from commit 654eaa403070d3c897454a5190603fda4071c3ff)
* hwdb: 60-keyboard::remove hardcoded definition for KEYBOARD_KEY_56 for MSI ↵Aakash Singh2021-07-211-1/+0
| | | | | | Prestige And Modern (cherry picked from commit 30c9faff0d74ceb0cbafb8ecdd8573bc479984dc)
* basic/unit-name: do not use strdupa() on a pathv249.1Zbigniew Jędrzejewski-Szmek2021-07-201-8/+5
| | | | | | | | | | | | | | | | | | | | | The path may have unbounded length, for example through a fuse mount. CVE-2021-33910: attacked controlled alloca() leads to crash in systemd and ultimately a kernel panic. Systemd parses the content of /proc/self/mountinfo and each mountpoint is passed to mount_setup_unit(), which calls unit_name_path_escape() underneath. A local attacker who is able to mount a filesystem with a very long path can crash systemd and the whole system. https://bugzilla.redhat.com/show_bug.cgi?id=1970887 The resulting string length is bounded by UNIT_NAME_MAX, which is 256. But we can't easily check the length after simplification before doing the simplification, which in turns uses a copy of the string we can write to. So we can't reject paths that are too long before doing the duplication. Hence the most obvious solution is to switch back to strdup(), as before 7410616cd9dbbec97cf98d75324da5cda2b2f7a2. (cherry picked from commit 441e0115646d54f080e5c3bb0ba477c892861ab9)
* Minor typo (#20254)rene2021-07-201-1/+1
| | | | | | Correct resoulution with resolution. (cherry picked from commit b838bc11268ea461e8c58ce69e2f781be1821aa1)
* shell-completion/zsh/_systemd-run: Fix completion of command names and argumentsduament2021-07-201-1/+2
| | | | (cherry picked from commit 3f49d1faf59acaa85aa5ad502c39b1a601d58d26)
* man/systemd.network: Fix duplicate Xfrm descriptionRaul Tambre2021-07-201-8/+0
| | | | | | It's already listed along with others (Tunnel, VLAN, etc.) and its description matches those. The duplication was introduced by commit c3006a485c9c35c0ab947479ff1dd7149fda9750. (cherry picked from commit 534b5abce12847abc896fba24cafb99c101a2987)
* shared/format-table: allocate buffer of sufficient sizeZbigniew Jędrzejewski-Szmek2021-07-201-2/+2
| | | | (cherry picked from commit 6dc57047ff0f1f9e98938ffb172dae06e6868b94)
* homed: allow systemd-homed access to FIDO2 devicesGibeom Gwon2021-07-201-0/+1
| | | | | | Add DeviceAllow= option for FIDO2 devices in systemd-homed.service. (cherry picked from commit 85e424c0c852fcb92d108494a6efa9dd0ce943b2)
* systemctl: show error when help for unknown unit is requestedZbigniew Jędrzejewski-Szmek2021-07-201-1/+1
| | | | | | | | | | | | | | Fixes #20189. We would only log at debug level and return failure, which looks like a noop for the user. ('help' accepts multiple arguments and will show multiple concatenated man pages in that case. Actually, it will also show multiple concatenated man pages if the Documentation= setting lists multiple pages. I don't think it's very terribly useful, but, meh, I don't think we can do much better. If a user requests a help for a two services, one known and one unknown, there'll now be a line in the output. It's not very user friendly, but not exactly wrong too.) (cherry picked from commit 75312ada5324d8adae3f3a0ed97f0acfc8b8bde5)
* Updated manpage for sd_bus_set_propertyBen Stockett2021-07-201-6/+3
| | | | | | Updated manpage for sd_bus_set_property and sd_bus_set_propertyv. In the old manpage, these functions included the parameter sd_bus_message **reply when the actual function had no such argument. (cherry picked from commit 4226dfafbac2167e1441a7a65d00c29c5016d4fb)
* Fixed typo (#20187)nassir902021-07-201-2/+2
| | | | | | | | | | * Fixed typo Before, the file claimed that some systemd units are created "from other configuration". It should have read "from other configuration files". Co-authored-by: Nozz <nozolo90@gmail.com> (cherry picked from commit a814eae728a5e238e39d4a9d952ce8e309fa38fd)
* test: strip binaries by defaultFrantisek Sumsal2021-07-201-0/+1
| | | | | | | Since 23f8e01 we always kept binaries unstripped, since $STRIP_BINARIES is unset by default. (cherry picked from commit e68e473ba2d6383155c49337c3c5f2c0d3fb0b5f)
* test: bump the test timeout to give ldconfig.service enough time to finishFrantisek Sumsal2021-07-201-1/+1
| | | | | | | | | | | | | | | | | | Sometimes the ldconfig.service might take a bit longer to finish, causing spurious test timeouts: ``` [ 1025.858923] systemd[24]: ldconfig.service: Executing: /sbin/ldconfig -X ... [ 1043.883620] systemd[1]: ldconfig.service: Main process exited, code=exited, status=0/SUCCESS (success) ... Trying to halt container. Send SIGTERM again to trigger immediate termination. Container TEST-52-HONORFIRSTSHUTDOWN terminated by signal KILL. E: Test timed out after 20s ``` (cherry picked from commit 7fb4ee7aa5b6ffdf2e1e8e50a18630aa30f16505)
* docs: improve wording when mentioning the acronym "ESP"nl67202021-07-205-10/+10
| | | | | | "ESP" is "EFI system partition", so "ESP partition" is redundant. (cherry picked from commit 250db1bf02b9fd73f2e0604acddbc20937c67d19)
* hostnamed: correct variable with errno in fallback_chassisJan Palus2021-07-201-4/+4
| | | | | | | | | fixes assertion failure on arm: systemd-hostnamed[642]: Assertion '(_error) != 0' failed at src/hostname/hostnamed.c:207, function fallback_chassis(). Aborting. (cherry picked from commit 105a4245ff13d588e1e848e8ee3cffd6185bd0ae) (cherry picked from commit 4a44597bdd725f504ebd520b0deef7797dc46daa)
* NEWS: finalize for v249v249Luca Boccassi2021-07-071-1/+1
|
* process-util: explicitly handle processes lacking parents in get_process_ppid()Lennart Poettering2021-07-073-26/+72
| | | | | | | | | | | | | | | Let's make sure we signal out-of-band via an error message if a process doesn't have a parent process whose PID we could return. Otherwise we'll too likely hide errors, as we return an invalid PID 0, which in other contexts has special meaning (i.e. usually "myself"). Replaces: #20153 This is based on work by @dtardon, but goes a different route, by ensuring we propagate a proper error in this case. This modernizes the function in question a bit in other ways, i.e. renames stuff and makes the return parameter optional.
* Merge pull request #20145 from bluca/prepZbigniew Jędrzejewski-Szmek2021-07-0711-1691/+2919
|\ | | | | Preparations for v249
| * man: fix systemd-sleep.conf.xml whitespaceLuca Boccassi2021-07-071-1/+2
| | | | | | | | Follow-up for 33f899bd479534b0a920ce427cdf06739028f5ab
| * NEWS: note new user-visible change, drop 'in spe'Luca Boccassi2021-07-071-2/+3
| |
| * NEWS: update contributors listLuca Boccassi2021-07-071-29/+30
| | | | | | | | | | Added Alexey Rubtsov, Icenowy Zheng, milaq, qhill, Trent Piepho, Hamish Moffatt
| * hwdb: run ninja -C build update-hwdb update-hwdb-autosuspendLuca Boccassi2021-07-079-1659/+2884
| |
* | Revert "Add systemd-resolve backwards compatibility section to resolvectl docs"Lennart Poettering2021-07-072-14/+1
| | | | | | | | This reverts commit 9fcfc0470df856c870dcfc6df78bfbc714da6bd2.
* | meson: install the right README file in modprobe.dZbigniew Jędrzejewski-Szmek2021-07-072-3/+6
| | | | | | | | | | We put the "global" README file there. Introduced in d83e90c73cf25a839f5e60f355baa0d38364ff41.
* | basic/time-util: fix errno nameZbigniew Jędrzejewski-Szmek2021-07-071-1/+1
|/ | | | | Fixup for bdaeafea5dff32ccb479ecf8fe0a3173c995fbf5. This was supposed to be pushed in an updated version, but I forgot to stage the change.
* Clarify the behaviour of suspend-then-sleep mode in the manual pages.Hamish Moffatt2021-07-072-7/+12
| | | | Fixes #20125.
* wait-online: fix typoYu Watanabe2021-07-071-1/+1
|
* NEWS: add old entry about Type=etherZbigniew Jędrzejewski-Szmek2021-07-071-0/+5
| | | | | | | Apparently it's an important feature for some folks: https://utcc.utoronto.ca/\~cks/space/blog/linux/NetworkdMACMatchesWidely. I think we considered this more of a bugfix, but it's somewhere on the border. Let's add this it's easier to discover.
* oomd: don't collect candidate stats on every intervalAnita Zhang2021-07-071-7/+0
| | | | | | | | | cb13961ada52c1b27f6d6c2c6e37a2901f01ed30 updated the oomd logic to collect candidate data when a kill was about to happen. However there was still a call left over in the main loop to collect candidate data on every interval. Remove this since it's unneeded. Fixes #20122
* tmpfiles: fix borked assertZbigniew Jędrzejewski-Szmek2021-07-061-4/+4
| | | | | | | | | | It seems that fd_set_perms() is always called after checking that fd >= 0 (also when called as action() in glob_item_recursively()), so it seems that the assertion really came from fd==0. Fixes #20140. Also three other similar cases are updated.
* man: correct return value of sd_bus_open_with_descriptionLuca Boccassi2021-07-061-2/+5
| | | | | | Since https://github.com/systemd/systemd/commit/f4b2933ee7890e5d414ab266d8586f19027a2bd9 if a description is not set, sd_bus_open_with_description returns -ENXIO, but the documnetation stated that it returned successfully with a NULL string.
* Merge pull request #20092 from ↵Zbigniew Jędrzejewski-Szmek2021-07-064-8/+44
|\ | | | | | | | | fbuihuu/tag-xgi-z7z9-graphic-chip-as-master-of-seat-take2 login: XGI Z7/Z9 (XG20 core) graphic chip requires master-of-seat to…
| * login: use a hwdb entry for tagging Parallels' fb devices with ↵Franck Bui2021-07-052-5/+7
| | | | | | | | | | | | 'master-of-seat' tag This assumes that (vesa)fb driver is used as fallback.
| * login: use a hwdb entry for tagging HyperV's fb devices with ↵Franck Bui2021-07-052-3/+9
| | | | | | | | | | | | | | 'master-of-seat' tag Graphic devices that don't do DRM and relies on fb devices are now listed in hwdb. Dedicated udev rules are no more needed.
| * login: XGI Z7/Z9 (XG20 core) graphic chip requires master-of-seat to be setFranck Bui2021-07-054-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | This graphic chip doesn't have a DRM driver and fall back to vesa-framebuffer driver. Without this patch, users of such chip suddenly see their GUI broken without any indication or reason of what happened (no error message). Hence this regression is near to impossible to troubleshoot for end users. Such case was reported https://bugzilla.opensuse.org/show_bug.cgi?id=1187154. Rather than adding another exception in the udev rules to deal with such HWs, they instead get their own hwdb file '60-seat.hwdb'.
* | update TODOLennart Poettering2021-07-051-0/+6
| |
* | hwdb: add resolution override for Pinebook Pro touchpadIcenowy Zheng2021-07-051-0/+11
| | | | | | | | | | | | | | | | | | | | | | The Pinebook Pro touchpad returns a resolution data that is 2 times of the real value, which makes libinput think the touchpad is only 1/4 the real size. Add a resolution override value for it, to allow libinput to calculate the distance moved on it correctly. Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
* | Merge pull request #20098 from milaq/hwdb_logitech_additionsYu Watanabe2021-07-051-3/+19
|\ \ | | | | | | hwdb: Additions and fixes to Logitech mice
| * | hwdb: Add Logitech Trackman Marblemilaq2021-07-011-0/+4
| | | | | | | | | | | | As per Logitech specsheet and quick verification via mouse-dpi-tool
| * | hwdb: Use correct default values for Logitech M310milaq2021-07-011-1/+1
| | | | | | | | | | | | | | | | | | Altough the Logitech website states "1000 DPI", the default DPI settings seems to be 800 as shown by older versions of Logitech SetPoint and verification by mouse-dpi-tool.
| * | hwdb: Add Logitech G Pro Wirelessmilaq2021-07-011-0/+6
| | | | | | | | | | | | Use the default settings as advertised in the manual and in Logitech G HUB.
| * | hwdb: Add Logitech G700 "Nano" receivermilaq2021-07-011-0/+1
| | | | | | | | | | | | | | | | | | Although this mouse may be paired with other receivers this one is the "G-Series Nano Receiver" that originally shipped with the device.
| * | hwdb: Fix Logitech G700 default DPI settingsmilaq2021-07-011-1/+1
| | | | | | | | | | | | | | | | | | | | | The old settings were all over the place contained mixed refresh rates. The new settings are the correct default DPI settings as advertised online. This has also been confirmed in the latest Logitech Gaming Software (9.02.65).
| * | hwdb: Fix Logitech G500 default DPI settingsmilaq2021-07-011-1/+1
| | | | | | | | | | | | | | | These are the correct default DPI settings as advertised in the manual. This has also been confirmed in the latest Logitech Gaming Software (9.02.65).
| * | hwdb: Add DPI info for Logitech MX Ergomilaq2021-07-011-0/+1
| | | | | | | | | | | | | | | Use the "nominal value" as advertised in the spec sheet by Logitech. This has also been verified with mouse-dpi-tool.
| * | hwdb: Add Logitech G403 Heromilaq2021-07-011-0/+4
| | | | | | | | | | | | Use the default settings as advertised in the manual and in Logitech G HUB.
* | | test: unify handling of boolean valuesFrantisek Sumsal2021-07-042-62/+82
| | | | | | | | | | | | | | | | | | | | | Let's unify handling of the boolean values throughout the test-functions code, since we use 0/1, true/false, and yes/no almost randomly in many places, so picking the right values during CI configuration can be a real pain.