1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 19:21:53 +03:00
Commit Graph

52397 Commits

Author SHA1 Message Date
Lennart Poettering
91d0750dbf
Merge pull request #19854 from poettering/journal-enum-uniq-fix
fix journalctl -F
2021-06-09 15:37:01 +02:00
Lennart Poettering
34254e599a seccomp: add some recently added syscalls to filter groups 2021-06-09 15:36:19 +02:00
Zbigniew Jędrzejewski-Szmek
fe50aae5e1 core/serialization: call exec_runtime_deserialize_compat() independently of whether .serialize is defined
There is no reason to tie the two together: in principle we may have
in the future a unit type which does not define .serialize/.deserialize_item,
but we would still want to call the compat deserialization code for it.
2021-06-09 12:54:27 +02:00
Zbigniew Jędrzejewski-Szmek
6923020ec1 networkd: reorder conditional to handle errors first
This also avoid the implicit assumption that if r is not -ENOENT, 0, or 1,
it must be negative. The compiler cannot know this.
2021-06-09 12:48:52 +02:00
Lennart Poettering
86e2c53c7f hwdb: run ninja hwdb-update 2021-06-09 11:45:08 +02:00
Lennart Poettering
2ded911208 hwdb: run ninja update-hwdb-autosuspend 2021-06-09 11:41:13 +02:00
Lennart Poettering
5156e6804d syscalls: run ninja update-syscall-* 2021-06-09 11:40:14 +02:00
Lennart Poettering
00fb6caf70 update NEWS 2021-06-09 11:37:26 +02:00
Štěpán Němec
7833a46ca1 docs/CGROUP_DELEGATION: fix some typos 2021-06-09 11:04:17 +02:00
Lennart Poettering
bead169fe0
Merge pull request #19851 from poettering/bpf-firewall-tweaks
close bpf firewall reload gap
2021-06-09 09:47:23 +02:00
Lennart Poettering
2e1a8a5dab journal: don't try to reuse already calculated hash between files with keyed hash feature
When suppressing duplicate fields between files we so far tried to reuse
the already known hash value of the data fields between files. This was
fine as long as we used the same hash function everywhere. However,
since addition of the keyed hash feature for journal files this doesn't
work anymore, since the hashes will be different for different files.

Fixes: #19172
2021-06-09 09:34:55 +02:00
Lennart Poettering
8d5a1082b0 journal: remove an unnecessary 'else' 2021-06-09 09:34:55 +02:00
Lennart Poettering
0e0b05294b journal: make return parameters for sd_journal_enumerate_unique() optional 2021-06-09 09:34:50 +02:00
Lennart Poettering
f4cb1bfd57 journal: as per coding style don't clobber return parameters in sd_journal_get_cutoff_monotonic_usec() on failure 2021-06-09 09:34:50 +02:00
Lennart Poettering
900952ecd5 journal: use free_and_strdup() where appropriate 2021-06-09 09:34:50 +02:00
Lennart Poettering
d8671b1c6f journal: add some careful overflow checking 2021-06-09 09:34:50 +02:00
Yu Watanabe
21e43a7c51 tmpfile: several minor coding style fixes
This makes the followings:
- reduces scope of variables,
- drop unnecessary 'else'
- use CLOSE_AND_REPLACE() macro
- use strnull() for possible NULL string
2021-06-09 13:30:19 +09:00
Yu Watanabe
045d7232b5
Merge pull request #19852 from yuwata/network-stable-secret
network: introduce IPv6StableSecretAddress= to configure secret key for generating IPv6LL address
2021-06-09 12:30:57 +09:00
Lennart Poettering
e68778a3ac journald: when journald namespace instances log, they can do so safely to the main journald instance
Fixes: #18951
2021-06-09 12:30:22 +09:00
Yu Watanabe
0acd7f1c5f
Merge pull request #19831 from yuwata/network-next2
network: several interface up/down and setting MTU related updates
2021-06-09 12:27:37 +09:00
Luca Boccassi
165c23c6b2 NEWS: list more recent changes 2021-06-08 21:23:26 +01:00
Lennart Poettering
dbef3d163b bpf-firewall: close gap when updating the firewall
If we have BPF_F_ALLOW_MULTI support we can install the new program
before we drop the old (because we can install two program at the same
time). Let's do that, and thus fully close the firewall
gap.
2021-06-08 22:02:35 +02:00
Lennart Poettering
a947ebb515 bpf-program: document BPFProgram a bit 2021-06-08 22:02:35 +02:00
Lennart Poettering
b57d752326 bpf-program: serialize attached BPF programs across daemon reexec/reload
Alternative to #17495
2021-06-08 22:02:35 +02:00
Lennart Poettering
7a7cf83dc3 bpf-program: export hash_ops for BPFProgam objects 2021-06-08 22:02:35 +02:00
Lennart Poettering
06ad9d0c12 bpf-program: use structured initialization when allocating BPFProgram objects 2021-06-08 22:02:35 +02:00
Lennart Poettering
d63a3d350f bpf-link: prefix function names with "bpf_"
we generally do this for all bpf functions, do so here too.
2021-06-08 22:02:35 +02:00
Lennart Poettering
cd09a5f3c1 core: rename socket-bind.[ch] → bpf-socket-bind.[ch]
The other BPF infra has a file name prefix of "bpf-" hence do so here
too.
2021-06-08 22:02:32 +02:00
Yu Watanabe
baa95d2274 network: do not process requests which conditionalized with link flags while the flags are updating
E.g. nexthop requires IFF_UP flag, but the currently stored flag may be
outdated if we called link_down(). This makes such requests pending if
at least one of the flags are updating.
2021-06-09 04:59:23 +09:00
Yu Watanabe
2a057a7340 network: make several link settings critical 2021-06-09 04:59:23 +09:00
Yu Watanabe
712fd5d25a network: use request queue to handle always-up or -down activation policy 2021-06-09 04:59:23 +09:00
Yu Watanabe
68f5206349 network: use request queue to handle bound_to list 2021-06-09 04:59:23 +09:00
Yu Watanabe
aa9117c0c4 network: handle bound_by list even if IgnoreCarrierLoss=yes 2021-06-09 04:59:23 +09:00
Yu Watanabe
ad82f0c32b network: add brief comments about bound_to and bound_by list 2021-06-09 04:59:23 +09:00
Yu Watanabe
899b0e5eec network: apply activation policy only when it is once activated
Otherwise, e.g., if activation policy is always-up is set for bond
slave, then setting bond configuration may fail.
2021-06-09 04:59:23 +09:00
Yu Watanabe
da4929eeb9 network: do not drop requests on carrier lost
On carrier lost, then all requests which require carrier will not be
processed. And they will be processed when the interface gained its
carrier again. So, it is not necessary to drop requests here.
2021-06-09 04:59:23 +09:00
Yu Watanabe
e95c06c977 network: route: update error message 2021-06-09 04:59:23 +09:00
Yu Watanabe
e56e1a15b5 network: also adjust IPv6 MTU by the maximum MTU of the interface 2021-06-09 04:59:23 +09:00
Yu Watanabe
717ba5fc90 network: read the minimum and maximum MTU of the interface, and adjust requested MTU based on these values 2021-06-09 04:59:23 +09:00
Yu Watanabe
7558f9e717 network: use request queue to configure CAN interfaces
This also makes SR-IOV configurations are ignored for CAN interfaces,
as CAN interfaces seem not to support SR-IOV features.
2021-06-09 04:59:23 +09:00
Yu Watanabe
4681ab5547 test-network: add a test case for IPv6StableSecretAddress= 2021-06-09 04:56:52 +09:00
Yu Watanabe
9e1432d5cc network: introduce IPv6StableSecretAddress= setting
Previously, IPv6LinkLocalAddressGenerationMode= is not set, then we
define the address generation mode based on the result of reading
stable_secret sysctl value. This makes the mode is determined by whether
a secret address is specified in the new setting.

Closes #19622.
2021-06-09 04:56:48 +09:00
Lennart Poettering
0b05142494 bpf: various coding style fixes
Mostly logging related: let's downgrade logging in dlopen_bpf() for
example, and remove duplicate logging at various places. Add %m to log
messages and so on.
2021-06-08 21:54:49 +02:00
Lennart Poettering
0fd9c28cc9 bpf-firewall: move destruction of IP firewall objects to bpf-firewall.c
These are so many runtime objects, let's add a bpf_firewall_close()
helper that destroys them all, and call that from unit_free(), simply as
an excercise of encapsulating more BPF code in bpf-firewall.c.

This also brings the destruction order and variable declaration order in
struct Unit into the same systematic order.

No change in behaviour just some minor refactoring.
2021-06-08 21:54:49 +02:00
Zbigniew Jędrzejewski-Szmek
7ff9d99e9e test-libcrypt-util: print out default for password settings, run make_salt() a few times
Inspired by
https://fedoraproject.org/wiki/Changes/yescrypt_as_default_hashing_method_for_shadow.
2021-06-08 21:41:17 +02:00
Zbigniew Jędrzejewski-Szmek
a77f9dfbae resolved: fix strange function recursion
In dns_server_unlink_marked() and dns_server_mark_all() we done recursively.
People might have dozens of servers defined, and it's better to avoid recursion
when a simple loop suffices.

dns_server_unlink_marked() would only unmark the first marked server.

Fixes #19651.
2021-06-08 21:40:54 +02:00
Vito Caputo
592d419ce6 journal-file: truncate archived journals
Journal files have space allocated in 8MiB-aligned increments.

This can add up to substantial wasted space as many archived journals
accumulate without using all the allocated space.

This commit introduces truncating to the offset a subsequent append
would get written at when archiving.

Fixes https://github.com/systemd/systemd/issues/17613
2021-06-08 21:36:47 +02:00
Yu Watanabe
61730746f7 dissect: find partition more frequently
With the previous commit, the partition may be found after 45 sec. It is
too late. Let's find partition more frequently.
2021-06-09 02:54:44 +09:00
Yu Watanabe
05c3c620f7 dissect: try to find partition again on timeout
Not sure, but at the time the target partition device is created or
enumerated, some sysattrs or properties may not be ready.

So, let's find partition on timeout. The device may be ready at that
time.
2021-06-09 02:54:29 +09:00
Srinidhi Kaushik
7f7a50dd15 tmpfiles: extend "Age" to accept an "age-by" argument
For "systemd-tmpfiles --cleanup", when the "Age" parameter
is specified, the criteria for deletion is determined from
the path's last modification timestamp ("mtime"), its last
access timestamp ("atime") and its last status change
timestamp ("ctime").

For instance, if one of those paths to be cleaned up are
opened, it results in the modification of "atime", which
results file system entry to not be removed because the
default aging algorithm would skip the entry.

Add an optional "age-by" argument by extending the "Age"
parameter to restrict the clean-up for a particular type
of file timestamp, which can be specified in "tmpfiles.d"
as follows:

  [age-by:]cleanup-age, where age-by is "[abcmACBM]+"

For example:

  d /foo/bar - - - abM:1m -

Would clean-up any files that were not accessed and created,
or directories that were not modified less than a minute ago
in "/foo/bar".

Fixes: #17002
2021-06-08 18:24:58 +02:00