ldap_common.h revision d8e3d9b5fb5f269ef7a0cf4b70f3ba4c8051429c
/*
SSSD
LDAP Common utility code
Copyright (C) Simo Sorce <ssorce@redhat.com> 2009
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/>.
*/
#ifndef _LDAP_COMMON_H_
#define _LDAP_COMMON_H_
#include "providers/dp_backend.h"
#include "providers/ldap/sdap_id_op.h"
#include "providers/fail_over.h"
#include "providers/krb5/krb5_common.h"
#define PWD_POL_OPT_NONE "none"
#define PWD_POL_OPT_SHADOW "shadow"
#define PWD_POL_OPT_MIT "mit_kerberos"
#define SSS_LDAP_SRV_NAME "ldap"
/* a fd the child process would log into */
extern int ldap_child_debug_fd;
struct sdap_id_ctx {
struct sdap_options *opts;
struct fo_service *fo_service;
struct sdap_service *service;
/* what rootDSE returns */
struct sysdb_attrs *rootDSE;
/* If using GSSAPI */
struct krb5_service *krb5_service;
/* LDAP connection cache */
struct sdap_id_conn_cache *conn_cache;
/* enumeration loop timer */
/* cleanup loop timer */
struct timeval last_purge;
char *max_user_timestamp;
char *max_group_timestamp;
};
struct sdap_auth_ctx {
struct sdap_options *opts;
struct fo_service *fo_service;
struct sdap_service *service;
};
/* id */
/* auth */
/* chpass */
/* access */
const char *service_name, const char *dns_service_name,
struct sdap_service *sdap_service,
struct krb5_service **krb5_service);
const char *realm,
const char *service_name);
struct tevent_context *ev,
const char *realm);
void sdap_remove_kdcinfo_files_callback(void *pvt);
/* options parser */
struct confdb_ctx *cdb,
const char *conf_path,
struct sdap_options **_opts);
struct tevent_context *ev,
struct sdap_id_ctx *ctx,
const char *name,
int filter_type,
int attrs_type);
struct tevent_context *ev,
struct sdap_id_ctx *ctx,
const char *name,
int filter_type,
int attrs_type);
struct tevent_context *ev,
struct sdap_id_ctx *ctx,
const char *name);
/* setup child logging */
#endif /* _LDAP_COMMON_H_ */