]> git.ipfire.org Git - thirdparty/systemd.git/commit
user-util: Don't setgroups() if /proc/self/gid_map is empty
authorDaan De Meyer <daan@amutable.com>
Fri, 13 Feb 2026 11:24:49 +0000 (12:24 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 27 Feb 2026 21:57:05 +0000 (21:57 +0000)
commitf965a86ef254c95613fff765644fe75752d91f6d
tree3e74bfca2d9724734995cc6807310784a00d839a
parent44957e4f1aada8e39a0d8f4e7ff40af19ab8ccbf
user-util: Don't setgroups() if /proc/self/gid_map is empty

If /proc/self/gid_map is empty, the kernel will refuse setgroups(),
so don't attempt it if that's the case on top of the /proc/self/setgroups
check we already have.

(cherry picked from commit e2c1f3ca2a69a033c748d62f9be0db8817826839)
(cherry picked from commit b654d79deeda0e1de46398ed2cd0416876f585ea)
(cherry picked from commit ce4fc4f0b19b574a5fe2c9768e4a67dfbadee31a)
src/basic/user-util.c