summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2017-04-25Export sd_bus_message_append_ap. It is renamed to sd_bus_message_appendv to ↵Federico
follow systemd naming conventions. (#5753) Moreover, man page for sd_bus_message_append is updated with reference to new exposed function. Makefile-man is updated too, to reflect new alias.
2017-04-25load-fragment: don't print error about incorrect syntax when IPv6 is ↵Michal Sekletar
disabled (#5791)
2017-04-24importd: support SUSE style checksums (#5206)tblume
In order to verify a pulled container or disk image, importd only supports SHA256SUMS files with the detached signature in SHA256SUMS.gpg. SUSE is using an inline signed file with the name of the image itself and the suffix .sha256 instead. This commit adds support for this type of signature files. It is first attempted to pull the .sha256 file. If this fails with error 404, the SHA256SUMS and SHA256SUMS.gpg files are pulled and used for verification.
2017-04-24Merge pull request #5354 from msekletar/issue-518Lennart Poettering
service: serialize information about currently executing command
2017-04-24fstab-generator: do not skip Before= ordering for noauto mountpoints (#5547)Ivan Shapovalov
2017-04-24sd-journal: return SD_JOURNAL_INVALIDATE only if journal files were actually ↵Michal Sekletar
deleted/moved (#5580) When caller invokes sd_journal_open() we usually open at least one directory with journal files. add_root_directory() function increments current_invalidate_counter. After sd_journal_open() returns current_invalidate_counter != last_invalidate_counter. After caller waits for journal events (e.g. waits for new messages in journal) then it usually calls sd_journal_process(). However, on first call to sd_journal_process(), function determine_change() returns SD_JOURNAL_INVALIDATE even though no journal files were deleted/moved. This is because current_invalidate_counter != last_invalidate_counter. After the fix we make sure counters has the same value before we begin processing inotify events.
2017-04-24redirect stdout/stderr back when closing the pager (#5661)Matija Skala
2017-04-24load-fragment: resolve specifiers in BindPaths/BindReadOnlyPaths (#5687)Danielle Church
2017-04-23Merge pull request #5774 from keszybz/printf-annotationsDjalal Harouni
Printf annotation improvements
2017-04-21Merge pull request #5756 from keszybz/make-cleanupsMartin Pitt
Various meson-independent cleanups from the meson patchset
2017-04-21kernel-install: remove unneeded modules.* files created by depmod (#5766)Yu Watanabe
Fixes #5765.
2017-04-21coredump: fix non-literal string used in printfZbigniew Jędrzejewski-Szmek
This was exposed by the previous commit. This could be potentially unpleasant, but we are saved by the fact that this code path was only taken for journald crashes, where we control COMM and know that it doesn't contain any special characters. Use log_dispatch which does not do any format processing to push the message out.
2017-04-21basic/log: expose log_dispatchZbigniew Jędrzejewski-Szmek
This is useful when we want to avoid printf formatting on the message. It's nicer than using log_struct with "%s" as the format, because printf is slow and with a large message (like from a backtrace) this would require extra unnecessary memory. I'm not exposing all the fields in the wrapper: only level and errno. Those are the most likely to be useful.
2017-04-21tree-wide: mark log_struct with _printf_ and fix falloutZbigniew Jędrzejewski-Szmek
log_struct takes multiple format strings, each one followed by arguments. The _printf_ annotation is not sufficiently flexible to express this, but we can still annotate the first format string, though not its arguments (because their number is unknown). With the annotation, the places which specified the message id or similar as the first pattern cause a warning from -Wformat-nonliteral. This can be trivially fixed by putting the MESSAGE= first. This change will help find issues where a non-literal is erroneously used as the pattern.
2017-04-21µhttpd-util: use #pragma to silence warning about nonliteral patternZbigniew Jędrzejewski-Szmek
This is safe, because we're taking a pattern which was already marked with _printf_ and appending a literal string.
2017-04-21bus: include sd-{bus,messages}.h the same as other systemd headersZbigniew Jędrzejewski-Szmek
This is our own header, we should include use the local-include syntax ("" not <>), to make it clear we are including the one from the build tree. All other includes of files from src/systemd/ use this scheme.
2017-04-21microhttpd-util: silence warnings about deprecated optionsZbigniew Jędrzejewski-Szmek
C.f. 21b6ff368438bd3e809c2fabe73038eb305df296.
2017-04-21test-exec-util: drop duplicate constZbigniew Jędrzejewski-Szmek
gcc-7 warns about this with -Wduplicate-decl-specifier.
2017-04-21basic/random-util: add new header for getrandom()Zbigniew Jędrzejewski-Szmek
There's some confusion: older man pages specify that linux/random.h contains getrandom, but newer glibc has it in sys/random.h. Detect if the newer header is available and include it. We still need the older header for the flags.
2017-04-21libshared: fix compilation without libblkidZbigniew Jędrzejewski-Szmek
This reverts a75e27eb. a75e27eb fixed the case of libcryptsetup=no, libblkid=yes, but broke the case of libcryptsetup=no, libblkid=yes. Instead of trying to define the function only when used, which would result in too much ifdeffery, just silence the warning.
2017-04-21basic/missing.h: drop inclusion of macro.hZbigniew Jędrzejewski-Szmek
It's not necessary for anything.
2017-04-21networkd: route - support 'onlink' routes (#5734)Susant Sahani
This work based on Tom's original patch teg@1312172 By setting GatewayOnlink=yes, the kernel will assume that the gateway is onlink even if there is no route to it. Resolves issue #1283.
2017-04-21networkd: vlan add GVRP support (#5761)Susant Sahani
Add support to configure GVRP. Closes #5760
2017-04-21core: move checking default_dependencies into ↵iplayinsun
target_add_default_dependencies. (#5762) Almost units check default_dependencies within [unit]_add_default_dependencies except target unit.
2017-04-21ima: Ensure policy exists before asking the kernel to load it (#5777)Benjamin Gilbert
e8e42b31c5a950a7b43d64f4a531ec59750e823e added support for having the kernel load the IMA policy directly, but didn't check that the policy file exists. If not, this produced a kernel message: IMA: policy update failed
2017-04-20basic/log: fix _printf_ annotation on log_object_internalvZbigniew Jędrzejewski-Szmek
Fixup for 4b58153dd22172d817055d2a09a0cdf3f4bd9db3. I saw this because of a clang warning. With gcc the -Wformat-nonliteral warning doesn't seem to work as expected. In two places, a string constructed with strjoina is used as the pattern. This is safe, because we're taking a pattern which was already marked with _printf_ and prepending a known value to it. Those places are marked with #pragma to silence the warning.
2017-04-19test-compress*: silence warning about unused definitions when w/o both xz ↵Zbigniew Jędrzejewski-Szmek
and lz4 I think it's nice to mark the test as skipped instead of omitting it entirely, hence #ifdefs in the code instead of excluding the test in Makefile.am/meson.build.
2017-04-19rc-local-generator: drop duplicate definitions for rc.localZbigniew Jędrzejewski-Szmek
We always define those paths in the configure scripts.
2017-04-19basic/def.h: drop TTY_GID definitionZbigniew Jędrzejewski-Szmek
We already provide a definition through the configuration system, this one is duplicate.
2017-04-19tree-wide: fix wrong indent (#5757)Yu Watanabe
Fixes wrong indent introduced by the commit 43688c49d1fdb585196d94e2e30bb29755fa591b.
2017-04-17Merge pull request #5708 from vcatechnology/arm-cross-compileLennart Poettering
ARM32 cross-compile fixes
2017-04-13loginctl: fix typo causing ignoring multiple session IDs (#5732)slodki
Fixes #5733
2017-04-12Merge pull request #5690 from yuwata/fix-5621Djalal Harouni
core: downgrade error message if command is prefixed with `-` and the…
2017-04-11networkd: Add bridge port priority setting (#5545)Dimitri John Ledkov
Allow setting bridge port priority in the Bridge section of the network file, similar to e.g. port path cost setting. Set the default to an invalid value of 128, and only set the port priority when it's not 128. Unlike e.g. path cost, zero is a valid priority value. Add a networkd-test.py to check that bridge port priority is correctly set. Incidently, fix bridge port cost type and document valid ranges.
2017-04-11service: serialize information about currently executing commandMichal Sekletar
Stored information will help us to resume execution after the daemon-reload. This commit implements following scheme, * On serialization: - we count rank of the currently executing command - we store command type, its rank and command line arguments * On deserialization: - configuration is parsed and loaded - we deserialize stored data, command type, rank and arguments - we look at the given rank in the list and if command there has same arguments then we restore execution at that point - otherwise we search respective command list and we look for command that has the same arguments - if both methods fail we do not do not resume execution at all To better illustrate how does above scheme works, please consider following cases (<<< denotes position where we resume execution after reload) ; Original unit file [Service] ExecStart=/bin/true <<< ExecStart=/bin/false ; Swapped commands ; Second command is not going to be executed [Service] ExecStart=/bin/false ExecStart=/bin/true <<< ; Commands added before ; Same commands are problematic and execution could be restarted at wrong place [Service] ExecStart=/bin/foo ExecStart=/bin/bar ExecStart=/bin/true <<< ExecStart=/bin/false ; Commands added after ; Same commands are not an issue in this case [Service] ExecStart=/bin/true <<< ExecStart=/bin/false ExecStart=/bin/foo ExecStart=/bin/bar ; New commands interleaved with old commands ; Some new commands will be executed while others won't ExecStart=/bin/foo ExecStart=/bin/true <<< ExecStart=/bin/bar ExecStart=/bin/false As you can see, above scheme has some drawbacks. However, in most cases (we assume that in most common case unit file command list is not changed while some other command is running for the same unit) it should cause that systemd does the right thing, which is restoring execution exactly at the point we were before daemon-reload. Fixes #518
2017-04-10tmpfiles: downgrade error message when operation is not supported (#5692)Yu Watanabe
Fixes #5607
2017-04-10core: fix values of BindPaths and BindReadOnlyPaths properties on 32-bit ↵Evgeny Vereshchagin
platforms (#5713) $ busctl get-property \ org.freedesktop.systemd1 \ /org/freedesktop/systemd1/unit/run_2dr471de87550554a6dbb165501c33c5dab_2eservice \ org.freedesktop.systemd1.Service BindReadOnlyPaths a(ssbt) 1 "/etc" "/etc" false 9228635523571007488 The correct values are 0 and 16384
2017-04-10core: downgrade legit error logs (#5705)umuttl
manager_sync_bus_names() function retrieves the dbus names and compares it with unit bus names. It could be right after the list is retrieved, the dbus peer is disconnected. In this case it is really not an ERROR print if sd_bus_get_name_creds() or sd_bus_creds_get_unique_name() fail.
2017-04-06Remove BTN_DPAD_* keys from ID_INPUT_KEY test (#5701)Nathaniel R. Lewis
At present, devices implementing the BTN_DPAD_UP/DOWN/LEFT/RIGHT codes will be incorrectly classified as key devices. This causes devices respecting the Linux gamepad spec (such as the DS3 as of kernel 4.12) to be classified as keyboards by X11. This is caused by the test_key function checking all codes on [KEY_OK, BTN_TRIGGER_HAPPY). Unfortunately the BTN_DPAD_* codes are placed between KEY_LIGHTS_TOGGLE and KEY_ALS_TOGGLE. This patch splits the upper key block check into the block before and after the BTN_DPAD_* codes. An array is used to avoid dedicated, per block loops in the event that more event codes are added in the future.
2017-04-06build-sys: correct blkid.h includesMatt Clarkson
When using pkg-config to determine the include flags for blkid the flags are returned as: $ pkg-config blkid --cflags -I/usr/include/blkid -I/usr/include/uuid We use the <blkid/blkid.h> include which would be correct when using the default compiler /usr/include header search path. However, when cross-compiling the blkid.h will not be installed at /usr/include and highly likely in a temporary system root. It is futher compounded if the cross-compile packages are split up and the blkid package is not available in the same sysroot as the compiler. Regardless of the compilation setup, the correct include path should be <blkid.h> if using the pkg-config returned CFLAGS.
2017-04-05Merge pull request #5706 from keszybz/make-cleanupsLennart Poettering
Move busctl to its own dir and other cleanups
2017-04-05logind: Stopped inhibitions should be considered inactive (#5698)afrantzis
2017-04-04udev: rename gperf struct name to match other headersZbigniew Jędrzejewski-Szmek
This makes it easier to use the same generator script as for other gperf scripts. With automake each gperf file had it's own rule, but with meson I'm trying to use one script, and this inconsistency made that harder.
2017-04-04tree-wide: standardize on $(PACKAGE_VERSION) for the version stringZbigniew Jędrzejewski-Szmek
We defined both $(VERSION) and $(PACKAGE_VERSION) with the same contents. $(PACKAGE_VERSION) is slightly more descriptive, so settle on that, and drop the other define.
2017-04-04build-sys: use a single ENABLE_LOGIND conditionalZbigniew Jędrzejewski-Szmek
We used ENABLE_LOGIND for the automake conditional, and HAVE_LOGIND for the ifdef. That wasn't wrong, but it certainly was confusing. Also, move the ifdeffery to avoid warning about unused static function logind_set_wall_message() when logind is disabled.
2017-04-04shared/dissect-image: fix warning about unused function when !HAVE_BLKIDZbigniew Jędrzejewski-Szmek
2017-04-04Move busctl sources to src/busctlZbigniew Jędrzejewski-Szmek
busctl is not part of libsystemd, and should not be stored under libsystemd. In particular this is confusing because busctl is linked with libshared, but stuff in libsystemd is not supposed to depend on libshared.
2017-04-03core: downgrade error message if command is prefixed with `-` and the ↵Yu Watanabe
command is not found Fixes #5621
2017-04-01Merge pull request #5589 from jasonreeder/claimed_address_fixLennart Poettering
libsystemd-network: sd-ipv4ll: acquire new address after claimed addr…
2017-03-31libsystemd-network: sd-ipv4ll: acquire new address after claimed address ↵Jason Reeder
conflict If a conflict occurs on a claimed ipv4ll address, the device releases the address and then does not attempt to acquire a new ipv4ll address. According to RFC3927, releasing the address in this situation is correct. However, this should be followed by an attempt to configure a new ipv4ll address. This commit restarts the ipv4ll address acquisition state machine after releasing the conflicting address. From RFC3927 Section 2.5 conflict defense method (b): ... However, if this is not the first conflicting ARP packet the host has seen, and the time recorded for the previous conflicting ARP packet is recent, within DEFEND_INTERVAL seconds, then the host MUST immediately cease using this address and configure a new IPv4 Link-Local address as described above. ... Signed-off-by: Jason Reeder <jasonreeder@gmail.com>