summaryrefslogtreecommitdiffstats
path: root/server/db/sysdb.h
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-11-30 21:51:41 -0500
committerStephen Gallagher <sgallagh@redhat.com>2009-12-07 10:18:53 -0500
commit518596b1bf8aab2ef1468309c41ee101a2c87bf3 (patch)
tree2710073bb48a4042e8c86e70ee2635b48720b16d /server/db/sysdb.h
parent545432a63359fbba14a344e6f38279541d0004c2 (diff)
downloadsssd-518596b1bf8aab2ef1468309c41ee101a2c87bf3.tar.gz
sssd-518596b1bf8aab2ef1468309c41ee101a2c87bf3.tar.xz
sssd-518596b1bf8aab2ef1468309c41ee101a2c87bf3.zip
Fix nested group memberships
Search the local db to find the local DN using the original DN as search key. This way we do not have to rely on weak and faulty heuristicts based on DN names. Add a few helper functions in the process and change the way we pass members to sysdb_store_group_send(), instead of passing users and groups list, just add member DNs to the other sysdb attrs.
Diffstat (limited to 'server/db/sysdb.h')
-rw-r--r--server/db/sysdb.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/server/db/sysdb.h b/server/db/sysdb.h
index c345caf8e..641ec6803 100644
--- a/server/db/sysdb.h
+++ b/server/db/sysdb.h
@@ -175,6 +175,16 @@ int sysdb_attrs_get_string(struct sysdb_attrs *attrs, const char *name,
int sysdb_attrs_replace_name(struct sysdb_attrs *attrs, const char *oldname,
const char *newname);
+int sysdb_attrs_users_from_str_list(struct sysdb_attrs *attrs,
+ const char *attr_name,
+ const char *domain,
+ const char **list);
+int sysdb_attrs_users_from_ldb_vals(struct sysdb_attrs *attrs,
+ const char *attr_name,
+ const char *domain,
+ struct ldb_val *values,
+ int num_values);
+
/* convert an ldb error into an errno error */
int sysdb_error_to_errno(int ldberr);
@@ -200,6 +210,7 @@ char *sysdb_group_strdn(TALLOC_CTX *memctx,
struct ldb_context *sysdb_ctx_get_ldb(struct sysdb_ctx *ctx);
struct ldb_context *sysdb_handle_get_ldb(struct sysdb_handle *handle);
+struct sysdb_ctx *sysdb_handle_get_ctx(struct sysdb_handle *handle);
int compare_ldb_dn_comp_num(const void *m1, const void *m2);
@@ -497,8 +508,6 @@ struct tevent_req *sysdb_store_group_send(TALLOC_CTX *mem_ctx,
struct sss_domain_info *domain,
const char *name,
gid_t gid,
- const char **member_users,
- const char **member_groups,
struct sysdb_attrs *attrs,
uint64_t cache_timeout);
int sysdb_store_group_recv(struct tevent_req *req);