1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00
Commit Graph

70234 Commits

Author SHA1 Message Date
Yu Watanabe
0c61995d80 resolvectl: use JSON_ALLOW_EXTENSIONS
Follow-up for f0e4244b2f.
2024-01-11 02:10:32 +09:00
Yu Watanabe
41398e8793 resolve: several follow-ups for 9ca133e97a.
- add missing initialization for DnsQuery.answer_ede_rcode,

- clear EDE code and message in dns_transaction_reset_answer(),
  otherwise the previous EDE code or message may be mistakenly reused
  on restart. This fixes memory leak of DnsTransaction.answer_ede_msg.

- also clear EDE code and message in dns_query_reset_answer(),
  otherwise ede message is leaked if dns_query_accept() is called
  multiple times for the same DnsQuery.

Follow-up for 9ca133e97a.

Fixes #30752.
2024-01-11 02:10:11 +09:00
Lennart Poettering
563c5511ad pam_systemd_home: move two bool flags into a proper flags parameter
We are going to add more shortly, but this makes sense on its own.

No changes in behaviour.
2024-01-10 17:53:57 +01:00
Antonio Alvarez Feijoo
4f464e7419
firstboot: fix memory leak 2024-01-10 17:31:49 +01:00
Antonio Alvarez Feijoo
981644edc9
firstboot: fix typo and add missing option to help text 2024-01-10 17:29:56 +01:00
Lennart Poettering
9a70dc02c6
Merge pull request #30786 from yuwata/udev-net-link-property
udev/net: introduce [Link] Property= setting and friends
2024-01-10 15:56:29 +01:00
Damien Challet
3a0fbeacea
hwdb: add Teclast X98 Pro sensor info (#30859)
added Teclast X98 Pro
2024-01-10 15:12:56 +01:00
Antonio Alvarez Feijoo
398760c84a kernel-install: clarify what is currently supported with --root and --image
`list` and `add-all` ignore `--root` or `--image`, working on the running
system instead.
Also improve the error message if `--image` is used.
2024-01-10 12:40:35 +00:00
Yu Watanabe
9540f8e216 test-network: add test case for MACAddress=none in .netdev and MACAddressPolicy=none in .link
Prompted by #30813.
2024-01-10 12:07:23 +01:00
Lennart Poettering
8d27d78784
Merge pull request #30860 from aafeijoo-suse/kernel-install-leak-fix
kernel-install/coredumpctl: fix memory leaks
2024-01-10 10:47:32 +01:00
Nick Rosbrook
76808638b6 test: skip test_exec_networknamespacepath if netns setup fails
In some environments, such as a LXD container, the netns setup might
fail because ip netns exec fails trying to mount /sys:

 $ systemd-detect-virt
 lxc
 $ ip link add dummy-test-exec type dummy
 $ ip netns add test-execute-netns
 $ ip netns exec test-execute-netns ip link add dummy-test-ns type dummy
 mount of /sys failed: Operation not permitted

If this setup fails, test_exec_networknamespacepath will fail, so check
the exit codes for these setup calls and skip the test if necessary.
2024-01-10 08:59:22 +00:00
Lennart Poettering
a795ec8100
Merge pull request #30839 from yuwata/detect-virt-google
detect-virt: add Google Compute Engine support
2024-01-10 09:55:44 +01:00
Lennart Poettering
f5812f337d
Merge pull request #30849 from YHNdnzj/daemon-modernization
Modernize a couple of daemons that use bus_event_loop_with_idle
2024-01-10 09:55:12 +01:00
Mike Yuan
95bcaa4e81 creds-util: make read_credential_strings_many behave the same as comment
The comment states "If the specified buffers are already non-NULL
frees them if a credential is found".

Also return 1 if all credentials are found.
2024-01-10 09:54:39 +01:00
Lennart Poettering
ff85480458
Merge pull request #30853 from YHNdnzj/mount-accept-fstab-node
core: allow fstab-style nodes in mount/swap What=
2024-01-10 09:54:18 +01:00
Antonio Alvarez Feijoo
57ab094d73
coredumpctl: fix memory leak 2024-01-10 09:30:50 +01:00
Antonio Alvarez Feijoo
d1b1cf8f26
kernel-install: fix memory leak 2024-01-10 09:20:15 +01:00
Yu Watanabe
9ae51762d7 resolve: drop DNS_TRANSACTION_UPSTREAM_DNSSEC_FAILURE
This partially reverts commit 9ca133e97a.

Not only there is no reason to introduce a new transaction failure state,
but also the commit introduces several severe issues.

Fixes #30776, #30779.
2024-01-10 13:14:14 +09:00
Yu Watanabe
c08fd7beca resolve: several follow-ups for ac6844460c
- fix indentation,
- drop incorrect comment, dns_packet_ede_rcode() can handle unknown EDE rcode.
- 0 is a valid EDE rcode,
- DnsTransaction.answer_ede_msg may be NULL, so needs to use strempty()
  on logging,
- drop redundant ede_rcode temporary variable.

Follow-up for ac6844460c.
2024-01-10 13:13:11 +09:00
Yu Watanabe
71682ac6bb resolve: cleanup dns_packet_ede_rcode()
This makes the following:
- make dns_packet_ede_rcode() return -EINVAL when EDE code not found.
  Otherwise, the caller may be confused that the packet has an unknown
  error code.
- make the function escape EDE message only when non-utf8 message is received.
- the message handling logic is applied even if the error code is unknown, as
  there is no reason that we escape EDE message only when an known error code
  is received.
- reduce scope of variables,
- drop redundant 'else',
- append full stop to the log messages,
- drop redundant log message in the caller,
- split out error in the function and returned EDE error code.

Follow-up for ac6844460c.
2024-01-10 13:06:02 +09:00
Yu Watanabe
a92ea352a5 resolve: update rcode table and align enum definitions 2024-01-10 10:23:14 +09:00
Yu Watanabe
eabc38daa8 TODO: drop implemented feature 2024-01-10 04:33:55 +09:00
Yu Watanabe
d26319be92 test: add test for [Link] Property= and friends 2024-01-10 04:33:55 +09:00
Yu Watanabe
046286e863 udev/net: introduce [Link] Property=, ImportProperty=, and UnsetProperty= settings
The applied order is equivalent to Environment=, PassEnvironment=, and
UnsetEnvironment= for [Service] or so.
2024-01-10 04:33:51 +09:00
Yu Watanabe
513ca8b6f0 udev: split out check that udev property can be updated 2024-01-10 04:27:41 +09:00
Yu Watanabe
3e00171dcd udev/net: split out udev property assignment logic
No functional change, just refactoring.
2024-01-10 04:27:41 +09:00
Yu Watanabe
0c3af33e19 udev/net: do not set unapplied .link file name to ID_NET_LINK_FILE
Instead, import already assigned value from the udev database.
Then, return the builtin earlier.
2024-01-10 04:27:41 +09:00
Yu Watanabe
ac36406277 udev-builtin-path_id: drop redundant debugging logs
The function udev_builtin_add_property() internally logs the failure.
2024-01-10 04:27:26 +09:00
Yu Watanabe
50a0379d5d udev/builtin: introduce udev_builtin_import_property() helper function
This is not used in this commit, but will be used later commits.
2024-01-10 04:11:08 +09:00
Yu Watanabe
12b1e04073 man: fix indentation 2024-01-10 03:50:32 +09:00
Yu Watanabe
9b0688f491 virt: add Google Compute Engine support
See https://cloud.google.com/run/docs/container-contract#sandbox
2024-01-10 03:08:31 +09:00
Mike Yuan
435e1098ee
core: allow fstab-style nodes in mount/swap What=
Closes #28989
2024-01-10 02:07:18 +08:00
Mike Yuan
e195a5c1e9
core/load-fragment: use unit_path_printf where appropriate 2024-01-10 02:07:17 +08:00
Lennart Poettering
84960b7f3c
Merge pull request #30844 from keszybz/rename-uid-alloc-range
Rename uid-alloc-range.[ch] files
2024-01-09 18:51:35 +01:00
Lennart Poettering
d16d05d2d3 nspawn: drop empty #if/#endif section
Follow-up for adb29d588e
2024-01-09 16:06:30 +01:00
Daan De Meyer
8c018edb0a mkosi: Update to latest
The mkosi github action doesn't set up the host machine for building
full images anymore. Instead, only sufficient packages are installed
to be able to build tools trees so we configure a fedora tools tree
to build the actual images.
2024-01-09 14:58:34 +00:00
Mike Yuan
33354ffb14
localed: modernization 2024-01-09 21:57:46 +08:00
Mike Yuan
9737e2c850
hostnamed: use Type=notify 2024-01-09 21:57:46 +08:00
Mike Yuan
deb869970d
importd: use Type=notify 2024-01-09 21:57:45 +08:00
Mike Yuan
c3ff3175d6
timedated: modernization
Switch to sd_event_set_signal_exit() and use Type=notify
2024-01-09 21:57:45 +08:00
Mike Yuan
f359b3073f
machined,portabled: remove unneeded NOTIFY_STOPPING
This is done internally by bus_event_loop_with_idle().
2024-01-09 21:57:45 +08:00
Luca Boccassi
b4a85f75b0
Merge pull request #30843 from keszybz/test-relative-paths
Use relative paths in test units
2024-01-09 12:23:35 +00:00
Lennart Poettering
bed41c4084
Merge pull request #30833 from poettering/hostnamed-varlink
hostnamed: add simple varlink interface
2024-01-09 12:38:58 +01:00
Lennart Poettering
bf543ba624 update TODO 2024-01-09 12:34:33 +01:00
Luca Boccassi
c3f4d9f9a4
Merge pull request #30842 from aafeijoo-suse/analyze-q-man-help-fix
analyze: minor fixes
2024-01-09 10:40:19 +00:00
Lennart Poettering
11f4f647d3
Merge pull request #30826 from YHNdnzj/networkd-wireguard-credential
networkd/wireguard: support network.wireguard.* credentials
2024-01-09 11:26:11 +01:00
Zbigniew Jędrzejewski-Szmek
67953523d1 TEST-07: minor simplification 2024-01-09 11:18:11 +01:00
Zbigniew Jędrzejewski-Szmek
8e1ac16bc6 src/basic: rename uid-alloc-range.[ch] to uid-classification.[ch]
We had both uid-range.h and uid-alloc-range.h. The latter now contains helpers
like {uid,gid}_is_{system,dynamic,container}(), uid_for_system_journal(), so
the existing name is outdated. I think the uid-range.[ch] should stay separate
because it has a bunch of helpers for parsing and printing of uid ranges. So
let's rename as in $subject to better reflect the contents of the file and make
the two sets of files harder to confuse.
2024-01-09 11:15:00 +01:00
Zbigniew Jędrzejewski-Szmek
eb7d7d14fb src/basic: "UidRange" → "UIDRange"
We don't "uncapitalize" parts of an already-capitalized name when concatenating
words. In particular, we had UidRange in basic/uid-range.h and UGIDAllocationRange
in basic/uid-alloc-range.h, which is annoying.
2024-01-09 11:15:00 +01:00
Zbigniew Jędrzejewski-Szmek
63403f07b0 tests: use relative paths in ExecStart= and friends
We want to retain *some* of the full paths in order to test more code paths.
But the default should be to use the command name only. This makes the tests
less visually cluttered.
2024-01-09 11:14:16 +01:00