From 1e72a17f6527d47968032fc928f489dad10705ea Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Fri, 19 Apr 2013 17:44:06 +0200 Subject: sysdb: add sysdb_search_object_by_sid() The patch add a new sysdb to find objects based on their SID. Currently only the basic attributes needed to map SIDs to POSIX IDs and names are requested, but this list can be extended for future use cases. --- src/db/sysdb.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/db/sysdb.h') diff --git a/src/db/sysdb.h b/src/db/sysdb.h index fb5e64507..e91143c18 100644 --- a/src/db/sysdb.h +++ b/src/db/sysdb.h @@ -154,6 +154,8 @@ #define SYSDB_NETGR_FILTER "(&("SYSDB_NC")(|("SYSDB_NAME_ALIAS"=%s)("SYSDB_NAME"=%s)))" #define SYSDB_NETGR_TRIPLES_FILTER "(|("SYSDB_NAME"=%s)("SYSDB_NAME_ALIAS"=%s)("SYSDB_MEMBEROF"=%s))" +#define SYSDB_SID_FILTER "(&(|("SYSDB_UC")("SYSDB_GC"))("SYSDB_SID_STR"=%s))" + #define SYSDB_HAS_ENUMERATED "has_enumerated" #define SYSDB_DEFAULT_ATTRS SYSDB_LAST_UPDATE, \ @@ -848,4 +850,10 @@ errno_t sysdb_idmap_get_mappings(TALLOC_CTX *mem_ctx, struct sss_domain_info *domain, struct ldb_result **_result); +errno_t sysdb_search_object_by_sid(TALLOC_CTX *mem_ctx, + struct sysdb_ctx *sysdb, + struct sss_domain_info *domain, + const char *sid_str, + const char **attrs, + struct ldb_result **msg); #endif /* __SYS_DB_H__ */ -- cgit