]> git.ipfire.org Git - thirdparty/util-linux.git/commit
unshare: Fix "you (user xxxx) don't exist" error when uid differs from primary gid
authorSol Boucher <sboucher@cmu.edu>
Fri, 8 Jul 2022 16:09:13 +0000 (12:09 -0400)
committerKarel Zak <kzak@redhat.com>
Wed, 20 Jul 2022 16:00:58 +0000 (18:00 +0200)
commit1f27183e9a377b1f3f78290791bf324be2969090
tree82db4984240d1006e25f227a257eca1a41ea5577
parent651a21bca1c82d3644c5ea4cc57f1ec7b34acf83
unshare: Fix "you (user xxxx) don't exist" error when uid differs from primary gid

This problem affected the --map-auto and --map-groups=auto command-line switches.
The root cause is that /etc/subgid is indexed by user or uid, not by group or gid;
therefore, we should be using the effective uid to find entries in this file, just
as we do for /etc/subuid.

Signed-off-by: Sol Boucher <sboucher@cmu.edu>
sys-utils/unshare.c