diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2011-03-17 17:54:06 +0100 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-03-23 06:48:36 -0400 |
commit | 851e91d2f5959db4d1001c80d46bab349de4ffa2 (patch) | |
tree | 0d9ceaf907295e2b8f0aa4140570f1993f8186e9 /src/db | |
parent | 5fb53f1f2dc079e5bf3494436bb169ddd8b8be96 (diff) | |
download | sssd-851e91d2f5959db4d1001c80d46bab349de4ffa2.tar.gz sssd-851e91d2f5959db4d1001c80d46bab349de4ffa2.tar.xz sssd-851e91d2f5959db4d1001c80d46bab349de4ffa2.zip |
Use fake groups during IPA initgroups
Add originalDN to fake groups
Use fake groups during IPA schema initgroups
https://fedorahosted.org/sssd/ticket/822
Use sysdb_attrs_primary_name() in sdap_initgr_nested_store_group
Diffstat (limited to 'src/db')
-rw-r--r-- | src/db/sysdb.h | 3 | ||||
-rw-r--r-- | src/db/sysdb_ops.c | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h index e98426551..971a35f99 100644 --- a/src/db/sysdb.h +++ b/src/db/sysdb.h @@ -496,7 +496,8 @@ int sysdb_add_group(TALLOC_CTX *mem_ctx, int sysdb_add_incomplete_group(struct sysdb_ctx *ctx, struct sss_domain_info *domain, const char *name, - gid_t gid); + gid_t gid, + const char *original_dn); /* Add netgroup (only basic attrs and w/o checks) */ int sysdb_add_basic_netgroup(struct sysdb_ctx *ctx, diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c index e60af7175..ba1f6672c 100644 --- a/src/db/sysdb_ops.c +++ b/src/db/sysdb_ops.c @@ -1147,7 +1147,8 @@ done: int sysdb_add_incomplete_group(struct sysdb_ctx *ctx, struct sss_domain_info *domain, const char *name, - gid_t gid) + gid_t gid, + const char *original_dn) { TALLOC_CTX *tmpctx; time_t now; @@ -1178,6 +1179,11 @@ int sysdb_add_incomplete_group(struct sysdb_ctx *ctx, now-1); if (ret) goto done; + if (original_dn) { + ret = sysdb_attrs_add_string(attrs, SYSDB_ORIG_DN, original_dn); + if (ret) goto done; + } + ret = sysdb_set_group_attr(tmpctx, ctx, domain, name, attrs, SYSDB_MOD_REP); |