source: vendor/3.6.0/source3/libads/ads_proto.h

Last change on this file was 740, checked in by Silvan Scherrer, 13 years ago

Samba Server: update vendor to 3.6.0

File size: 8.1 KB
Line 
1/*
2 * Unix SMB/CIFS implementation.
3 * ads (active directory) utility library
4 *
5 * Copyright (C) Andrew Bartlett 2001
6 * Copyright (C) Andrew Tridgell 2001
7 * Copyright (C) Remus Koos (remuskoos@yahoo.com) 2001
8 * Copyright (C) Alexey Kotovich 2002
9 * Copyright (C) Jim McDonough <jmcd@us.ibm.com> 2002-2003
10 * Copyright (C) Luke Howard 2003
11 * Copyright (C) Guenther Deschner 2003-2008
12 * Copyright (C) Rakesh Patel 2004
13 * Copyright (C) Dan Perry 2004
14 * Copyright (C) Jeremy Allison 2004
15 * Copyright (C) Gerald Carter 2006
16 * Copyright (C) Stefan Metzmacher 2007
17 *
18 * This program is free software; you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation; either version 3 of the License, or
21 * (at your option) any later version.
22 *
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
27 *
28 * You should have received a copy of the GNU General Public License
29 * along with this program. If not, see <http://www.gnu.org/licenses/>.
30 */
31
32#ifndef _LIBADS_ADS_PROTO_H_
33#define _LIBADS_ADS_PROTO_H_
34
35/* The following definitions come from libads/ads_struct.c */
36
37char *ads_build_path(const char *realm, const char *sep, const char *field, int reverse);
38char *ads_build_dn(const char *realm);
39char *ads_build_domain(const char *dn);
40ADS_STRUCT *ads_init(const char *realm,
41 const char *workgroup,
42 const char *ldap_server);
43bool ads_set_sasl_wrap_flags(ADS_STRUCT *ads, int flags);
44void ads_destroy(ADS_STRUCT **ads);
45
46/* The following definitions come from libads/disp_sec.c */
47
48void ads_disp_sd(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, struct security_descriptor *sd);
49
50/* The following definitions come from libads/kerberos_keytab.c */
51
52int ads_keytab_add_entry(ADS_STRUCT *ads, const char *srvPrinc);
53int ads_keytab_flush(ADS_STRUCT *ads);
54int ads_keytab_create_default(ADS_STRUCT *ads);
55int ads_keytab_list(const char *keytab_name);
56
57/* The following definitions come from libads/krb5_errs.c */
58
59/* The following definitions come from libads/kerberos_util.c */
60
61ADS_STATUS ads_set_machine_password(ADS_STRUCT *ads,
62 const char *machine_account,
63 const char *password);
64int ads_kinit_password(ADS_STRUCT *ads);
65
66/* The following definitions come from libads/ldap.c */
67
68bool ads_sitename_match(ADS_STRUCT *ads);
69bool ads_closest_dc(ADS_STRUCT *ads);
70ADS_STATUS ads_connect(ADS_STRUCT *ads);
71ADS_STATUS ads_connect_user_creds(ADS_STRUCT *ads);
72ADS_STATUS ads_connect_gc(ADS_STRUCT *ads);
73void ads_disconnect(ADS_STRUCT *ads);
74ADS_STATUS ads_do_search_all_fn(ADS_STRUCT *ads, const char *bind_path,
75 int scope, const char *expr, const char **attrs,
76 bool (*fn)(ADS_STRUCT *, char *, void **, void *),
77 void *data_area);
78char *ads_parent_dn(const char *dn);
79ADS_MODLIST ads_init_mods(TALLOC_CTX *ctx);
80ADS_STATUS ads_mod_str(TALLOC_CTX *ctx, ADS_MODLIST *mods,
81 const char *name, const char *val);
82ADS_STATUS ads_mod_strlist(TALLOC_CTX *ctx, ADS_MODLIST *mods,
83 const char *name, const char **vals);
84ADS_STATUS ads_gen_mod(ADS_STRUCT *ads, const char *mod_dn, ADS_MODLIST mods);
85ADS_STATUS ads_gen_add(ADS_STRUCT *ads, const char *new_dn, ADS_MODLIST mods);
86ADS_STATUS ads_del_dn(ADS_STRUCT *ads, char *del_dn);
87char *ads_ou_string(ADS_STRUCT *ads, const char *org_unit);
88char *ads_default_ou_string(ADS_STRUCT *ads, const char *wknguid);
89ADS_STATUS ads_add_strlist(TALLOC_CTX *ctx, ADS_MODLIST *mods,
90 const char *name, const char **vals);
91uint32 ads_get_kvno(ADS_STRUCT *ads, const char *account_name);
92uint32_t ads_get_machine_kvno(ADS_STRUCT *ads, const char *machine_name);
93ADS_STATUS ads_clear_service_principal_names(ADS_STRUCT *ads, const char *machine_name);
94ADS_STATUS ads_add_service_principal_name(ADS_STRUCT *ads, const char *machine_name,
95 const char *my_fqdn, const char *spn);
96ADS_STATUS ads_create_machine_acct(ADS_STRUCT *ads, const char *machine_name,
97 const char *org_unit);
98ADS_STATUS ads_move_machine_acct(ADS_STRUCT *ads, const char *machine_name,
99 const char *org_unit, bool *moved);
100int ads_count_replies(ADS_STRUCT *ads, void *res);
101ADS_STATUS ads_USN(ADS_STRUCT *ads, uint32 *usn);
102ADS_STATUS ads_current_time(ADS_STRUCT *ads);
103ADS_STATUS ads_domain_func_level(ADS_STRUCT *ads, uint32 *val);
104ADS_STATUS ads_domain_sid(ADS_STRUCT *ads, struct dom_sid *sid);
105ADS_STATUS ads_site_dn(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, const char **site_name);
106ADS_STATUS ads_site_dn_for_machine(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, const char *computer_name, const char **site_dn);
107ADS_STATUS ads_upn_suffixes(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, char ***suffixes, size_t *num_suffixes);
108ADS_STATUS ads_get_joinable_ous(ADS_STRUCT *ads,
109 TALLOC_CTX *mem_ctx,
110 char ***ous,
111 size_t *num_ous);
112ADS_STATUS ads_get_sid_from_extended_dn(TALLOC_CTX *mem_ctx,
113 const char *extended_dn,
114 enum ads_extended_dn_flags flags,
115 struct dom_sid *sid);
116char* ads_get_dnshostname( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *machine_name );
117char* ads_get_upn( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *machine_name );
118char* ads_get_samaccountname( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *machine_name );
119ADS_STATUS ads_join_realm(ADS_STRUCT *ads, const char *machine_name,
120 uint32 account_type, const char *org_unit);
121ADS_STATUS ads_leave_realm(ADS_STRUCT *ads, const char *hostname);
122ADS_STATUS ads_find_samaccount(ADS_STRUCT *ads,
123 TALLOC_CTX *mem_ctx,
124 const char *samaccountname,
125 uint32 *uac_ret,
126 const char **dn_ret);
127ADS_STATUS ads_config_path(ADS_STRUCT *ads,
128 TALLOC_CTX *mem_ctx,
129 char **config_path);
130const char *ads_get_extended_right_name_by_guid(ADS_STRUCT *ads,
131 const char *config_path,
132 TALLOC_CTX *mem_ctx,
133 const struct GUID *rights_guid);
134ADS_STATUS ads_check_ou_dn(TALLOC_CTX *mem_ctx,
135 ADS_STRUCT *ads,
136 const char **account_ou);
137
138/* The following definitions come from libads/ldap_printer.c */
139
140ADS_STATUS ads_mod_printer_entry(ADS_STRUCT *ads, char *prt_dn,
141 TALLOC_CTX *ctx, const ADS_MODLIST *mods);
142ADS_STATUS ads_add_printer_entry(ADS_STRUCT *ads, char *prt_dn,
143 TALLOC_CTX *ctx, ADS_MODLIST *mods);
144WERROR get_remote_printer_publishing_data(struct rpc_pipe_client *cli,
145 TALLOC_CTX *mem_ctx,
146 ADS_MODLIST *mods,
147 const char *printer);
148
149/* The following definitions come from libads/ldap_user.c */
150
151ADS_STATUS ads_add_user_acct(ADS_STRUCT *ads, const char *user,
152 const char *container, const char *fullname);
153ADS_STATUS ads_add_group_acct(ADS_STRUCT *ads, const char *group,
154 const char *container, const char *comment);
155
156/* The following definitions come from libads/ldap_utils.c */
157
158ADS_STATUS ads_ranged_search(ADS_STRUCT *ads,
159 TALLOC_CTX *mem_ctx,
160 int scope,
161 const char *base,
162 const char *filter,
163 void *args,
164 const char *range_attr,
165 char ***strings,
166 size_t *num_strings);
167
168/* The following definitions come from libads/ndr.c */
169
170struct ndr_print;
171void ndr_print_ads_struct(struct ndr_print *ndr, const char *name, const struct ads_struct *r);
172
173/* The following definitions come from libads/sasl.c */
174
175ADS_STATUS ads_sasl_bind(ADS_STRUCT *ads);
176
177/* The following definitions come from libads/sasl_wrapping.c */
178
179ADS_STATUS ads_setup_sasl_wrapping(ADS_STRUCT *ads,
180 const struct ads_saslwrap_ops *ops,
181 void *private_data);
182ADS_STATUS ads_setup_sasl_wrapping(ADS_STRUCT *ads,
183 const struct ads_saslwrap_ops *ops,
184 void *private_data);
185
186/* The following definitions come from libads/util.c */
187
188ADS_STATUS ads_change_trust_account_password(ADS_STRUCT *ads, char *host_principal);
189
190#endif /* _LIBADS_ADS_PROTO_H_ */
Note: See TracBrowser for help on using the repository browser.