Lennart Poettering
b1beb00406
Merge pull request #21331 from poettering/luks-extra-mount-options
...
homed: allow per-user additional LUKS mount options
2021-11-13 08:03:55 +01:00
Jan Janssen
9cc6154608
test: Create convenience macros to declare tests
2021-11-13 09:20:24 +09:00
Frantisek Sumsal
c76a838589
ci: run the unit_tests and mkosi jobs on stable branches as well
...
To provide more coverage for the systemd-stable repo.
See: https://github.com/systemd/systemd-stable/issues/24
2021-11-13 09:09:54 +09:00
Yu Watanabe
1de88f3048
udev/net: read hardware address from netlink message
2021-11-13 08:53:33 +09:00
Yu Watanabe
49c351a8ac
networkctl: read permanent hardware address from netlink message
2021-11-13 08:53:33 +09:00
Yu Watanabe
8a77e245df
network: also logs iftype, kind, and permanent hardware address
2021-11-13 08:53:33 +09:00
Yu Watanabe
4fea97a61d
network: read permanent hardware address from netlink message
...
The attribute was introduced by f74877a5457d34d604dba6dbbb13c4c05bac8b93 (v5.6),
so, fallback to ethtool if failed.
2021-11-13 08:53:33 +09:00
Yu Watanabe
ed9fa69f1c
ethtool-util: introduce ethtool_get_permanent_hw_addr()
...
And replaces all ethtool_get_permanent_macaddr() with it.
2021-11-13 08:53:33 +09:00
Yu Watanabe
57ae8cd812
networkctl: introduce dump_hw_address()
2021-11-13 08:53:33 +09:00
Lennart Poettering
6b945d7031
homework: split out password cache logic into its own .c/.h file
...
Preparation for extending it further down the line.
2021-11-13 00:22:16 +01:00
Yu Watanabe
17f8d8f9b4
network: manage route and nexthop flags
2021-11-13 08:16:06 +09:00
Yu Watanabe
f505de80d2
network: mention that errors will be ignored
2021-11-13 08:16:06 +09:00
Yu Watanabe
5bfee718d2
sd-netlink: introduce sd_rtnl_message_nexthop_get_flags()
2021-11-13 08:16:06 +09:00
Yu Watanabe
45b1299a1e
sd-netlink: clear previous flags or state by _set_flags() or _set_state()
...
Otherwise, there is no way to reset the previous value.
2021-11-13 08:16:06 +09:00
Lennart Poettering
0881991c32
Merge pull request #21329 from poettering/homed-compress-default
...
homed: default to btrfs compression
2021-11-12 22:55:14 +01:00
Lennart Poettering
e0c311b1aa
update TODO
2021-11-12 22:45:03 +01:00
Lennart Poettering
67a6d39953
doc: document the two new accessMode/fileSystemType fields
2021-11-12 22:44:54 +01:00
Lennart Poettering
b0a7fb152a
homed: include actual fs type + access mode as part of "status" section of user record
...
So far we have two properties for the intended fstype + access mode of
home dirs, but they might differ from what is actually used (because the
user record changed from the home dir, after it was created, or vice
versa). Let's hence add these props also to the "status" section of user
record, which report the status quo. That way we can always show the
correct, current settings.
2021-11-12 22:44:54 +01:00
Lennart Poettering
f639f60ed5
homed: allow querying disk free status separetely from generating JSON from it
...
We later want to query per-home free status for implementing automatic
grow/shrink of home directories, hence let's separate the JSON
generation from the disk free status determination.
2021-11-12 22:44:54 +01:00
Lennart Poettering
5dd57a00d5
doc: document the new luksExtraMountOptions concept
2021-11-12 22:22:06 +01:00
Lennart Poettering
edf0c907e7
homectl: make new LUKS extra mount option field settable
2021-11-12 22:22:06 +01:00
Lennart Poettering
2e0001c281
homework: also add a way to configure additional mount options via a JSON user record field
...
Fixes : #15120
2021-11-12 22:22:06 +01:00
Lennart Poettering
423de19223
man: run ninja -C build update-man-rules
2021-11-12 22:21:22 +01:00
Lennart Poettering
1783a48c87
homework: add a const where appropriate
2021-11-12 22:15:51 +01:00
Lennart Poettering
cbae575e0f
keyring-util: add new keyring-util.h helpers
...
This adds to new helpers: keyring_read() for reading a key data from a
keyring entry, and TAKE_KEY_SERIAL which is what TAKE_FD is for fds, but
for key_serial_t.
The former is immediately used by ask-password-api.c
2021-11-12 22:15:06 +01:00
Lennart Poettering
7b9eaec069
Merge pull request #21294 from keszybz/binfmt-misc
...
Improve systemd-binfmt logging, fix exit value
2021-11-12 22:14:12 +01:00
Lennart Poettering
8ccb69aef0
homework: turn off compression for files backing LUKS volumes
...
We need random access read/write files, and compression sucks for that,
hence disable it on the underlying files.
Compression in the home directory might be desirable, but if so it
should be done *inside* the home dir fs, not on the underlying fs.
2021-11-12 22:13:48 +01:00
Luca Boccassi
c3c50474d2
tree-wide: don't ignore return code from sd_event_source_set_enabled()
...
CID#1465793
CID#1465794
CID#1465795
2021-11-12 22:13:24 +01:00
Lennart Poettering
fe0777fb94
Merge pull request #21320 from poettering/namespace-mkdir-umask
...
make pid1 namespace code independent of umask
2021-11-12 22:12:58 +01:00
Frantisek Sumsal
59f5d2f431
Merge pull request #21316 from evverx/pin-labeler
...
ci: pin labeler
2021-11-12 20:51:26 +00:00
Lennart Poettering
db42f011c6
docs: document new mount option env var
2021-11-12 17:36:53 +01:00
Lennart Poettering
6309512c02
homed: add env var for overriding default mount options
...
This adds an esay way to override the default mount options to use for
LUKS home dirs via the env vars SYSTEMD_HOME_MOUNT_OPTIONS_EXT4,
SYSTEMD_HOME_MOUNT_OPTIONS_BTRFS, SYSTEMD_HOME_MOUNT_OPTIONS_XFS.
See: #15120
2021-11-12 17:34:31 +01:00
Lennart Poettering
a428a4518b
homework: default to btrfs compression
...
This follows what Fedora did with 34: enables compression by default,
lowering IO bandwidth and reducing disk space use, at the price of
slightly higher CPU use.
https://fedoraproject.org/wiki/Changes/BtrfsTransparentCompression
2021-11-12 17:33:16 +01:00
Zbigniew Jędrzejewski-Szmek
99a041d1ce
binfmt: add logging information
...
In delete_rule(), we already checked that the rule name is a valid file name
(i.e. no slashes), so we can just trivially append.
Also, let's always reject rules that we would later fail to delete. It's
probably better to avoid such confusion.
And print the operations we do with file name and line number. I hope this
helps with cases like https://github.com/systemd/systemd/pull/21178 . At least
we'll know what rule failed.
$ sudo SYSTEMD_LOG_LEVEL=debug build/systemd-binfmt
Flushed all binfmt_misc rules.
Applying /etc/binfmt.d/kshcomp.conf…
/etc/binfmt.d/kshcomp.conf:1: binary format 'kshcomp' registered.
2021-11-12 17:23:36 +01:00
Topi Miettinen
006d1864fb
execute: always log a warning when setting SELinux context fails
...
Update also manual page to explain how the transition can still fail.
2021-11-12 17:17:21 +01:00
Zbigniew Jędrzejewski-Szmek
b01ee585c9
Merge pull request #21321 from yuwata/ether-addr-fix-local
...
ether-addr-util: fix ether_addr_is_local()
2021-11-12 17:12:46 +01:00
Evgeny Vereshchagin
33796123bc
ci: run codeql-analysis daily
...
https://github.com/github/codeql-action
Apparently to judge from a couple of warnings I haven't seen
before it's a bit different from LGTM.
2021-11-12 15:47:15 +00:00
Emily Gonyer
be7148ebed
Change gendered terms to be gender-neutral ( #21325 )
...
Some typos are also fixed.
2021-11-12 16:09:56 +01:00
Lennart Poettering
875afa02fa
tests: add test case for UMask=+BindPaths= combination
...
Inspired by the test case described in #19899
2021-11-12 16:02:26 +01:00
Lennart Poettering
3044343927
namespace: make tmp dir handling code independent of umask too
...
Let's make all code in namespace.c robust towards weird umask. This
doesn't matter too much given that the parent dirs we deal here almost
certainly exist anyway, but let's clean this up anyway and make it fully
clean.
2021-11-12 16:02:22 +01:00
Lennart Poettering
cdf42f9bd4
namespace: make whole namespace_setup() work regardless of configured umask
...
Let's reset the umask during the whole namespace_setup() logic, so that
all our mkdir() + mknod() are not subjected to whatever umask might
currently be set.
This mostly moves the umask save/restore logic out of
mount_private_dev() and into the stack frame of namespace_setup() that
is further out.
Fixes #19899
2021-11-12 16:02:17 +01:00
Lennart Poettering
d73020f242
namespace: rebreak a few comments
2021-11-12 16:02:12 +01:00
Lennart Poettering
52f05ef21d
umask-util: add helper that resets umask until end of current code block
2021-11-12 16:01:40 +01:00
Lennart Poettering
b0c4b28246
pid1: add a manager_trigger_run_queue() helper
...
We have two different places where we re-trigger the run queue now.
let's unify it under a common function, that is part of the Manager
code.
Follow-up for #20953
2021-11-12 15:52:37 +01:00
Zbigniew Jędrzejewski-Szmek
a456086b37
basic/utf8: inline some iterator variables
2021-11-12 15:51:26 +01:00
Zbigniew Jędrzejewski-Szmek
4f05a11c55
makefs: supress mkfs output, but print one line on success
...
$ for i in ext2 ext3 ext4 btrfs xfs vfat swap minix; do
echo $i && wipefs -q -a /var/tmp/test2_img && build/systemd-makefs $i /var/tmp/test2_img
done
ext2
/var/tmp/test2_img successfully formatted as ext2 (label "test2_img", uuid ad584a5b-037b-497a-825d-eaf2ba90da2d)
ext3
/var/tmp/test2_img successfully formatted as ext3 (label "test2_img", uuid 95239fff-55f4-44d5-bae0-11ef75d13166)
ext4
/var/tmp/test2_img successfully formatted as ext4 (label "test2_img", uuid 8c7ea699-05ab-4ce6-8df6-bc20d53dfd29)
btrfs
/var/tmp/test2_img successfully formatted as btrfs (label "test2_img", uuid 860bb061-4d92-4607-8821-a9d00216490e)
xfs
/var/tmp/test2_img successfully formatted as xfs (label "test2_img", uuid f32499ea-7311-47bb-be57-da62e51d33ae)
vfat
mkfs.fat 4.2 (2021-01-31)
/var/tmp/test2_img successfully formatted as vfat (label "TEST2_IMG", uuid d1e4ae63)
swap
mkswap: /var/tmp/test2_img: insecure permissions 0644, fix with: chmod 0600 /var/tmp/test2_img
mkswap: /var/tmp/test2_img contains holes or other unsupported extents.
This swap file can be rejected by kernel on swap activation!
Use --verbose for more details.
Setting up swapspace version 1, size = 256 MiB (268431360 bytes)
LABEL=test2_img, UUID=16bc3d8c-98d4-462b-8ff8-338467cde871
/var/tmp/test2_img successfully formatted as swap (no label or uuid specified)
minix
21856 inodes
65535 blocks
Firstdatazone=696 (696)
Zonesize=1024
Maxsize=268966912
/var/tmp/test2_img successfully formatted as minix (no label or uuid specified)
2021-11-12 15:51:24 +01:00
Yu Watanabe
a55277b889
test: add tests for MAC address helper functions
2021-11-12 20:00:50 +09:00
Yu Watanabe
847f1ea69e
ether-addr-util: fix ether_addr_is_local() and add one more helper
...
Follow-up for 1f86a3fe52 .
2021-11-12 20:00:29 +09:00
Lennart Poettering
6ebbcafeb4
Merge pull request #20953 from msekletar/mount-ratelimit-followup-20329
...
Delay running mount start jobs when we /p/s/mountinfo event source is rate limited
2021-11-12 09:23:47 +01:00
Jonas Witschel
6401279fee
test: add regression test for systemd-run --scope [--user]
...
systemd-run --scope --user failed to run in system 249.6, cf. #21297 . Add tests
for systemd-run --scope and systemd-run --scope --user to make sure this does
not regress again.
2021-11-12 13:31:46 +09:00