many: do not use nss when looking up for users/groups from snapd snap
~~Depends on #13370~~
When snapd runs as a snap, it has its own runtime. This may not have NSS plugins needed for the host. For example to get users from AD/LDAP/Kerberos, or systemd-homed, or custom user databses. In general we can use tag osusergo to make go not to use the local configuration (i.e. /etc/nsswitch.conf), however, even if it is fine for most databases, we really need users and groups to be resolved with the host configuration.
To be able to load correctly plugins, we expect the host system to provide getent. And we query passwd and group databases through this command.
In the future we should connect the systemd-userdb if it is running and use getent only as fallback.
This branch depends on #13517 to be properly tested.
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 78.74%. Comparing base (
ea13a33) to head (b9df3a3). Report is 37 commits behind head on master.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## master #13776 +/- ##
==========================================
+ Coverage 78.73% 78.74% +0.01%
==========================================
Files 1055 1061 +6
Lines 138275 139197 +922
==========================================
+ Hits 108866 109609 +743
- Misses 22588 22736 +148
- Partials 6821 6852 +31
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 78.74% <ø> (+0.01%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.