1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00
Commit Graph

54498 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
e92777d275 meson: add check:true/false to all run_command() invocations
meson-0.59.4-1.fc35.noarch says:
WARNING: You should add the boolean check kwarg to the run_command call.
         It currently defaults to false,
         but it will default to true in future releases of meson.
         See also: https://github.com/mesonbuild/meson/issues/9300
2021-11-18 09:19:23 +01:00
dependabot[bot]
d59d6cc154 build(deps): bump github/codeql-action from 1.0.22 to 1.0.23
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1.0.22 to 1.0.23.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](5581e08a65...a627e9fa50)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-18 01:17:19 +03:00
Lennart Poettering
fe60b860a6
Merge pull request #21421 from poettering/homed-recovery-pw
homed: handle password changing for accounts that have recovery keys correctly
2021-11-17 21:55:31 +01:00
Luca Boccassi
b52b5763e7 hwdb: voidify call to mkdir_parents_label
CID#1466060
2021-11-17 17:47:48 +00:00
Lennart Poettering
edde3a35b4 pam_systemd_home: prompt user for recovery key if homed asks for it
For accoutns that have no passwords but only a recovery key homed might
ask explicitly for that. Honour the request and ask the user for it.
2021-11-17 17:45:21 +01:00
Lennart Poettering
c7b6051f16 homectl: if homed asks for the recovery key to be supplied, query the user for it
Fixes: #21103
2021-11-17 17:42:12 +01:00
Evgeny Vereshchagin
0da6973c17 ci: switch to weekly dependabot updates
Apparently some dependencies get updated much more often
than I would have exepected.

It can always be triggered manually at https://github.com/systemd/systemd/network/dependencies
if there are any urgent updates
2021-11-17 12:16:57 +00:00
dependabot[bot]
eb37ed701b build(deps): bump github/super-linter from 4.8.3 to 4.8.4
Bumps [github/super-linter](https://github.com/github/super-linter) from 4.8.3 to 4.8.4.
- [Release notes](https://github.com/github/super-linter/releases)
- [Changelog](https://github.com/github/super-linter/blob/main/docs/release-process.md)
- [Commits](7d5dc989c5...563be7dc55)

---
updated-dependencies:
- dependency-name: github/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-17 10:59:41 +00:00
Luca Boccassi
cc970310a4 CONTAINER_INTERFACE: clarify that /proc/sys can be writable with namespacing
When user and network namespaces are enabled, the kernel
makes the global keys read-only, and makes the namespaced
ones available for the guest already.
2021-11-17 10:53:03 +00:00
Evgeny Vereshchagin
7e7e31521a ci: run codeql on PRs from Dependabot
To make sure PRs like https://github.com/systemd/systemd/pull/21409
don't break anything.
2021-11-17 10:14:33 +00:00
Frantisek Sumsal
fabf79b0df
Merge pull request #21406 from yuwata/test-network-debug-udev
test-network: check alternative name
2021-11-17 08:39:32 +00:00
Yu Watanabe
b36caceb88 test-network: check if actually alternative name is set
Fixes #21404.
2021-11-17 12:58:08 +09:00
Yu Watanabe
3e3b0d2a40 test-network: make udevd also generate debugging logs 2021-11-17 08:32:45 +09:00
Yu Watanabe
b2174e2922 network: accept all values provided by kernel
Follow-up for af493fb742.

The kernel sends FRA_SUPPRESS_IFGROUP attribute with -1, that must be
handled by networkd.

For FRA_SUPPRESS_PREFIXLEN, we already handled -1, but ignored values
larger than 128. We should not configure rules with such a meaningless
value, but should manage such rules when received from kernel. It can
occur when created by other tools mistakenly. If networkd ignores them,
then networkd cannot remove them.
2021-11-16 23:31:24 +00:00
Lennart Poettering
b049b48c4b
Merge pull request #21326 from poettering/mkdir-tweaks
various tweaks to mkdir code
2021-11-16 22:55:11 +01:00
Lennart Poettering
2939fff235
Merge pull request #21391 from poettering/homed-minimize
homed: add ability to "minimize" home dirs, i.e. shrink to smallest possible size
2021-11-16 22:53:24 +01:00
Lennart Poettering
1fbe8d0cf2 coredump: tweak which dir we create 2021-11-16 22:50:58 +01:00
Lennart Poettering
8ff5fa167f tree-wide: use WRITE_STRING_FILE_MKDIR_0755 at more places 2021-11-16 18:57:57 +01:00
Zbigniew Jędrzejewski-Szmek
af5e64be2e
Merge pull request #21392 from keszybz/memleak-fix-and-assorted-fs-code-cleanups
Memleak fix and assorted fs code cleanups
2021-11-16 18:57:04 +01:00
Lennart Poettering
a89b67509f test: add grow/shrink/minimize test for homed
Let's add testing for the stuff we just added.
2021-11-16 17:28:26 +01:00
Lennart Poettering
c8caf53ca2 homework: beef up luks resize logic to allow "minimizing" homes 2021-11-16 17:28:26 +01:00
Lennart Poettering
71bf7ba193 user-record: relax rules on diskSize user record field
Let's not refuse low or high disk sizes unnecessarily early. They disk
sizes are subject fs limits anyway, hence there's no point in adding
another limit.

Relaxing thhe rules here as the advantage that we can later allow
"homectl resize lennart 0" as a generic way to minimize disk space.
2021-11-16 17:18:07 +01:00
Lennart Poettering
61fa16c1ca resize-fs: add helper that checks if the specified fs can do online grow/shrink
There's only one that can do this (btrfs), but let's abstract that fact,
a bit in case the other file systems learn this too one day.
2021-11-16 17:18:07 +01:00
Lennart Poettering
4e6e72f10b homework: make sync of identies when resizing homes optional
This is preparation for resizing automatically at login and logout.
2021-11-16 17:18:07 +01:00
Lennart Poettering
35cd0ba516 shared: clean up mkdir.h/label.h situation
Previously the mkdir_label() family of calls was implemented in
src/shared/mkdir-label.c but its functions partly declared ins
src/shared/label.h and partly in src/basic/mkdir.h (!!). That's weird
(and wrong).

Let's clean this up, and add a proper mkdir-label.h matching the .c
file.
2021-11-16 17:03:28 +01:00
Lennart Poettering
ed304a5d73 mkdir: drop mkdir_errno_wrapper(), use mkdirat_errno_wrapper() instead
Let's reduce our code duplication, and let's focus on using xyzat()
style APIs more, hence drop mkdir_errno_wrapper() and stick to
mkdirar_errno_wrapper() wherever we can, it's a true superset of
functionality after all.
2021-11-16 17:03:03 +01:00
Lennart Poettering
3f692e2ece tree-wide: don't use mkdir_errno_wrapper() without reason
Simple mkdir() is fine, too, no need to use the wrapper
2021-11-16 17:02:58 +01:00
Lennart Poettering
3bb5ecaa88 mkdir-label: make mkdir_label() a wrapper around mkdirat_label() 2021-11-16 17:02:30 +01:00
Lennart Poettering
2ec0c4f94d sysext: fix tmpfs mount source
It's "sysext", not "sysexit".

The string passed here is pure decoration, and noone will see it, since
it's only in our private mount namespace. But still, it's a typo, let's
fix it
2021-11-16 17:02:18 +01:00
Lennart Poettering
fc0f4d6024 selinux: make mac_selinux_create_file_prepare() at wrapper around _at()
Let's make sure mac_selinux_create_file_prepare_at() works fine with
AT_FDCWD, and then make mac_selinux_create_file_prepare() just a inline
wrapper around it.
2021-11-16 17:02:03 +01:00
Lennart Poettering
d1cd465e21 smack make mac_smack_fix_at() useful when called with dir_fd=AT_FDCWD 2021-11-16 17:01:58 +01:00
Lennart Poettering
1e146d7382 mkdir: use chase_symlinks_and_stat() where appropriate 2021-11-16 17:01:54 +01:00
Lennart Poettering
c7e715096f mkdir: make sure mode is set 2021-11-16 17:01:49 +01:00
Lennart Poettering
05f05a06cd mkdir: tighten permission check
Let's complain about any bit that is set in the existing inode but no in
the mask we are supposed to use.
2021-11-16 17:00:06 +01:00
Franck Bui
0c98f381e7 TEST-08: don't force ext4 for /
Forcing a specific fs for the image is usually a bad idea because the initrd
(borrowed from the host) is likely to include only support for the filesystem
used by the host's rootfs.

Since the point of this test is to check aliases on mount units, there's no
specific need for ext4, hence drop any parts that request or rely on ext4.
2021-11-16 16:58:49 +01:00
Daan De Meyer
054ed43075 meson: Downgrade unused function from error to warning in local builds
When working on systemd, it's often useful to be able to comment out
a function to see how a build behaves without it. Currently, when doing
this with a static function that's only used once, the build fails because
the function then becomes unused. As such, Let's downgrade the unused
function error to a warning in local builds.
2021-11-16 16:57:36 +01:00
Zbigniew Jędrzejewski-Szmek
b15f6eae42 tmpfiles: split out config for systemd-resolve
This mirrors what was done in 564761fcae
for sysusers.d. If we allow separating resolved sysusers config
in a subpackage, we should do the same for the symlink that is
only useful when resolved is installed.

Related to #21317.
2021-11-16 16:56:08 +01:00
Lennart Poettering
67d0c6744f
Merge pull request #21275 from keszybz/makefs-quiet
Makefs quiet output
2021-11-16 16:55:47 +01:00
Lennart Poettering
032e11a234
Merge pull request #21386 from keszybz/binfmt-later
Order binfmt.service after local-fs.target
2021-11-16 16:54:47 +01:00
Takashi Sakamoto
289c2459b7 hwdb: ieee1394-unit-function: add entry for MOTU Track 16
In Linux kernel 5.16 prepatch, MOTU Track 16 is newly supported by ALSA
firewire-motu driver.

This commit adds hwdb entry for the device.

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=411ac2982cb6
2021-11-16 16:54:33 +01:00
Yu Watanabe
39b91d1ae4 network: tuntap: drop unnecessary minus 2021-11-16 16:53:43 +01:00
Lennart Poettering
91822de4f6
Merge pull request #21383 from yuwata/network-address-scope
network: use route_scope_from_string() at one more place
2021-11-16 16:53:26 +01:00
Lennart Poettering
31f5c84dfc
Merge pull request #21380 from poettering/homed-test-qemu
homed: make sure homed tests actually run in qemu, too
2021-11-16 16:52:57 +01:00
Lennart Poettering
d6c3a32056 umount: fix log message
The sentence wasn't correct English language, let's fix that. More
importantly: if the mount options are empty we'd display "(null)" here.
Fix that. (And they can be empty IRL, see CI results)
2021-11-16 15:08:29 +01:00
Zbigniew Jędrzejewski-Szmek
76760f7b4f analyze: supress bogus compiler warning 2021-11-16 14:24:46 +01:00
Zbigniew Jędrzejewski-Szmek
1c271d3871 man: document fs types known to makefs 2021-11-16 13:55:50 +01:00
Zbigniew Jędrzejewski-Szmek
2d96440fd5 makefs: add "support" for f2fs
The man page doesn't quite match what --help says, and I needed to use "-f" to
write a wiped partition. This all feels a bit experimental, but the fs has some
adherents, and we should make it easy to use.

(Also, an empty 256MB device formatted and mounted shows up as
  Filesystem      Size  Used Avail Use% Mounted on
  /dev/loop0      254M   85M  170M  34% /var/tmp/mount
which also seems a bit over the top…)

Requested in https://github.com/systemd/systemd/pull/21275#issuecomment-967928690.
2021-11-16 13:55:49 +01:00
Zbigniew Jędrzejewski-Szmek
8d433a99a4 makefs: fix too-long swap labels
Apparently mkswap has it's own limit, and it seems to be one lower than the one
for ext2/3/4.

$ for i in ext2 ext3 ext4 btrfs xfs vfat swap minix; do
  echo $i && wipefs -q -a '/var/tmp/głąbźśńćąśððð.img'
  build/systemd-makefs $i '/var/tmp/głąbźśńćąśððð.img'
done

ext2
/var/tmp/głąbźśńćąśððð.img successfully formatted as ext2 (label "głąbźśńćą", uuid 7626bc5c-8ac4-43cf-87b7-1b2761272dd3)
ext3
/var/tmp/głąbźśńćąśððð.img successfully formatted as ext3 (label "głąbźśńćą", uuid 0da22cad-0dbf-4a7a-962d-12cd39d006b5)
ext4
/var/tmp/głąbźśńćąśððð.img successfully formatted as ext4 (label "głąbźśńćą", uuid dded267b-8955-4d19-82a5-1f231d446059)
btrfs
/var/tmp/głąbźśńćąśððð.img successfully formatted as btrfs (label "głąbźśńćąśððð.img", uuid 9e2e89f1-010d-4ab6-80f3-f9e215dbc225)
xfs
/var/tmp/głąbźśńćąśððð.img successfully formatted as xfs (label "głąbźśń", uuid 2cc937af-4c41-465c-8f52-aab2304bd860)
vfat
mkfs.fat 4.2 (2021-01-31)
/var/tmp/głąbźśńćąśððð.img successfully formatted as vfat (label "G__B_______", uuid a3a9e028)

swap
...
LABEL=głąbźśńć, UUID=0ab787aa-37a6-4b32-978b-d71efc6e6098
/var/tmp/głąbźśńćąśððð.img successfully formatted as swap (label "głąbźśńć", uuid 0ab787aa-37a6-4b32-978b-d71efc6e6098)

minix
...
/var/tmp/głąbźśńćąśððð.img successfully formatted as minix (no label or uuid specified)
2021-11-16 13:55:48 +01:00
Zbigniew Jędrzejewski-Szmek
7ffe593b79 makefs: fix too-long ext2/3/4 labels 2021-11-16 13:55:46 +01:00
Zbigniew Jędrzejewski-Szmek
dc91c971bf makefs: fix label for vfat filesystems
I was testing with a "test1.img" and mkfs.vfat rejects "TEST1.IMG" with the
error "Labels with characters *?.,;:/\|+=<>[]" are not allowed". So let's
replace those characters with "_".
2021-11-16 13:55:33 +01:00