[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH] Lookup users and groups in root directory instead of on host



Hi!

On Tue, 2023-03-07 at 13:05:51 +0100, Daan De Meyer wrote:
> If a root directory is configured by the user, lookup users and groups
> in the /etc/passwd and /etc/group of that root directory instead of the
> host's /etc/passwd and /etc/group.
> 
> This is especially important when building Debian chroots on distros
> that are not Debian based and where the host's /etc/passwd and /etc/group
> is using passwd and group entries that differ wildly from those shipped
> by Debian or its derivatives, causing dpkg stat-overrides to fail because
> a group or user cannot be found in the host's passwd or group entries.

Indeed, nice catch, and thanks for the patch (and for filing the bug
report). While I don't quite like the hardcoding of the filenames, this
is something that was already implicitly done by the system libc
(including chroots and similar).

I'll be queueing this as part of the greater refactoring for the
dpkg sysusers support, and will probably add a way to override those
pathnames externally to mitigate this hardcoding.

Thanks,
Guillem


Reply to: