1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-27 01:57:35 +03:00

58314 Commits

Author SHA1 Message Date
Yu Watanabe
c0f664ca89 sd-bus: merge message_peek_fields() and buffer_peek() 2022-06-01 03:41:15 +09:00
Yu Watanabe
75c85c3b25 sd-bus: make several functions static
And drop 'bus_' prefix from them.
2022-06-01 03:41:15 +09:00
Yu Watanabe
590a738562 sd-bus: use UINT32_MAX 2022-06-01 03:41:15 +09:00
Yu Watanabe
b7096bd690 sd-bus: drop unnecessary cast 2022-06-01 03:41:15 +09:00
Yu Watanabe
30da99bd30 sd-bus: drop redundant condition
By the previous commit, ALIGN8() is always equal to or greater than the
argument.
2022-06-01 03:41:15 +09:00
Yu Watanabe
dc7be33266 sd-bus: use ALIGN8() 2022-06-01 03:41:15 +09:00
Yu Watanabe
b4e7df4a47 boot: use ALIGN4() 2022-06-01 03:41:15 +09:00
Yu Watanabe
4c8d7caf1a macro: make ALIGN4() and ALIGN8() also return SIZE_MAX on overflow
This also drops unused ALIGN4_PTR(), ALIGN8_PTR(), and ALIGN_TO_PTR().
2022-06-01 03:40:20 +09:00
Yu Watanabe
394129f88b tree-wide: use ALIGN_PTR() 2022-06-01 03:12:33 +09:00
Alexander Shopov
1c1cb8ec6f Move message repeat
Original catalog file is in English
Move the repeating German message to German catalog

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2022-06-01 00:20:30 +09:00
Alexander Shopov
3e597d0d35 Update Bulgarian translation
po: catalog: Bring bg.po and catalog file to 100%

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2022-05-31 16:34:25 +02:00
Yu Watanabe
a0f0cf0a6b portable: fix command option in comment
Follow-up for edea370222eec3d185dd84a7d9e942ec5933af63.
2022-05-31 16:32:09 +02:00
Zbigniew Jędrzejewski-Szmek
978af07f66 logind: use consistent casing in message
The other strings use "sentence capitalization". Let's do the
same here.
2022-05-31 15:59:40 +02:00
Zbigniew Jędrzejewski-Szmek
3c98bdce55 logind: align tables 2022-05-31 15:59:29 +02:00
Zbigniew Jędrzejewski-Szmek
1661833238 shared/utmp-wtmp: pass information if entry is local to filter function
This just adds an unused parameter for future use. No change in
behaviour.
2022-05-31 15:54:16 +02:00
Zbigniew Jędrzejewski-Szmek
b5cb2d2847 tty-ask-password-agent: drop unnecessary code for non-absolute paths
utmp_wall() always prepends /dev/, so we don't need to do this a second
time here.
2022-05-31 15:54:03 +02:00
Jan Janssen
7783ab5df1 boot: Use xstrdup8/16
Note that xstrdup is now safe to call with a NULL pointer and will
just return NULL in that case.
2022-05-31 15:15:01 +02:00
Jan Janssen
101f68ff33 boot: Add xstrdup8/16 2022-05-31 15:15:01 +02:00
Jan Janssen
bbc1f2eac5 boot: Use memcmp/memcpy/memset 2022-05-31 15:15:01 +02:00
Jan Janssen
f7967716e3 boot: Add memcmp/memcpy/memset 2022-05-31 15:14:56 +02:00
Jan Janssen
60c2af56d6 boot: Use strsize8/16 2022-05-31 15:14:56 +02:00
Jan Janssen
96dc0dd387 boot: Add strsize8/16 2022-05-31 15:14:54 +02:00
Jan Janssen
fb67588c62 boot: Use strchr8/16 2022-05-31 15:13:58 +02:00
Jan Janssen
5d7e0e8341 boot: Add strchr8/16 2022-05-31 15:13:58 +02:00
Jan Janssen
08ed842b56 boot: Use strcpy8/16 2022-05-31 15:10:48 +02:00
Jan Janssen
ef4d71ad7f boot: Add strcpy8/16 2022-05-31 15:10:48 +02:00
Jan Janssen
fc178cf1f8 boot: Use strtolower8/16 2022-05-31 15:10:48 +02:00
Jan Janssen
98850528bf boot: Add strtolower8/16 2022-05-31 15:10:45 +02:00
Jan Janssen
3d5127c68f boot: Use strcmp16 for cpio sorting 2022-05-31 15:09:10 +02:00
Jan Janssen
ec436bdf16 boot: Use strcmp8/16
This also replaces streq and similar functions for consistency. Note
that streq16 is null pointer safe, so streq_ptr can be safely replaced
too.
2022-05-31 15:09:10 +02:00
Jan Janssen
0d933d024a boot: Add strcmp8/16 2022-05-31 15:09:06 +02:00
Jan Janssen
5f49747255 boot: Use strlen8/16
The casts in this and the next few commits are curently necessary
because CHAR8 is defined as uint8_t in gnu-efi, while char is signed.
Once we switch from gnu-efi typedefs to stdint types, the casts
will be dropped.
2022-05-31 14:18:43 +02:00
Jan Janssen
9080ffd4cd boot: Add strlen8/16 2022-05-31 14:18:43 +02:00
Jan Janssen
11f9a32de0 boot: Use stddef.h offsetof 2022-05-31 14:18:43 +02:00
Frantisek Sumsal
a52765a550 seccomp: fix a typo in error message 2022-05-31 18:29:40 +09:00
Yu Watanabe
71891fb2de
Merge pull request #23558 from msekletar/issue-20329-followup
Actually delay running of mount start jobs when /p/s/mountinfo is rate limited
2022-05-31 17:38:25 +09:00
Matthias Lisin
b3c57bd76c docs: fix typo XBOOOTLDR -> XBOOTLDR 2022-05-31 10:20:33 +02:00
Jason A. Donenfeld
87cb1ab676 Simplify random number selection
We currently have a convoluted and complex selection of which random
numbers to use. We can simplify this down to two functions that cover
all of our use cases:

1) Randomness for crypto: this one needs to wait until the RNG is
   initialized. So it uses getrandom(0). If that's not available, it
   polls on /dev/random, and then reads from /dev/urandom. This function
   returns whether or not it was successful, as before.

2) Randomness for other things: this one uses getrandom(GRND_INSECURE).
   If it's not available it uses getrandom(GRND_NONBLOCK). And if that
   would block, then it falls back to /dev/urandom. And if /dev/urandom
   isn't available, it uses the fallback code. It never fails and
   doesn't return a value.

These two cases match all the uses of randomness inside of systemd.

I would prefer to make both of these return void, and get rid of the
fallback code, and simply assert in the incredibly unlikely case that
/dev/urandom doesn't exist. But Luca disagrees, so this commit attempts
to instead keep case (1) returning a return value, which all the callers
already check, and fix the fallback code in (2) to be less bad than
before.

For the less bad fallback code for (2), we now use auxval and some
timestamps, together with various counters representing the invocation,
hash it all together and provide the output. Provided that AT_RANDOM is
secure, this construction is probably okay too, though notably it
doesn't have any forward secrecy. Fortunately, it's only used by
random_bytes() and not by crypto_random_bytes().
2022-05-31 09:20:52 +02:00
Zbigniew Jędrzejewski-Szmek
fada4bdcaa
Merge pull request #23533 from yuwata/portable-remove-drop-in-configs
portable: remove drop-in configs
2022-05-31 08:52:30 +02:00
Yu Watanabe
4282f39430
Merge pull request #23564 from yuwata/core-unit-add-dep
core: fix notification about unit dependency change
2022-05-31 14:07:34 +09:00
msizanoen1
37f0289bf5 cgroup-util: Properly handle conditions where cgroup.threads is empty after SIGKILL but processes still remain
After sending a SIGKILL to a process, the process might disappear from
`cgroup.threads` but still show up in `cgroup.procs` and still remains in the
cgroup and cause migrating new processes to `Delegate=yes` cgroups to fail with
`-EBUSY`. This is especially likely for heavyweight processes that consume more
kernel CPU time to clean up.

Fix this by only returning 0 when both `cgroup.threads` and
`cgroup.procs` are empty.
2022-05-31 05:03:31 +09:00
Yu Watanabe
9a18321058
Merge pull request #23560 from mrc0mmand/coccinelle
A couple of tweaks suggested by Coccinelle
2022-05-31 05:02:57 +09:00
Zbigniew Jędrzejewski-Szmek
d61ee4a33b
Merge pull request #23565 from bnf/man-nspawn-wording
man: nspawn related wording improvements
2022-05-30 21:50:57 +02:00
Benjamin Franzke
926f2a04fc man/nspawn: os-release is only checked for booted containers
/etc/os-release existence is only enforced in --boot mode,
therefore the term "starting" (which also applies to chroot-like mode)
is substituted with "booting" in this context.
2022-05-30 20:26:44 +02:00
Benjamin Franzke
3a9d9f2a23 man/nspawn: add a sentence-connecting adverb to machinectl note
The recommendation to use machinectl login/shell instead of
trying to combine two distinct container instances seemed a
litte bit out of context and is now combined via "rather".
2022-05-30 20:21:27 +02:00
Benjamin Franzke
b47013fd77 man/nspawn: fix boot-option related wording 2022-05-30 20:21:27 +02:00
Yu Watanabe
a8c5a4c6c2 core: make unit_add_two_dependencies() or friends return 1 on changed
Follow-up for f971def3c23d780aab99d988bd71b94931d74be6.
2022-05-31 01:53:11 +09:00
Yu Watanabe
ac17080c04 core/unit: fix notification about unit dependency change
This also makes unit_add_dependency() return 1 only when a dependency
is added.
2022-05-31 01:53:11 +09:00
Yu Watanabe
35207b14cf
Merge pull request #23562 from yuwata/fix-typo
Fix typo
2022-05-31 01:52:39 +09:00
Yu Watanabe
5473bc61af esp: fix typo
Follow-up for 13d7c841a24f784995a000230706f259c4baec96.
2022-05-31 01:17:34 +09:00