1 /* This is a generated file, edit the .stub.php file instead.
2 * Stub hash: 7415695a7ae90e6abd45617baf8a9ecf9232b801 */
3
4 #if defined(HAVE_ORALDAP)
5 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ldap_connect, 0, 0, LDAP\\Connection, MAY_BE_FALSE)
6 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 1, "null")
7 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "389")
8 ZEND_ARG_TYPE_INFO(0, wallet, IS_STRING, 0)
9 ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
10 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, auth_mode, IS_LONG, 0, "GSLC_SSL_NO_AUTH")
11 ZEND_END_ARG_INFO()
12 #endif
13
14 #if defined(HAVE_ORALDAP) && defined(LDAP_API_FEATURE_X_OPENLDAP)
15 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ldap_connect_wallet, 0, 3, LDAP\\Connection, MAY_BE_FALSE)
16 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 1, "null")
17 ZEND_ARG_TYPE_INFO(0, wallet, IS_STRING, 0)
18 ZEND_ARG_TYPE_INFO(0, password, IS_STRING, 0)
19 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, auth_mode, IS_LONG, 0, "GSLC_SSL_NO_AUTH")
20 ZEND_END_ARG_INFO()
21 #endif
22
23 #if !(defined(HAVE_ORALDAP))
24 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ldap_connect, 0, 0, LDAP\\Connection, MAY_BE_FALSE)
25 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, uri, IS_STRING, 1, "null")
26 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, port, IS_LONG, 0, "389")
27 ZEND_END_ARG_INFO()
28 #endif
29
30 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_unbind, 0, 1, _IS_BOOL, 0)
31 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
32 ZEND_END_ARG_INFO()
33
34 #define arginfo_ldap_close arginfo_ldap_unbind
35
36 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_bind, 0, 1, _IS_BOOL, 0)
37 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
38 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 1, "null")
39 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null")
40 ZEND_END_ARG_INFO()
41
42 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ldap_bind_ext, 0, 1, LDAP\\Result, MAY_BE_FALSE)
43 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
44 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 1, "null")
45 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null")
46 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
47 ZEND_END_ARG_INFO()
48
49 #if defined(HAVE_LDAP_SASL)
50 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_sasl_bind, 0, 1, _IS_BOOL, 0)
51 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
52 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dn, IS_STRING, 1, "null")
53 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 1, "null")
54 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mech, IS_STRING, 1, "null")
55 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, realm, IS_STRING, 1, "null")
56 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, authc_id, IS_STRING, 1, "null")
57 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, authz_id, IS_STRING, 1, "null")
58 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, props, IS_STRING, 1, "null")
59 ZEND_END_ARG_INFO()
60 #endif
61
62 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ldap_read, 0, 3, LDAP\\Result, MAY_BE_ARRAY|MAY_BE_FALSE)
63 ZEND_ARG_INFO(0, ldap)
64 ZEND_ARG_TYPE_MASK(0, base, MAY_BE_ARRAY|MAY_BE_STRING, NULL)
65 ZEND_ARG_TYPE_MASK(0, filter, MAY_BE_ARRAY|MAY_BE_STRING, NULL)
66 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes, IS_ARRAY, 0, "[]")
67 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, attributes_only, IS_LONG, 0, "0")
68 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sizelimit, IS_LONG, 0, "-1")
69 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, timelimit, IS_LONG, 0, "-1")
70 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, deref, IS_LONG, 0, "LDAP_DEREF_NEVER")
71 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
72 ZEND_END_ARG_INFO()
73
74 #define arginfo_ldap_list arginfo_ldap_read
75
76 #define arginfo_ldap_search arginfo_ldap_read
77
78 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_free_result, 0, 1, _IS_BOOL, 0)
79 ZEND_ARG_OBJ_INFO(0, result, LDAP\\Result, 0)
80 ZEND_END_ARG_INFO()
81
82 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_count_entries, 0, 2, IS_LONG, 0)
83 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
84 ZEND_ARG_OBJ_INFO(0, result, LDAP\\Result, 0)
85 ZEND_END_ARG_INFO()
86
87 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ldap_first_entry, 0, 2, LDAP\\ResultEntry, MAY_BE_FALSE)
88 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
89 ZEND_ARG_OBJ_INFO(0, result, LDAP\\Result, 0)
90 ZEND_END_ARG_INFO()
91
92 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ldap_next_entry, 0, 2, LDAP\\ResultEntry, MAY_BE_FALSE)
93 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
94 ZEND_ARG_OBJ_INFO(0, entry, LDAP\\ResultEntry, 0)
95 ZEND_END_ARG_INFO()
96
97 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_get_entries, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
98 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
99 ZEND_ARG_OBJ_INFO(0, result, LDAP\\Result, 0)
100 ZEND_END_ARG_INFO()
101
102 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_first_attribute, 0, 2, MAY_BE_STRING|MAY_BE_FALSE)
103 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
104 ZEND_ARG_OBJ_INFO(0, entry, LDAP\\ResultEntry, 0)
105 ZEND_END_ARG_INFO()
106
107 #define arginfo_ldap_next_attribute arginfo_ldap_first_attribute
108
109 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_get_attributes, 0, 2, IS_ARRAY, 0)
110 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
111 ZEND_ARG_OBJ_INFO(0, entry, LDAP\\ResultEntry, 0)
112 ZEND_END_ARG_INFO()
113
114 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_get_values_len, 0, 3, MAY_BE_ARRAY|MAY_BE_FALSE)
115 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
116 ZEND_ARG_OBJ_INFO(0, entry, LDAP\\ResultEntry, 0)
117 ZEND_ARG_TYPE_INFO(0, attribute, IS_STRING, 0)
118 ZEND_END_ARG_INFO()
119
120 #define arginfo_ldap_get_values arginfo_ldap_get_values_len
121
122 #define arginfo_ldap_get_dn arginfo_ldap_first_attribute
123
124 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_explode_dn, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE)
125 ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0)
126 ZEND_ARG_TYPE_INFO(0, with_attrib, IS_LONG, 0)
127 ZEND_END_ARG_INFO()
128
129 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_dn2ufn, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
130 ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0)
131 ZEND_END_ARG_INFO()
132
133 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_add, 0, 3, _IS_BOOL, 0)
134 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
135 ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0)
136 ZEND_ARG_TYPE_INFO(0, entry, IS_ARRAY, 0)
137 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
138 ZEND_END_ARG_INFO()
139
140 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ldap_add_ext, 0, 3, LDAP\\Result, MAY_BE_FALSE)
141 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
142 ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0)
143 ZEND_ARG_TYPE_INFO(0, entry, IS_ARRAY, 0)
144 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
145 ZEND_END_ARG_INFO()
146
147 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_delete, 0, 2, _IS_BOOL, 0)
148 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
149 ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0)
150 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
151 ZEND_END_ARG_INFO()
152
153 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ldap_delete_ext, 0, 2, LDAP\\Result, MAY_BE_FALSE)
154 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
155 ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0)
156 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
157 ZEND_END_ARG_INFO()
158
159 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_modify_batch, 0, 3, _IS_BOOL, 0)
160 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
161 ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0)
162 ZEND_ARG_TYPE_INFO(0, modifications_info, IS_ARRAY, 0)
163 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
164 ZEND_END_ARG_INFO()
165
166 #define arginfo_ldap_mod_add arginfo_ldap_add
167
168 #define arginfo_ldap_mod_add_ext arginfo_ldap_add_ext
169
170 #define arginfo_ldap_mod_replace arginfo_ldap_add
171
172 #define arginfo_ldap_modify arginfo_ldap_add
173
174 #define arginfo_ldap_mod_replace_ext arginfo_ldap_add_ext
175
176 #define arginfo_ldap_mod_del arginfo_ldap_add
177
178 #define arginfo_ldap_mod_del_ext arginfo_ldap_add_ext
179
180 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_errno, 0, 1, IS_LONG, 0)
181 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
182 ZEND_END_ARG_INFO()
183
184 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_error, 0, 1, IS_STRING, 0)
185 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
186 ZEND_END_ARG_INFO()
187
188 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_err2str, 0, 1, IS_STRING, 0)
189 ZEND_ARG_TYPE_INFO(0, errno, IS_LONG, 0)
190 ZEND_END_ARG_INFO()
191
192 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_compare, 0, 4, MAY_BE_BOOL|MAY_BE_LONG)
193 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
194 ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0)
195 ZEND_ARG_TYPE_INFO(0, attribute, IS_STRING, 0)
196 ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
197 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
198 ZEND_END_ARG_INFO()
199
200 #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP)
201 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_rename, 0, 5, _IS_BOOL, 0)
202 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
203 ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0)
204 ZEND_ARG_TYPE_INFO(0, new_rdn, IS_STRING, 0)
205 ZEND_ARG_TYPE_INFO(0, new_parent, IS_STRING, 0)
206 ZEND_ARG_TYPE_INFO(0, delete_old_rdn, _IS_BOOL, 0)
207 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
208 ZEND_END_ARG_INFO()
209
210 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ldap_rename_ext, 0, 5, LDAP\\Result, MAY_BE_FALSE)
211 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
212 ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0)
213 ZEND_ARG_TYPE_INFO(0, new_rdn, IS_STRING, 0)
214 ZEND_ARG_TYPE_INFO(0, new_parent, IS_STRING, 0)
215 ZEND_ARG_TYPE_INFO(0, delete_old_rdn, _IS_BOOL, 0)
216 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
217 ZEND_END_ARG_INFO()
218
219 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_get_option, 0, 2, _IS_BOOL, 0)
220 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
221 ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0)
222 ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, value, "null")
223 ZEND_END_ARG_INFO()
224
225 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_set_option, 0, 3, _IS_BOOL, 0)
226 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 1)
227 ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0)
228 ZEND_ARG_INFO(0, value)
229 ZEND_END_ARG_INFO()
230
231 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_count_references, 0, 2, IS_LONG, 0)
232 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
233 ZEND_ARG_OBJ_INFO(0, result, LDAP\\Result, 0)
234 ZEND_END_ARG_INFO()
235
236 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ldap_first_reference, 0, 2, LDAP\\ResultEntry, MAY_BE_FALSE)
237 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
238 ZEND_ARG_OBJ_INFO(0, result, LDAP\\Result, 0)
239 ZEND_END_ARG_INFO()
240
241 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ldap_next_reference, 0, 2, LDAP\\ResultEntry, MAY_BE_FALSE)
242 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
243 ZEND_ARG_OBJ_INFO(0, entry, LDAP\\ResultEntry, 0)
244 ZEND_END_ARG_INFO()
245 #endif
246
247 #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) && defined(HAVE_LDAP_PARSE_REFERENCE)
248 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_parse_reference, 0, 3, _IS_BOOL, 0)
249 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
250 ZEND_ARG_OBJ_INFO(0, entry, LDAP\\ResultEntry, 0)
251 ZEND_ARG_INFO(1, referrals)
252 ZEND_END_ARG_INFO()
253 #endif
254
255 #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) && defined(HAVE_LDAP_PARSE_RESULT)
256 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_parse_result, 0, 3, _IS_BOOL, 0)
257 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
258 ZEND_ARG_OBJ_INFO(0, result, LDAP\\Result, 0)
259 ZEND_ARG_INFO(1, error_code)
260 ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, matched_dn, "null")
261 ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, error_message, "null")
262 ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, referrals, "null")
263 ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, controls, "null")
264 ZEND_END_ARG_INFO()
265 #endif
266
267 #if (defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC))
268 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_set_rebind_proc, 0, 2, _IS_BOOL, 0)
269 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
270 ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 1)
271 ZEND_END_ARG_INFO()
272 #endif
273
274 #if defined(HAVE_LDAP_START_TLS_S)
275 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_start_tls, 0, 1, _IS_BOOL, 0)
276 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
277 ZEND_END_ARG_INFO()
278 #endif
279
280 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_escape, 0, 1, IS_STRING, 0)
281 ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
282 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ignore, IS_STRING, 0, "\"\"")
283 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
284 ZEND_END_ARG_INFO()
285
286 #if defined(STR_TRANSLATION)
287 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_t61_to_8859, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
288 ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
289 ZEND_END_ARG_INFO()
290
291 #define arginfo_ldap_8859_to_t61 arginfo_ldap_t61_to_8859
292 #endif
293
294 #if defined(HAVE_LDAP_EXTENDED_OPERATION_S)
295 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ldap_exop, 0, 2, LDAP\\Result, MAY_BE_BOOL)
296 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
297 ZEND_ARG_TYPE_INFO(0, request_oid, IS_STRING, 0)
298 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, request_data, IS_STRING, 1, "null")
299 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
300 ZEND_ARG_INFO(1, response_data)
301 ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, response_oid, "null")
302 ZEND_END_ARG_INFO()
303
304 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_ldap_exop_sync, 0, 2, LDAP\\Result, MAY_BE_BOOL)
305 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
306 ZEND_ARG_TYPE_INFO(0, request_oid, IS_STRING, 0)
307 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, request_data, IS_STRING, 1, "null")
308 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, controls, IS_ARRAY, 1, "null")
309 ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, response_data, "null")
310 ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, response_oid, "null")
311 ZEND_END_ARG_INFO()
312 #endif
313
314 #if defined(HAVE_LDAP_PASSWD)
315 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_exop_passwd, 0, 1, MAY_BE_STRING|MAY_BE_BOOL)
316 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
317 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, user, IS_STRING, 0, "\"\"")
318 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, old_password, IS_STRING, 0, "\"\"")
319 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, new_password, IS_STRING, 0, "\"\"")
320 ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, controls, "null")
321 ZEND_END_ARG_INFO()
322 #endif
323
324 #if defined(HAVE_LDAP_WHOAMI_S)
325 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_exop_whoami, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
326 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
327 ZEND_END_ARG_INFO()
328 #endif
329
330 #if defined(HAVE_LDAP_REFRESH_S)
331 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_ldap_exop_refresh, 0, 3, MAY_BE_LONG|MAY_BE_FALSE)
332 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
333 ZEND_ARG_TYPE_INFO(0, dn, IS_STRING, 0)
334 ZEND_ARG_TYPE_INFO(0, ttl, IS_LONG, 0)
335 ZEND_END_ARG_INFO()
336 #endif
337
338 #if defined(HAVE_LDAP_PARSE_EXTENDED_RESULT)
339 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ldap_parse_exop, 0, 2, _IS_BOOL, 0)
340 ZEND_ARG_OBJ_INFO(0, ldap, LDAP\\Connection, 0)
341 ZEND_ARG_OBJ_INFO(0, result, LDAP\\Result, 0)
342 ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, response_data, "null")
343 ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, response_oid, "null")
344 ZEND_END_ARG_INFO()
345 #endif
346
347 #if defined(HAVE_ORALDAP)
348 ZEND_FUNCTION(ldap_connect);
349 #endif
350 #if defined(HAVE_ORALDAP) && defined(LDAP_API_FEATURE_X_OPENLDAP)
351 ZEND_FUNCTION(ldap_connect_wallet);
352 #endif
353 #if !(defined(HAVE_ORALDAP))
354 ZEND_FUNCTION(ldap_connect);
355 #endif
356 ZEND_FUNCTION(ldap_unbind);
357 ZEND_FUNCTION(ldap_bind);
358 ZEND_FUNCTION(ldap_bind_ext);
359 #if defined(HAVE_LDAP_SASL)
360 ZEND_FUNCTION(ldap_sasl_bind);
361 #endif
362 ZEND_FUNCTION(ldap_read);
363 ZEND_FUNCTION(ldap_list);
364 ZEND_FUNCTION(ldap_search);
365 ZEND_FUNCTION(ldap_free_result);
366 ZEND_FUNCTION(ldap_count_entries);
367 ZEND_FUNCTION(ldap_first_entry);
368 ZEND_FUNCTION(ldap_next_entry);
369 ZEND_FUNCTION(ldap_get_entries);
370 ZEND_FUNCTION(ldap_first_attribute);
371 ZEND_FUNCTION(ldap_next_attribute);
372 ZEND_FUNCTION(ldap_get_attributes);
373 ZEND_FUNCTION(ldap_get_values_len);
374 ZEND_FUNCTION(ldap_get_dn);
375 ZEND_FUNCTION(ldap_explode_dn);
376 ZEND_FUNCTION(ldap_dn2ufn);
377 ZEND_FUNCTION(ldap_add);
378 ZEND_FUNCTION(ldap_add_ext);
379 ZEND_FUNCTION(ldap_delete);
380 ZEND_FUNCTION(ldap_delete_ext);
381 ZEND_FUNCTION(ldap_modify_batch);
382 ZEND_FUNCTION(ldap_mod_add);
383 ZEND_FUNCTION(ldap_mod_add_ext);
384 ZEND_FUNCTION(ldap_mod_replace);
385 ZEND_FUNCTION(ldap_mod_replace_ext);
386 ZEND_FUNCTION(ldap_mod_del);
387 ZEND_FUNCTION(ldap_mod_del_ext);
388 ZEND_FUNCTION(ldap_errno);
389 ZEND_FUNCTION(ldap_error);
390 ZEND_FUNCTION(ldap_err2str);
391 ZEND_FUNCTION(ldap_compare);
392 #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP)
393 ZEND_FUNCTION(ldap_rename);
394 ZEND_FUNCTION(ldap_rename_ext);
395 ZEND_FUNCTION(ldap_get_option);
396 ZEND_FUNCTION(ldap_set_option);
397 ZEND_FUNCTION(ldap_count_references);
398 ZEND_FUNCTION(ldap_first_reference);
399 ZEND_FUNCTION(ldap_next_reference);
400 #endif
401 #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) && defined(HAVE_LDAP_PARSE_REFERENCE)
402 ZEND_FUNCTION(ldap_parse_reference);
403 #endif
404 #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) && defined(HAVE_LDAP_PARSE_RESULT)
405 ZEND_FUNCTION(ldap_parse_result);
406 #endif
407 #if (defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC))
408 ZEND_FUNCTION(ldap_set_rebind_proc);
409 #endif
410 #if defined(HAVE_LDAP_START_TLS_S)
411 ZEND_FUNCTION(ldap_start_tls);
412 #endif
413 ZEND_FUNCTION(ldap_escape);
414 #if defined(STR_TRANSLATION)
415 ZEND_FUNCTION(ldap_t61_to_8859);
416 ZEND_FUNCTION(ldap_8859_to_t61);
417 #endif
418 #if defined(HAVE_LDAP_EXTENDED_OPERATION_S)
419 ZEND_FUNCTION(ldap_exop);
420 ZEND_FUNCTION(ldap_exop_sync);
421 #endif
422 #if defined(HAVE_LDAP_PASSWD)
423 ZEND_FUNCTION(ldap_exop_passwd);
424 #endif
425 #if defined(HAVE_LDAP_WHOAMI_S)
426 ZEND_FUNCTION(ldap_exop_whoami);
427 #endif
428 #if defined(HAVE_LDAP_REFRESH_S)
429 ZEND_FUNCTION(ldap_exop_refresh);
430 #endif
431 #if defined(HAVE_LDAP_PARSE_EXTENDED_RESULT)
432 ZEND_FUNCTION(ldap_parse_exop);
433 #endif
434
435 static const zend_function_entry ext_functions[] = {
436 #if defined(HAVE_ORALDAP)
437 ZEND_FE(ldap_connect, arginfo_ldap_connect)
438 #endif
439 #if defined(HAVE_ORALDAP) && defined(LDAP_API_FEATURE_X_OPENLDAP)
440 ZEND_FE(ldap_connect_wallet, arginfo_ldap_connect_wallet)
441 #endif
442 #if !(defined(HAVE_ORALDAP))
443 ZEND_FE(ldap_connect, arginfo_ldap_connect)
444 #endif
445 ZEND_FE(ldap_unbind, arginfo_ldap_unbind)
446 ZEND_RAW_FENTRY("ldap_close", zif_ldap_unbind, arginfo_ldap_close, 0, NULL, NULL)
447 ZEND_FE(ldap_bind, arginfo_ldap_bind)
448 ZEND_FE(ldap_bind_ext, arginfo_ldap_bind_ext)
449 #if defined(HAVE_LDAP_SASL)
450 ZEND_FE(ldap_sasl_bind, arginfo_ldap_sasl_bind)
451 #endif
452 ZEND_FE(ldap_read, arginfo_ldap_read)
453 ZEND_FE(ldap_list, arginfo_ldap_list)
454 ZEND_FE(ldap_search, arginfo_ldap_search)
455 ZEND_FE(ldap_free_result, arginfo_ldap_free_result)
456 ZEND_FE(ldap_count_entries, arginfo_ldap_count_entries)
457 ZEND_FE(ldap_first_entry, arginfo_ldap_first_entry)
458 ZEND_FE(ldap_next_entry, arginfo_ldap_next_entry)
459 ZEND_FE(ldap_get_entries, arginfo_ldap_get_entries)
460 ZEND_FE(ldap_first_attribute, arginfo_ldap_first_attribute)
461 ZEND_FE(ldap_next_attribute, arginfo_ldap_next_attribute)
462 ZEND_FE(ldap_get_attributes, arginfo_ldap_get_attributes)
463 ZEND_FE(ldap_get_values_len, arginfo_ldap_get_values_len)
464 ZEND_RAW_FENTRY("ldap_get_values", zif_ldap_get_values_len, arginfo_ldap_get_values, 0, NULL, NULL)
465 ZEND_FE(ldap_get_dn, arginfo_ldap_get_dn)
466 ZEND_FE(ldap_explode_dn, arginfo_ldap_explode_dn)
467 ZEND_FE(ldap_dn2ufn, arginfo_ldap_dn2ufn)
468 ZEND_FE(ldap_add, arginfo_ldap_add)
469 ZEND_FE(ldap_add_ext, arginfo_ldap_add_ext)
470 ZEND_FE(ldap_delete, arginfo_ldap_delete)
471 ZEND_FE(ldap_delete_ext, arginfo_ldap_delete_ext)
472 ZEND_FE(ldap_modify_batch, arginfo_ldap_modify_batch)
473 ZEND_FE(ldap_mod_add, arginfo_ldap_mod_add)
474 ZEND_FE(ldap_mod_add_ext, arginfo_ldap_mod_add_ext)
475 ZEND_FE(ldap_mod_replace, arginfo_ldap_mod_replace)
476 ZEND_RAW_FENTRY("ldap_modify", zif_ldap_mod_replace, arginfo_ldap_modify, 0, NULL, NULL)
477 ZEND_FE(ldap_mod_replace_ext, arginfo_ldap_mod_replace_ext)
478 ZEND_FE(ldap_mod_del, arginfo_ldap_mod_del)
479 ZEND_FE(ldap_mod_del_ext, arginfo_ldap_mod_del_ext)
480 ZEND_FE(ldap_errno, arginfo_ldap_errno)
481 ZEND_FE(ldap_error, arginfo_ldap_error)
482 ZEND_FE(ldap_err2str, arginfo_ldap_err2str)
483 ZEND_FE(ldap_compare, arginfo_ldap_compare)
484 #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP)
485 ZEND_FE(ldap_rename, arginfo_ldap_rename)
486 ZEND_FE(ldap_rename_ext, arginfo_ldap_rename_ext)
487 ZEND_FE(ldap_get_option, arginfo_ldap_get_option)
488 ZEND_FE(ldap_set_option, arginfo_ldap_set_option)
489 ZEND_FE(ldap_count_references, arginfo_ldap_count_references)
490 ZEND_FE(ldap_first_reference, arginfo_ldap_first_reference)
491 ZEND_FE(ldap_next_reference, arginfo_ldap_next_reference)
492 #endif
493 #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) && defined(HAVE_LDAP_PARSE_REFERENCE)
494 ZEND_FE(ldap_parse_reference, arginfo_ldap_parse_reference)
495 #endif
496 #if (LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP) && defined(HAVE_LDAP_PARSE_RESULT)
497 ZEND_FE(ldap_parse_result, arginfo_ldap_parse_result)
498 #endif
499 #if (defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC))
500 ZEND_FE(ldap_set_rebind_proc, arginfo_ldap_set_rebind_proc)
501 #endif
502 #if defined(HAVE_LDAP_START_TLS_S)
503 ZEND_FE(ldap_start_tls, arginfo_ldap_start_tls)
504 #endif
505 ZEND_FE(ldap_escape, arginfo_ldap_escape)
506 #if defined(STR_TRANSLATION)
507 ZEND_FE(ldap_t61_to_8859, arginfo_ldap_t61_to_8859)
508 ZEND_FE(ldap_8859_to_t61, arginfo_ldap_8859_to_t61)
509 #endif
510 #if defined(HAVE_LDAP_EXTENDED_OPERATION_S)
511 ZEND_FE(ldap_exop, arginfo_ldap_exop)
512 ZEND_FE(ldap_exop_sync, arginfo_ldap_exop_sync)
513 #endif
514 #if defined(HAVE_LDAP_PASSWD)
515 ZEND_FE(ldap_exop_passwd, arginfo_ldap_exop_passwd)
516 #endif
517 #if defined(HAVE_LDAP_WHOAMI_S)
518 ZEND_FE(ldap_exop_whoami, arginfo_ldap_exop_whoami)
519 #endif
520 #if defined(HAVE_LDAP_REFRESH_S)
521 ZEND_FE(ldap_exop_refresh, arginfo_ldap_exop_refresh)
522 #endif
523 #if defined(HAVE_LDAP_PARSE_EXTENDED_RESULT)
524 ZEND_FE(ldap_parse_exop, arginfo_ldap_parse_exop)
525 #endif
526 ZEND_FE_END
527 };
528
register_ldap_symbols(int module_number)529 static void register_ldap_symbols(int module_number)
530 {
531 REGISTER_LONG_CONSTANT("LDAP_DEREF_NEVER", LDAP_DEREF_NEVER, CONST_PERSISTENT);
532 REGISTER_LONG_CONSTANT("LDAP_DEREF_SEARCHING", LDAP_DEREF_SEARCHING, CONST_PERSISTENT);
533 REGISTER_LONG_CONSTANT("LDAP_DEREF_FINDING", LDAP_DEREF_FINDING, CONST_PERSISTENT);
534 REGISTER_LONG_CONSTANT("LDAP_DEREF_ALWAYS", LDAP_DEREF_ALWAYS, CONST_PERSISTENT);
535 REGISTER_LONG_CONSTANT("LDAP_MODIFY_BATCH_ADD", LDAP_MODIFY_BATCH_ADD, CONST_PERSISTENT);
536 REGISTER_LONG_CONSTANT("LDAP_MODIFY_BATCH_REMOVE", LDAP_MODIFY_BATCH_REMOVE, CONST_PERSISTENT);
537 REGISTER_LONG_CONSTANT("LDAP_MODIFY_BATCH_REMOVE_ALL", LDAP_MODIFY_BATCH_REMOVE_ALL, CONST_PERSISTENT);
538 REGISTER_LONG_CONSTANT("LDAP_MODIFY_BATCH_REPLACE", LDAP_MODIFY_BATCH_REPLACE, CONST_PERSISTENT);
539 REGISTER_STRING_CONSTANT("LDAP_MODIFY_BATCH_ATTRIB", LDAP_MODIFY_BATCH_ATTRIB, CONST_PERSISTENT);
540 REGISTER_STRING_CONSTANT("LDAP_MODIFY_BATCH_MODTYPE", LDAP_MODIFY_BATCH_MODTYPE, CONST_PERSISTENT);
541 REGISTER_STRING_CONSTANT("LDAP_MODIFY_BATCH_VALUES", LDAP_MODIFY_BATCH_VALUES, CONST_PERSISTENT);
542 #if ((LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP))
543 REGISTER_LONG_CONSTANT("LDAP_OPT_DEREF", LDAP_OPT_DEREF, CONST_PERSISTENT);
544 #endif
545 #if ((LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP))
546 REGISTER_LONG_CONSTANT("LDAP_OPT_SIZELIMIT", LDAP_OPT_SIZELIMIT, CONST_PERSISTENT);
547 #endif
548 #if ((LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP))
549 REGISTER_LONG_CONSTANT("LDAP_OPT_TIMELIMIT", LDAP_OPT_TIMELIMIT, CONST_PERSISTENT);
550 #endif
551 #if ((LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP)) && defined(LDAP_OPT_NETWORK_TIMEOUT)
552 REGISTER_LONG_CONSTANT("LDAP_OPT_NETWORK_TIMEOUT", LDAP_OPT_NETWORK_TIMEOUT, CONST_PERSISTENT);
553 #endif
554 #if ((LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP)) && (!defined(LDAP_OPT_NETWORK_TIMEOUT) && defined(LDAP_X_OPT_CONNECT_TIMEOUT))
555 REGISTER_LONG_CONSTANT("LDAP_OPT_NETWORK_TIMEOUT", LDAP_X_OPT_CONNECT_TIMEOUT, CONST_PERSISTENT);
556 #endif
557 #if ((LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP)) && defined(LDAP_OPT_TIMEOUT)
558 REGISTER_LONG_CONSTANT("LDAP_OPT_TIMEOUT", LDAP_OPT_TIMEOUT, CONST_PERSISTENT);
559 #endif
560 #if ((LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP))
561 REGISTER_LONG_CONSTANT("LDAP_OPT_PROTOCOL_VERSION", LDAP_OPT_PROTOCOL_VERSION, CONST_PERSISTENT);
562 #endif
563 #if ((LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP))
564 REGISTER_LONG_CONSTANT("LDAP_OPT_ERROR_NUMBER", LDAP_OPT_ERROR_NUMBER, CONST_PERSISTENT);
565 #endif
566 #if ((LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP))
567 REGISTER_LONG_CONSTANT("LDAP_OPT_REFERRALS", LDAP_OPT_REFERRALS, CONST_PERSISTENT);
568 #endif
569 #if ((LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP)) && defined(LDAP_OPT_RESTART)
570 REGISTER_LONG_CONSTANT("LDAP_OPT_RESTART", LDAP_OPT_RESTART, CONST_PERSISTENT);
571 #endif
572 #if ((LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP)) && defined(LDAP_OPT_HOST_NAME)
573 REGISTER_LONG_CONSTANT("LDAP_OPT_HOST_NAME", LDAP_OPT_HOST_NAME, CONST_PERSISTENT);
574 #endif
575 #if ((LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP))
576 REGISTER_LONG_CONSTANT("LDAP_OPT_ERROR_STRING", LDAP_OPT_ERROR_STRING, CONST_PERSISTENT);
577 #endif
578 #if ((LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP)) && defined(LDAP_OPT_MATCHED_DN)
579 REGISTER_LONG_CONSTANT("LDAP_OPT_MATCHED_DN", LDAP_OPT_MATCHED_DN, CONST_PERSISTENT);
580 #endif
581 #if ((LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP))
582 REGISTER_LONG_CONSTANT("LDAP_OPT_SERVER_CONTROLS", LDAP_OPT_SERVER_CONTROLS, CONST_PERSISTENT);
583 #endif
584 #if ((LDAP_API_VERSION > 2000) || defined(HAVE_ORALDAP))
585 REGISTER_LONG_CONSTANT("LDAP_OPT_CLIENT_CONTROLS", LDAP_OPT_CLIENT_CONTROLS, CONST_PERSISTENT);
586 #endif
587 #if defined(LDAP_OPT_DEBUG_LEVEL)
588 REGISTER_LONG_CONSTANT("LDAP_OPT_DEBUG_LEVEL", LDAP_OPT_DEBUG_LEVEL, CONST_PERSISTENT);
589 #endif
590 #if defined(LDAP_OPT_DIAGNOSTIC_MESSAGE)
591 REGISTER_LONG_CONSTANT("LDAP_OPT_DIAGNOSTIC_MESSAGE", LDAP_OPT_DIAGNOSTIC_MESSAGE, CONST_PERSISTENT);
592 #endif
593 #if defined(HAVE_LDAP_SASL)
594 REGISTER_LONG_CONSTANT("LDAP_OPT_X_SASL_MECH", LDAP_OPT_X_SASL_MECH, CONST_PERSISTENT);
595 #endif
596 #if defined(HAVE_LDAP_SASL)
597 REGISTER_LONG_CONSTANT("LDAP_OPT_X_SASL_REALM", LDAP_OPT_X_SASL_REALM, CONST_PERSISTENT);
598 #endif
599 #if defined(HAVE_LDAP_SASL)
600 REGISTER_LONG_CONSTANT("LDAP_OPT_X_SASL_AUTHCID", LDAP_OPT_X_SASL_AUTHCID, CONST_PERSISTENT);
601 #endif
602 #if defined(HAVE_LDAP_SASL)
603 REGISTER_LONG_CONSTANT("LDAP_OPT_X_SASL_AUTHZID", LDAP_OPT_X_SASL_AUTHZID, CONST_PERSISTENT);
604 #endif
605 #if defined(LDAP_OPT_X_SASL_NOCANON)
606 REGISTER_LONG_CONSTANT("LDAP_OPT_X_SASL_NOCANON", LDAP_OPT_X_SASL_NOCANON, CONST_PERSISTENT);
607 #endif
608 #if defined(LDAP_OPT_X_SASL_USERNAME)
609 REGISTER_LONG_CONSTANT("LDAP_OPT_X_SASL_USERNAME", LDAP_OPT_X_SASL_USERNAME, CONST_PERSISTENT);
610 #endif
611 #if defined(HAVE_ORALDAP)
612 REGISTER_LONG_CONSTANT("GSLC_SSL_NO_AUTH", GSLC_SSL_NO_AUTH, CONST_PERSISTENT);
613 #endif
614 #if defined(HAVE_ORALDAP)
615 REGISTER_LONG_CONSTANT("GSLC_SSL_ONEWAY_AUTH", GSLC_SSL_ONEWAY_AUTH, CONST_PERSISTENT);
616 #endif
617 #if defined(HAVE_ORALDAP)
618 REGISTER_LONG_CONSTANT("GSLC_SSL_TWOWAY_AUTH", GSLC_SSL_TWOWAY_AUTH, CONST_PERSISTENT);
619 #endif
620 #if (LDAP_API_VERSION > 2000)
621 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_REQUIRE_CERT", LDAP_OPT_X_TLS_REQUIRE_CERT, CONST_PERSISTENT);
622 #endif
623 #if (LDAP_API_VERSION > 2000)
624 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_NEVER", LDAP_OPT_X_TLS_NEVER, CONST_PERSISTENT);
625 #endif
626 #if (LDAP_API_VERSION > 2000)
627 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_HARD", LDAP_OPT_X_TLS_HARD, CONST_PERSISTENT);
628 #endif
629 #if (LDAP_API_VERSION > 2000)
630 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_DEMAND", LDAP_OPT_X_TLS_DEMAND, CONST_PERSISTENT);
631 #endif
632 #if (LDAP_API_VERSION > 2000)
633 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_ALLOW", LDAP_OPT_X_TLS_ALLOW, CONST_PERSISTENT);
634 #endif
635 #if (LDAP_API_VERSION > 2000)
636 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_TRY", LDAP_OPT_X_TLS_TRY, CONST_PERSISTENT);
637 #endif
638 #if (LDAP_API_VERSION > 2000)
639 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_CACERTDIR", LDAP_OPT_X_TLS_CACERTDIR, CONST_PERSISTENT);
640 #endif
641 #if (LDAP_API_VERSION > 2000)
642 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_CACERTFILE", LDAP_OPT_X_TLS_CACERTFILE, CONST_PERSISTENT);
643 #endif
644 #if (LDAP_API_VERSION > 2000)
645 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_CERTFILE", LDAP_OPT_X_TLS_CERTFILE, CONST_PERSISTENT);
646 #endif
647 #if (LDAP_API_VERSION > 2000)
648 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_CIPHER_SUITE", LDAP_OPT_X_TLS_CIPHER_SUITE, CONST_PERSISTENT);
649 #endif
650 #if (LDAP_API_VERSION > 2000)
651 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_KEYFILE", LDAP_OPT_X_TLS_KEYFILE, CONST_PERSISTENT);
652 #endif
653 #if (LDAP_API_VERSION > 2000)
654 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_RANDOM_FILE", LDAP_OPT_X_TLS_RANDOM_FILE, CONST_PERSISTENT);
655 #endif
656 #if defined(LDAP_OPT_X_TLS_CRLCHECK)
657 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_CRLCHECK", LDAP_OPT_X_TLS_CRLCHECK, CONST_PERSISTENT);
658 #endif
659 #if defined(LDAP_OPT_X_TLS_CRLCHECK)
660 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_CRL_NONE", LDAP_OPT_X_TLS_CRL_NONE, CONST_PERSISTENT);
661 #endif
662 #if defined(LDAP_OPT_X_TLS_CRLCHECK)
663 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_CRL_PEER", LDAP_OPT_X_TLS_CRL_PEER, CONST_PERSISTENT);
664 #endif
665 #if defined(LDAP_OPT_X_TLS_CRLCHECK)
666 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_CRL_ALL", LDAP_OPT_X_TLS_CRL_ALL, CONST_PERSISTENT);
667 #endif
668 #if defined(LDAP_OPT_X_TLS_DHFILE)
669 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_DHFILE", LDAP_OPT_X_TLS_DHFILE, CONST_PERSISTENT);
670 #endif
671 #if defined(LDAP_OPT_X_TLS_CRLFILE)
672 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_CRLFILE", LDAP_OPT_X_TLS_CRLFILE, CONST_PERSISTENT);
673 #endif
674 #if defined(LDAP_OPT_X_TLS_PROTOCOL_MIN)
675 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_PROTOCOL_MIN", LDAP_OPT_X_TLS_PROTOCOL_MIN, CONST_PERSISTENT);
676 #endif
677 #if defined(LDAP_OPT_X_TLS_PROTOCOL_MIN)
678 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_PROTOCOL_SSL2", LDAP_OPT_X_TLS_PROTOCOL_SSL2, CONST_PERSISTENT);
679 #endif
680 #if defined(LDAP_OPT_X_TLS_PROTOCOL_MIN)
681 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_PROTOCOL_SSL3", LDAP_OPT_X_TLS_PROTOCOL_SSL3, CONST_PERSISTENT);
682 #endif
683 #if defined(LDAP_OPT_X_TLS_PROTOCOL_MIN)
684 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_PROTOCOL_TLS1_0", LDAP_OPT_X_TLS_PROTOCOL_TLS1_0, CONST_PERSISTENT);
685 #endif
686 #if defined(LDAP_OPT_X_TLS_PROTOCOL_MIN)
687 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_PROTOCOL_TLS1_1", LDAP_OPT_X_TLS_PROTOCOL_TLS1_1, CONST_PERSISTENT);
688 #endif
689 #if defined(LDAP_OPT_X_TLS_PROTOCOL_MIN)
690 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_PROTOCOL_TLS1_2", LDAP_OPT_X_TLS_PROTOCOL_TLS1_2, CONST_PERSISTENT);
691 #endif
692 #if defined(LDAP_OPT_X_TLS_PROTOCOL_TLS1_3)
693 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_PROTOCOL_TLS1_3", LDAP_OPT_X_TLS_PROTOCOL_TLS1_3, CONST_PERSISTENT);
694 #endif
695 #if defined(LDAP_OPT_X_TLS_PROTOCOL_MAX)
696 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_PROTOCOL_MAX", LDAP_OPT_X_TLS_PROTOCOL_MAX, CONST_PERSISTENT);
697 #endif
698 #if defined(LDAP_OPT_X_TLS_PACKAGE)
699 REGISTER_LONG_CONSTANT("LDAP_OPT_X_TLS_PACKAGE", LDAP_OPT_X_TLS_PACKAGE, CONST_PERSISTENT);
700 #endif
701 #if defined(LDAP_OPT_X_KEEPALIVE_IDLE)
702 REGISTER_LONG_CONSTANT("LDAP_OPT_X_KEEPALIVE_IDLE", LDAP_OPT_X_KEEPALIVE_IDLE, CONST_PERSISTENT);
703 #endif
704 #if defined(LDAP_OPT_X_KEEPALIVE_IDLE)
705 REGISTER_LONG_CONSTANT("LDAP_OPT_X_KEEPALIVE_PROBES", LDAP_OPT_X_KEEPALIVE_PROBES, CONST_PERSISTENT);
706 #endif
707 #if defined(LDAP_OPT_X_KEEPALIVE_IDLE)
708 REGISTER_LONG_CONSTANT("LDAP_OPT_X_KEEPALIVE_INTERVAL", LDAP_OPT_X_KEEPALIVE_INTERVAL, CONST_PERSISTENT);
709 #endif
710 REGISTER_LONG_CONSTANT("LDAP_ESCAPE_FILTER", PHP_LDAP_ESCAPE_FILTER, CONST_PERSISTENT);
711 REGISTER_LONG_CONSTANT("LDAP_ESCAPE_DN", PHP_LDAP_ESCAPE_DN, CONST_PERSISTENT);
712 #if defined(HAVE_LDAP_EXTENDED_OPERATION_S)
713 REGISTER_STRING_CONSTANT("LDAP_EXOP_START_TLS", LDAP_EXOP_START_TLS, CONST_PERSISTENT);
714 #endif
715 #if defined(HAVE_LDAP_EXTENDED_OPERATION_S)
716 REGISTER_STRING_CONSTANT("LDAP_EXOP_MODIFY_PASSWD", LDAP_EXOP_MODIFY_PASSWD, CONST_PERSISTENT);
717 #endif
718 #if defined(HAVE_LDAP_EXTENDED_OPERATION_S)
719 REGISTER_STRING_CONSTANT("LDAP_EXOP_REFRESH", LDAP_EXOP_REFRESH, CONST_PERSISTENT);
720 #endif
721 #if defined(HAVE_LDAP_EXTENDED_OPERATION_S)
722 REGISTER_STRING_CONSTANT("LDAP_EXOP_WHO_AM_I", LDAP_EXOP_WHO_AM_I, CONST_PERSISTENT);
723 #endif
724 #if defined(HAVE_LDAP_EXTENDED_OPERATION_S)
725 REGISTER_STRING_CONSTANT("LDAP_EXOP_TURN", LDAP_EXOP_TURN, CONST_PERSISTENT);
726 #endif
727 #if defined(LDAP_CONTROL_MANAGEDSAIT)
728 REGISTER_STRING_CONSTANT("LDAP_CONTROL_MANAGEDSAIT", LDAP_CONTROL_MANAGEDSAIT, CONST_PERSISTENT);
729 #endif
730 #if defined(LDAP_CONTROL_PROXY_AUTHZ)
731 REGISTER_STRING_CONSTANT("LDAP_CONTROL_PROXY_AUTHZ", LDAP_CONTROL_PROXY_AUTHZ, CONST_PERSISTENT);
732 #endif
733 #if defined(LDAP_CONTROL_SUBENTRIES)
734 REGISTER_STRING_CONSTANT("LDAP_CONTROL_SUBENTRIES", LDAP_CONTROL_SUBENTRIES, CONST_PERSISTENT);
735 #endif
736 #if defined(LDAP_CONTROL_VALUESRETURNFILTER)
737 REGISTER_STRING_CONSTANT("LDAP_CONTROL_VALUESRETURNFILTER", LDAP_CONTROL_VALUESRETURNFILTER, CONST_PERSISTENT);
738 #endif
739 #if defined(LDAP_CONTROL_ASSERT)
740 REGISTER_STRING_CONSTANT("LDAP_CONTROL_ASSERT", LDAP_CONTROL_ASSERT, CONST_PERSISTENT);
741 #endif
742 #if defined(LDAP_CONTROL_ASSERT)
743 REGISTER_STRING_CONSTANT("LDAP_CONTROL_PRE_READ", LDAP_CONTROL_PRE_READ, CONST_PERSISTENT);
744 #endif
745 #if defined(LDAP_CONTROL_ASSERT)
746 REGISTER_STRING_CONSTANT("LDAP_CONTROL_POST_READ", LDAP_CONTROL_POST_READ, CONST_PERSISTENT);
747 #endif
748 #if defined(LDAP_CONTROL_SORTREQUEST)
749 REGISTER_STRING_CONSTANT("LDAP_CONTROL_SORTREQUEST", LDAP_CONTROL_SORTREQUEST, CONST_PERSISTENT);
750 #endif
751 #if defined(LDAP_CONTROL_SORTREQUEST)
752 REGISTER_STRING_CONSTANT("LDAP_CONTROL_SORTRESPONSE", LDAP_CONTROL_SORTRESPONSE, CONST_PERSISTENT);
753 #endif
754 #if defined(LDAP_CONTROL_PAGEDRESULTS)
755 REGISTER_STRING_CONSTANT("LDAP_CONTROL_PAGEDRESULTS", LDAP_CONTROL_PAGEDRESULTS, CONST_PERSISTENT);
756 #endif
757 #if defined(LDAP_CONTROL_AUTHZID_REQUEST)
758 REGISTER_STRING_CONSTANT("LDAP_CONTROL_AUTHZID_REQUEST", LDAP_CONTROL_AUTHZID_REQUEST, CONST_PERSISTENT);
759 #endif
760 #if defined(LDAP_CONTROL_AUTHZID_REQUEST)
761 REGISTER_STRING_CONSTANT("LDAP_CONTROL_AUTHZID_RESPONSE", LDAP_CONTROL_AUTHZID_RESPONSE, CONST_PERSISTENT);
762 #endif
763 #if defined(LDAP_CONTROL_SYNC)
764 REGISTER_STRING_CONSTANT("LDAP_CONTROL_SYNC", LDAP_CONTROL_SYNC, CONST_PERSISTENT);
765 #endif
766 #if defined(LDAP_CONTROL_SYNC)
767 REGISTER_STRING_CONSTANT("LDAP_CONTROL_SYNC_STATE", LDAP_CONTROL_SYNC_STATE, CONST_PERSISTENT);
768 #endif
769 #if defined(LDAP_CONTROL_SYNC)
770 REGISTER_STRING_CONSTANT("LDAP_CONTROL_SYNC_DONE", LDAP_CONTROL_SYNC_DONE, CONST_PERSISTENT);
771 #endif
772 #if defined(LDAP_CONTROL_DONTUSECOPY)
773 REGISTER_STRING_CONSTANT("LDAP_CONTROL_DONTUSECOPY", LDAP_CONTROL_DONTUSECOPY, CONST_PERSISTENT);
774 #endif
775 #if defined(LDAP_CONTROL_PASSWORDPOLICYREQUEST)
776 REGISTER_STRING_CONSTANT("LDAP_CONTROL_PASSWORDPOLICYREQUEST", LDAP_CONTROL_PASSWORDPOLICYREQUEST, CONST_PERSISTENT);
777 #endif
778 #if defined(LDAP_CONTROL_PASSWORDPOLICYREQUEST)
779 REGISTER_STRING_CONSTANT("LDAP_CONTROL_PASSWORDPOLICYRESPONSE", LDAP_CONTROL_PASSWORDPOLICYRESPONSE, CONST_PERSISTENT);
780 #endif
781 #if defined(LDAP_CONTROL_X_INCREMENTAL_VALUES)
782 REGISTER_STRING_CONSTANT("LDAP_CONTROL_X_INCREMENTAL_VALUES", LDAP_CONTROL_X_INCREMENTAL_VALUES, CONST_PERSISTENT);
783 #endif
784 #if defined(LDAP_CONTROL_X_INCREMENTAL_VALUES)
785 REGISTER_STRING_CONSTANT("LDAP_CONTROL_X_DOMAIN_SCOPE", LDAP_CONTROL_X_DOMAIN_SCOPE, CONST_PERSISTENT);
786 #endif
787 #if defined(LDAP_CONTROL_X_INCREMENTAL_VALUES)
788 REGISTER_STRING_CONSTANT("LDAP_CONTROL_X_PERMISSIVE_MODIFY", LDAP_CONTROL_X_PERMISSIVE_MODIFY, CONST_PERSISTENT);
789 #endif
790 #if defined(LDAP_CONTROL_X_INCREMENTAL_VALUES)
791 REGISTER_STRING_CONSTANT("LDAP_CONTROL_X_SEARCH_OPTIONS", LDAP_CONTROL_X_SEARCH_OPTIONS, CONST_PERSISTENT);
792 #endif
793 #if defined(LDAP_CONTROL_X_INCREMENTAL_VALUES)
794 REGISTER_STRING_CONSTANT("LDAP_CONTROL_X_TREE_DELETE", LDAP_CONTROL_X_TREE_DELETE, CONST_PERSISTENT);
795 #endif
796 #if defined(LDAP_CONTROL_X_INCREMENTAL_VALUES)
797 REGISTER_STRING_CONSTANT("LDAP_CONTROL_X_EXTENDED_DN", LDAP_CONTROL_X_EXTENDED_DN, CONST_PERSISTENT);
798 #endif
799 #if defined(LDAP_CONTROL_VLVREQUEST)
800 REGISTER_STRING_CONSTANT("LDAP_CONTROL_VLVREQUEST", LDAP_CONTROL_VLVREQUEST, CONST_PERSISTENT);
801 #endif
802 #if defined(LDAP_CONTROL_VLVREQUEST)
803 REGISTER_STRING_CONSTANT("LDAP_CONTROL_VLVRESPONSE", LDAP_CONTROL_VLVRESPONSE, CONST_PERSISTENT);
804 #endif
805
806 #if defined(HAVE_ORALDAP)
807
808 zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "ldap_connect", sizeof("ldap_connect") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
809 #endif
810 #if defined(HAVE_ORALDAP) && defined(LDAP_API_FEATURE_X_OPENLDAP)
811
812 zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "ldap_connect_wallet", sizeof("ldap_connect_wallet") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
813 #endif
814
815 zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "ldap_bind", sizeof("ldap_bind") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
816
817 zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "ldap_bind_ext", sizeof("ldap_bind_ext") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
818 #if defined(HAVE_LDAP_SASL)
819
820 zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "ldap_sasl_bind", sizeof("ldap_sasl_bind") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
821 #endif
822 #if defined(HAVE_LDAP_PASSWD)
823
824 zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "ldap_exop_passwd", sizeof("ldap_exop_passwd") - 1), 2, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
825
826 zend_add_parameter_attribute(zend_hash_str_find_ptr(CG(function_table), "ldap_exop_passwd", sizeof("ldap_exop_passwd") - 1), 3, ZSTR_KNOWN(ZEND_STR_SENSITIVEPARAMETER), 0);
827 #endif
828 }
829
register_class_LDAP_Connection(void)830 static zend_class_entry *register_class_LDAP_Connection(void)
831 {
832 zend_class_entry ce, *class_entry;
833
834 INIT_NS_CLASS_ENTRY(ce, "LDAP", "Connection", NULL);
835 class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES|ZEND_ACC_NOT_SERIALIZABLE);
836
837 return class_entry;
838 }
839
register_class_LDAP_Result(void)840 static zend_class_entry *register_class_LDAP_Result(void)
841 {
842 zend_class_entry ce, *class_entry;
843
844 INIT_NS_CLASS_ENTRY(ce, "LDAP", "Result", NULL);
845 class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES|ZEND_ACC_NOT_SERIALIZABLE);
846
847 return class_entry;
848 }
849
register_class_LDAP_ResultEntry(void)850 static zend_class_entry *register_class_LDAP_ResultEntry(void)
851 {
852 zend_class_entry ce, *class_entry;
853
854 INIT_NS_CLASS_ENTRY(ce, "LDAP", "ResultEntry", NULL);
855 class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_FINAL|ZEND_ACC_NO_DYNAMIC_PROPERTIES|ZEND_ACC_NOT_SERIALIZABLE);
856
857 return class_entry;
858 }
859