~ubuntu-branches/ubuntu/saucy/sssd/saucy

« back to all changes in this revision

Viewing changes to src/providers/ldap/sdap_async.h

  • Committer: Stéphane Graber
  • Date: 2011-06-15 16:23:14 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: stgraber@ubuntu.com-20110615162314-rbhoppnpaxfqo5q7
Merge 1.5.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    SSSD
 
3
 
 
4
    Async LDAP Helper routines
 
5
 
 
6
    Copyright (C) Simo Sorce <ssorce@redhat.com>
 
7
 
 
8
    This program is free software; you can redistribute it and/or modify
 
9
    it under the terms of the GNU General Public License as published by
 
10
    the Free Software Foundation; either version 3 of the License, or
 
11
    (at your option) any later version.
 
12
 
 
13
    This program is distributed in the hope that it will be useful,
 
14
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
    GNU General Public License for more details.
 
17
 
 
18
    You should have received a copy of the GNU General Public License
 
19
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
20
*/
 
21
 
 
22
#ifndef _SDAP_ASYNC_H_
 
23
#define _SDAP_ASYNC_H_
 
24
 
 
25
#include <talloc.h>
 
26
#include <tevent.h>
 
27
#include "providers/dp_backend.h"
 
28
#include "providers/ldap/sdap.h"
 
29
#include "providers/fail_over.h"
 
30
 
 
31
struct tevent_req *sdap_connect_send(TALLOC_CTX *memctx,
 
32
                                     struct tevent_context *ev,
 
33
                                     struct sdap_options *opts,
 
34
                                     const char *uri,
 
35
                                     bool use_start_tls);
 
36
int sdap_connect_recv(struct tevent_req *req,
 
37
                      TALLOC_CTX *memctx,
 
38
                      struct sdap_handle **sh);
 
39
 
 
40
struct tevent_req *sdap_get_users_send(TALLOC_CTX *memctx,
 
41
                                       struct tevent_context *ev,
 
42
                                       struct sss_domain_info *dom,
 
43
                                       struct sysdb_ctx *sysdb,
 
44
                                       struct sdap_options *opts,
 
45
                                       struct sdap_handle *sh,
 
46
                                       const char **attrs,
 
47
                                       const char *wildcard,
 
48
                                       int timeout);
 
49
int sdap_get_users_recv(struct tevent_req *req,
 
50
                        TALLOC_CTX *mem_ctx, char **timestamp);
 
51
 
 
52
struct tevent_req *sdap_get_groups_send(TALLOC_CTX *memctx,
 
53
                                       struct tevent_context *ev,
 
54
                                       struct sss_domain_info *dom,
 
55
                                       struct sysdb_ctx *sysdb,
 
56
                                       struct sdap_options *opts,
 
57
                                       struct sdap_handle *sh,
 
58
                                       const char **attrs,
 
59
                                       const char *wildcard,
 
60
                                       int timeout);
 
61
int sdap_get_groups_recv(struct tevent_req *req,
 
62
                         TALLOC_CTX *mem_ctx, char **timestamp);
 
63
 
 
64
struct tevent_req *sdap_get_netgroups_send(TALLOC_CTX *memctx,
 
65
                                           struct tevent_context *ev,
 
66
                                           struct sss_domain_info *dom,
 
67
                                           struct sysdb_ctx *sysdb,
 
68
                                           struct sdap_options *opts,
 
69
                                           struct sdap_handle *sh,
 
70
                                           const char **attrs,
 
71
                                           const char *wildcard,
 
72
                                           int timeout);
 
73
int sdap_get_netgroups_recv(struct tevent_req *req,
 
74
                            TALLOC_CTX *mem_ctx, char **timestamp,
 
75
                            size_t *reply_count,
 
76
                            struct sysdb_attrs ***reply);
 
77
 
 
78
struct tevent_req *sdap_kinit_send(TALLOC_CTX *memctx,
 
79
                                   struct tevent_context *ev,
 
80
                                   struct be_ctx *be,
 
81
                                   struct sdap_handle *sh,
 
82
                                   const char *service_name,
 
83
                                   int    timeout,
 
84
                                   const char *keytab,
 
85
                                   const char *principal,
 
86
                                   const char *realm,
 
87
                                   int lifetime);
 
88
 
 
89
int sdap_kinit_recv(struct tevent_req *req,
 
90
                    enum sdap_result *result,
 
91
                    time_t *expire_time);
 
92
 
 
93
struct tevent_req *sdap_auth_send(TALLOC_CTX *memctx,
 
94
                                  struct tevent_context *ev,
 
95
                                  struct sdap_handle *sh,
 
96
                                  const char *sasl_mech,
 
97
                                  const char *sasl_user,
 
98
                                  const char *user_dn,
 
99
                                  const char *authtok_type,
 
100
                                  struct dp_opt_blob authtok);
 
101
 
 
102
int sdap_auth_recv(struct tevent_req *req,
 
103
                   TALLOC_CTX *memctx,
 
104
                   enum sdap_result *result,
 
105
                   struct sdap_ppolicy_data **ppolicy);
 
106
 
 
107
struct tevent_req *sdap_get_initgr_send(TALLOC_CTX *memctx,
 
108
                                        struct tevent_context *ev,
 
109
                                        struct sdap_handle *sh,
 
110
                                        struct sdap_id_ctx *id_ctx,
 
111
                                        const char *name,
 
112
                                        const char **grp_attrs);
 
113
int sdap_get_initgr_recv(struct tevent_req *req);
 
114
 
 
115
struct tevent_req *sdap_exop_modify_passwd_send(TALLOC_CTX *memctx,
 
116
                                                struct tevent_context *ev,
 
117
                                                struct sdap_handle *sh,
 
118
                                                char *user_dn,
 
119
                                                char *password,
 
120
                                                char *new_password);
 
121
int sdap_exop_modify_passwd_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
 
122
                                 enum sdap_result *result,
 
123
                                 char **user_error_msg);
 
124
 
 
125
struct tevent_req *sdap_cli_connect_send(TALLOC_CTX *memctx,
 
126
                                         struct tevent_context *ev,
 
127
                                         struct sdap_options *opts,
 
128
                                         struct be_ctx *be,
 
129
                                         struct sdap_service *service,
 
130
                                         bool skip_rootdse);
 
131
int sdap_cli_connect_recv(struct tevent_req *req,
 
132
                          TALLOC_CTX *memctx,
 
133
                          bool *can_retry,
 
134
                          struct sdap_handle **gsh,
 
135
                          struct sdap_server_opts **srv_opts);
 
136
 
 
137
struct tevent_req *sdap_get_generic_send(TALLOC_CTX *memctx,
 
138
                                         struct tevent_context *ev,
 
139
                                         struct sdap_options *opts,
 
140
                                         struct sdap_handle *sh,
 
141
                                         const char *search_base,
 
142
                                         int scope,
 
143
                                         const char *filter,
 
144
                                         const char **attrs,
 
145
                                         struct sdap_attr_map *map,
 
146
                                         int map_num_attrs,
 
147
                                         int timeout);
 
148
int sdap_get_generic_recv(struct tevent_req *req,
 
149
                         TALLOC_CTX *mem_ctx, size_t *reply_count,
 
150
                         struct sysdb_attrs ***reply_list);
 
151
#endif /* _SDAP_ASYNC_H_ */