nspawn: only remount /usr/ with idmap when --volatile=yes
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 6 Sep 2024 04:18:59 +0000 (13:18 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 6 Sep 2024 04:24:12 +0000 (13:24 +0900)
commit025be2361b3ee7cc3732fb3963d36b8583842064
treeb1d32c2f52ff7e0dbc0cd404426a7760932a878c
parent2c2511aa734c507e04e06d273b474acacac9d486
nspawn: only remount /usr/ with idmap when --volatile=yes

The root directory is already mounted with a picked UID shift, hence
it is not necessary to remount with idmap. However, /usr/ is a bind-mount,
hence it must be remounted with idmap.

With this change, now '-U --volatile=yes' works fine.

Fixes #34254.
src/nspawn/nspawn.c