#1124822 mmdebstrap: support subid delegation via nsswitch

Package:
mmdebstrap
Source:
mmdebstrap
Submitter:
Tobias Wiese
Date:
2026-01-07 03:39:04 UTC
Severity:
normal
Tags:
#1124822#5
Date:
2026-01-07 03:30:32 UTC
From:
To:
Hi,

newuidmap / newgidmap consult /etc/nsswitch.conf to decide where to
get information on allowed sbuids from.
The /etc/subuid and /etc/subgid files are only used if the subid filed
in /etc/nsswitch.conf is either unset or set to files (see subuid(5)).
Otherwise the information is retrived by calling some function in a
shared object file derived from the subid value in /etc/nsswitch.conf.

I propose the retrieve the subuids/subgids by calling the getsubids
command included in the uidmap package.

I proposed a similar change to sbuild here:
https://salsa.debian.org/debian/sbuild/-/merge_requests/222


Regards,

Tobias Wiese