ldap_common.h revision d81d8d3dc151ebc95cd0e3f3b14c1cdaa48980f1
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen LDAP Common utility code
b039dabf4c53f72454e795930e7643b6e0e625f9Timo Sirainen Copyright (C) Simo Sorce <ssorce@redhat.com> 2009
a35cbba04d0a2823da98e693bd09a051addffdb2Timo Sirainen This program is free software; you can redistribute it and/or modify
94e1adead9faddec88a623485b9999a87b1684faTimo Sirainen it under the terms of the GNU General Public License as published by
94e1adead9faddec88a623485b9999a87b1684faTimo Sirainen the Free Software Foundation; either version 3 of the License, or
3ccfcf0856958cb9208a9fc51c3bdf13c58ad52aTimo Sirainen (at your option) any later version.
3ccfcf0856958cb9208a9fc51c3bdf13c58ad52aTimo Sirainen This program is distributed in the hope that it will be useful,
cb2b5a7d6e7e651191bf9ee1eda94a6e207288b0Timo Sirainen but WITHOUT ANY WARRANTY; without even the implied warranty of
cb2b5a7d6e7e651191bf9ee1eda94a6e207288b0Timo Sirainen MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7ca2a9f1cca63cbc2ebffc185c7e5a2b32bc2780Timo Sirainen GNU General Public License for more details.
3ccfcf0856958cb9208a9fc51c3bdf13c58ad52aTimo Sirainen You should have received a copy of the GNU General Public License
3ccfcf0856958cb9208a9fc51c3bdf13c58ad52aTimo Sirainen along with this program. If not, see <http://www.gnu.org/licenses/>.
3fe44a0df5a0bdd80c495f79cbf0e384441d6fccTimo Sirainen/* a fd the child process would log into */
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainen /* LDAP connection cache */
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainen /* dlinklist pointers */
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainen /* do not go offline, try another connection */
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainen /* If using GSSAPI */
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainen /* connection to a server */
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainenvoid sdap_do_online_check(struct be_req *be_req, struct sdap_id_ctx *ctx);
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainenstruct tevent_req* sdap_reinit_cleanup_send(TALLOC_CTX *mem_ctx,
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainenerrno_t sdap_reinit_cleanup_recv(struct tevent_req *req);
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainenvoid sdap_account_info_handler(struct be_req *breq);
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainenvoid sdap_handle_account_info(struct be_req *breq, struct sdap_id_ctx *ctx,
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainen/* Set up enumeration and/or cleanup */
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainenint ldap_id_setup_tasks(struct sdap_id_ctx *ctx);
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainensdap_handle_acct_req_recv(struct tevent_req *req,
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainenvoid sdap_pam_auth_handler(struct be_req *breq);
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainenvoid sdap_pam_chpass_handler(struct be_req *breq);
82995cc154a929f37aa486a72a6485e9f8d34a30Timo Sirainenvoid sdap_pam_access_handler(struct be_req *breq);
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainenvoid sdap_handler_done(struct be_req *req, int dp_err,
82995cc154a929f37aa486a72a6485e9f8d34a30Timo Sirainenint sdap_service_init(TALLOC_CTX *memctx, struct be_ctx *ctx,
82995cc154a929f37aa486a72a6485e9f8d34a30Timo Sirainen const char *service_name, const char *dns_service_name,
3ccfcf0856958cb9208a9fc51c3bdf13c58ad52aTimo Sirainenerrno_t sdap_install_offline_callback(TALLOC_CTX *mem_ctx,
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainenerrno_t sdap_install_sigterm_handler(TALLOC_CTX *mem_ctx,
3fe44a0df5a0bdd80c495f79cbf0e384441d6fccTimo Sirainen const char *realm);
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainenvoid sdap_remove_kdcinfo_files_callback(void *pvt);
3ccfcf0856958cb9208a9fc51c3bdf13c58ad52aTimo Sirainen/* options parser */
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainenint ldap_get_autofs_options(TALLOC_CTX *memctx,
3ccfcf0856958cb9208a9fc51c3bdf13c58ad52aTimo Sirainen/* Calling ldap_setup_enumeration will set up a periodic task
3ccfcf0856958cb9208a9fc51c3bdf13c58ad52aTimo Sirainen * that would periodically call send_fn/recv_fn request. The
3ccfcf0856958cb9208a9fc51c3bdf13c58ad52aTimo Sirainen * send_fn's pvt parameter will be a pointer to ldap_enum_ctx
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainen * structure that contains the request data
3ccfcf0856958cb9208a9fc51c3bdf13c58ad52aTimo Sirainenerrno_t ldap_setup_enumeration(struct be_ctx *be_ctx,
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainenerrno_t ldap_enumeration_recv(struct tevent_req *req);
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainenerrno_t ldap_setup_cleanup(struct sdap_id_ctx *id_ctx,
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainenerrno_t ldap_id_cleanup(struct sdap_options *opts,
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainenvoid sdap_mark_offline(struct sdap_id_ctx *ctx);
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainenstruct tevent_req *groups_get_send(TALLOC_CTX *memctx,
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainenint groups_get_recv(struct tevent_req *req, int *dp_error_out, int *sdap_ret);
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainenstruct tevent_req *ldap_netgroup_get_send(TALLOC_CTX *memctx,
65e14cef911d5d3fac8993c8a76911a587f05cd7Timo Sirainenint ldap_netgroup_get_recv(struct tevent_req *req, int *dp_error_out, int *sdap_ret);
d19d3aa4eafa34b48b7d7d311c9db31e1898576aTimo Sirainenservices_get_recv(struct tevent_req *req, int *dp_error_out, int *sdap_ret);
82995cc154a929f37aa486a72a6485e9f8d34a30Timo Sirainen/* setup child logging */
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainenerrno_t string_to_shadowpw_days(const char *s, long *d);
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainenerrno_t get_sysdb_attr_name(TALLOC_CTX *mem_ctx,
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainenerrno_t list_missing_attrs(TALLOC_CTX *mem_ctx,
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainenchar *sdap_get_id_specific_filter(TALLOC_CTX *mem_ctx,
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainenchar *sdap_get_access_filter(TALLOC_CTX *mem_ctx,
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainenerrno_t msgs2attrs_array(TALLOC_CTX *mem_ctx, size_t count,
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainenerrno_t sdap_domain_add(struct sdap_options *opts,
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainensdap_domain_subdom_add(struct sdap_id_ctx *sdap_id_ctx,
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainenstruct sdap_domain *sdap_domain_get(struct sdap_options *opts,
2615df45a8027948a474abe5e817b34b0499c171Timo Sirainenstruct sdap_domain *sdap_domain_get_by_dn(struct sdap_options *opts,
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainen const char *dn);
e20e638805c4bd54e039891a3e92760b1dfa189aTimo Sirainenerrno_t sdap_parse_search_base(TALLOC_CTX *mem_ctx,
3ccfcf0856958cb9208a9fc51c3bdf13c58ad52aTimo Sirainenerrno_t common_parse_search_base(TALLOC_CTX *mem_ctx,
a449ed9df03e9f7e93d1ec278754416ac3ad9073Timo Sirainensdap_set_sasl_options(struct sdap_options *id_opts,
a449ed9df03e9f7e93d1ec278754416ac3ad9073Timo Sirainensdap_id_ctx_conn_add(struct sdap_id_ctx *id_ctx,
3851ad9fcb25635f02b46d44586742ef1081876bTimo Sirainensdap_id_ctx_new(TALLOC_CTX *mem_ctx, struct be_ctx *bectx,
a449ed9df03e9f7e93d1ec278754416ac3ad9073Timo Sirainenerrno_t sdap_refresh_init(struct be_refresh_ctx *refresh_ctx,
3851ad9fcb25635f02b46d44586742ef1081876bTimo Sirainen#endif /* _LDAP_COMMON_H_ */