diff options
author | Sumit Bose <sbose@redhat.com> | 2009-10-23 13:54:28 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-10-27 08:01:34 -0400 |
commit | 95770dff1b48de4dd2329efa0eb0d42655399db3 (patch) | |
tree | a1a9ae866b83daf83217269d8594d5c44a07673c /server | |
parent | 69598a6818e32b37494eb3a2ed0f43d3cb6129ca (diff) | |
download | sssd-95770dff1b48de4dd2329efa0eb0d42655399db3.tar.gz sssd-95770dff1b48de4dd2329efa0eb0d42655399db3.tar.bz2 sssd-95770dff1b48de4dd2329efa0eb0d42655399db3.zip |
store original DN with cached group objects if available
Diffstat (limited to 'server')
-rw-r--r-- | server/providers/ldap/sdap_async.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/server/providers/ldap/sdap_async.c b/server/providers/ldap/sdap_async.c index 6350433b..6b8790a1 100644 --- a/server/providers/ldap/sdap_async.c +++ b/server/providers/ldap/sdap_async.c @@ -1648,6 +1648,22 @@ static struct tevent_req *sdap_save_group_send(TALLOC_CTX *memctx, goto fail; } + ret = sysdb_attrs_get_el(state->attrs, SYSDB_ORIG_DN, &el); + if (ret) { + goto fail; + } + if (el->num_values == 0) { + DEBUG(7, ("Original DN is not available for [%s].\n", state->name)); + } else { + DEBUG(7, ("Adding original DN [%s] to attributes of [%s].\n", + el->values[0].data, state->name)); + ret = sysdb_attrs_add_string(group_attrs, SYSDB_ORIG_DN, + (const char *) el->values[0].data); + if (ret) { + goto fail; + } + } + ret = sysdb_attrs_get_el(state->attrs, opts->group_map[SDAP_AT_GROUP_MODSTAMP].sys_name, &el); if (ret) { |