s4:smbd: Add tstream to the stream_connection structure
[Samba/ekacnet.git] / source3 / include / ads_protos.h
blob09eaf99cfbcd110416b9854fbe69e68a69da49e1
1 /*
2 * Prototypes for ads
3 */
5 void ads_msgfree(ADS_STRUCT *ads, LDAPMessage *msg);
6 char *ads_get_dn(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, LDAPMessage *msg);
7 char *ads_get_dn_canonical(ADS_STRUCT *ads, LDAPMessage *msg);
9 char *ads_pull_string(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, LDAPMessage *msg,
10 const char *field);
11 char **ads_pull_strings(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
12 LDAPMessage *msg, const char *field,
13 size_t *num_values);
14 char **ads_pull_strings_range(ADS_STRUCT *ads,
15 TALLOC_CTX *mem_ctx,
16 LDAPMessage *msg, const char *field,
17 char **current_strings,
18 const char **next_attribute,
19 size_t *num_strings,
20 bool *more_strings);
21 bool ads_pull_uint32(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
22 uint32 *v);
23 bool ads_pull_guid(ADS_STRUCT *ads, LDAPMessage *msg, struct GUID *guid);
24 bool ads_pull_sid(ADS_STRUCT *ads, LDAPMessage *msg, const char *field,
25 struct dom_sid *sid);
26 int ads_pull_sids(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
27 LDAPMessage *msg, const char *field, struct dom_sid **sids);
28 bool ads_pull_sd(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
29 LDAPMessage *msg, const char *field, struct security_descriptor **sd);
30 char *ads_pull_username(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
31 LDAPMessage *msg);
32 int ads_pull_sids_from_extendeddn(ADS_STRUCT *ads,
33 TALLOC_CTX *mem_ctx,
34 LDAPMessage *msg,
35 const char *field,
36 enum ads_extended_dn_flags flags,
37 struct dom_sid **sids);
39 ADS_STATUS ads_find_machine_acct(ADS_STRUCT *ads, LDAPMessage **res,
40 const char *machine);
41 ADS_STATUS ads_find_printer_on_server(ADS_STRUCT *ads, LDAPMessage **res,
42 const char *printer,
43 const char *servername);
44 ADS_STATUS ads_find_printers(ADS_STRUCT *ads, LDAPMessage **res);
45 ADS_STATUS ads_find_user_acct(ADS_STRUCT *ads, LDAPMessage **res,
46 const char *user);
48 ADS_STATUS ads_do_search(ADS_STRUCT *ads, const char *bind_path, int scope,
49 const char *expr,
50 const char **attrs, LDAPMessage **res);
51 ADS_STATUS ads_search(ADS_STRUCT *ads, LDAPMessage **res,
52 const char *expr, const char **attrs);
53 ADS_STATUS ads_search_dn(ADS_STRUCT *ads, LDAPMessage **res,
54 const char *dn, const char **attrs);
55 ADS_STATUS ads_do_search_all_args(ADS_STRUCT *ads, const char *bind_path,
56 int scope, const char *expr,
57 const char **attrs, void *args,
58 LDAPMessage **res);
59 ADS_STATUS ads_do_search_all(ADS_STRUCT *ads, const char *bind_path,
60 int scope, const char *expr,
61 const char **attrs, LDAPMessage **res);
62 ADS_STATUS ads_do_search_retry(ADS_STRUCT *ads, const char *bind_path,
63 int scope,
64 const char *expr,
65 const char **attrs, LDAPMessage **res);
66 ADS_STATUS ads_do_search_retry_args(ADS_STRUCT *ads, const char *bind_path,
67 int scope, const char *expr,
68 const char **attrs, void *args,
69 LDAPMessage **res);
70 ADS_STATUS ads_search_retry(ADS_STRUCT *ads, LDAPMessage **res,
71 const char *expr, const char **attrs);
72 ADS_STATUS ads_search_retry_dn(ADS_STRUCT *ads, LDAPMessage **res,
73 const char *dn,
74 const char **attrs);
75 ADS_STATUS ads_search_retry_extended_dn(ADS_STRUCT *ads, LDAPMessage **res,
76 const char *dn,
77 const char **attrs,
78 enum ads_extended_dn_flags flags);
79 ADS_STATUS ads_search_retry_extended_dn_ranged(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
80 const char *dn,
81 const char **attrs,
82 enum ads_extended_dn_flags flags,
83 char ***strings,
84 size_t *num_strings);
85 ADS_STATUS ads_search_retry_sid(ADS_STRUCT *ads, LDAPMessage **res,
86 const struct dom_sid *sid,
87 const char **attrs);
90 LDAPMessage *ads_first_entry(ADS_STRUCT *ads, LDAPMessage *res);
91 LDAPMessage *ads_next_entry(ADS_STRUCT *ads, LDAPMessage *res);
92 LDAPMessage *ads_first_message(ADS_STRUCT *ads, LDAPMessage *res);
93 LDAPMessage *ads_next_message(ADS_STRUCT *ads, LDAPMessage *res);
94 void ads_process_results(ADS_STRUCT *ads, LDAPMessage *res,
95 bool (*fn)(ADS_STRUCT *,char *, void **, void *),
96 void *data_area);
97 void ads_dump(ADS_STRUCT *ads, LDAPMessage *res);
99 struct GROUP_POLICY_OBJECT;
100 ADS_STATUS ads_parse_gpo(ADS_STRUCT *ads,
101 TALLOC_CTX *mem_ctx,
102 LDAPMessage *res,
103 const char *gpo_dn,
104 struct GROUP_POLICY_OBJECT *gpo);
105 ADS_STATUS ads_search_retry_dn_sd_flags(ADS_STRUCT *ads, LDAPMessage **res,
106 uint32 sd_flags,
107 const char *dn,
108 const char **attrs);
109 ADS_STATUS ads_do_search_all_sd_flags(ADS_STRUCT *ads, const char *bind_path,
110 int scope, const char *expr,
111 const char **attrs, uint32 sd_flags,
112 LDAPMessage **res);
113 ADS_STATUS ads_get_tokensids(ADS_STRUCT *ads,
114 TALLOC_CTX *mem_ctx,
115 const char *dn,
116 struct dom_sid *user_sid,
117 struct dom_sid *primary_group_sid,
118 struct dom_sid **sids,
119 size_t *num_sids);
120 ADS_STATUS ads_get_joinable_ous(ADS_STRUCT *ads,
121 TALLOC_CTX *mem_ctx,
122 char ***ous,
123 size_t *num_ous);