1
0
mirror of https://github.com/systemd/systemd synced 2026-03-28 09:44:50 +01:00

Compare commits

...

4 Commits

Author SHA1 Message Date
Yu Watanabe
69646ac0e2 include: fix typo
Follow-up for ec32732043550ec311dfb0e7be4e7f114366dd24.
2025-12-04 07:50:26 +09:00
Alexandru Tocar
1d9a8e439c man: drop --import-credential mention from systemd-nspawn(1) 2025-12-04 07:47:23 +09:00
Daan De Meyer
2253b4c35d dissect: Stop refusing external verity settings for mountfsd
These are supported now so no point in refusing them in systemd-dissect
2025-12-03 22:13:48 +00:00
Antonio Alvarez Feijoo
a308e97ad2 run-generator: use generator_add_symlink() 2025-12-03 15:52:55 +01:00
4 changed files with 10 additions and 17 deletions

View File

@ -624,11 +624,10 @@
provides protection against accidental destructive operations only.</para> provides protection against accidental destructive operations only.</para>
<para>Note that if credentials are used in combination with a non-root <option>--user=</option> <para>Note that if credentials are used in combination with a non-root <option>--user=</option>
(e.g.: <option>--set-credential=</option>, <option>--load-credential=</option> or (e.g.: <option>--set-credential=</option> or <option>--load-credential=</option>), then
<option>--import-credential=</option>), then <option>--no-new-privileges=yes</option> must be used, and <option>--no-new-privileges=yes</option> must be used, and <option>--boot</option> or
<option>--boot</option> or <option>--as-pid2</option> must not be used, as the credentials would <option>--as-pid2</option> must not be used, as the credentials would otherwise be unreadable
otherwise be unreadable by the container due to missing privileges after switching to the specified by the container due to missing privileges after switching to the specified user.</para></listitem>
user.</para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>

View File

@ -2178,9 +2178,6 @@ static int run(int argc, char *argv[]) {
if (arg_loop_ref || arg_loop_ref_auto) /* yes, the 2nd check is strictly speaking redundant, given the normalization we did above, but let's be explicit here */ if (arg_loop_ref || arg_loop_ref_auto) /* yes, the 2nd check is strictly speaking redundant, given the normalization we did above, but let's be explicit here */
return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "--loop-ref=/--loop-ref-auto not supported when operating via systemd-mountfsd."); return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "--loop-ref=/--loop-ref-auto not supported when operating via systemd-mountfsd.");
if (verity_settings_set(&arg_verity_settings))
return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "Externally configured verity settings not supported when operating via systemd-mountfsd.");
/* Don't run things in private userns, if the mount shall be attached to the host */ /* Don't run things in private userns, if the mount shall be attached to the host */
if (!IN_SET(arg_action, ACTION_MOUNT, ACTION_WITH)) { if (!IN_SET(arg_action, ACTION_MOUNT, ACTION_WITH)) {
userns_fd = nsresource_allocate_userns(/* name= */ NULL, NSRESOURCE_UIDS_64K); /* allocate 64K users by default */ userns_fd = nsresource_allocate_userns(/* name= */ NULL, NSRESOURCE_UIDS_64K); /* allocate 64K users by default */

View File

@ -36,8 +36,7 @@ extern int umount(const char *__special_file);
/* Unmount a filesystem. Force unmounting if FLAGS is set to MNT_FORCE. */ /* Unmount a filesystem. Force unmounting if FLAGS is set to MNT_FORCE. */
extern int umount2(const char *__special_file, int __flags); extern int umount2(const char *__special_file, int __flags);
/* Open the filesystem referenced by FS_NAME so it can be configured for /* Open the filesystem referenced by FS_NAME so it can be configured for mounting. */
mouting. */
/* Defined since glibc-2.36. /* Defined since glibc-2.36.
* Supported since kernel v5.2 (24dcb3d90a1f67fe08c68a004af37df059d74005). */ * Supported since kernel v5.2 (24dcb3d90a1f67fe08c68a004af37df059d74005). */
#if HAVE_FSOPEN #if HAVE_FSOPEN

View File

@ -6,7 +6,6 @@
#include "fd-util.h" #include "fd-util.h"
#include "fileio.h" #include "fileio.h"
#include "generator.h" #include "generator.h"
#include "glyph-util.h"
#include "log.h" #include "log.h"
#include "proc-cmdline.h" #include "proc-cmdline.h"
#include "special.h" #include "special.h"
@ -115,12 +114,11 @@ static int generate(void) {
return log_error_errno(r, "Failed to create unit file %s: %m", p); return log_error_errno(r, "Failed to create unit file %s: %m", p);
/* And now redirect default.target to our new target */ /* And now redirect default.target to our new target */
p = strjoina(arg_dest, "/" SPECIAL_DEFAULT_TARGET); return generator_add_symlink(
if (symlink("kernel-command-line.target", p) < 0) arg_dest,
return log_error_errno(errno, "Failed to link unit file kernel-command-line.target %s %s: %m", SPECIAL_DEFAULT_TARGET,
glyph(GLYPH_ARROW_RIGHT), p); /* dep_type= */ NULL,
"kernel-command-line.target");
return 0;
} }
static int run(const char *dest, const char *dest_early, const char *dest_late) { static int run(const char *dest, const char *dest_early, const char *dest_late) {