summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/passdb/pdb_unix.c')
-rw-r--r--source3/passdb/pdb_unix.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/source3/passdb/pdb_unix.c b/source3/passdb/pdb_unix.c
index d1f95c445b..d7574e6e13 100644
--- a/source3/passdb/pdb_unix.c
+++ b/source3/passdb/pdb_unix.c
@@ -66,35 +66,28 @@ static BOOL unixsam_getsampwrid (struct pdb_methods *methods,
}
/***************************************************************************
- Delete a SAM_ACCOUNT
+ Adds an existing SAM_ACCOUNT
****************************************************************************/
-static BOOL unixsam_delete_sam_account(struct pdb_methods *methods, const SAM_ACCOUNT *sam_pass)
+static BOOL unixsam_add_sam_account (struct pdb_methods *methods, const SAM_ACCOUNT *newpwd)
{
- /*
- * Unsupported as well - we don't need to get involved in
- * unix passdb's - and hey, we would need to use pam for that anyway
- */
+ DEBUG(0,("pdb_unix should not be listed as the first passdb backend! You can't add users to it.\n"));
return False;
}
/***************************************************************************
- Modifies an existing SAM_ACCOUNT
- ****************************************************************************/
+ Updates a SAM_ACCOUNT
-static BOOL unixsam_update_sam_account (struct pdb_methods *methods, const SAM_ACCOUNT *newpwd)
-{
- return False;
-}
+ This isn't a particulary practical option for pdb_unix. We certainly don't
+ want to twidde the filesystem, so what should we do?
-/***************************************************************************
- Adds an existing SAM_ACCOUNT
+ 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 BOOL unixsam_add_sam_account (struct pdb_methods *methods, const SAM_ACCOUNT *newpwd)
+static BOOL unixsam_update_sam_account (struct pdb_methods *methods, SAM_ACCOUNT *newpwd)
{
- DEBUG(0,("pdb_unix should not be listed as the first passdb backend! You can't add users to it.\n"));
- return False;
+ return methods->parent->pdb_add_sam_account(methods->parent, newpwd);
}
NTSTATUS pdb_init_unixsam(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_method, const char *location)
@@ -119,7 +112,7 @@ NTSTATUS pdb_init_unixsam(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_method, co
(*pdb_method)->getsampwrid = unixsam_getsampwrid;
(*pdb_method)->add_sam_account = unixsam_add_sam_account;
(*pdb_method)->update_sam_account = unixsam_update_sam_account;
- (*pdb_method)->delete_sam_account = unixsam_delete_sam_account;
+ (*pdb_method)->delete_sam_account = NULL;
/* There's not very much to initialise here */
return NT_STATUS_OK;