diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-05-15 11:49:48 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-05-16 09:26:17 +0200 |
commit | a4b3e9423696f604be33b4ab93c4bb5c6c807554 (patch) | |
tree | ad5fcdca2f8f8f6e824232a86992ec84fa279150 /src/analyze | |
parent | be79c23569f7e4065a5a26dbf15612bce28e6bb3 (diff) | |
download | systemd-a4b3e9423696f604be33b4ab93c4bb5c6c807554.tar.gz |
dissect-image: port mount_image_privately_interactively() to use /run/systemd/mount-rootfs/ too
Let's use the same common directory as the unit logic uses.
This means we have less to clean up, and opens the door to eventually
allow unprivileged operation of the
mount_image_privately_interactively() logic.
Diffstat (limited to 'src/analyze')
-rw-r--r-- | src/analyze/analyze.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c index 09a38e7930..b555c713fc 100644 --- a/src/analyze/analyze.c +++ b/src/analyze/analyze.c @@ -599,7 +599,7 @@ static int parse_argv(int argc, char *argv[]) { static int run(int argc, char *argv[]) { _cleanup_(loop_device_unrefp) LoopDevice *loop_device = NULL; - _cleanup_(umount_and_rmdir_and_freep) char *unlink_dir = NULL; + _cleanup_(umount_and_freep) char *mounted_dir = NULL; static const Verb verbs[] = { { "help", VERB_ANY, VERB_ANY, 0, help }, @@ -660,13 +660,13 @@ static int run(int argc, char *argv[]) { DISSECT_IMAGE_GENERIC_ROOT | DISSECT_IMAGE_RELAX_VAR_CHECK | DISSECT_IMAGE_READ_ONLY, - &unlink_dir, + &mounted_dir, /* ret_dir_fd= */ NULL, &loop_device); if (r < 0) return r; - arg_root = strdup(unlink_dir); + arg_root = strdup(mounted_dir); if (!arg_root) return log_oom(); } |