URL: https://github.com/SSSD/sssd/pull/156 Author: lslebodn Title: #156: FILES: Remove unnecessary check Action: opened
PR body: """ "grp_iter->gr_mem" is an array of strings and not just a string. We tried to compare first string to NULL (acctually '\0') But after that we iterated over the array to find count of members and we check for NULL one more time. """
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/156/head:pr156 git checkout pr156
URL: https://github.com/SSSD/sssd/pull/156 Title: #156: FILES: Remove unnecessary check
fidencio commented: """ Go for it. """
See the full comment at https://github.com/SSSD/sssd/pull/156#issuecomment-280362258
URL: https://github.com/SSSD/sssd/pull/156 Title: #156: FILES: Remove unnecessary check
Label: +Accepted
URL: https://github.com/SSSD/sssd/pull/156 Title: #156: FILES: Remove unnecessary check
jhrozek commented: """ Well, this check was actually intentional. Please grep for gr_mem in proxy_id.c code. I remember from the distant past that we had issues where libc would pass in a zero-length member name..
To be honest, I haven't been able to reproduce this issue and I don't even remember if the issue in proxy code happened with the nss_files proxy -- so if you prefer to have a cleaner code guarding against conditions that we absolutely know how to trigger, feel free to remove the code. I'm just saying I added the check on purpose. """
See the full comment at https://github.com/SSSD/sssd/pull/156#issuecomment-281020827
URL: https://github.com/SSSD/sssd/pull/156 Title: #156: FILES: Remove unnecessary check
lslebodn commented: """ On (20/02/17 00:52), Jakub Hrozek wrote:
Well, this check was actually intentional. Please grep for gr_mem in proxy_id.c code. I remember from the distant past that we had issues where libc would pass in a zero-length member name..
To be honest, I haven't been able to reproduce this issue and I don't even remember if the issue in proxy code happened with the nss_files proxy -- so if you prefer to have a cleaner code guarding against conditions that we absolutely know how to trigger, feel free to remove the code. I'm just saying I added the check on purpose.
Do you mean macro `DEBUG_GR_MEM`? a) this checkis there to have debug message "Group %s has no members!\n" rahter then "has 0 members!\n" b) there if chech for NULL: `!grp->gr_mem[0]` and not '\0' :-)
LS
"""
See the full comment at https://github.com/SSSD/sssd/pull/156#issuecomment-281027539
URL: https://github.com/SSSD/sssd/pull/156 Title: #156: FILES: Remove unnecessary check
jhrozek commented: """ No, I meant the one in save_group, but you're right the check for \0 is strange. """
See the full comment at https://github.com/SSSD/sssd/pull/156#issuecomment-281665452
URL: https://github.com/SSSD/sssd/pull/156 Author: lslebodn Title: #156: FILES: Remove unnecessary check Action: closed
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/156/head:pr156 git checkout pr156
URL: https://github.com/SSSD/sssd/pull/156 Title: #156: FILES: Remove unnecessary check
jhrozek commented: """ * master: 1f49be4429c17475b789e9089ce4d0ae48315e74 """
See the full comment at https://github.com/SSSD/sssd/pull/156#issuecomment-281666431
URL: https://github.com/SSSD/sssd/pull/156 Title: #156: FILES: Remove unnecessary check
Label: +Pushed
sssd-devel@lists.fedorahosted.org