Commit graph

70975 commits

Author SHA1 Message Date
Yu Watanabe a853cc99e6 network: adjust default RequiredForOnline= and RequiredFamilyForOnline= setting
E.g. a bonding port does not support addressing, hence the default
should be 'enslaved'.

Follow-up for 3255bda698.

Closes #27724.
2024-02-02 15:38:30 +09:00
Yu Watanabe c89efaf9e5 man: fix default behavior of RequiredFamilyForOnline= 2024-02-02 15:38:30 +09:00
Yu Watanabe 2933881ea5
Merge pull request #31032 from yuwata/pam-session-close
pam: fix warning "Attempted to close sd-bus after fork, this should not happen." on session close
2024-02-02 09:51:08 +09:00
Harald Brinkmann 2a9b1a76ee coredump: log minimal metadata early 2024-02-02 09:43:50 +09:00
Yu Watanabe 25d2376052
Merge pull request #31166 from mrc0mmand/vpick-tweaks
vpick: make a working copy of the current dname
2024-02-02 09:37:13 +09:00
Yu Watanabe 68676af60d test-network: fix typo
Follow-up for d4c8de21a0.
2024-02-02 09:29:14 +09:00
Yu Watanabe 58125c1920 test: fix typo
Follow-up for fa8ff98ea4.
2024-02-02 09:27:52 +09:00
Yu Watanabe 04a755466b man/creds: fix typo
Follow-up for 7704c3474d.
2024-02-02 09:25:57 +09:00
Yu Watanabe 49d6e3c8a8 man: fix typo
Follow-up for 34bbda18a5.
2024-02-02 09:24:25 +09:00
Yu Watanabe 35dab29d58 sd-bus: fix typo
Follow-up for 25fd5343ca.
2024-02-02 09:22:43 +09:00
Yu Watanabe 431042e901 sd-bus: fix typo
Follow-up for 71be64064c.
2024-02-02 09:21:18 +09:00
Yu Watanabe 9d7f6b3db4 creds: fix typo
Follow-up for 8464f7cbd6.
2024-02-02 09:20:05 +09:00
Yu Watanabe 14f95de8da local-addresses: fix typo
Follow-up for 5cb56068d0.
2024-02-02 09:18:38 +09:00
Yu Watanabe 77924eab17 tpm2-util: fix typo
Follow-up for d37c312b87.
2024-02-02 09:17:25 +09:00
Yu Watanabe 6a8026e8ae network/ndisc: fix typo
Follow-up for d4c8de21a0.
2024-02-02 09:16:02 +09:00
Yu Watanabe e53fcb0932 repart: fix typo
Follow-up for a575f2148f.
2024-02-02 09:14:50 +09:00
Yu Watanabe 197e77c527 core/unit: fix typo
Follow-up for 16b6af6ade.
2024-02-02 09:13:05 +09:00
Yu Watanabe d282d55d4f cgroup-util: fix typo
Follow-up for 677e6c14b1.
2024-02-02 09:11:42 +09:00
Yu Watanabe a4f1a3087a user-util: fix typo
Follow-up for 75673cd8ae.
2024-02-02 09:10:02 +09:00
Yu Watanabe 3600b0f401 TODO: fix typo
Follow-up for fd40e7da6e.
2024-02-02 09:07:31 +09:00
Luca Boccassi 556d2bc4a1 core: use PidRef in exec_spawn 2024-02-01 21:06:14 +00:00
Gabríel Arthúr Pétursson 47ec2c8a8e cryptenroll: Support rotating PIN on an existing TPM2 enrollment 2024-02-01 13:55:17 +00:00
Frantisek Sumsal d049bffc50 vpick: use prefix_roota() to avoid double slash in log messages
If the toplevel_path is empty we end up with doubled leading slash,
which looks weird:

[ 4737.028985] testsuite-74.sh[102]: Inode '//var/lib/machines/mytree.v/mytree_37.0_arm64+2-3' has wrong type, found 'dir'.
[ 4737.028985] testsuite-74.sh[102]: Failed to pick version for '/var/lib/machines/mytree.v': Is a directory
...
[ 4316.957536] testsuite-74.sh[99]: Failed to open '//var/lib/machines/mytree.v/mytree_37.0': No such file or directory
...
2024-02-01 14:54:06 +01:00
Frantisek Sumsal 9258784762 vpick: make a working copy of the current dname
Since we might edit the string later on by inserting NULs, which then
leads up to using an invalid dname when opening the potential chosen
directory:

[ 4316.957536] testsuite-74.sh[99]: make_choice: entry: mytree_37.0_arm64+2-3
[ 4316.957536] testsuite-74.sh[99]: make_choice: best_version: 37.0
[ 4316.957536] testsuite-74.sh[99]: make_choice: best_filename: mytree_37.0
[ 4316.957536] testsuite-74.sh[99]: Failed to open '//var/lib/machines/mytree.v/mytree_37.0': No such file or directory

Uncovered by vpick tests from TEST-74-AUX-UTILS when run on aarch64.
2024-02-01 14:54:06 +01:00
Gabríel Arthúr Pétursson 631cf7f004 cryptenroll: Add support for unlocking through TPM2 enrollments 2024-02-01 12:37:12 +00:00
Ondrej Kozina 7a87d01f28 homework: Use minimal pbkdf2 parameters without benchmark. 2024-02-01 12:32:31 +00:00
Gabríel Arthúr Pétursson 97fb1fc4b1 cryptenroll: Lock memory pages before operating on the device
This is what systemd-cryptsetup does. We will be unlocking the device,
working with sensitive cryptographic material as well.
2024-02-01 12:20:02 +00:00
Gabríel Arthúr Pétursson 4a67075007 cryptsetup: Fix memory leak when iterating over systemd-tpm2 tokens 2024-02-01 12:20:00 +00:00
Gabríel Arthúr Pétursson 47b425de0c shared: Move cryptsetup-tpm2.[ch] from systemd-cryptsetup 2024-02-01 11:57:52 +00:00
dependabot[bot] f6f00383ff build(deps): bump actions/upload-artifact from 4.0.0 to 4.3.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.0.0 to 4.3.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](c7d193f32e...26f96dfa69)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-01 12:18:13 +01:00
Mike Yuan 75971cd68a
Merge pull request #31107 from yuwata/pam-setcred-vs-close-session
core/exec-invoke: call pam_setcred(PAM_DELETE_CRED) after pam_close_session()
2024-02-01 19:02:40 +08:00
dependabot[bot] 12d1e448b2 build(deps): bump redhat-plumbers-in-action/advanced-issue-labeler
Bumps [redhat-plumbers-in-action/advanced-issue-labeler](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler) from 2.0.6 to 3.0.0.
- [Release notes](https://github.com/redhat-plumbers-in-action/advanced-issue-labeler/releases)
- [Commits](71bcf99aef...9e55064634)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/advanced-issue-labeler
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-01 10:57:02 +01:00
Yu Watanabe 88b8d08276 test: check pam warning message 2024-02-01 18:00:54 +09:00
Yu Watanabe 34e4ad1796 pam: do not warn closing bus connection which is opened after the fork
In pam_systemd.so and pam_systemd_home.so, we open a bus connection on
session close, which is called after fork. Closing the connection is
harmless, and should not warn about that.

This suppresses the following log message:
===
(sd-pam)[127]: PAM Attempted to close sd-bus after fork, this should not happen.
===
2024-02-01 17:59:39 +09:00
Yu Watanabe e1effd2974 exec-invoke: update log message a bit 2024-02-01 17:45:47 +09:00
Yu Watanabe 41ad015205 core/exec-invoke: call pam_setcred(PAM_DELETE_CRED) after pam_close_session()
The man page pam_setcred(3) states:
> The credentials should be deleted after the session has been closed
> (with pam_close_session(3)).

Follow-up for 3bb39ea936.
2024-02-01 17:45:47 +09:00
networkException de39202426 resolve: include interface name in org.freedesktop.resolve1 polkit checks
this patch adds the interface name of the interface to be modified
to *details* when verifying dbus calls to the `org.freedesktop.resolve1`
D-Bus interface for all `Set*` and the `Revert` method.

when defining a polkit rule, this allows limiting the access to a specific
interface:

```js
// This rule prevents the user "vpn" to disable DNSoverTLS for any
// other interface than "vpn0". The vpn service should be allowed
// to disable DNSoverTLS on its own as it provides a local DNS
// server with search domains on the interface and this server does
// not support DNSoverTLS.
polkit.addRule(function(action, subject) {
  if (action.id == "org.freedesktop.resolve1.set-dns-over-tls" &&
      action.lookup("interface") == "vpn0" &&
      subject.user == "vpn") {
    return polkit.Result.YES;
  }
});
```
2024-01-31 19:06:45 +00:00
Lennart Poettering cd2f649dc6
Merge pull request #31141 from poettering/resolvectl-more-json
resolvectl: add JSON output support for "resolvectl query"
2024-01-31 18:59:11 +01:00
Lennart Poettering 700f5b18e3 resolvectl: add basic ANSI markup to --help text
Underline the sections, as we nowadays do.
2024-01-31 16:13:16 +01:00
Lennart Poettering 3557f1a62a resolvectl: add JSON output support for "resolvectl query"
It's easy to add. Let's do so.

This only covers record lookups, i.e. with the --type= switch.

The higher level lookups are not covered, I opted instead to print a
message there to use --type= instead.

I am a bit reluctant to defining a new JSON format for the high-level
lookups, hence I figured for now a helpful error is good enough, that
points people to the right use.

Fixes: #29755
2024-01-31 16:13:16 +01:00
Lennart Poettering bcb004d5ae
Merge pull request #31144 from poettering/less-loopback
don't try to setup a loopback network device unless CLONE_NEWNET is selected (i.e. not in CLONE_NEWIPC case)
2024-01-31 16:05:37 +01:00
Frantisek Sumsal 1d556e9e2a test: use a dropin for the journald snippet
The original way of appending to /etc/systemd/journald.conf doesn't work
anymore, since we no longer ship the default configs in /etc/.
2024-01-31 13:00:01 +00:00
Lennart Poettering 4f6d671dd1 test-namespace: SOCK_CLOEXEC'ify all the things 2024-01-31 13:22:33 +01:00
Lennart Poettering a5387637c2 namespace: don't invoke loopback_setup() unless we allocate a CLONE_NEWNET namespace
It doesn't really make sense to initialize the loopback device if we are
not called for a network namespace.

Follow-up for 54c2459d56
2024-01-31 13:22:07 +01:00
Franck Bui 887b2529eb man: always install bootctl
Since dedb925eaf /usr/bin/bootctl is always built
so does its man page.
2024-01-31 10:32:46 +00:00
Lennart Poettering 4fec9fed61
Merge pull request #30847 from keszybz/some-docs-updates
Some docs updates
2024-01-31 11:09:56 +01:00
Lennart Poettering f277d99c30 update TODO 2024-01-31 10:11:00 +01:00
Daan De Meyer dce5d31c75 mkosi: Stop using file provides with CentOS/Fedora
dnf5 does not download filelists metadata by default anymore as this
consists of a pretty big chunk of the repository metadata. Let's make
sure the filelists metadata doesn't have to be downloaded by dnf5 by
removing any usage of file provides from our package lists.
2024-01-31 09:50:54 +01:00
Adrian Vovk 691b99160d homed: Add InhibitSuspend() method
This returns an FD that can be used to temporarily inhibit the automatic
locking on system suspend behavior of homed. As long as the FD is open,
LockAllHomes() won't lock that home directory on suspend. This allows
desktop environments to implement custom more complicated behavior
2024-01-31 09:48:23 +01:00
Lennart Poettering 116ce3f391
Merge pull request #31039 from AdrianVovk/slice-freeze-thaw
Rework slice recursive freeze/thaw
2024-01-31 09:48:05 +01:00