summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* sysctl: set kernel.core_pipe_limit=16Lennart Poettering2020-10-131-0/+11
| | | | | | | | | | | | | | | | | | | | We need to make sure that our coredump pattern handler manages to read process metadata from /proc/$PID/ before the kernel reaps the crashed process. By default the kernel will reap the process as soon as it can. By setting kernel.core_pipe_limit to a non-zero the kernel will wait for userspace to finish before reaping. We'll set the value to 16, which allows 16 crashes to be processed in parallel. This matches the MaxConnections= setting in systemd-coredump.socket. See: #17301 (This doesn't close 17301, since we probably should also gracefully handle if /proc/$PID/ vanished already while our coredump handler runs, just in case people loclly set the sysctl back to zero. i.e. we should collect what we can and rather issue an incomplete log record than none.)
* basic/selinux: work around mallinfo deprecationZbigniew Jędrzejewski-Szmek2020-10-123-8/+27
| | | | | | | Latest glibc has deprecated mallinfo(), so it might become unavailable at some point in the future. There is malloc_info(), but it returns XML, ffs. I think the information that we get from mallinfo() is quite useful, so let's use mallinfo() if available, and not otherwise.
* update TODOLennart Poettering2020-10-121-3/+5
|
* xdg-autostart: Lower most info messages to debug levelBenjamin Berg2020-10-121-7/+7
| | | | | | | | | | | | | | It is expected for numerous autostart files to not be convertible to corresponding units. The information is only useful for someone debugging why a file might not be started, but it is not generally useful for users in most situations. As such, lower the warnings. Anyone wondering why an application is not started will easily notice that the unit is not generated. From there it will be somewhat harder to figure out why, but the overall trade-off is still improved. Fixes: #17305
* Merge pull request #17302 from keszybz/fix-inhibitorsLennart Poettering2020-10-122-1/+4
|\ | | | | Fix inhibitors
| * logind: fix taking of inhibitorsZbigniew Jędrzejewski-Szmek2020-10-101-0/+1
| | | | | | | | Ooops made in 0a9bf7fa593682326f1c5c2d7ec3d29a9d59e5cb.
| * logind: print what action is ignoredZbigniew Jędrzejewski-Szmek2020-10-101-1/+3
| | | | | | | | | | | | | | | | | | | | My logs have lines like this: Oct 10 09:38:38 krowka systemd-logind[1889]: External (2) displays connected. Oct 10 09:38:38 krowka systemd-logind[1889]: Refusing operation, as it is turned off. Without some hint *what* operation is ignored, this is not very informative. (I remember this came up before, but I don't remember why we didn't change this log line back then...)
* | Merge pull request #17273 from mrc0mmand/coccinelle-check-for-bad-errnoLennart Poettering2020-10-1270-433/+636
|\ \ | | | | | | coccinelle: resolve our own macros to avoid skipping functions
| * | tree-wide: drop if braces around single line expressions as wellFrantisek Sumsal2020-10-0913-31/+14
| | |
| * | tree-wide: assorted coccinelle fixesFrantisek Sumsal2020-10-0956-400/+352
| | |
| * | coccinelle: introduce drop-braces transformationFrantisek Sumsal2020-10-091-0/+27
| | | | | | | | | | | | | | | | | | to drop braces around single-line if statements. Also, prefix it with zz- so it runs as the last one, so it's able to fix stuff tweaked by previous transformations.
| * | coccinelle: check for invalid errno comparisonsFrantisek Sumsal2020-10-091-0/+10
| | | | | | | | | | | | Prompted by #15868
| * | coccinelle: correctly resolve our own macrosFrantisek Sumsal2020-10-092-2/+233
| | | | | | | | | | | | | | | | | | | | | | | | Coccinelle can't do this automagically and requires we supply it respective header files. Unfortunately, the option for this (--macro-file=) can be used only once, so let's create our own macro file by collecting macros needed for the semantic parser to be happy.
* | | hwdb: Add accel orientation quirk for MPMAN Converter 9 2-in-1Hans de Goede2020-10-121-0/+6
| | | | | | | | | | | | | | | Add a quirk to fix the accelerometer orientation on the MPMAN Converter 9 2-in-1.
* | | Add Lenovo USB touchscreens to 60-autosuspend.hwdbHans de Goede2020-10-121-0/+10
| | | | | | | | | | | | | | | Add Lenovo USB touchscreens which can safely autosuspend to hwdb, this helps the processor reach deaper PC# states when idle.
* | | Merge pull request #17292 from poettering/idn-dlsymZbigniew Jędrzejewski-Szmek2020-10-107-44/+190
|\ \ \ | | | | | | | | turn libidn/libidn2 dep into dlopen() one
| * | | update TODOLennart Poettering2020-10-091-1/+0
| | | |
| * | | shared: make libidn/libdidn2 dependency a dlopen() oneLennart Poettering2020-10-096-43/+190
| |/ /
* | | resolved: don't append RFC6975 data to stub repliesLennart Poettering2020-10-104-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We previously checked the QR bit to decide whether the RFC6975 algorithm data in our packets. But that doesn't work in many cases, since we initialize the QR flags along with the other flags usually only after appending OPT (since success to do so propagates into flags). Hence, let's add an explicit parameter that controls whether to include RFC6975 data in DNS packets, and set it to false for stub reply, and on true for upstream queries. Fixes: #17217
* | | docs: clarify that udev watches for IN_CLOSE_WRITE (and not IN_CLOSE)Lennart Poettering2020-10-101-9/+20
| | | | | | | | | | | | | | | Also, while we are at it, explain that udev won't reprobe if users just release the lock, they have to close the block device too.
* | | Merge pull request #17211 from poettering/udev-loop-fixesLennart Poettering2020-10-092-2/+56
|\ \ \ | |_|/ |/| | two udev fixes, split out of #16859
| * | udev: make sure to install an inotify watch whenever we find a block device ↵Lennart Poettering2020-10-091-2/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | locked This fixes a race where a block device that pops up and immediately is locked (such as a loopback device in preparation) might result in udev never run any rules for it, and thus never turn on inotify watching for it (as inotify watching is controlled via an option set via udev rules), thus not noticing when the device is unlocked/closed again (which is noticed via IN_CLOSE_WRITE inotify events). This changes two things: 1. Whenever we encounter a locked block device we'll now inotify watch it, so that it is guaranteed we'll notice when the BSD lock fd is closed again, and will reprobe. 2. We'll now turn off inotify watching again once we realise the udev rules don't actually want that. Previously, once watching a device was enabled via a udev rule, it would be watched forever until the device disappeared, even if the option was dropped by the rules for later events. Together this will make sure that we'll watch the device via inotify in both of the following cases: a) The block device has been BSD locked when udev wanted to look at it b) The udev rules run for the last seen event for the device say so In all other cases inotify is off for block devices. This new behaviour both fixes the race, but also makes the most sense, as the rules (when they are run) actually really control the watch state now. And if someone BSD locks a block device then it should be OK to inotify watch it briefly until the lock is released again as the user this way more or less opts into the locking protocol.
| * | udev-util: ignore remove events, we care about initialization after allLennart Poettering2020-10-091-0/+16
| |/
* | Merge pull request #17286 from benzea/benzea/xdg-autostart-improvementsLennart Poettering2020-10-092-0/+16
|\ \ | | | | | | XDG autostart improvements
| * | xdg-autostart: Ignore more common XDG Desktop Entry fieldsBenjamin Berg2020-10-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | It makes sense to ignore all the common fields that are expected and that we can safely ignore. Note that it is fine to ignore URL as we will already warn about the type= being wrong in that case. Closes: #17276
| * | xdg-autostart: Add support for Path= in XDG Desktop FileBenjamin Berg2020-10-092-0/+13
| | | | | | | | | | | | This sets the working directory of the application.
* | | missing_syscall: fixup syscall numbers for x32 vs. amd64mirabilos2020-10-091-11/+17
| |/ |/|
* | Merge pull request #17289 from keszybz/two-coverity-fixesLennart Poettering2020-10-092-7/+9
|\ \ | | | | | | Two coverity-inspired fixes
| * | networkd: add assert to appease coverityZbigniew Jędrzejewski-Szmek2020-10-091-2/+4
| | | | | | | | | | | | | | | | | | | | | The code was OK, but not obviously so. Let's add an assert to help a human or nonhuman reader figure it out. Coverity CID#1433224.
| * | systemctl: fix reversed arguments in function callZbigniew Jędrzejewski-Szmek2020-10-091-5/+5
| |/ | | | | | | | | | | | | This is confusing, but had no effect because the arguments were consistently switched. Coverity CID#1433223.
* | ratelimit: add ratelimit_configured() helperLennart Poettering2020-10-092-1/+5
| | | | | | | | | | | | This helper alone doesn't make too much sense, but it's preparatory work for #17274, and I guess it can't hurt to land it early, it does make the ratelimit code a tiny bit prettier after all.
* | sd-event: check return value of syscals directly, avoid redundant variable ↵Lennart Poettering2020-10-091-25/+12
|/ | | | | | assignment And while we are at it, fix one incorrect error propagation.
* missing-syscall: fix copypastaLennart Poettering2020-10-081-1/+1
| | | | | | As noticed by @mbiebl: https://github.com/systemd/systemd/commit/5134e18eedc30bfe5397ed31f94903d984a60cfc#r43033443
* basic/missing_syscall: fix syscall numbers for mips*Michael Biebl2020-10-081-2/+26
| | | | | Thanks Christian Brauner @brauner Fixes: #17261
* Merge pull request #17279 from poettering/systemctl-split-upLennart Poettering2020-10-0876-8553/+9274
|\ | | | | systemctl: split huge .c file into smaller bits
| * systemctl: split up humungous systemctl.c fileLennart Poettering2020-10-0772-8535/+9253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is just some refactoring: shifting around of code, not change in codeflow. This splits up the way too huge systemctl.c in multiple more easily digestable files. It roughly follows the rule that each family of verbs gets its own .c/.h file pair, and so do all the compat executable names we support. Plus three extra files for sysv compat (which existed before already, but I renamed slightly, to get the systemctl- prefix lik everything else), a -util file with generic stuff everything uses, and a -logind file with everything that talks directly to logind instead of PID1. systemctl is still a bit too complex for my taste, but I think this way itc omes in a more digestable bits at least. No change of behaviour, just reshuffling of some code.
| * systemctl: move compare_unit_info() to bus-unit-util.[ch]Lennart Poettering2020-10-073-19/+21
| | | | | | | | | | | | It's an auxiliary function to the UnitInfo structures, and very generic. Let's hence move it over to the other code operating with UnitInfo, even if it's not used by code outside of systemctl (yet).
| * pretty-print: don't abbreviate needlessly in user-facing stringLennart Poettering2020-10-071-1/+1
| |
| * basic: include stddef.h since we use NULL in headerLennart Poettering2020-10-071-0/+1
| |
* | Merge pull request #17271 from ↵Yu Watanabe2020-10-0822-276/+801
|\ \ | |/ |/| | | | | yuwata/network-route-improve-multipath-route-support network: improve multipath route support
| * network: introduce IPV4_ADDRESS_FMT_STR macroYu Watanabe2020-10-074-21/+22
| | | | | | | | | | This also moves ADDRESS_FMT_VAL() macro to networkd-address.h, and renames it to IPV4_ADDRESS_FMT_VAL().
| * network: make Gateway= in [Route] section accept an empty stringYu Watanabe2020-10-071-0/+8
| |
| * network: introduce Gateway=_dhcp4 and _dhcp6, and deprecate "_dhcp"Yu Watanabe2020-10-072-8/+32
| | | | | | | | Fixes #17249.
| * test-network: do not fail when multiple ipv6 default gateways are configuredYu Watanabe2020-10-071-7/+9
| | | | | | | | | | When multiple ipv6 default gateways are set, kernel seems to merge them into a multipath route.
| * util: make local_gateways() support RT_VIA and RT_MULTIPATHYu Watanabe2020-10-071-29/+86
| | | | | | | | Then, `networkctl status` correctly shows gateways.
| * network: manage multipath routes separatelyYu Watanabe2020-10-072-102/+205
| |
| * sd-netlink: introduce sd_netlink_message_read_data()Yu Watanabe2020-10-072-0/+25
| |
| * sd-netlink: introduce rtattr_read_nexthop()Yu Watanabe2020-10-073-12/+92
| |
| * network: free Route object when route_remove() failsYu Watanabe2020-10-071-2/+2
| | | | | | | | | | When route_remove() succeeds, the Route object will be freed later by manager_rtnl_process_route().
| * network: constify argumentsYu Watanabe2020-10-072-28/+31
| |