]> git.ipfire.org Git - thirdparty/systemd.git/commit
btrfs-util: Make nested subvolume operations work unpriv
authorDaan De Meyer <daan@amutable.com>
Mon, 11 May 2026 19:58:24 +0000 (21:58 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 12 May 2026 11:03:06 +0000 (13:03 +0200)
commit60d6f70ca4ced0a426800c55eaefa17438b89c3e
tree927dd5e493bcaefdb4ec33ead374263900e599e3
parentdc6b6e9d649f0738fa20862bd9daee76cc336783
btrfs-util: Make nested subvolume operations work unpriv

BTRFS_IOC_SEARCH is only available to root in the
initial userns. This means we fail to recursively
snapshot even if a subvolume has no nested subvolumes
at the moment.

Let's fix this by using the newer btrfs ioctls which
do work even if we don't have CAP_SYS_ADMIN in the initial
userns.
src/shared/btrfs-util.c