diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-07-05 10:39:41 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-07-05 10:39:41 +0000 |
commit | 85921dbd6fa417aa451ab9b6e88ecb7900333549 (patch) | |
tree | 8bdb5a575f2f9dc06d29480bbf5165e5bb8760c6 /source3/passdb/pdb_guest.c | |
parent | a3ddfa5069c9df07626135aa5fd2ec411c41943f (diff) | |
download | samba-85921dbd6fa417aa451ab9b6e88ecb7900333549.tar.gz samba-85921dbd6fa417aa451ab9b6e88ecb7900333549.tar.xz samba-85921dbd6fa417aa451ab9b6e88ecb7900333549.zip |
Add some debug statments to our vampire code - try to make it easier to track
down failures.
Add a 'auto-add on modify' feature to guestsam
Fix some segfault bugs on no-op idmap modifications, and on new idmappings that
do not have a DN to tack onto.
Make the 'private data' a bit more robust.
Andrew Bartlett
(This used to be commit 6c48309cda9538da5a32f3d88a7bb9c413ae9e8e)
Diffstat (limited to 'source3/passdb/pdb_guest.c')
-rw-r--r-- | source3/passdb/pdb_guest.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/passdb/pdb_guest.c b/source3/passdb/pdb_guest.c index 359e2285a3a..18a456b2e1d 100644 --- a/source3/passdb/pdb_guest.c +++ b/source3/passdb/pdb_guest.c @@ -98,6 +98,21 @@ static NTSTATUS guestsam_getsampwsid(struct pdb_methods *my_methods, SAM_ACCOUNT } +/*************************************************************************** + Updates a SAM_ACCOUNT + + This isn't a particulary practical option for pdb_guest. We certainly don't + want to twidde the filesystem, so what should we do? + + Current plan is to transparently add the account. It should appear + as if the pdb_unix version was modified, but its actually stored somehwere. + ****************************************************************************/ + +static NTSTATUS guestsam_update_sam_account (struct pdb_methods *methods, SAM_ACCOUNT *newpwd) +{ + return methods->parent->pdb_add_sam_account(methods->parent, newpwd); +} + NTSTATUS pdb_init_guestsam(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_method, const char *location) { NTSTATUS nt_status; @@ -115,6 +130,7 @@ NTSTATUS pdb_init_guestsam(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_method, c (*pdb_method)->getsampwnam = guestsam_getsampwnam; (*pdb_method)->getsampwsid = guestsam_getsampwsid; + (*pdb_method)->update_sam_account = guestsam_update_sam_account; /* we should do no group mapping here */ (*pdb_method)->getgrsid = pdb_nop_getgrsid; |