summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* man: clarify whitespace handling in systemd.syntaxDavide Cavalca2019-02-271-1/+1
|
* Merge pull request #11837 from yuwata/network-tiny-cleanupsLennart Poettering2019-02-272-22/+18
|\ | | | | network: tiny cleanups
| * network: fix error code in logYu Watanabe2019-02-271-1/+1
| |
| * network: merge conditions and use FLAGS_SET() macroYu Watanabe2019-02-271-6/+6
| |
| * network: make ndisc_router_process_options() propagate errorYu Watanabe2019-02-271-15/+11
|/ | | | And its caller ignore the error.
* fs-util: add missing linux/falloc.h includeDavide Cavalca2019-02-271-0/+1
|
* Merge pull request #11824 from keszybz/fuzzer-fixesLennart Poettering2019-02-2614-37/+63
|\ | | | | Fuzzer fixes
| * fuzz-ndisc-rs: avoid assertion failure on samples which dont fit in pipeZbigniew Jędrzejewski-Szmek2019-02-262-0/+5
| | | | | | | | Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11605.
| * fuzz-lldp: avoid assertion failure on samples which dont fit in pipeZbigniew Jędrzejewski-Szmek2019-02-262-0/+5
| | | | | | | | Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11603.
| * fuzz-journal-stream: avoid assertion failure on samples which don't fit in pipeZbigniew Jędrzejewski-Szmek2019-02-262-1/+3
| | | | | | | | | | | | | | | | | | | | Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11587. We had a sample which was large enough that write(2) failed to push all the data into the pipe, and an assert failed. The code could be changed to use a loop, but then we'd need to interleave writes and sd_event_run (to process the journal). I don't think the complexity is worth it — fuzzing works best if the sample is not too huge anyway. So let's just reject samples above 64k, and tell oss-fuzz about this limit.
| * shared/ask-password-api: when echoing multi-byte characters, print the whole ↵Zbigniew Jędrzejewski-Szmek2019-02-261-1/+4
| | | | | | | | | | | | | | sequence This is untested, but I don't see how the previous code could have worked for multibyte characters (with echo on).
| * basic/utf8: do not read past end of string when looking for a multi-byte ↵Zbigniew Jędrzejewski-Szmek2019-02-268-26/+42
| | | | | | | | | | | | character Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9341.
| * basic/utf8: change type of function to emphasize that it only looks at one ↵Zbigniew Jędrzejewski-Szmek2019-02-261-9/+4
| | | | | | | | character
* | Merge pull request #11827 from keszybz/pkgconfig-variablesLennart Poettering2019-02-263-19/+22
|\ \ | | | | | | Allow overriding pkgconfig prefixes
| * | pkgconfig: define variables relative to ${prefix}/${rootprefix}/${sysconfdir}Zbigniew Jędrzejewski-Szmek2018-11-172-18/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #4549. People want to be able to redefine the prefixes relative to which the other variables are defined. Something like pkgconf --define-variable=prefix=/home/user/installpath --variable=systemdsystemunitdir systemd I'm not convinced that this entirely useful, because the installed systemd will not look at those paths, but maybe it's OK as an alternative type of $DESTDIR. This has been requested a few times over the years, so let's just provide this. I thought this would be more complicated, since we allow all kinds of directories to be overrides in the compilation configuration. But it turns out that all the directories defined in systemd.pc are relative to three prefixes: $prefix, $rootprefix, and $sysconfdir. So this patch adds $rootprefix and $sysconfdir to the .pc file and then changes the subsequent definitions in the .pc file to use them. In the end we define each path twice using the same rules: once in meson.build and once in the .pc file. Without overrides: $ for i in $(pkgconf --with-path=build/src/core systemd --print-variables); do echo -n "$i = "; pkgconf --with-path=$PWD/build/src/core --variable=$i systemd done containeruidbasemax = 1878982656 containeruidbasemin = 524288 dynamicuidmax = 65519 dynamicuidmin = 61184 systemgidmax = 999 systemuidmax = 999 catalogdir = /usr/lib/systemd/catalog modulesloaddir = /usr/lib/modules-load.d binfmtdir = /usr/lib/binfmt.d sysctldir = /usr/lib/sysctl.d sysusersdir = /usr/lib/sysusers.d tmpfilesdir = /usr/lib/tmpfiles.d systemdshutdowndir = /usr/lib/systemd/system-shutdown systemdsleepdir = /usr/lib/systemd/system-sleep systemdusergeneratordir = /usr/lib/systemd/user-generators systemdsystemgeneratordir = /usr/lib/systemd/system-generators systemduserunitpath = /etc/systemd/user:/etc/systemd/user:/run/systemd/user:/usr/local/lib/systemd/user:/usr/local/share/systemd/user:/usr/lib/systemd/user:/usr/lib/systemd/user:/usr/share/systemd/user systemdsystemunitpath = /etc/systemd/system:/etc/systemd/system:/run/systemd/system:/usr/local/lib/systemd/system:/usr/lib/systemd/system:/usr/lib/systemd/system:/lib/systemd/system systemduserconfdir = /etc/systemd/user systemdsystemconfdir = /etc/systemd/system systemduserpresetdir = /usr/lib/systemd/user-preset systemduserunitdir = /usr/lib/systemd/user systemdsystempresetdir = /usr/lib/systemd/system-preset systemdsystemunitdir = /usr/lib/systemd/system systemdutildir = /usr/lib/systemd sysconfdir = /etc rootprefix = /usr prefix = /usr pcfiledir = /usr/share/pkgconfig With overrides: $ for i in $(pkgconf --with-path=build/src/core systemd --print-variables); do echo -n "$i = "; pkgconf --with-path=$PWD/build/src/core \ --define-variable=prefix=/PREFIX \ --define-variable=rootprefix=/ROOTPREFIX \ --define-variable=sysconfdir=/SYSCONF --variable=$i systemd done containeruidbasemax = 1878982656 containeruidbasemin = 524288 dynamicuidmax = 65519 dynamicuidmin = 61184 systemgidmax = 999 systemuidmax = 999 catalogdir = /PREFIX/lib/systemd/catalog modulesloaddir = /PREFIX/lib/modules-load.d binfmtdir = /PREFIX/lib/binfmt.d sysctldir = /PREFIX/lib/sysctl.d sysusersdir = /PREFIX/lib/sysusers.d tmpfilesdir = /PREFIX/lib/tmpfiles.d systemdshutdowndir = /ROOTPREFIX/lib/systemd/system-shutdown systemdsleepdir = /ROOTPREFIX/lib/systemd/system-sleep systemdusergeneratordir = /PREFIX/lib/systemd/user-generators systemdsystemgeneratordir = /ROOTPREFIX/lib/systemd/system-generators systemduserunitpath = /SYSCONF/systemd/user:/etc/systemd/user:/run/systemd/user:/usr/local/lib/systemd/user:/usr/local/share/systemd/user:/PREFIX/lib/systemd/user:/usr/lib/systemd/user:/usr/share/systemd/user systemdsystemunitpath = /SYSCONF/systemd/system:/etc/systemd/system:/run/systemd/system:/usr/local/lib/systemd/system:/ROOTPREFIX/lib/systemd/system:/usr/lib/systemd/system:/lib/systemd/system systemduserconfdir = /SYSCONF/systemd/user systemdsystemconfdir = /SYSCONF/systemd/system systemduserpresetdir = /PREFIX/lib/systemd/user-preset systemduserunitdir = /PREFIX/lib/systemd/user systemdsystempresetdir = /ROOTPREFIX/lib/systemd/system-preset systemdsystemunitdir = /ROOTPREFIX/lib/systemd/system systemdutildir = /usr/lib/systemd sysconfdir = /SYSCONF rootprefix = /ROOTPREFIX prefix = /PREFIX pcfiledir = /usr/share/pkgconfig (pkgconf doesn't provide a way to print all variables together with their definitions, according to the man page. Disappointing.)
| * | meson: document -Drootprefix a bit betterZbigniew Jędrzejewski-Szmek2018-11-171-1/+1
| | | | | | | | | | | | | | | All options are for "overriding", and the help string was just repeating the name of the option.
* | | Merge pull request #11357 from GiacintoCifelli/dbus_labelsLennart Poettering2019-02-266-15/+226
|\ \ \ | | | | | | | | sd-bus: add methods and signals parameter names
| * | | sd-bus: add methods and signals parameter names. Fixes: #1564Giacinto Cifelli2019-02-266-15/+226
| | | |
* | | | Merge pull request #11823 from keszybz/more-fuzz-coverageLennart Poettering2019-02-262-0/+19
|\ \ \ \ | |_|_|/ |/| | | More fuzz coverage
| * | | fuzz-unit-file: also run manager_dump()Zbigniew Jędrzejewski-Szmek2019-02-251-0/+1
| | | | | | | | | | | | | | | | This should increase coverage a bit.
| * | | fuzz-unit-file: add some directives for stuff coverage reports as not coveredZbigniew Jędrzejewski-Szmek2019-02-251-0/+18
| | | | | | | | | | | | | | | | | | | | Some of those directives appear in the corpus, but without arguments, so maybe the fuzzing libraries can't trigger the right cases. Let's help them.
* | | | Merge pull request #11822 from yuwata/fuzz-udev-databaseLennart Poettering2019-02-265-18/+556
|\ \ \ \ | | | | | | | | | | fuzz: add fuzzer for udev database
| * | | | fuzz: add a sample for fuzz-udev-databaseYu Watanabe2019-02-261-0/+500
| | | | |
| * | | | fuzz: add fuzzer for udev databaseYu Watanabe2019-02-262-0/+29
| | | | |
| * | | | sd-device: split device_read_db_internal() into two partYu Watanabe2019-02-262-18/+27
| | | | | | | | | | | | | | | | | | | | The new device_read_db_internal_filename() will be used by a fuzzer.
* | | | | core: consider non-SERVICE_EXEC_START commands for EXIT_CLEAN_COMMANDAnita Zhang2019-02-261-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there are multiple ExecStop= statements, the next command would continue to run even after TimeoutStopSec= is up and sends SIGTERM. This is because, unless Type= is oneshot, the exit code/status would evaluate to SERVICE_SUCCESS in service_sigchld_event()'s call to is_clean_exit(). This success indicates following commands would continue running until the end of the list is reached, or another timeout is hit and SIGKILL is sent. Since long running processes should not be invoked in non-SERVICE_EXEC_START commands, consider them for EXIT_CLEAN_COMMAND instead of EXIT_CLEAN_DAEMON. Passing EXIT_CLEAN_COMMAND to is_clean_exit() evaluates the SIGTERM exit code/status to failure and will stop execution after the first timeout is hit. Fixes #11431
* | | | | Merge pull request #11780 from yuwata/fix-4211Zbigniew Jędrzejewski-Szmek2019-02-265-138/+156
|\ \ \ \ \ | |/ / / / |/| | | | network: skip .network files earlier when conditions do not match system environment
| * | | | network: assign Network::manager when it is listed to the manager object.Yu Watanabe2019-02-261-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now Network::manager is not necessary during parsing configs. C.f. 838b2f7a30dbb68f4d6939626a165b313cc94542.
| * | | | network: make resolving NetDev names delayed and moved to network_verify()Yu Watanabe2019-02-264-128/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And before resolving NetDev names, check conditions in .network, and if they do not match the system environment, drop the network unit earlier. Fixes #4211.
| * | | | network: add debug log when conditions do not match system environmentYu Watanabe2019-02-261-5/+7
| | | | |
* | | | | cryptsetup: Treat key file errors as a failed password attemptRyan Gonzalez2019-02-261-0/+4
|/ / / / | | | | | | | | | | | | | | | | | | | | 6f177c7dc092eb68762b4533d41b14244adb2a73 caused key file errors to immediately fail, which would make it hard to correct an issue due to e.g. a crypttab typo or a damaged key file. Closes #11723.
* | | | Merge pull request #11767 from yuwata/network-bridge-enslavedLennart Poettering2019-02-259-70/+184
|\ \ \ \ | | | | | | | | | | network: extend 'enslaved' state to bridge slave
| * | | | man: update explanation about operational state of network interfacesYu Watanabe2019-02-251-4/+5
| | | | |
| * | | | man: mention that LinkLocalAddressing= is disabled by default when Bridge= ↵Yu Watanabe2019-02-251-4/+4
| | | | | | | | | | | | | | | | | | | | is set
| * | | | test-network: add more tests for IgnoreCarrierLoss=Yu Watanabe2019-02-252-0/+46
| | | | | | | | | | | | | | | | | | | | Suggested by @amishmm in #9262.
| * | | | test-network: add more tests for Bridge=Yu Watanabe2019-02-253-2/+27
| | | | |
| * | | | network: make bridge master also follow operstates of slave interfacesYu Watanabe2019-02-252-23/+36
| | | | | | | | | | | | | | | | | | | | | | | | | If one of bridge slaves is in off, no-carrier, or dormant, then operstate of the bridge master is set to degraded.
| * | | | network: extend 'enslaved' state to bridge slave interfacesYu Watanabe2019-02-252-16/+39
| | | | | | | | | | | | | | | | | | | | | | | | | Currently, the interface's operstate is set to 'enslaved' only when it is managed by networkd.
| * | | | network: disable LinkLocalAddressing= and IPv6AcceptRA= on bridge slaves by ↵Yu Watanabe2019-02-251-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | default If they are not explicitly configured, then let's disable these functionality on bridge slaves.
| * | | | network: do not disable dynamic addressing for bridge slavesYu Watanabe2019-02-251-17/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This effectively reverts 5971cb9de9081b537945d28895df70992e5664d0 and 2b00a4e03dc375465de7f60f3a6937cbe8ffdf31. Usually, it is not necessary to assign addresses to bridge slaves, but such functionality is supported by kernel. If users explicitly request such configuration, networkd should support that.
| * | | | network: fix invalid memory accessYu Watanabe2019-02-252-4/+10
| | | | | | | | | | | | | | | | | | | | This fixes a bug introduced by 959f65d32ec15cf84afe3efff1a18b0987b56c60.
* | | | | meson: declare version.h as dependency for systemdMichael Olbrich2019-02-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This is a followup to #11815 and adds the last missing dependency. With this #11565 is hopefully really fixed.
* | | | | Merge pull request #11798 from keszybz/mem-sanitizer-fixLennart Poettering2019-02-255-17/+31
|\ \ \ \ \ | | | | | | | | | | | | meson: make sure preprocesor warnings are not treated as errors
| * | | | | test-json: use standard test introZbigniew Jędrzejewski-Szmek2019-02-251-4/+2
| | | | | |
| * | | | | test-json: avoid deep stack recursion under msanZbigniew Jędrzejewski-Szmek2019-02-251-0/+7
| | | | | |
| * | | | | test-mountpoint-util: unpoison string allocated by sscanf %msZbigniew Jędrzejewski-Szmek2019-02-251-4/+9
| | | | | |
| * | | | | Add wrapper for __msan_unpoinson() to reduce #ifdefferyZbigniew Jędrzejewski-Szmek2019-02-252-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This isn't really necessary for the subsequent commit, but I expect that we'll need to unpoison more often once we turn on msan in CI, so I think think this change makes sense in the long run.
| * | | | | meson: make sure preprocesor warnings are not treated as errorsZbigniew Jędrzejewski-Szmek2019-02-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clang includes -W#warning in -Werror, so the #warning used for msan would be an error. v2: - use -Wno-error=... so that the warning is still emitted, but not as an error.
* | | | | | meson: declare version.h as dep for various targets that include build.hZbigniew Jędrzejewski-Szmek2019-02-253-7/+16
| |_|/ / / |/| | | | | | | | | | | | | | Should fix #11565.
* | | | | Merge pull request #11796 from yuwata/fuzz-link-parserZbigniew Jędrzejewski-Szmek2019-02-2512-37/+148
|\ \ \ \ \ | |_|/ / / |/| | | | fuzz: add fuzzer for .link files