diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-01-02 07:41:54 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-01-02 07:41:54 +0000 |
commit | d3dd28f6c443187b8d820d5a39c7c5b3be2fa95c (patch) | |
tree | f060ac4aba562b9e7bd686bba5dde8f4bf3bda3c /source/utils | |
parent | f6592628eb526c487069bb3fcd809aca930e668e (diff) | |
download | samba-d3dd28f6c443187b8d820d5a39c7c5b3be2fa95c.tar.gz samba-d3dd28f6c443187b8d820d5a39c7c5b3be2fa95c.tar.xz samba-d3dd28f6c443187b8d820d5a39c7c5b3be2fa95c.zip |
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
Diffstat (limited to 'source/utils')
-rw-r--r-- | source/utils/pdbedit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/utils/pdbedit.c b/source/utils/pdbedit.c index 90c50d7e9ff..ab7c9d6f7c1 100644 --- a/source/utils/pdbedit.c +++ b/source/utils/pdbedit.c @@ -87,8 +87,8 @@ static int print_sam_info (SAM_ACCOUNT *sam_pwent, BOOL verbosity, BOOL smbpwdst gid = pdb_get_gid(sam_pwent); printf ("user ID/Group: %d/%d\n", uid, gid); } - printf ("user RID/GRID: %u/%u\n", (unsigned int)sam_pwent->user_rid, - (unsigned int)sam_pwent->group_rid); + printf ("user RID/GRID: %u/%u\n", (unsigned int)pdb_get_user_rid(sam_pwent), + (unsigned int)pdb_get_group_rid(sam_pwent)); printf ("Full Name: %s\n", pdb_get_fullname(sam_pwent)); printf ("Home Directory: %s\n", pdb_get_homedir(sam_pwent)); printf ("HomeDir Drive: %s\n", pdb_get_dirdrive(sam_pwent)); |