s3-rpc_server: Implement an endpoint monitor loop.
[Samba/bjacke.git] / source3 / libads / ads_proto.h
blobed702de8a6c642723fafb5dcbb5e249faf262f23
1 /* The following definitions come from libads/ads_struct.c */
3 char *ads_build_path(const char *realm, const char *sep, const char *field, int reverse);
4 char *ads_build_dn(const char *realm);
5 char *ads_build_domain(const char *dn);
6 ADS_STRUCT *ads_init(const char *realm,
7 const char *workgroup,
8 const char *ldap_server);
9 bool ads_set_sasl_wrap_flags(ADS_STRUCT *ads, int flags);
10 void ads_destroy(ADS_STRUCT **ads);
12 /* The following definitions come from libads/disp_sec.c */
14 void ads_disp_sd(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, struct security_descriptor *sd);
16 /* The following definitions come from libads/kerberos_keytab.c */
18 int ads_keytab_add_entry(ADS_STRUCT *ads, const char *srvPrinc);
19 int ads_keytab_flush(ADS_STRUCT *ads);
20 int ads_keytab_create_default(ADS_STRUCT *ads);
21 int ads_keytab_list(const char *keytab_name);
23 /* The following definitions come from libads/krb5_errs.c */
25 /* The following definitions come from libads/kerberos_util.c */
27 ADS_STATUS ads_set_machine_password(ADS_STRUCT *ads,
28 const char *machine_account,
29 const char *password);
30 int ads_kinit_password(ADS_STRUCT *ads);
32 /* The following definitions come from libads/ldap.c */
34 bool ads_sitename_match(ADS_STRUCT *ads);
35 bool ads_closest_dc(ADS_STRUCT *ads);
36 ADS_STATUS ads_connect(ADS_STRUCT *ads);
37 ADS_STATUS ads_connect_user_creds(ADS_STRUCT *ads);
38 ADS_STATUS ads_connect_gc(ADS_STRUCT *ads);
39 void ads_disconnect(ADS_STRUCT *ads);
40 ADS_STATUS ads_do_search_all_fn(ADS_STRUCT *ads, const char *bind_path,
41 int scope, const char *expr, const char **attrs,
42 bool (*fn)(ADS_STRUCT *, char *, void **, void *),
43 void *data_area);
44 char *ads_parent_dn(const char *dn);
45 ADS_MODLIST ads_init_mods(TALLOC_CTX *ctx);
46 ADS_STATUS ads_mod_str(TALLOC_CTX *ctx, ADS_MODLIST *mods,
47 const char *name, const char *val);
48 ADS_STATUS ads_mod_strlist(TALLOC_CTX *ctx, ADS_MODLIST *mods,
49 const char *name, const char **vals);
50 ADS_STATUS ads_gen_mod(ADS_STRUCT *ads, const char *mod_dn, ADS_MODLIST mods);
51 ADS_STATUS ads_gen_add(ADS_STRUCT *ads, const char *new_dn, ADS_MODLIST mods);
52 ADS_STATUS ads_del_dn(ADS_STRUCT *ads, char *del_dn);
53 char *ads_ou_string(ADS_STRUCT *ads, const char *org_unit);
54 char *ads_default_ou_string(ADS_STRUCT *ads, const char *wknguid);
55 ADS_STATUS ads_add_strlist(TALLOC_CTX *ctx, ADS_MODLIST *mods,
56 const char *name, const char **vals);
57 uint32 ads_get_kvno(ADS_STRUCT *ads, const char *account_name);
58 uint32_t ads_get_machine_kvno(ADS_STRUCT *ads, const char *machine_name);
59 ADS_STATUS ads_clear_service_principal_names(ADS_STRUCT *ads, const char *machine_name);
60 ADS_STATUS ads_add_service_principal_name(ADS_STRUCT *ads, const char *machine_name,
61 const char *my_fqdn, const char *spn);
62 ADS_STATUS ads_create_machine_acct(ADS_STRUCT *ads, const char *machine_name,
63 const char *org_unit);
64 ADS_STATUS ads_move_machine_acct(ADS_STRUCT *ads, const char *machine_name,
65 const char *org_unit, bool *moved);
66 int ads_count_replies(ADS_STRUCT *ads, void *res);
67 ADS_STATUS ads_USN(ADS_STRUCT *ads, uint32 *usn);
68 ADS_STATUS ads_current_time(ADS_STRUCT *ads);
69 ADS_STATUS ads_domain_func_level(ADS_STRUCT *ads, uint32 *val);
70 ADS_STATUS ads_domain_sid(ADS_STRUCT *ads, struct dom_sid *sid);
71 ADS_STATUS ads_site_dn(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, const char **site_name);
72 ADS_STATUS ads_site_dn_for_machine(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, const char *computer_name, const char **site_dn);
73 ADS_STATUS ads_upn_suffixes(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, char ***suffixes, size_t *num_suffixes);
74 ADS_STATUS ads_get_joinable_ous(ADS_STRUCT *ads,
75 TALLOC_CTX *mem_ctx,
76 char ***ous,
77 size_t *num_ous);
78 ADS_STATUS ads_get_sid_from_extended_dn(TALLOC_CTX *mem_ctx,
79 const char *extended_dn,
80 enum ads_extended_dn_flags flags,
81 struct dom_sid *sid);
82 char* ads_get_dnshostname( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *machine_name );
83 char* ads_get_upn( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *machine_name );
84 char* ads_get_samaccountname( ADS_STRUCT *ads, TALLOC_CTX *ctx, const char *machine_name );
85 ADS_STATUS ads_join_realm(ADS_STRUCT *ads, const char *machine_name,
86 uint32 account_type, const char *org_unit);
87 ADS_STATUS ads_leave_realm(ADS_STRUCT *ads, const char *hostname);
88 ADS_STATUS ads_find_samaccount(ADS_STRUCT *ads,
89 TALLOC_CTX *mem_ctx,
90 const char *samaccountname,
91 uint32 *uac_ret,
92 const char **dn_ret);
93 ADS_STATUS ads_config_path(ADS_STRUCT *ads,
94 TALLOC_CTX *mem_ctx,
95 char **config_path);
96 const char *ads_get_extended_right_name_by_guid(ADS_STRUCT *ads,
97 const char *config_path,
98 TALLOC_CTX *mem_ctx,
99 const struct GUID *rights_guid);
100 ADS_STATUS ads_check_ou_dn(TALLOC_CTX *mem_ctx,
101 ADS_STRUCT *ads,
102 const char **account_ou);
104 /* The following definitions come from libads/ldap_printer.c */
106 ADS_STATUS ads_mod_printer_entry(ADS_STRUCT *ads, char *prt_dn,
107 TALLOC_CTX *ctx, const ADS_MODLIST *mods);
108 ADS_STATUS ads_add_printer_entry(ADS_STRUCT *ads, char *prt_dn,
109 TALLOC_CTX *ctx, ADS_MODLIST *mods);
110 WERROR get_remote_printer_publishing_data(struct rpc_pipe_client *cli,
111 TALLOC_CTX *mem_ctx,
112 ADS_MODLIST *mods,
113 const char *printer);
115 /* The following definitions come from libads/ldap_user.c */
117 ADS_STATUS ads_add_user_acct(ADS_STRUCT *ads, const char *user,
118 const char *container, const char *fullname);
119 ADS_STATUS ads_add_group_acct(ADS_STRUCT *ads, const char *group,
120 const char *container, const char *comment);
122 /* The following definitions come from libads/ldap_utils.c */
124 ADS_STATUS ads_ranged_search(ADS_STRUCT *ads,
125 TALLOC_CTX *mem_ctx,
126 int scope,
127 const char *base,
128 const char *filter,
129 void *args,
130 const char *range_attr,
131 char ***strings,
132 size_t *num_strings);
134 /* The following definitions come from libads/ndr.c */
136 struct ndr_print;
137 void ndr_print_ads_struct(struct ndr_print *ndr, const char *name, const struct ads_struct *r);
139 /* The following definitions come from libads/sasl.c */
141 ADS_STATUS ads_sasl_bind(ADS_STRUCT *ads);
143 /* The following definitions come from libads/sasl_wrapping.c */
145 ADS_STATUS ads_setup_sasl_wrapping(ADS_STRUCT *ads,
146 const struct ads_saslwrap_ops *ops,
147 void *private_data);
148 ADS_STATUS ads_setup_sasl_wrapping(ADS_STRUCT *ads,
149 const struct ads_saslwrap_ops *ops,
150 void *private_data);
152 /* The following definitions come from libads/util.c */
154 ADS_STATUS ads_change_trust_account_password(ADS_STRUCT *ads, char *host_principal);