auth/pycredentials: always check self is a Credentials object
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Sat, 6 Jul 2019 07:07:11 +0000 (19:07 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 22 Jul 2019 22:20:25 +0000 (22:20 +0000)
commitc9c1d444881d4464842cfc19fcb5ddd41c58dfa9
treeaddf27e21f1b6fb1e64b3ff114b6b0dd1c33773a
parent2d1c269a9e4b4bdf8bffc91fcb63778e03097b3e
auth/pycredentials: always check self is a Credentials object

This prevents a segfault with

    credentials.Credentials.guess(x)

where x is not a Credentials object.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
auth/credentials/pycredentials.c