summaryrefslogtreecommitdiff
path: root/src/providers
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-09-23 17:18:50 +0200
committerJakub Hrozek <jhrozek@redhat.com>2012-09-24 18:18:30 +0200
commite75a152157e054a2ed46acecbe8b5cfb9853773c (patch)
treeea6d942492af92e0f30a662a2fc5ec494e6d25ae /src/providers
parentf17d26a8db285622a5cd5f21c7488b62eedc2cf8 (diff)
downloadsssd-e75a152157e054a2ed46acecbe8b5cfb9853773c.tar.gz
sssd-e75a152157e054a2ed46acecbe8b5cfb9853773c.tar.bz2
sssd-e75a152157e054a2ed46acecbe8b5cfb9853773c.zip
AUTOFS: Use both key and value in entry RDN
This patch switches from using just key in the RDN to using both key and value. That is neccessary to allow multiple direct mounts in a single map.
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ldap/sdap_async_autofs.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap_async_autofs.c b/src/providers/ldap/sdap_async_autofs.c
index 8bfabda2..fdffd1d5 100644
--- a/src/providers/ldap/sdap_async_autofs.c
+++ b/src/providers/ldap/sdap_async_autofs.c
@@ -91,7 +91,7 @@ mod_autofs_entry(struct sysdb_ctx *sysdb,
ret = sysdb_save_autofsentry(sysdb, map, key, value, NULL);
break;
case AUTOFS_MAP_OP_DEL:
- ret = sysdb_del_autofsentry(sysdb, map, key);
+ ret = sysdb_del_autofsentry(sysdb, map, key, value);
break;
}
@@ -794,6 +794,7 @@ sdap_autofs_setautomntent_save(struct tevent_req *req)
bool in_transaction = false;
TALLOC_CTX *tmp_ctx;
struct ldb_message **entries = NULL;
+ struct sysdb_attrs **entries_attrs;
size_t count;
const char *val;
char **sysdb_entrylist;
@@ -902,9 +903,16 @@ sdap_autofs_setautomntent_save(struct tevent_req *req)
/* Delete entries that don't exist anymore */
if (del_entries && del_entries[0]) {
+ ret = sysdb_msg2attrs(tmp_ctx, count, entries, &entries_attrs);
+ if (ret != EOK) {
+ DEBUG(SSSDBG_OP_FAILURE,
+ ("sysdb_msg2attrs failed: [%d]: %s\n", ret, strerror(ret)));
+ goto done;
+ }
+
ret = del_autofs_entries(state->sysdb, state->opts,
state->mapname, del_entries,
- state->entries, state->entries_count);
+ entries_attrs, count);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE,
("Cannot delete autofs entries [%d]: %s\n",