cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek Async LDAP Helper routines for autofs
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek Jakub Hrozek <jhrozek@redhat.com>
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek Copyright (C) 2012 Red Hat
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek This program is free software; you can redistribute it and/or modify
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek it under the terms of the GNU General Public License as published by
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek the Free Software Foundation; either version 3 of the License, or
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek (at your option) any later version.
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek This program is distributed in the hope that it will be useful,
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek but WITHOUT ANY WARRANTY; without even the implied warranty of
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek GNU General Public License for more details.
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek You should have received a copy of the GNU General Public License
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek along with this program. If not, see <http://www.gnu.org/licenses/>.
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek/* ====== Utility functions ====== */
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozekstatic const char *
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozekget_autofs_map_name(struct sysdb_attrs *map, struct sdap_options *opts)
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek opts->autofs_mobject_map[SDAP_AT_AUTOFS_MAP_NAME].sys_name,
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozekstatic const char *
2234d49c8a307ee4f11cc544c862a359f76b44adJakub Hrozekget_autofs_entry_attr(struct sysdb_attrs *entry, struct sdap_options *opts,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "Expected one entry got %d\n", el->num_values);
2234d49c8a307ee4f11cc544c862a359f76b44adJakub Hrozekstatic const char *
2234d49c8a307ee4f11cc544c862a359f76b44adJakub Hrozekget_autofs_entry_key(struct sysdb_attrs *entry, struct sdap_options *opts)
2234d49c8a307ee4f11cc544c862a359f76b44adJakub Hrozek return get_autofs_entry_attr(entry, opts, SDAP_AT_AUTOFS_ENTRY_KEY);
2234d49c8a307ee4f11cc544c862a359f76b44adJakub Hrozekstatic const char *
2234d49c8a307ee4f11cc544c862a359f76b44adJakub Hrozekget_autofs_entry_value(struct sysdb_attrs *entry, struct sdap_options *opts)
2234d49c8a307ee4f11cc544c862a359f76b44adJakub Hrozek return get_autofs_entry_attr(entry, opts, SDAP_AT_AUTOFS_ENTRY_VALUE);
e7d1cd14ce1a427007b1a7e9789dcb7e9619f84fJakub Hrozekadd_autofs_entry(struct sss_domain_info *domain,
f17d26a8db285622a5cd5f21c7488b62eedc2cf8Jakub Hrozek const char *map,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_OP_FAILURE, "Could not get autofs entry key\n");
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_OP_FAILURE, "Could not get autofs entry value\n");
e7d1cd14ce1a427007b1a7e9789dcb7e9619f84fJakub Hrozek return sysdb_save_autofsentry(domain, map, key, value, NULL);
e7d1cd14ce1a427007b1a7e9789dcb7e9619f84fJakub Hrozeksave_autofs_entries(struct sss_domain_info *domain,
2234d49c8a307ee4f11cc544c862a359f76b44adJakub Hrozek const char *map,
2234d49c8a307ee4f11cc544c862a359f76b44adJakub Hrozek for (i=0; add_dn_list[i]; i++) {
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "Cannot retrieve entry [%s] from hash\n", add_dn_list[i]);
2234d49c8a307ee4f11cc544c862a359f76b44adJakub Hrozek entry = talloc_get_type(value.ptr, struct sysdb_attrs);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "Cannot retrieve entry [%s] from ptr\n", add_dn_list[i]);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "Saving autofs entry [%s]\n", add_dn_list[i]);
e7d1cd14ce1a427007b1a7e9789dcb7e9619f84fJakub Hrozek ret = add_autofs_entry(domain, map, opts, entry);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "Cannot save entry [%s] to cache\n", add_dn_list[i]);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_TRACE_FUNC, "Saved entry [%s]\n", add_dn_list[i]);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_TRACE_INTERNAL, "All entries saved\n");
2234d49c8a307ee4f11cc544c862a359f76b44adJakub Hrozek for (i=0; del_dn_list[i]; i++) {
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "Removing autofs entry [%s]\n", del_dn_list[i]);
e7d1cd14ce1a427007b1a7e9789dcb7e9619f84fJakub Hrozek ret = sysdb_del_autofsentry(dom, del_dn_list[i]);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "Cannot delete entry %s\n", del_dn_list[i]);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_TRACE_INTERNAL, "All entries removed\n");
e7d1cd14ce1a427007b1a7e9789dcb7e9619f84fJakub Hrozek ret = sysdb_save_autofsmap(dom, mapname, mapname,
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozekautomntmaps_process_members_done(struct tevent_req *subreq);
7f5de490e24f1389501b939b742a9e5675f1c41dJakub Hrozekautomntmaps_process_members_next_base(struct tevent_req *req);
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozekstatic struct tevent_req *
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozekautomntmaps_process_members_send(TALLOC_CTX *mem_ctx,
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek struct automntmaps_process_members_state *state;
7f5de490e24f1389501b939b742a9e5675f1c41dJakub Hrozek state->base_filter = talloc_asprintf(state, "(&(%s=*)(objectclass=%s))",
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek opts->autofs_entry_map[SDAP_AT_AUTOFS_ENTRY_KEY].name,
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek opts->autofs_entry_map[SDAP_OC_AUTOFS_ENTRY].name);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_CRIT_FAILURE, "Failed to build filter\n");
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek ret = build_attrs_from_map(state, opts->autofs_entry_map,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_CRIT_FAILURE, "Failed to build attributes from map\n");
f3dc9ac52a808fcbedc7fb1ae83964b523c72df2Stephen Gallagher ret = sysdb_attrs_get_string(state->map, SYSDB_ORIG_DN, &state->orig_dn);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_CRIT_FAILURE, "Cannot get originalDN\n");
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "Examining autofs map [%s]\n", state->orig_dn);
7f5de490e24f1389501b939b742a9e5675f1c41dJakub Hrozek ret = automntmaps_process_members_next_base(req);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "search failed [%d]: %s\n", ret, strerror(ret));
7f5de490e24f1389501b939b742a9e5675f1c41dJakub Hrozekautomntmaps_process_members_next_base(struct tevent_req *req)
7f5de490e24f1389501b939b742a9e5675f1c41dJakub Hrozek struct automntmaps_process_members_state *state =
7f5de490e24f1389501b939b742a9e5675f1c41dJakub Hrozek tevent_req_data(req, struct automntmaps_process_members_state);
92ec40e6aa25f75903ffdb166a8ec56b67bfd77dPavel Březina state->filter = sdap_combine_filters(state, state->base_filter,
7f5de490e24f1389501b939b742a9e5675f1c41dJakub Hrozek state->search_bases[state->base_iter]->filter);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "Searching for automount map entries with base [%s]\n",
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov state->search_bases[state->base_iter]->basedn);
7f5de490e24f1389501b939b742a9e5675f1c41dJakub Hrozek subreq = sdap_get_generic_send(state, state->ev, state->opts, state->sh,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_CRIT_FAILURE, "Cannot start search for entries\n");
7f5de490e24f1389501b939b742a9e5675f1c41dJakub Hrozek tevent_req_set_callback(subreq, automntmaps_process_members_done, req);
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozekautomntmaps_process_members_done(struct tevent_req *subreq)
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek struct tevent_req *req = tevent_req_callback_data(subreq,
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek struct automntmaps_process_members_state *state =
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek tevent_req_data(req, struct automntmaps_process_members_state);
7f5de490e24f1389501b939b742a9e5675f1c41dJakub Hrozek state->entries = talloc_realloc(state, state->entries,
7f5de490e24f1389501b939b742a9e5675f1c41dJakub Hrozek for (i=0; i < entries_count; i++) {
7f5de490e24f1389501b939b742a9e5675f1c41dJakub Hrozek ret = automntmaps_process_members_next_base(req);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_TRACE_INTERNAL, "No more search bases to try\n");
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "Search for autofs entries, returned %zu results.\n",
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozekautomntmaps_process_members_recv(struct tevent_req *req,
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek struct automntmaps_process_members_state *state;
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek state = tevent_req_data(req, struct automntmaps_process_members_state);
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek *entries = talloc_steal(mem_ctx, state->entries);
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozeksdap_get_automntmap_next_base(struct tevent_req *req);
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozeksdap_get_automntmap_process(struct tevent_req *subreq);
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozekstatic struct tevent_req *
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek const char **attrs,
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek req = tevent_req_create(memctx, &state, struct sdap_get_automntmap_state);
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozeksdap_get_automntmap_next_base(struct tevent_req *req)
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek state = tevent_req_data(req, struct sdap_get_automntmap_state);
92ec40e6aa25f75903ffdb166a8ec56b67bfd77dPavel Březina state->filter = sdap_combine_filters(state, state->base_filter,
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek state->search_bases[state->base_iter]->filter);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "Searching for automount maps with base [%s]\n",
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov state->search_bases[state->base_iter]->basedn);
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek state->opts->autofs_mobject_map, SDAP_OPTS_AUTOFS_MAP,
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek tevent_req_set_callback(subreq, sdap_get_automntmap_process, req);
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozeksdap_get_automntmap_done(struct tevent_req *subreq);
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozeksdap_get_automntmap_process(struct tevent_req *subreq)
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek struct tevent_req *req = tevent_req_callback_data(subreq,
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek struct sdap_get_automntmap_state *state = tevent_req_data(req,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "Search for autofs maps, returned %zu results.\n", state->count);
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek /* No maps found in this search */
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek /* There are more search bases to try */
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "The search yielded more than one autofs map\n");
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_TRACE_INTERNAL, "Processing autofs maps\n");
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek subreq = automntmaps_process_members_send(state, state->ev, state->opts,
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek tevent_req_set_callback(subreq, sdap_get_automntmap_done, req);
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozeksdap_get_automntmap_done(struct tevent_req *subreq)
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek struct tevent_req *req = tevent_req_callback_data(subreq,
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek struct sdap_get_automntmap_state *state = tevent_req_data(req,
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek ret = automntmaps_process_members_recv(subreq, state, &state->entries_count,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_TRACE_FUNC, "automount map members received\n");
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozeksdap_get_automntmap_recv(struct tevent_req *req,
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek struct sdap_get_automntmap_state *state = tevent_req_data(req,
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek *entries = talloc_steal(mem_ctx, state->entries);
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozeksdap_autofs_setautomntent_done(struct tevent_req *subreq);
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozeksdap_autofs_setautomntent_send(TALLOC_CTX *memctx,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_CRIT_FAILURE, "No map name given\n");
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek ret = sss_filter_sanitize(state, mapname, &clean_mapname);
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek state->filter = talloc_asprintf(state, "(&(%s=%s)(objectclass=%s))",
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek state->opts->autofs_mobject_map[SDAP_AT_AUTOFS_MAP_NAME].name,
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek state->opts->autofs_mobject_map[SDAP_OC_AUTOFS_MAP].name);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_CRIT_FAILURE, "Failed to build filter\n");
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek ret = build_attrs_from_map(state, state->opts->autofs_mobject_map,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_CRIT_FAILURE, "Failed to build attributes from map\n");
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek subreq = sdap_get_automntmap_send(state, ev, dom,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_CRIT_FAILURE, "Out of memory\n");
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek tevent_req_set_callback(subreq, sdap_autofs_setautomntent_done, req);
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozeksdap_autofs_setautomntent_save(struct tevent_req *req);
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozeksdap_autofs_setautomntent_done(struct tevent_req *subreq)
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek struct tevent_req *req = tevent_req_callback_data(subreq,
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek struct sdap_autofs_setautomntent_state *state = tevent_req_data(req,
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek ret = sdap_get_automntmap_recv(subreq, state, &state->map,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_MINOR_FAILURE, "Could not find automount map\n");
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "sdap_get_automntmap_recv failed [%d]: %s\n",
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_OP_FAILURE, "Could not save automount map\n");
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozeksdap_autofs_setautomntent_save(struct tevent_req *req)
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek struct sdap_autofs_setautomntent_state *state = tevent_req_data(req,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "Got %zu map entries from LDAP\n", state->entries_count);
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek /* No entries for this map in LDAP.
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek * We need to ensure that there are no entries
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek * in the sysdb either.
2234d49c8a307ee4f11cc544c862a359f76b44adJakub Hrozek /* Get a list of the map members by DN */
2234d49c8a307ee4f11cc544c862a359f76b44adJakub Hrozek for (i=0, j=0; i < state->entries_count; i++) {
2234d49c8a307ee4f11cc544c862a359f76b44adJakub Hrozek key = get_autofs_entry_key(state->entries[i], state->opts);
2234d49c8a307ee4f11cc544c862a359f76b44adJakub Hrozek val = get_autofs_entry_value(state->entries[i], state->opts);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_MINOR_FAILURE, "Malformed entry, skipping\n");
2234d49c8a307ee4f11cc544c862a359f76b44adJakub Hrozek ldap_entrylist[j] = sysdb_autofsentry_strdn(ldap_entrylist,
e18d5c703c529f99bd375da887d9aeaee6b82fcdLukas Slebodnik /* terminate array with NULL after the last retrieved entry */
e7d1cd14ce1a427007b1a7e9789dcb7e9619f84fJakub Hrozek ret = sysdb_autofs_entries_by_map(tmp_ctx, state->dom, state->mapname,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "cache lookup for the map failed [%d]: %s\n",
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov DEBUG(SSSDBG_TRACE_LIBS, "Got %zu map entries from sysdb\n", count);
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek /* No map members for this map in sysdb currently */
f17d26a8db285622a5cd5f21c7488b62eedc2cf8Jakub Hrozek sysdb_entrylist = talloc_array(state, char *, count+1);
2234d49c8a307ee4f11cc544c862a359f76b44adJakub Hrozek /* Get a list of the map members by DN */
f17d26a8db285622a5cd5f21c7488b62eedc2cf8Jakub Hrozek for (i=0; i < count; i++) {
2234d49c8a307ee4f11cc544c862a359f76b44adJakub Hrozek sysdb_entrylist[i] = talloc_strdup(sysdb_entrylist,
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek /* Find the differences between the sysdb and LDAP lists
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek * Entries in the sysdb only must be removed.
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek ret = diff_string_lists(tmp_ctx, ldap_entrylist, sysdb_entrylist,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "Cannot start sysdb transaction [%d]: %s\n",
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek /* Save the map itself */
e7d1cd14ce1a427007b1a7e9789dcb7e9619f84fJakub Hrozek ret = save_autofs_map(state->dom, state->opts, state->map);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "Cannot save autofs map entry [%d]: %s\n",
cc84fd46f356c4a36a721ab135a33ec77c93e34dJakub Hrozek /* Create entries that don't exist yet */
e7d1cd14ce1a427007b1a7e9789dcb7e9619f84fJakub Hrozek ret = save_autofs_entries(state->dom, state->opts,
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "Cannot save autofs entries [%d]: %s\n",
f17d26a8db285622a5cd5f21c7488b62eedc2cf8Jakub Hrozek /* Delete entries that don't exist anymore */
828433f7b73481cdff8d57ac378f156a676e3357Pavel Reichl ret = del_autofs_entries(state->dom, del_entries);
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "Cannot delete autofs entries [%d]: %s\n",
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "Cannot commit sysdb transaction [%d]: %s\n",
a3c8390d19593b1e5277d95bfb4ab206d4785150Nikolai Kondrashov "Cannot cancel sysdb transaction [%d]: %s\n",