ldap_init.c revision d8e3d9b5fb5f269ef7a0cf4b70f3ba4c8051429c
/*
SSSD
LDAP Provider Initialization functions
Authors:
Simo Sorce <ssorce@redhat.com>
Copyright (C) 2009 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 "providers/child_common.h"
#include "providers/ldap/ldap_common.h"
#include "providers/ldap/sdap_async_private.h"
#include "providers/ldap/sdap_access.h"
/* Id Handler */
struct bet_ops sdap_id_ops = {
};
/* Auth Handler */
struct bet_ops sdap_auth_ops = {
};
/* Chpass Handler */
struct bet_ops sdap_chpass_ops = {
};
/* Access Handler */
struct bet_ops sdap_access_ops = {
};
void **pvt_data)
{
struct sdap_id_ctx *ctx;
const char *urls;
const char *dns_service_name;
const char *sasl_mech;
int ret;
/* If we're already set up, just return that */
return EOK;
}
goto done;
}
if (!urls) {
}
goto done;
}
&ctx->krb5_service);
goto done;
}
}
}
goto done;
}
&ctx->conn_cache);
goto done;
}
goto done;
}
goto done;
}
*ops = &sdap_id_ops;
done:
}
return ret;
}
void **pvt_data)
{
struct sdap_auth_ctx *ctx;
const char *urls;
const char *dns_service_name;
int ret;
goto done;
}
if (!urls) {
}
goto done;
}
goto done;
}
*ops = &sdap_auth_ops;
done:
}
return ret;
}
void **pvt_data)
{
int ret;
*ops = &sdap_chpass_ops;
return ret;
}
void **pvt_data)
{
int ret;
struct sdap_access_ctx *access_ctx;
const char *filter;
if(access_ctx == NULL) {
goto done;
}
goto done;
}
/* It's okay if this is NULL. In that case we will simply act
* like the 'deny' provider.
*/
DEBUG(0, ("Warning: access_provider=ldap set, "
"but no ldap_access_filter configured. "
"All domain users will be denied access.\n"));
}
else {
if (filter[0] == '(') {
/* This filter is wrapped in parentheses.
* Pass it as-is to the openldap libraries.
*/
}
else {
/* Add parentheses around the filter */
goto done;
}
}
}
*ops = &sdap_access_ops;
*pvt_data = access_ctx;
done:
}
return ret;
}
{
/* TODO: Clean up any internal data */
}