[SSSD] [PATCHSET] intg: sss_override

Pavel Reichl preichl at redhat.com
Fri Nov 13 12:22:56 UTC 2015


Hello Nick, thanks for the valid comments I hope I addressed them all.

I used the dictionary hint, but I didn't use it everywhere - mostly just where the same dict would be reused in the same function.


On 11/03/2015 04:40 PM, Nikolai Kondrashov wrote:
>
>> +
>> +    # We can create override with name root.
>> +    ent.assert_passwd_by_name(
>> +        'user2',
>> +        dict(name='root', passwd='*', uid=10020, gid=20020,
>> +             gecos='Overriden User 2',
>> +             dir='/home/ov/user2',
>> +             shell='/bin/ov_user2_shell'))
>> +
>> +    ent.assert_passwd_by_uid(0, dict(name="root"))
>
> Could you please add a comment to this line explaining what it tests?

Well, I can't :-). I just hit this case and I don't think this is a security bug, but I decided to highlight it and at least canonize this behavior - whenever implementation would change test would need to be changed too.

I can remove this part of the test - no trouble at all.

>
> Could you make each set item start on a new line, so it's easier to read?
> Something like this:
>
>      assert set(out.splitlines()) == \
>             set(['user1 at LDAP:ov_user1:10010:20010:Overriden User 1:' \
>                      '/home/ov/user1:/bin/ov_user1_shell',
>                  'user2 at LDAP:ov_user2:10020:20020:Overriden User 2:' \
>                      '/home/ov/user2:/bin/ov_user2_shell'])

Sorry I could not use this format as pep8 didn't like it. I had to remove the backslash and then '2nd' part of the string could not be intended (pep8 didn't like too).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-intg-Add-test-for-user-and-group-local-overrides.patch
Type: text/x-patch
Size: 33769 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20151113/54f612df/attachment-0001.bin>


More information about the sssd-devel mailing list