summaryrefslogtreecommitdiff
path: root/source3/passdb/pdb_unix.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-05-18 09:06:23 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-05-18 09:06:23 +0000
commitd4dac178df1ff7dba83e3adddb55770b0b26e530 (patch)
tree56e4cd3e611403f990a2a218ee46b0520bbb539d /source3/passdb/pdb_unix.c
parent27b9283aff66073afd8811654f9d091bd283d6d6 (diff)
downloadsamba-d4dac178df1ff7dba83e3adddb55770b0b26e530.tar.gz
samba-d4dac178df1ff7dba83e3adddb55770b0b26e530.tar.bz2
samba-d4dac178df1ff7dba83e3adddb55770b0b26e530.zip
Passdb:
Kill off the silly code that attempts to do NT -> Unix username mapping. This is done well before here, no need to repeat it. Add some small fixes and extra debugs, trying to track down current build farm failures. pdb_unix: When 'updating' a pdb_unix account, instead add it to the default passdb. This means that you don't need to specify '-a' to smbpasswd any more when messing with an existing unix user, the account is simply 'upgraded'. The idea here is that these accounts are just as 'real' as any other, they just don't have the extra attributes an smbpasswd file does. I'm open for debate on the pdb_unix issue, and will remove it if given good reason. (without this, an attempt to add an account already in pdb_unix to smbpasswd would fail, as it would fail to update pdb_unix). rpc_server/srv_netlog_nt.c Change a couple of things around, so as to show the client workstation etc. WRONG_PASSWORD is certainly not the right default error. Try ACCESS_DENIED for now. Andrew Bartlett (This used to be commit d78b74b338df9accd9ad84c56a49fa4f787425e2)
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;