]> git.ipfire.org Git - thirdparty/systemd.git/commit
dissect-image: probe file system via main block device fd/image file fd 25591/head
authorLennart Poettering <lennart@poettering.net>
Wed, 30 Nov 2022 22:00:37 +0000 (23:00 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 1 Dec 2022 21:09:30 +0000 (22:09 +0100)
commitc80c9079c895f8e0285682a99fb3f91b892b8734
tree08095fe8997be3bff2afe45311c8da6b6deaf854
parent59a4c0d7e362269c708ab8359f7e47e952ab245e
dissect-image: probe file system via main block device fd/image file fd

let's make sure we can probe file systems also when unprivileged:
instead of probing the partition block devices for file system
signatures, let's go via the original "whole" fd.

libblkid makes this easy actually, as it allows us to specify the
offset/size of the area to probe. And we have the partition
offsets/sizes anyway, so it's trivial for us to make use of.

This thus enables fs probing also when lacking privs and operating on
naked regular files without loopback devices or anything like this.
src/shared/dissect-image.c
src/shared/dissect-image.h