summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #8399 from keszybz/systemctl-kexecYu Watanabe2018-03-192-11/+32
|\ | | | | Systemctl kexec buglet fixes
| * systemctl: honour --dry-run also on logind callsZbigniew Jędrzejewski-Szmek2018-03-091-2/+10
| | | | | | | | Fixes #7670.
| * systemctl: if kexec fails with --force, continue to reboot normallyZbigniew Jędrzejewski-Szmek2018-03-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we are in late shutdown, and for whatever reason kexec fails, we should proceed with a normal reboot. Network is down and sessions have been terminated when we attempt to do the kexec, so rebooting normally is a better solution. Logs from the case where the kexec kernel is not usable: Mar 08 11:23:10 fuefi systemd[1]: Reached target Final Step. Mar 08 11:23:10 fuefi systemd[1]: Starting Reboot via kexec... Mar 08 11:23:10 fuefi systemctl[1480]: Cannot find the ESP partition mount point. Mar 08 11:23:10 fuefi systemctl[1480]: Failed to load kexec kernel, continuing without. Mar 08 11:23:10 fuefi systemd[1]: Shutting down. ... and then we proceed to do a normal reboot Related to #7730.
| * systemctl: if kexec is missing, do not try to kexecZbigniew Jędrzejewski-Szmek2018-03-091-0/+3
| |
| * systemctl: propagate the error from kexecZbigniew Jędrzejewski-Szmek2018-03-091-2/+7
| |
| * systemctl: raise level of log line about kernel loadingZbigniew Jędrzejewski-Szmek2018-03-091-3/+6
| | | | | | | | | | It's pretty important after all. Also include the actual kexecuted command in the log message, that's useful to debug if something goes wrong.
| * shared/bootspec: look at the correct variableZbigniew Jędrzejewski-Szmek2018-03-081-3/+3
| | | | | | | | | | The result of this parsing isn't used for anything, so this didn't cause a functional difference, but a spurious warning was emitted.
* | Merge pull request #8408 from keszybz/ln-relativeYu Watanabe2018-03-194-15/+65
|\ \ | | | | | | bugs.fd.o bug archelogy
| * | man: beef up description of systemctl list-unitsZbigniew Jędrzejewski-Szmek2018-03-091-0/+36
| | | | | | | | | | | | Fixes https://bugs.freedesktop.org/show_bug.cgi?id=88135.
| * | pid1: make use of high rt signals on hppa with newer kernelsZbigniew Jędrzejewski-Szmek2018-03-092-14/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Back in 4dffec1459f50ac9f8f67ccfcb79836b4ed5a50e we stopped using SIGRTMIN+26 and higher on hppa because they were not available. Then they became available in linux 3.18: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1f25df2eff5b25f52c139d3ff31bc883eee9a0ab Instead of hard-coding the list based on architecture, let's use a runtime check like signal(7) says. (A note about implementation: RTSIG_IF_AVAILABLE is defined to take the full signal and not just an offset from SIGRTMIN so that it's still possible to grep for SIGRTMIN\+.) Add a simple "test" to print the signal values. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=84931.
| * | meson: add note about coreutils version with ln --relativeZbigniew Jędrzejewski-Szmek2018-03-091-1/+1
| |/ | | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=90799
* | shutdown: Don't limit unmount attempts prematurely (#8469)Jan Janssen2018-03-191-14/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once upon a time shutdown.c didn't have the logic to check whether any unmount attempts succeeded or not. So instead it kept looping for a fixed amount and hoped all was right. Nowadays, we do know if we changed anything during a iteration and also stop looping then, but we still limit ourselves to FINALIZE_ATTEMPTS. But, theoretically, we could have such a complicated and nested setup that would survive that limit, leaving stuff around we might actually be able to unmount. And we could also end up in a situation where the extra loop with raised unmount error level could be skipped too. So let's just drop the retries logic and rely fully on the changed flag.
* | hwdb: fix accelerometer mount matrix for Asus TP300LD (#8327) (#8463)futpib2018-03-191-1/+1
| |
* | macros: use here-docs instead of echo (#8480)Zbigniew Jędrzejewski-Szmek2018-03-191-3/+9
| | | | | | | | | | | | It's common for sysusers files to contain quotes (in particular around the comment/GECOS field), and using echo "..." is very likely to not work properly in that case. Let's use <<EOF redirection. It's not bulletproof, but should work in general.
* | Merge pull request #8476 from EliaGeretto/n550jv-touchpad-fixYu Watanabe2018-03-191-2/+4
|\ \ | | | | | | hwdb: correct touchpad resolution for Asus N550JV
| * | hwdb: Correct touchpad resolution for Asus N550JVElia Geretto2018-03-191-1/+2
| | |
| * | hwdb: Split touchpad rules for X550CC and S550CElia Geretto2018-03-191-1/+2
| | |
* | | Merge pull request #8461 from keszybz/oss-fuzz-fixesEvgeny Vereshchagin2018-03-1819-32/+125
|\ \ \ | | | | | | | | Oss fuzz fixes
| * | | core/unit: delay creating a stack variable until after length has been checkedZbigniew Jędrzejewski-Szmek2018-03-181-18/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | path_is_normalized() will reject paths longer than 4095 bytes, so it's better to not create a stack variable of unbounded size, but instead do the check first and only then do that allocation. Also use _cleanup_ to make things a bit shorter. https://oss-fuzz.com/v2/issue/5424177403133952/7000
| * | | fuzz-unit-file: simply do not test ListenNetlink= at allZbigniew Jędrzejewski-Szmek2018-03-183-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | msan doesn't understand sscanf with %ms, so it falsely reports unitialized memory. Using sscanf with %ms is quite convenient in socket_address_parse_netlink(), so let's just not run the fuzzer for ListenNetlink= at all for now. If msan is fixed, we can remove this. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6884
| * | | test-socket-util: add test for ListenNetlink with spacesZbigniew Jędrzejewski-Szmek2018-03-181-0/+10
| | | |
| * | | basic/cgroup-util: fix typo in debug messageZbigniew Jędrzejewski-Szmek2018-03-181-1/+1
| | | |
| * | | fuzz: add test case for oss-fuzz #6897 and a work-aroundZbigniew Jędrzejewski-Szmek2018-03-174-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The orignal reproducer from oss-fuzz depends on the hostname (via %H and %c). The hostname needs a dash for msan to report this, so a simpler case from @evverx with the dash hardcoded is also added. The issue is a false positive from msan, which does not instruct stpncpy (https://github.com/google/sanitizers/issues/926). Let's add a work-around until this is fixed.
| * | | unit-file: do not allow bogus IOSchedulingClass valuesZbigniew Jędrzejewski-Szmek2018-03-175-6/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have only three bits of space, i.e. 8 possible classes. Immediately reject anything outside of that range. Add the fuzzer test case and an additional unit test. oss-fuzz #6908.
| * | | core/service: fix memleak of USBFunctionStrings and USBFunctionDescriptorsZbigniew Jędrzejewski-Szmek2018-03-173-0/+7
| | | | | | | | | | | | | | | | oss-fuzz #6892.
| * | | Add .gitattributes for test/fuzz-regressionsZbigniew Jędrzejewski-Szmek2018-03-171-0/+1
| | | | | | | | | | | | | | | | | | | | Those reproducers are essentially binary, hence let's ignore whitespace in them.
| * | | basic/calendarspec: set a limit on length of calendarspec component chainsZbigniew Jędrzejewski-Szmek2018-03-173-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We probably should allow very deep calls of our recursive functions. Let's add a limit to avoid resource exhaustion. 240 is 10 per hour (if somebody is using this for time based triggers...), so it should be more than enough for most use cases, and is conveniently below the 250 stack limit in msan. oss-fuzz #6917.
| * | | test-calendarspec: add the test case from oss-fuzz 6886Zbigniew Jędrzejewski-Szmek2018-03-151-0/+1
| | | | | | | | | | | | | | | | Before the fix 55a30fd4e8 in this would crash in calendarspec_from_time_t().
* | | | systemd-link: Remove UDP Fragmentation Offload support. (#8183)Rosen Penev2018-03-188-49/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support was killed in kernel 4.15 as well as ethtool 4.13. Justification was lack of use by drivers and too much of a maintenance burden. https://www.spinics.net/lists/netdev/msg443815.html Also moved config_parse_warn_compat to conf-parser.[ch] to fix compile errors.
* | | | Merge pull request #8471 from filbranden/envnewline1Yu Watanabe2018-03-188-14/+23
|\ \ \ \ | | | | | | | | | | basic/env-util: Allow newlines in values of environment variables
| * | | | test-execute: Introduce tests for environment values containing newlinesFilipe Brandenburger2018-03-176-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also fix one case where the presence of a newline was used to generate an invalid environment assignment. Tested: with mkosi, which builds the local tree and run ninja tests.
| * | | | basic/env-util: Allow newlines in values of environment variablesFilipe Brandenburger2018-03-162-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | They are allowed by the shell and the EnvironmentFile parsing passes them through, so we should just accept them, same as we accept tabs.
* | | | | Merge pull request #8468 from fbuihuu/sysusers-support-nisYu Watanabe2018-03-187-8/+69
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Sysusers support nis Fixes #8467.
| * | | | | test: add a sysusers test with NIS entriesFranck Bui2018-03-176-6/+37
| | | | | |
| * | | | | sysusers: do not append entries after the NIS onesFranck Bui2018-03-161-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NIS-catchall entry switches from files to NIS lookup and never goes back, so it must be the last entry in /etc/passwd (the other +/-{user,@netgroup} entries don't have to be). That's how the nss_compat mode for /etc/passwd (and /etc/group) traditionally works. It's age-old historic behaviour that the NIS entry must be the last one. It doesn't seem to be specified somewhere, but it worked like this since very early SunOS when NIS was first included. Fixes: #8467
* | | | | | units: Fix SuccessAction that belongs to [Unit] section not [Service] ↵Karol Augustin2018-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | section (#8478)
* | | | | | Merge pull request #8473 from keszybz/fix-dbus-reloadYu Watanabe2018-03-172-7/+8
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Fix dbus reload. Fixes #8414.
| * | | | | core/manager: move some comments to a better placeZbigniew Jędrzejewski-Szmek2018-03-161-5/+3
| | | | | |
| * | | | | core: when reloading, delay any actions on journal and dbus connectionsZbigniew Jędrzejewski-Szmek2018-03-161-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | manager_recheck_journal() and manager_recheck_dbus() would be called to early while we were deserialiazing units, before the systemd-journald.service and dbus.service have been deserialized. In effect we'd disable logging to the journald and close the bus connection. The first is not very noticable, it mostly means that logs emitted during deserialization are lost. The second is more noticeable, because manager_recheck_dbus() would call bus_done_api() and bus_done_system() and close dbus connections. Logging and bus connection would then be restored later after the respective units have been deserialized. This is easily reproduced by calling: $ sudo gdbus call --system --dest org.freedesktop.systemd1 --object-path /org/freedesktop/systemd1 --method "org.freedesktop.systemd1.Manager.Reload" which works fine before 8559b3b75cb, and then starts failing with: Error: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Remote peer disconnected None of this should happen, and we should delay changing state until after deserialization is complete when reloading. manager_reload() already included the calls to manager_recheck_journal() and manager_recheck_dbus(), so the connection state will be updated after deserialization during reloading is done. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1554578.
* | | | | | hwdb: fix comment suggested `udevadm trigger` command (#8465)futpib2018-03-161-1/+1
| |_|_|/ / |/| | | |
* | | | | udev: use startswith() instead of the combination of strneq() and strlen() ↵Yu Watanabe2018-03-161-3/+2
|/ / / / | | | | | | | | | | | | (#8459)
* / / / udev/net-id: Fix check for address to keep interface names stable (#8458)Filipe Brandenburger2018-03-151-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a bug inadvertently added by commit 73fc96c8ac0aa9. The intent of the check is to "match slot address with device by stripping the function" (as the comment above states it), for example match network device PCI address 0000:05:00.0 (including a .0 for function) to PCI slot address 0000:05:00, but changing that to a streq() call prevented the match. Change that to startswith(), which should both fix the bug and make the intent of the check more clear and prevent unintentional bugs from being introduced by future refactorings.
* / / basic/macros: rename noreturn into _noreturn_ (#8456)Franck Bui2018-03-159-21/+20
|/ / | | | | | | | | | | | | | | | | | | | | | | "noreturn" is reserved and can be used in other header files we include: [ 16s] In file included from /usr/include/gcrypt.h:30:0, [ 16s] from ../src/journal/journal-file.h:26, [ 16s] from ../src/journal/journal-vacuum.c:31: [ 16s] /usr/include/gpg-error.h:1544:46: error: expected ‘,’ or ‘;’ before ‘)’ token [ 16s] void gpgrt_log_bug (const char *fmt, ...) GPGRT_ATTR_NR_PRINTF(1,2); Here we include grcrypt.h (which in turns include gpg-error.h) *after* we "noreturn" was defined in macro.h.
* | Merge pull request #8441 from keszybz/oss-fuzz-fixesEvgeny Vereshchagin2018-03-1411-59/+68
|\ \ | | | | | | Fixes for bugs found by oss-fuzz
| * | basic/calendarspec: fix assert crash when year is too large in ↵Zbigniew Jędrzejewski-Szmek2018-03-143-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | calendarspec_from_time_t() gmtime_r() will return NULL in that case, and we would crash. I committed the reproducer case in fuzz-regressions/, even though we don't have ubsan hooked up yet. Let's add it anyway in case it is useful in the future. We actually crash anyway when compiled with asserts, so this can be easily reproduced without ubsan. oss-fuzz #6886.
| * | shared/conf-parser: fix crash when specifiers cannot be resolved in ↵Zbigniew Jędrzejewski-Szmek2018-03-144-1/+6
| | | | | | | | | | | | | | | | | | config_parse_device_allow() oss-fuzz #6885.
| * | TODO: trim obsolete entriesZbigniew Jędrzejewski-Szmek2018-03-141-4/+0
| | | | | | | | | | | | | | | set -e is now used in test/TEST-*/test.sh, BUILD_DIR may be specified, and symlinks are created as of ba7f4ae6178309dc937e10cf7dce0eca9dafb8de.
| * | fuzz: commit test case for oss-fuzz issue 6884Zbigniew Jędrzejewski-Szmek2018-03-143-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This seems to be a false positive in msan: https://github.com/google/sanitizers/issues/767. I don't see anything wrong with the code either, and valgrind does not see the issue. Anyway, let's add the test case. We don't have msan hooked up yet, but hopefully we'll in the future. oss-fuzz #6884.
| * | test: run all fuzz regression tests with all sanitizersZbigniew Jędrzejewski-Szmek2018-03-144-53/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently have just one sanitizer for tests, asan, but we may add more in the future. So let's keep the loop over the sanitizers in meson.build, but just enable all regression cases under all sanitizers. If it fails under one of them, it might fail under a different one. In subsequent commits I'll add test cases which might not fail under asan, but it's good to commit them for future use. The test names are made more verbose: 256/257 fuzz-dns-packet:oss-fuzz-5465:address OK 0.04 s 257/257 fuzz-dns-packet:issue-7888:address OK 0.03 s
* | | hwdb: add axis override for the Razer Blade Stealth (#8436)Peter Hutterer2018-03-131-0/+11
| | | | | | | | | | | | | | | This touchpad has heavy jitter, set a fuzz of 8 to work around this. From https://bugs.freedesktop.org/show_bug.cgi?id=105409