summaryrefslogtreecommitdiffstats
path: root/server/db/sysdb.h
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2009-10-06 09:17:56 +0200
committerStephen Gallagher <sgallagh@redhat.com>2009-10-22 13:56:23 -0400
commit47dde498d2696d3801111850dea4521cc4dd09c7 (patch)
treeadd2c4d54b861528ee2511630fdb6ff0cc755ec5 /server/db/sysdb.h
parentdc35d48c98e78116a8393f6fa432d38c2622c02b (diff)
downloadsssd-47dde498d2696d3801111850dea4521cc4dd09c7.tar.gz
sssd-47dde498d2696d3801111850dea4521cc4dd09c7.tar.xz
sssd-47dde498d2696d3801111850dea4521cc4dd09c7.zip
add store/search/delete interface for custom sysdb objects
Diffstat (limited to 'server/db/sysdb.h')
-rw-r--r--server/db/sysdb.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/server/db/sysdb.h b/server/db/sysdb.h
index 9afb957f5..55852c555 100644
--- a/server/db/sysdb.h
+++ b/server/db/sysdb.h
@@ -33,6 +33,7 @@
#define SYSDB_DOM_BASE "cn=%s,cn=sysdb"
#define SYSDB_TMPL_USER_BASE "cn=users,cn=%s,"SYSDB_BASE
#define SYSDB_TMPL_GROUP_BASE "cn=groups,cn=%s,"SYSDB_BASE
+#define SYSDB_TMPL_CUSTOM_BASE "cn=custom,cn=%s,"SYSDB_BASE
#define SYSDB_USER_CLASS "user"
#define SYSDB_GROUP_CLASS "group"
@@ -132,6 +133,7 @@
#define SYSDB_TMPL_USER SYSDB_NAME"=%s,"SYSDB_TMPL_USER_BASE
#define SYSDB_TMPL_GROUP SYSDB_NAME"=%s,"SYSDB_TMPL_GROUP_BASE
+#define SYSDB_TMPL_CUSTOM SYSDB_NAME"=%s,cn=%s,"SYSDB_TMPL_CUSTOM_BASE
#define SYSDB_MOD_ADD LDB_FLAG_MOD_ADD
#define SYSDB_MOD_DEL LDB_FLAG_MOD_DELETE
@@ -176,6 +178,11 @@ struct ldb_dn *sysdb_group_dn(struct sysdb_ctx *ctx, void *memctx,
const char *domain, const char *name);
struct ldb_dn *sysdb_domain_dn(struct sysdb_ctx *ctx, void *memctx,
const char *domain);
+struct ldb_dn *sysdb_custom_dn(struct sysdb_ctx *ctx, void *memctx,
+ const char *domain, const char *object_name,
+ const char *subtree_name);
+
+
struct ldb_context *sysdb_ctx_get_ldb(struct sysdb_ctx *ctx);
struct ldb_context *sysdb_handle_get_ldb(struct sysdb_handle *handle);
@@ -515,4 +522,32 @@ struct tevent_req *sysdb_cache_password_send(TALLOC_CTX *mem_ctx,
const char *password);
int sysdb_cache_password_recv(struct tevent_req *req);
+struct tevent_req *sysdb_store_custom_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct sysdb_handle *handle,
+ struct sss_domain_info *domain,
+ const char *object_name,
+ const char *subtree_name,
+ struct sysdb_attrs *attrs);
+int sysdb_store_custom_recv(struct tevent_req *req);
+
+struct tevent_req *sysdb_search_custom_by_name_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct sysdb_ctx *sysdb,
+ struct sysdb_handle *handle,
+ struct sss_domain_info *domain,
+ const char *object_name,
+ const char *subtree_name,
+ const char **attrs);
+int sysdb_search_custom_recv(struct tevent_req *req,
+ TALLOC_CTX *mem_ctx,
+ struct ldb_message **msg);
+
+struct tevent_req *sysdb_delete_custom_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct sysdb_handle *handle,
+ struct sss_domain_info *domain,
+ const char *object_name,
+ const char *subtree_name);
+int sysdb_delete_custom_recv(struct tevent_req *req);
#endif /* __SYS_DB_H__ */