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)
commitf9147c4e408d316d194c4e367dfccbf433cb8ec9
treec706add179942ab8c6b54cda49e9b0a47fc69bca
parenta1e0a0e9286fbe90ca04cda9df38e72d8d18b0c1
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.
(This used to be commit a0d368197d6ae6777b7c2c3c6e970ab8ae7ca2ae)
source3/auth/auth_util.c
source3/pam_smbpass/pam_smb_acct.c
source3/pam_smbpass/pam_smb_auth.c
source3/passdb/passdb.c
source3/passdb/pdb_get_set.c
source3/passdb/pdb_interface.c
source3/rpc_server/srv_netlog_nt.c
source3/smbd/lanman.c
source3/utils/smbpasswd.c