Discussion:
[Freeipa-devel] [freeipa PR#578][opened] Coverity: fix bad use of null-like value in cert.py
tomaskrizek
2017-03-13 18:19:10 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/578
Author: tomaskrizek
Title: #578: Coverity: fix bad use of null-like value in cert.py
Action: opened

PR body:
"""
http://cov01.lab.eng.brq.redhat.com/covscanhub/task/38300/
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/578/head:pr578
git checkout pr578
tomaskrizek
2017-03-13 18:30:56 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/578
Author: tomaskrizek
Title: #578: Coverity: fix bad use of null-like value in cert.py
Action: edited

Changed field: body
Original value:
"""
http://cov01.lab.eng.brq.redhat.com/covscanhub/task/38300/
"""
apophys
2017-03-13 18:40:40 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/578
Title: #578: Coverity: fix bad use of null-like value in cert.py

apophys commented:
"""
Please do not post links to internal Red Hat resources in public.
"""

See the full comment at https://github.com/freeipa/freeipa/pull/578#issuecomment-286203585
stlaz
2017-03-13 18:44:17 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/578
Title: #578: Coverity: fix bad use of null-like value in cert.py

stlaz commented:
"""
Shame on you, @tomaskrizek
"""

See the full comment at https://github.com/freeipa/freeipa/pull/578#issuecomment-286204648
MartinBasti
2017-03-13 19:26:35 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/578
Title: #578: Coverity: fix bad use of null-like value in cert.py

MartinBasti commented:
"""
I would rather focus on why `principal_obj` is not defined there
"""

See the full comment at https://github.com/freeipa/freeipa/pull/578#issuecomment-286216443
stlaz
2017-03-14 06:21:02 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/578
Title: #578: Coverity: fix bad use of null-like value in cert.py

stlaz commented:
"""
if you look at steps 2, 4 and 13 in the Synopsis report (sorry, community!), you will see that this is a false positive. Anyone, please close this as "rejected" to confirm.
"""

See the full comment at https://github.com/freeipa/freeipa/pull/578#issuecomment-286332822
tomaskrizek
2017-03-14 08:21:33 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/578
Author: tomaskrizek
Title: #578: Coverity: fix bad use of null-like value in cert.py
Action: edited

Changed field: body
Original value:
"""
http://cov01.lab.eng.brq.redhat.com/covscanhub/task/38300/log/fixed.html#def2
"""
tomaskrizek
2017-03-14 08:40:10 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/578
Title: #578: Coverity: fix bad use of null-like value in cert.py

tomaskrizek commented:
"""
Sorry about the link, I've removed it.

Nevertheless, it seems that's indeed a false positive, because `principal_type` is set to `USER`, but `principal_type == KRBTGT` on [L616](https://github.com/freeipa/freeipa/pull/578/files#diff-95cc6f5739d8923e9d470c2f686038f1R616) is evaluated as true instead of `principal_type == USER` at [L624](https://github.com/freeipa/freeipa/pull/578/files#diff-95cc6f5739d8923e9d470c2f686038f1R624) which would set `principal_obj`. There is no other assignment to `principal_type` in between.

Closing the PR, coverity error is a false positive.
"""

See the full comment at https://github.com/freeipa/freeipa/pull/578#issuecomment-286355703
tomaskrizek
2017-03-14 08:40:15 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/578
Title: #578: Coverity: fix bad use of null-like value in cert.py

Label: +rejected
tomaskrizek
2017-03-14 08:40:11 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/578
Author: tomaskrizek
Title: #578: Coverity: fix bad use of null-like value in cert.py
Action: closed

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/578/head:pr578
git checkout pr578
MartinBasti
2017-03-14 08:58:48 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/578
Title: #578: Coverity: fix bad use of null-like value in cert.py

MartinBasti commented:
"""
But this is about `principal_obj`, I don't see it in step 2, but I see `principal_obj = None` in step 11
"""

See the full comment at https://github.com/freeipa/freeipa/pull/578#issuecomment-286359771
MartinBasti
2017-03-14 09:02:49 UTC
Permalink
URL: https://github.com/freeipa/freeipa/pull/578
Title: #578: Coverity: fix bad use of null-like value in cert.py

MartinBasti commented:
"""
Ah I see it is really false positive
"""

See the full comment at https://github.com/freeipa/freeipa/pull/578#issuecomment-286360715
Loading...