]> skyeroc.xyz Git - dgamelaunch/commit
Add support for Linux namespaces
authorRon Nazarov <ron@noisytoot.org>
Wed, 27 Nov 2024 00:41:20 +0000 (00:41 +0000)
committerRon Nazarov <ron@noisytoot.org>
Wed, 27 Nov 2024 00:41:20 +0000 (00:41 +0000)
commit52cf6045c0ce521228ea893748189fca8dc42199
treeaf96c2cb90e763fbf9c203c3e4fb3c6136d3897e
parent77db89758ececca9d7c1d5a29e7f4bcd9a4ea536
Add support for Linux namespaces

If compiled with --enable-namespaces, dgamelaunch will now create new
user and network namespaces before chrooting.  This means that it
works without root (if unprivileged user namespaces are enabled) and
cannot access the network.

Without namespaces:
-chroot
-setgroups/setgid/setuid to shed_gid/shed_uid

With namespaces:
-unshare to create a new user and network namespace
-write to /proc/self/{uid,gid}_map to set uid/gid to shed_uid/shed_gid
-chroot
-drop all capabilities
configure.ac
dgamelaunch.c