1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

s4-dsdb: added samdb_domain_sid_cache_only()

This commit is contained in:
Andrew Tridgell 2010-01-10 12:52:22 +11:00
parent fd92db55eb
commit d5091a1dd9

View File

@ -1196,11 +1196,18 @@ const struct dom_sid *samdb_domain_sid(struct ldb_context *ldb)
return domain_sid; return domain_sid;
failed: failed:
DEBUG(1,("Failed to find domain_sid for open ldb\n"));
talloc_free(tmp_ctx); talloc_free(tmp_ctx);
return NULL; return NULL;
} }
/*
get domain sid from cache
*/
const struct dom_sid *samdb_domain_sid_cache_only(struct ldb_context *ldb)
{
return (struct dom_sid *)ldb_get_opaque(ldb, "cache.domain_sid");
}
bool samdb_set_domain_sid(struct ldb_context *ldb, const struct dom_sid *dom_sid_in) bool samdb_set_domain_sid(struct ldb_context *ldb, const struct dom_sid *dom_sid_in)
{ {
TALLOC_CTX *tmp_ctx; TALLOC_CTX *tmp_ctx;