Title: #5171: files: allow root membership
SSSD design decision was to "never handle root" and we use uid=0 and gid=0 to indicate
various error states. root user and group is unconditionally added in negative cache.
This makes perfect sense for LDAP but introduced regressions in files provider
when compared to nss_files:
1) When a user is part of root group - the membership is not returned
2) When a user has root as primary group - the user is not returned and every other membership is broken.
The "never handle root" policy is basically kept, with few exceptions for files provider:
- it will not filter out root as group member if it is also files provider - solves 1)
- it will store user with gid=0 unless it also has uid=0 thus solving 2)
Direct request for root user or group will still not be handled.
To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/5171/head:pr5171
git checkout pr5171
Running pycodestyle-2.6.0 currently reports cases which is one of a set of three
style checks to avoid ambiguous single letter names which look like numbers
./src/tests/python-test.py:54:35: E741 ambiguous variable name 'l'
./src/tests/python-test.py:102:38: E741 ambiguous variable name 'l'
./src/tests/intg/krb5utils.py:101:27: E741 ambiguous variable name 'l'
./src/tests/intg/krb5utils.py:116:23: E741 ambiguous variable name 'l'
./src/tests/intg/krb5utils.py:140:28: E741 ambiguous variable name 'l'