r16241: Fix Klocwork #106 and others like it.
authorJeremy Allison <jra@samba.org>
Thu, 15 Jun 2006 01:54:09 +0000 (01:54 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:17:27 +0000 (11:17 -0500)
commita0d368197d6ae6777b7c2c3c6e970ab8ae7ca2ae
tree35d2d865dae6d0c9ad16664f262461a54af82a0d
parent6c61dc8ed6d84f310ef391fb7700e93ef42c4afc
r16241: Fix Klocwork #106 and others like it.
Make 2 important changes. pdb_get_methods()
returning NULL is a *fatal* error. Don't try
and cope with it just call smb_panic. This
removes a *lot* of pointless "if (!pdb)" handling
code. Secondly, ensure that if samu_init()
fails we *always* back out of a function. That
way we are never in a situation where the pdb_XXX()
functions need to start with a "if (sampass)"
test - this was just bad design, not defensive
programming.
Jeremy.
source/auth/auth_util.c
source/pam_smbpass/pam_smb_acct.c
source/pam_smbpass/pam_smb_auth.c
source/passdb/passdb.c
source/passdb/pdb_get_set.c
source/passdb/pdb_interface.c
source/rpc_server/srv_netlog_nt.c
source/smbd/lanman.c
source/utils/smbpasswd.c