summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_async_netgroups.c
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2012-02-21 07:18:12 -0500
committerStephen Gallagher <sgallagh@redhat.com>2012-02-24 14:58:26 -0500
commit3ff729e6c8a371e7a52914772816c39ca73c50a9 (patch)
tree03d5c089a7b0c88dcbf79b3011f7a886d13bcfc2 /src/providers/ldap/sdap_async_netgroups.c
parent277a0187190fd417696590b303a5d7a204ed0555 (diff)
downloadsssd-3ff729e6c8a371e7a52914772816c39ca73c50a9.tar.gz
sssd-3ff729e6c8a371e7a52914772816c39ca73c50a9.tar.xz
sssd-3ff729e6c8a371e7a52914772816c39ca73c50a9.zip
Modifications to simplify list_missing_attrs
Diffstat (limited to 'src/providers/ldap/sdap_async_netgroups.c')
-rw-r--r--src/providers/ldap/sdap_async_netgroups.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/providers/ldap/sdap_async_netgroups.c b/src/providers/ldap/sdap_async_netgroups.c
index a5f30623d..2262db51c 100644
--- a/src/providers/ldap/sdap_async_netgroups.c
+++ b/src/providers/ldap/sdap_async_netgroups.c
@@ -49,7 +49,6 @@ static errno_t sdap_save_netgroup(TALLOC_CTX *memctx,
const char *name = NULL;
int ret;
char *timestamp = NULL;
- const char **ldap_attrs = NULL;
char **missing = NULL;
ret = sysdb_attrs_get_el(attrs,
@@ -129,29 +128,16 @@ static errno_t sdap_save_netgroup(TALLOC_CTX *memctx,
goto fail;
}
- ret = build_attrs_from_map(attrs, opts->netgroup_map, SDAP_OPTS_NETGROUP,
- &ldap_attrs);
- if (ret != EOK) {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to retrieve attributes from map\n"));
- goto fail;
- }
-
/* Make sure that any attributes we requested from LDAP that we
* did not receive are also removed from the sysdb
*/
ret = list_missing_attrs(attrs, opts->netgroup_map, SDAP_OPTS_NETGROUP,
- ldap_attrs, attrs, &missing);
+ attrs, &missing);
if (ret != EOK) {
DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to list missing attributes\n"));
goto fail;
}
- /* Remove missing attributes */
- if (missing && !missing[0]) {
- /* Nothing to remove */
- talloc_zfree(missing);
- }
-
ret = sysdb_add_netgroup(ctx, name, NULL, netgroup_attrs, missing,
dom->netgroup_timeout, now);
if (ret) goto fail;