diff options
author | Volker Lendecke <vl@samba.org> | 2009-06-28 17:36:12 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-06-28 22:13:50 +0200 |
commit | 711544d4943a40649b6c590f8ee003093081889a (patch) | |
tree | afee8fcd95e3a9b3844dccd9cb11b2418cf67fd8 /source3/passdb/pdb_interface.c | |
parent | 325a58a6532e2a9bc7b8e21d55c9b1ccfb879bf9 (diff) | |
download | samba-711544d4943a40649b6c590f8ee003093081889a.tar.gz samba-711544d4943a40649b6c590f8ee003093081889a.tar.bz2 samba-711544d4943a40649b6c590f8ee003093081889a.zip |
Turn the pdb_rid_algorithm into a capabilities call that returns flags
Diffstat (limited to 'source3/passdb/pdb_interface.c')
-rw-r--r-- | source3/passdb/pdb_interface.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c index 6fe0979a50..a72409ea4a 100644 --- a/source3/passdb/pdb_interface.c +++ b/source3/passdb/pdb_interface.c @@ -574,12 +574,12 @@ static NTSTATUS pdb_default_create_dom_group(struct pdb_methods *methods, return NT_STATUS_ACCESS_DENIED; } - if (pdb_rid_algorithm()) { - *rid = algorithmic_pdb_gid_to_group_rid( grp->gr_gid ); - } else { + if (pdb_capabilities() & PDB_CAP_STORE_RIDS) { if (!pdb_new_rid(rid)) { return NT_STATUS_ACCESS_DENIED; } + } else { + *rid = algorithmic_pdb_gid_to_group_rid( grp->gr_gid ); } sid_compose(&group_sid, get_global_sam_sid(), *rid); @@ -1043,10 +1043,10 @@ bool pdb_sid_to_id(const DOM_SID *sid, union unid_t *id, return pdb->sid_to_id(pdb, sid, id, type); } -bool pdb_rid_algorithm(void) +uint32_t pdb_capabilities(void) { struct pdb_methods *pdb = pdb_get_methods(); - return pdb->rid_algorithm(pdb); + return pdb->capabilities(pdb); } /******************************************************************** @@ -1065,7 +1065,7 @@ bool pdb_new_rid(uint32 *rid) int i; TALLOC_CTX *ctx; - if (pdb_rid_algorithm()) { + if ((pdb_capabilities() & PDB_CAP_STORE_RIDS) == 0) { DEBUG(0, ("Trying to allocate a RID when algorithmic RIDs " "are active\n")); return False; |