Actually enforce the passdb API.
authorAndrew Bartlett <abartlet@samba.org>
Wed, 2 Jan 2002 07:41:54 +0000 (07:41 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 2 Jan 2002 07:41:54 +0000 (07:41 +0000)
commitd3dd28f6c443187b8d820d5a39c7c5b3be2fa95c
treef060ac4aba562b9e7bd686bba5dde8f4bf3bda3c
parentf6592628eb526c487069bb3fcd809aca930e668e
Actually enforce the passdb API.

Thou shalt not reference SAM_ACCOUNT members directly - always use
pdb_get/pdb_set.

This is achived by making the whole of SAM_ACCOUNT have a .private member,
where the real members live.  This caught a pile of examples, and these have
beeen fixed.

The pdb_get..() functions are 'const' (have been for some time) and this
required a few small changes to constify other functions.

I've also added some debugs to the pdb get and set, they can be removed if
requested.

I've rewritten the copy_id2x_to_sam_pass() functions to use the new passdb
interface, but I need the flags info to do it properly.

The pdb_free_sam() funciton now blanks out the LM and NT hashes, and as such
I have removed many extra 'samr_clear_sam_passwd(smbpass)' calls as a result.

Finally, any and all testing is always appriciated - but the basics seem to
work.

Andrew Bartlett
source/groupdb/mapping.c
source/include/smb.h
source/passdb/passdb.c
source/passdb/pdb_ldap.c
source/passdb/pdb_nisplus.c
source/passdb/pdb_tdb.c
source/rpc_server/srv_samr_nt.c
source/smbd/password.c
source/utils/pdbedit.c