1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 14:55:37 +03:00
Commit Graph

62428 Commits

Author SHA1 Message Date
Daan De Meyer
77db9ef2ab boot: Make sure we take --root into account everywhere. 2023-02-09 14:46:17 +00:00
Luca Boccassi
dbfd5d3837
Merge pull request #26377 from keszybz/doc-fixups-2
Fix links in man pages
2023-02-09 14:45:40 +00:00
Zbigniew Jędrzejewski-Szmek
f37f0f35cd man: fix links to man pages
Done using linkchecker as usual.
2023-02-09 14:30:43 +01:00
Zbigniew Jędrzejewski-Szmek
359c14368e man: fix section number
Fixes #26376.
2023-02-09 14:04:26 +01:00
Luca Boccassi
7ef09e2099 units: change assert to condition to skip running in initrd/os
These units are also present in the initrd, so instead of an assert,
just use a condition so they are skipped where they need to be skipped.

Fixes https://github.com/systemd/systemd/issues/26358
2023-02-09 12:04:21 +00:00
Daan De Meyer
3b42ffe590 bootctl: Add missing %m 2023-02-09 11:31:57 +00:00
Luca Boccassi
dad1305eca
Merge pull request #26366 from yuwata/nss-myhostname
nss-myhostname: two fixlets
2023-02-09 10:04:14 +00:00
Yu Watanabe
1c3762937e nss-myhostname: do not return empty result with NSS_STATUS_SUCCESS
Fixes a bug introduced by db50d326a4.

Fixes RHBZ#2167468 (https://bugzilla.redhat.com/show_bug.cgi?id=2167468).
2023-02-09 06:07:16 +09:00
Yu Watanabe
a3b993ca3f nss-myhostname: fix inverted condition in
Fixes a bug introduced by db50d326a4.
2023-02-09 05:55:51 +09:00
Luca Boccassi
c80ff4a435
Merge pull request #26354 from bluca/news
NEWS: add future incompatible changes notice
2023-02-08 20:25:10 +00:00
Lennart Poettering
ece6fc51e6 process-util: add missing error check 2023-02-08 20:15:57 +00:00
Zbigniew Jędrzejewski-Szmek
45062a62ac hwdb: add override for IdeaPad5 insert key
Fixes #25968.

I wrote the rule to assume that all IdeaPad5 thingies are like that.
2023-02-08 20:15:27 +00:00
Luca Boccassi
777440f110
Merge pull request #26225 from qdeslandes/fix_delegate_cgroup_logs_filtering
Fix delegate cgroup logs filtering
2023-02-08 19:36:21 +00:00
Zbigniew Jędrzejewski-Szmek
667578bb11 ukify: add explanatory message when import fails 2023-02-08 19:35:42 +00:00
Lennart Poettering
834f759c49 journal: modernize sd_journal_get_realtime_usec() a bit
This does what 404803e6ca did for the
monotonic timestamp getter, but for the realtime timestamp.

It also also makes the return value optional, exactly as for the
monotonic timestamp logic.
2023-02-08 17:33:23 +00:00
Luca Boccassi
318c257835 NEWS: note about future implicit PrivateUsers= in user units 2023-02-08 17:19:56 +00:00
Luca Boccassi
bccad0584e
Merge pull request #26350 from keszybz/reload-messages
Improve messages emitted when Reload or Reexec is requested
2023-02-08 17:05:16 +00:00
Geert Lorang
d5e3d3465c docs/NETWORK_ONLINE: fix example
Type=oneshot is necessary for systemd to actually wait for the service
to return. With RemainAfterExit=yes it won't be started again.

Fixes #26342.
2023-02-08 16:53:53 +00:00
Quentin Deslandes
41b7fcc5e8 journald: fix ignored filtering patterns for delegated cgroups
If a service defines Delegate=yes, its subcgroup won't inherit the
LogFilterPatterns= option, because the option is stored on the unit's
cgroup attributes, not on the subcgroup.

Fixed by using the unit's cgroup attributes instead.
2023-02-08 16:52:51 +01:00
Quentin Deslandes
ee164216d3 core: add cg_path_get_unit_path()
From a given cgroup path, cg_path_get_unit() allows to retrieve the
unit's name. Although, this removes the path to the unit's cgroup,
preventing the result to be used to fetch xattrs.

Introduce cg_path_get_unit_path() which provides the path to the unit's
cgroup. This function behave similarly to cg_path_get_unit() (checking
the validity and escaping the unit's name).
2023-02-08 16:48:58 +01:00
Zbigniew Jędrzejewski-Szmek
f031e8b8dd sd-bus: adjust line breaks 2023-02-08 15:48:43 +01:00
Zbigniew Jędrzejewski-Szmek
1980a25dc0 manager: improve message about Reload/Reexec requests
If we fail to get the necessary information, let's just not print that
part of the message. 'n/a' looks pretty ugly.

I used a bunch of ternary operators instead of seperate log lines because
with two components that might or might not be there, we need four different
combinations.

Also, the unit name doesn't need to be quoted, it's always printable.
2023-02-08 15:48:43 +01:00
Zbigniew Jędrzejewski-Szmek
a99bd455b5 manager: "downgrade" message about command vanishing from the unit file
We would print "Current command vanished from the unit file, execution of
the command list won't be resumed." as a warning, but most of the time there
is nothing to resume, because a unit has just one command. So let's detect
the case where the command that was active is the last command in the sequence
and skip the warning.

I was considering how to store the information that the command is last. An
important consideration is not to use a format that would confuse older versions
of systemd. (It wouldn't be a big problem if older systemd just refused the
new serialization, since we require systemd to be newer, but we should avoid
the case where the deserialization is "successful", but actually incorrect.)
Similarly, the deserialization from the old systemd must not confuse new systemd.
For this command, we have a list of arguments at the end, so just adding a
new field either in the middle or at the end is problematic because it's hard
to ensure that we don't mix up the positional and variable arguments.

We actually need to store just one bit of information, so '+' is prefixed on
the index of the last command and used by new systemd to skip the warning.
When deserializing from older systemd, '+' is not present, so we detect all
commands as "not last", and still emit the warning, so we err on the side of
caution. If the user were to deserialize from newer to older systemd, nothing
untoward would happen, because the '+' is ignored. (Users shouldn't do this,
but we know that this occasionally happens with initrds or exitrds and package
downgrades.)
2023-02-08 15:48:43 +01:00
Luca Boccassi
70879f6ccd NEWS: copy future incompatible changes notice from 252
These are in the future, so it's good to re-emphasize on every release until they
actually happen
2023-02-08 13:38:15 +00:00
Jan Macku
9779079b53 ci: Add names to steps in labeler workflow
This makes it easier to see what step failed/was skipped in the GitHub
Actions UI. It also makes future debugging easier.
2023-02-08 22:37:10 +09:00
Fabian Gurtner
11c0f0659e hwdb: Add HP Envy x360 Convertible 15-cn0xxx to existing entry 2023-02-08 11:01:36 +00:00
Zbigniew Jędrzejewski-Szmek
8eb491f499 test-parse-util: add tests with explicit plus character
I expected this to work, but our tests did not cover this
explicitly.
2023-02-08 12:01:16 +01:00
Zbigniew Jędrzejewski-Szmek
502096b565 core/service: constify ExecCommand* in two functions 2023-02-08 12:01:16 +01:00
Luca Boccassi
398dc7d39b core: imply DeviceAllow=/dev/tpmrm0 with LoadCredentialEncrypted
If the device access policy is restricted, add implicitly access to the TPM
if at least one encrypted credential needs to be loaded.

Fixes https://github.com/systemd/systemd/issues/26042
2023-02-08 10:59:55 +00:00
Luca Boccassi
b0fc23fae5 cryptenroll: do not implicitly verify with default tpm policy signature
If it was not requested to use a tpm2 signature file when enrolling, do
not fallback to the default /run/systemd/tpm2-pcr-signature.json as it
likely will be unrelated if it exists.

Fixes https://github.com/systemd/systemd/issues/25435
2023-02-08 10:58:57 +00:00
msizanoen1
500cd2e83b unit: always return 1 in log_kill
This ensures that cg_kill_items returns the correct value to let the
manager know that a process was killed.
2023-02-08 11:33:54 +01:00
Zbigniew Jędrzejewski-Szmek
ef9962212a
Merge pull request #26328 from yuwata/udev-worker-set-process-name
udev: set worker process name
2023-02-08 08:57:05 +01:00
Lennart Poettering
9eba03c7b1 journal: minor modernizations 2023-02-07 19:36:47 +00:00
Luca Boccassi
b4cdd8792e
Merge pull request #26337 from poettering/journal-display-ts
logs-show: rename "ts" paramater/variable to "display_ts"
2023-02-07 19:36:27 +00:00
Luca Boccassi
19995b8121
Merge pull request #26336 from poettering/journal-etoomanyrefs
journal: print nicer log message when limit of open journal files during display is hit
2023-02-07 19:35:56 +00:00
Luca Boccassi
2a0e9089cc
Merge pull request #26335 from keszybz/dns-not-found
resolve: adjust message for NXDOMAIN lookup result
2023-02-07 19:33:07 +00:00
drosdeck
2f2d948293 Fix Positivo-vaio VJPW12F11X key toggle touchpad 2023-02-07 16:31:50 +01:00
Zbigniew Jędrzejewski-Szmek
c820bd413e
Merge pull request #26338 from jamacku/fix-labeling
ci: Fix automatic removing of labels when PR is closed
2023-02-07 16:27:06 +01:00
Jan Macku
de95bb2a98 ci: remove if: github.event.issue.pull_request from labeler.yml
`github.event.issue.pull_request` is an object, not a boolean.
This is the root cause of why the step that is supposed to remove labels
is always skipped. Having this condition in place is not necessary since
the workflow is run on the `pull_request_target` event.
2023-02-07 16:00:49 +01:00
Lennart Poettering
4e30b87d94 logs-show: rename "ts" paramater/variable to "display_ts"
When displaying log data we deal with two kind of timestamps: the one we
use for display (typically the source timestamp if available), and the
one we use internally (typically the reception timestamp of journald).

The user-facing output modes generally use the display timestamp, the
ones intended for further processing (i.e. json + export outputs) do
not, and directly query the timestamps of the entry, ignoring the
source. This gets a bit confusing, since it's not always clear why we
use which timestamp where. Let's address that by renaming the generic
"ts" parameter/variable to "display_ts" to emphasize that the stored
timestamp are "corrected" timestamps for display only.

No real code change, just some renaming.
2023-02-07 15:52:22 +01:00
Jan Macku
d709b92ef1 ci: fix missing quotes in labeler.yml 2023-02-07 15:39:37 +01:00
Lennart Poettering
2fbfdb1edc update TODO 2023-02-07 15:12:07 +01:00
Lennart Poettering
763c46defa journal: print a useful error message if we hit the journal file open limit
See: #20921
2023-02-07 15:12:07 +01:00
Zbigniew Jędrzejewski-Szmek
bbb86efa7c resolve: adjust message for NXDOMAIN lookup result
Previously, we reported:
  nx.example.org: resolve call failed: 'nx.example.org' not found
But the call did succeed, and in fact all communication with the upstream
servers was successful, and we got an authoritative negative answer.
So instead of saying that the call fail, just say that the host doesn't exist:
  nx.example.org: Name 'nx.example.org' not found

I wanted to keep the prefix of "<name>: ", to keep the output uniform. But
it'd look a bit strange to say "<name>: <name> not found", so I added "Name "
to make the output more readable. (Another option would be to not display
the error string received from resolved, but that seems risky: even if right
now resolved uses just one message format, it could start doing something else
in the future, so it's better to display the error as received.)

Fixes #26233.
2023-02-07 14:49:58 +01:00
Zbigniew Jędrzejewski-Szmek
03e80572a7 resolve: define normal macros for BUS_ERROR_DNS error codes
This result is identical after cpp is done, so we don't save anything
by not having the usual macros. And with the usual macros it's easier to
grep and code-crossreferencing works better.
2023-02-07 14:49:58 +01:00
Yu Watanabe
f3f2d02e97 tree-wide: set FORK_RLIMIT_NOFILE_SAFE flag
No functional changes, just refactoring.
2023-02-07 14:39:49 +09:00
Yu Watanabe
e955a7f460 udevd: configure a child process name for worker processes
This effectively reverts commit ff86c92e30,
and re-apply 49f3ee7e74.

The change was dropped due to the process name was not correctly logged,
but the issue was fixed by dd15e4cb57.
Let's set the child process name again.
2023-02-07 14:38:55 +09:00
Yu Watanabe
8586e8ab84
Merge pull request #26324 from yuwata/argv-util-update-short-name
argv-util: also update short invocation name
2023-02-07 12:08:07 +09:00
Yu Watanabe
5746c82968
Merge pull request #26322 from keszybz/log-errno-fix
Log errno fix
2023-02-07 12:07:45 +09:00
Yu Watanabe
e7ced42d24
Merge pull request #26321 from keszybz/flex-arrays
Enable new compiler diagnostics for invalid array accesses
2023-02-07 12:07:21 +09:00