sdap_autofs.c revision dea636af4d1902a081ee891f1b19ee2f8729d759
/*
SSSD
LDAP handler for autofs
Authors:
Jakub Hrozek <jhrozek@redhat.com>
Copyright (C) 2012 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <errno.h>
#include <tevent.h>
#include "providers/ldap/ldap_common.h"
#include "providers/ldap/sdap_autofs.h"
#include "providers/ldap/sdap_async.h"
#include "providers/data_provider.h"
#include "db/sysdb_autofs.h"
struct autofs_get_map_state {
struct tevent_context *ev;
struct sdap_id_ctx *ctx;
struct sdap_id_op *op;
const char *map_name;
int dp_error;
};
static errno_t
static void
static void
static struct tevent_req *
struct tevent_context *ev,
struct sdap_id_ctx *ctx,
const char *map_name)
{
struct tevent_req *req;
struct autofs_get_map_state *state;
int ret;
goto fail;
}
goto fail;
}
return req;
fail:
return req;
}
static errno_t
{
struct autofs_get_map_state *state =
struct tevent_req *subreq;
if (!subreq) {
return ret;
}
return EOK;
}
static void
{
struct tevent_req);
struct autofs_get_map_state *state =
int dp_error = DP_ERR_FATAL;
int ret;
return;
}
if (!subreq) {
"sdap_autofs_setautomntent_send failed\n");
return;
}
}
static void
{
struct tevent_req);
struct autofs_get_map_state *state =
int dp_error = DP_ERR_FATAL;
int ret;
/* retry */
return;
}
return;
}
return;
}
"Cannot delete autofs map %s [%d]: %s\n",
return;
}
}
}
static errno_t
{
struct autofs_get_map_state *state =
if (dp_error_out) {
}
return EOK;
}
struct sdap_autofs_handler_state {
struct dp_reply_std reply;
};
struct tevent_req *
struct sdap_id_ctx *id_ctx,
struct dp_autofs_data *data,
struct dp_req_params *params)
{
struct sdap_autofs_handler_state *state;
struct tevent_req *subreq;
struct tevent_req *req;
const char *master_map;
return NULL;
}
"backend might return stale entries\n");
}
}
goto immediately;
}
return req;
/* TODO For backward compatibility we always return EOK to DP now. */
return req;
}
{
struct sdap_autofs_handler_state *state;
struct tevent_req *req;
int dp_error;
/* TODO For backward compatibility we always return EOK to DP now. */
}
struct tevent_req *req,
struct dp_reply_std *data)
{
return EOK;
}
struct sdap_id_ctx *id_ctx,
struct dp_method *dp_methods)
{
return ret;
}
return EOK;
}