sdap.h revision ed80a7f8ff76089bdcfae7007dbdef42d05e2cc8
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi LDAP Helper routines
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi Copyright (C) Simo Sorce <ssorce@redhat.com>
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi This program is free software; you can redistribute it and/or modify
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi it under the terms of the GNU General Public License as published by
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi the Free Software Foundation; either version 3 of the License, or
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi (at your option) any later version.
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi This program is distributed in the hope that it will be useful,
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi but WITHOUT ANY WARRANTY; without even the implied warranty of
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi GNU General Public License for more details.
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi You should have received a copy of the GNU General Public License
17fbd200b78112bd0d89e89598aa01cea72a74e5Martti Rannanjärvi along with this program. If not, see <http://www.gnu.org/licenses/>.
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomitypedef void (sdap_op_callback_t)(struct sdap_op *op,
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi struct sdap_msg *, int, void *);
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi /* Authentication ticket expiration time (if any) */
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi /* during release we need to lock access to the handler
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi * from the destructor to avoid recursion */
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi /* mark when it is safe to finally release the handler memory */
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi#define SYSDB_SHADOWPW_LASTCHANGE "shadowLastChange"
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi#define SYSDB_KRBPW_EXPIRATION "krbPasswordExpiration"
32340fe8f461f6ae56c4cb3ee8392ba14c9f539aAki Tuomi#define SYSDB_AD_ACCOUNT_EXPIRES "adAccountExpires"
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi#define SYSDB_AD_USER_ACCOUNT_CONTROL "adUserAccountControl"
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi#define SYSDB_NDS_LOGIN_DISABLED "ndsLoginDisabled"
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi#define SYSDB_NDS_LOGIN_EXPIRATION_TIME "ndsLoginExpirationTime"
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi#define SYSDB_NDS_LOGIN_ALLOWED_TIME_MAP "ndsLoginAllowedTimeMap"
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi#define SDAP_ROOTDSE_ATTR_NAMING_CONTEXTS "namingContexts"
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi#define SDAP_ROOTDSE_ATTR_DEFAULT_NAMING_CONTEXT "defaultNamingContext"
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi/* the objectclass must be the first attribute.
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi * Functions depend on this */
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi/* the objectclass must be the first attribute.
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi * Functions depend on this */
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi const char *basedn;
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi const char *filter;
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi /* supported schema types */
32340fe8f461f6ae56c4cb3ee8392ba14c9f539aAki Tuomi unsigned long last_usn;
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomiint sdap_parse_user(TALLOC_CTX *memctx, struct sdap_options *opts,
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomiint sdap_parse_group(TALLOC_CTX *memctx, struct sdap_options *opts,
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomiint sdap_get_msg_dn(TALLOC_CTX *memctx, struct sdap_handle *sh,
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomierrno_t setup_tls_config(struct dp_option *basic_opts);
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomiint sdap_set_rootdse_supported_lists(struct sysdb_attrs *rootdse,
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomibool sdap_check_sup_list(struct sup_list *l, const char *val);
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi#define sdap_is_sasl_mech_supported(sh, sasl_mech) \
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi sdap_check_sup_list(&((sh)->supported_saslmechs), sasl_mech)
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi sdap_check_sup_list(&((sh)->supported_controls), ctrl_oid)
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi sdap_check_sup_list(&((sh)->supported_extensions), ext_oid)
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomiint sdap_control_create(struct sdap_handle *sh, const char *oid, int iscritical,
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi struct berval *value, int dupval, LDAPControl **ctrlp);
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomierrno_t sdap_set_config_options_with_rootdse(struct sysdb_attrs *rootdse,
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomiint sdap_get_server_opts_from_rootdse(TALLOC_CTX *memctx,
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi const char *server,
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomivoid sdap_steal_server_opts(struct sdap_id_ctx *id_ctx,
316cbe323513a0f20d1cf519fe9405e231d633e2Aki Tuomi#endif /* _SDAP_H_ */