Age | Commit message (Collapse) | Author |
|
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.
|
|
disabled (#5791)
|
|
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.
|
|
service: serialize information about currently executing command
|
|
|
|
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.
|
|
|
|
|
|
Printf annotation improvements
|
|
Various meson-independent cleanups from the meson patchset
|
|
Fixes #5765.
|
|
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.
|
|
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.
|
|
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.
|
|
This is safe, because we're taking a pattern which was already marked with
_printf_ and appending a literal string.
|
|
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.
|
|
C.f. 21b6ff368438bd3e809c2fabe73038eb305df296.
|
|
gcc-7 warns about this with -Wduplicate-decl-specifier.
|
|
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.
|
|
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.
|
|
It's not necessary for anything.
|
|
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.
|
|
Add support to configure GVRP.
Closes #5760
|
|
target_add_default_dependencies. (#5762)
Almost units check default_dependencies within [unit]_add_default_dependencies
except target unit.
|
|
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
|
|
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.
|
|
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.
|
|
We always define those paths in the configure scripts.
|
|
We already provide a definition through the configuration system, this
one is duplicate.
|
|
Fixes wrong indent introduced by the commit 43688c49d1fdb585196d94e2e30bb29755fa591b.
|
|
ARM32 cross-compile fixes
|
|
Fixes #5733
|
|
core: downgrade error message if command is prefixed with `-` and the…
|
|
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.
|
|
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
|
|
Fixes #5607
|
|
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
|
|
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.
|
|
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.
|
|
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.
|
|
Move busctl to its own dir and other cleanups
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
command is not found
Fixes #5621
|
|
libsystemd-network: sd-ipv4ll: acquire new address after claimed addr…
|
|
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>
|