summaryrefslogtreecommitdiff
path: root/source3/passdb/passdb.c
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2011-08-10 17:32:32 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-08-13 12:30:48 +1000
commitae9a3274bc511a302ab52ec94b43b7a0abd84fe9 (patch)
tree5be7c341473c709813ed480f47dfd33efe149dad /source3/passdb/passdb.c
parent2e0ccc47723e5117180a4ece8a260920fc66b2b8 (diff)
downloadsamba-ae9a3274bc511a302ab52ec94b43b7a0abd84fe9.tar.gz
samba-ae9a3274bc511a302ab52ec94b43b7a0abd84fe9.tar.bz2
samba-ae9a3274bc511a302ab52ec94b43b7a0abd84fe9.zip
passdb: Call with correct backend methods instead of default methods
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/passdb/passdb.c')
-rw-r--r--source3/passdb/passdb.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index faa608cc78..62dcb5dedd 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -146,7 +146,8 @@ static int count_commas(const char *str)
attributes and a user SID.
*********************************************************************/
-static NTSTATUS samu_set_unix_internal(struct samu *user, const struct passwd *pwd, bool create)
+static NTSTATUS samu_set_unix_internal(struct pdb_methods *methods,
+ struct samu *user, const struct passwd *pwd, bool create)
{
const char *guest_account = lp_guestaccount();
const char *domain = lp_netbios_name();
@@ -246,11 +247,11 @@ static NTSTATUS samu_set_unix_internal(struct samu *user, const struct passwd *p
initialized and will fill in these fields later (such as from a
netr_SamInfo3 structure) */
- if ( create && (pdb_capabilities() & PDB_CAP_STORE_RIDS)) {
+ if ( create && (methods->capabilities(methods) & PDB_CAP_STORE_RIDS)) {
uint32_t user_rid;
struct dom_sid user_sid;
- if ( !pdb_new_rid( &user_rid ) ) {
+ if ( !methods->new_rid(methods, &user_rid) ) {
DEBUG(3, ("Could not allocate a new RID\n"));
return NT_STATUS_ACCESS_DENIED;
}
@@ -282,12 +283,13 @@ static NTSTATUS samu_set_unix_internal(struct samu *user, const struct passwd *p
NTSTATUS samu_set_unix(struct samu *user, const struct passwd *pwd)
{
- return samu_set_unix_internal( user, pwd, False );
+ return samu_set_unix_internal( NULL, user, pwd, False );
}
-NTSTATUS samu_alloc_rid_unix(struct samu *user, const struct passwd *pwd)
+NTSTATUS samu_alloc_rid_unix(struct pdb_methods *methods,
+ struct samu *user, const struct passwd *pwd)
{
- return samu_set_unix_internal( user, pwd, True );
+ return samu_set_unix_internal( methods, user, pwd, True );
}
/**********************************************************