diff options
author | Gerald Carter <jerry@samba.org> | 2006-02-11 21:27:08 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:10:04 -0500 |
commit | 75ef18fa7510d894ccc4540d82616110c3166db3 (patch) | |
tree | 7a3e2e31489f614a48262525228187bdffabe1e4 /source3/passdb/pdb_tdb.c | |
parent | 85160e654e5a1fc4fcb0d6cecc5187cc3b62f6d7 (diff) | |
download | samba-75ef18fa7510d894ccc4540d82616110c3166db3.tar.gz samba-75ef18fa7510d894ccc4540d82616110c3166db3.tar.bz2 samba-75ef18fa7510d894ccc4540d82616110c3166db3.zip |
r13460: by popular demand....
* remove pdb_context data structure
* set default group for DOMAIN_RID_GUEST user as RID 513 (just
like Windows)
* Allow RID 513 to resolve to always resolve to a name
* Remove auto mapping of guest account primary group given the
previous 2 changes
(This used to be commit 7a2da5f0cc05c1920c664c9a690a23bdf854e285)
Diffstat (limited to 'source3/passdb/pdb_tdb.c')
-rw-r--r-- | source3/passdb/pdb_tdb.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c index 74f47e70dc..d77f2b3377 100644 --- a/source3/passdb/pdb_tdb.c +++ b/source3/passdb/pdb_tdb.c @@ -965,25 +965,21 @@ static void free_private_data(void **vp) /* No need to free any further, as it is talloc()ed */ } - - - /** * Init tdbsam backend * - * @param pdb_context initialised passdb context * @param pdb_method backend methods structure to be filled with function pointers * @param location the backend tdb file location * * @return nt_status code **/ -static NTSTATUS pdb_init_tdbsam(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_method, const char *location) +static NTSTATUS pdb_init_tdbsam(struct pdb_methods **pdb_method, const char *location) { NTSTATUS nt_status; struct tdbsam_privates *tdb_state; - if (!NT_STATUS_IS_OK(nt_status = make_pdb_methods(pdb_context->mem_ctx, pdb_method))) { + if (!NT_STATUS_IS_OK(nt_status = make_pdb_method( pdb_method ))) { return nt_status; } @@ -1002,21 +998,19 @@ static NTSTATUS pdb_init_tdbsam(PDB_CONTEXT *pdb_context, PDB_METHODS **pdb_meth (*pdb_method)->rid_algorithm = tdbsam_rid_algorithm; (*pdb_method)->new_rid = tdbsam_new_rid; - tdb_state = TALLOC_ZERO_P(pdb_context->mem_ctx, struct tdbsam_privates); - - if (!tdb_state) { + if ( !(tdb_state = TALLOC_ZERO_P( *pdb_method, struct tdbsam_privates)) ) { DEBUG(0, ("talloc() failed for tdbsam private_data!\n")); return NT_STATUS_NO_MEMORY; } if (location) { - tdb_state->tdbsam_location = talloc_strdup(pdb_context->mem_ctx, location); + tdb_state->tdbsam_location = talloc_strdup(*pdb_method, location); } else { pstring tdbfile; get_private_directory(tdbfile); pstrcat(tdbfile, "/"); pstrcat(tdbfile, PASSDB_FILE_NAME); - tdb_state->tdbsam_location = talloc_strdup(pdb_context->mem_ctx, tdbfile); + tdb_state->tdbsam_location = talloc_strdup(*pdb_method, tdbfile); } (*pdb_method)->private_data = tdb_state; |