]> git.ipfire.org Git - thirdparty/mkosi.git/commit
Restore all of a user's groups when running sync 2508/head
authorRichard Maw <richard.maw@codethink.co.uk>
Wed, 13 Mar 2024 17:30:34 +0000 (17:30 +0000)
committerRichard Maw <richard.maw@codethink.co.uk>
Thu, 14 Mar 2024 16:11:59 +0000 (16:11 +0000)
commitf800ad9d37ad3173466e83f5c8756c361d086662
tree6317494741b935d136e4333fc93bb1c482693d63
parent343552b70d6ac2eacef7867fe5481b2af43cb7ea
Restore all of a user's groups when running sync

Shared development hardware often has storage partitioned up by project
groups, with the root of the shared storage owned by root:project.

Since this group isn't the primary group of the user
using setgroups and restoring groups to just the user's primary gid
will mean that it does not have this project group gid
and so won't be able to see the contents of this shared directory.

Using getgrouplist to get all of the groups from the user database
allows these additional groups to be set.
mkosi/__init__.py