summaryrefslogtreecommitdiffstats
path: root/server/db/sysdb.h
diff options
context:
space:
mode:
Diffstat (limited to 'server/db/sysdb.h')
-rw-r--r--server/db/sysdb.h43
1 files changed, 27 insertions, 16 deletions
diff --git a/server/db/sysdb.h b/server/db/sysdb.h
index 014e2ce91..656cb8fe1 100644
--- a/server/db/sysdb.h
+++ b/server/db/sysdb.h
@@ -82,6 +82,13 @@ struct confdb_ctx;
typedef void (*sysdb_callback_t)(void *, int, struct ldb_result *);
+enum sysdb_flags {
+ SYSDB_FLAG_MOD_NONE = 0,
+ SYSDB_FLAG_MOD_ADD,
+ SYSDB_FLAG_MOD_DELETE,
+ SYSDB_FLAG_MOD_MODIFY
+};
+
int sysdb_init(TALLOC_CTX *mem_ctx,
struct event_context *ev,
struct confdb_ctx *cdb,
@@ -155,20 +162,24 @@ int sysdb_store_group_posix(TALLOC_CTX *memctx,
const char *domain,
const char *name, gid_t gid);
-int sysdb_add_acct_to_posix_group(TALLOC_CTX *mem_ctx,
- struct sysdb_ctx *sysdb,
- const char *domain,
- const char *gname,
- const char *username);
-
-int sysdb_add_group_to_posix_group(TALLOC_CTX *mem_ctx,
- struct sysdb_ctx *sysdb,
- const char *domain,
- const char *group,
- const char *member_group);
-
-int sysdb_add_member_to_posix_group(TALLOC_CTX *mem_ctx,
- struct sysdb_ctx *sysdb,
- struct ldb_dn *member_dn,
- struct ldb_dn *group_dn);
+int sysdb_add_remove_posix_group_acct(TALLOC_CTX *mem_ctx,
+ struct sysdb_ctx *sysdb,
+ int flag,
+ const char *domain,
+ const char *group,
+ const char *username);
+
+/* Wrapper around adding a POSIX group to a POSIX group */
+int sysdb_add_remove_posix_group_group(TALLOC_CTX *mem_ctx,
+ struct sysdb_ctx *sysdb,
+ int flag,
+ const char *domain,
+ const char *group,
+ const char *member_group);
+
+int sysdb_add_remove_posix_group_member(TALLOC_CTX *mem_ctx,
+ struct sysdb_ctx *sysdb,
+ int flag,
+ struct ldb_dn *member_dn,
+ struct ldb_dn *group_dn);
#endif /* __SYS_DB_H__ */