Open peterhoeg opened 5 years ago
See #31990 for syncthing
Can nixos tests be excluded from this list? Also, the command-fu to regerate this list would be appreciated.
Also worth mentioning that this list isn't exhaustive as when a group isn't specified in some cases nogroup
will be used which obviously makes it harder to track them all down.
Can nixos tests be excluded from this list?
If we look at nixos/test/certmgr.nix
, those tests should definitely be changed as their use of nobody/nogroup is not correct. That being said, nixos/tests/buildbot.nix
is a false positive.
Also, the command-fu to regerate this list would be appreciated.
I have updated the original post with the grep invocation.
Also worth mentioning that this list isn't exhaustive as when a group isn't specified in some cases
nogroup
will be used which obviously makes it harder to track them all down.
Correct, something like will help:
sudo grep ' 65534 ' --files-with-matches /proc/**/gid_map
I guess this was closed in error @Mic92?
@peterhoeg yes, it was closed by a merged pull request.
It would be better if instead of grep this would be an actual checklist.
Sure, here you go.
I filtered out a few false-positive i.e. nobody was used in a comment/different context or its usage was legitimate.
Sounds like murmur
also needs to be fixed.
More instances: https://github.com/NixOS/nixpkgs/pull/119559
I think there are potentially even more instances.. If a service has a user without a group it also runs as nogroup.
I updated the list. After #126289 and #133166 a bunch of (old) offenders have been unmasked, so the count went up a bit. Meanwhile some modules have been fixed, but we're still halfway through.
Most of these modules should be fixed by switching to systemd DynamicUser
, the remaining just need to add a users.group.something = {};
. Similarly, some setgid/setuid wrappers should simply use root.
I think we should consider adding an annoying warning (learning from my systemd-udev-settle
experience) for programs running as nobody/nogroup. I'm not sure how to implement it, though.
One does now actually get a warning on master if a user is missing a group. I think this should solve this issue here as modules no longer evaluate otherwise.
One does now actually get a warning on master if a user is missing a group. I think this should solve this issue here as modules no longer evaluate otherwise.
There are more way more cases than a system user missing a group:
chown
ing to nobody
This should not be closed, yet.
Issue description
The problem with
nobody/nogroup
is that people expect them to be nobody while in fact they are somebody named nobody. And that somebody is then shared among all services using it.Their only legitimate purpose is for NFS.
Here are all the files mentioning either - let's get them knocked off!
Generated as follows: