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

« back to all changes in this revision

Viewing changes to server/providers/ipa/ipa_common.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
 
    IPA Common utility code
5
 
 
6
 
    Copyright (C) Simo Sorce <ssorce@redhat.com> 2009
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 _IPA_COMMON_H_
23
 
#define _IPA_COMMON_H_
24
 
 
25
 
#include "util/util.h"
26
 
#include "confdb/confdb.h"
27
 
#include "providers/ldap/ldap_common.h"
28
 
#include "providers/krb5/krb5_common.h"
29
 
 
30
 
struct ipa_service {
31
 
    struct sdap_service *sdap;
32
 
    struct krb5_service *krb5_service;
33
 
};
34
 
 
35
 
enum ipa_basic_opt {
36
 
    IPA_DOMAIN = 0,
37
 
    IPA_SERVER,
38
 
    IPA_HOSTNAME,
39
 
 
40
 
    IPA_OPTS_BASIC /* opts counter */
41
 
};
42
 
 
43
 
struct ipa_options {
44
 
    struct dp_option *basic;
45
 
 
46
 
    struct ipa_service *service;
47
 
 
48
 
    /* id provider */
49
 
    struct sdap_options *id;
50
 
    struct sdap_id_ctx *id_ctx;
51
 
 
52
 
    /* auth and chpass provider */
53
 
    struct dp_option *auth;
54
 
    struct krb5_ctx *auth_ctx;
55
 
};
56
 
 
57
 
/* options parsers */
58
 
int ipa_get_options(TALLOC_CTX *memctx,
59
 
                    struct confdb_ctx *cdb,
60
 
                    const char *conf_path,
61
 
                    struct sss_domain_info *dom,
62
 
                    struct ipa_options **_opts);
63
 
 
64
 
int ipa_get_id_options(struct ipa_options *ipa_opts,
65
 
                       struct confdb_ctx *cdb,
66
 
                       const char *conf_path,
67
 
                       struct sdap_options **_opts);
68
 
 
69
 
int ipa_get_auth_options(struct ipa_options *ipa_opts,
70
 
                         struct confdb_ctx *cdb,
71
 
                         const char *conf_path,
72
 
                         struct dp_option **_opts);
73
 
 
74
 
int ipa_service_init(TALLOC_CTX *memctx, struct be_ctx *ctx,
75
 
                     const char *servers, const char *domain,
76
 
                     struct ipa_service **_service);
77
 
 
78
 
#endif /* _IPA_COMMON_H_ */