Commit Graph

194 Commits

Author SHA1 Message Date
foobar
96e9ed33b3 The last 4 args are by ref.. 2003-08-05 11:54:01 +00:00
Zeev Suraski
538d58dd5f Use new infrastructure.
There are bound to be some messups, please report build/runtime bugs!
2003-08-03 17:44:39 +00:00
foobar
bb37952bc2 Fixed the SASL config check. 2003-06-13 13:30:46 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
foobar
c0e4bfcae4 - Added ldap_sasl_bind(). (Jani, peter_c60@hotmail.com) 2003-06-08 23:44:01 +00:00
foobar
c15b8fb19e ws & cs 2003-06-08 23:34:51 +00:00
Ilia Alshanetsky
8a09151f5e emalloc -> safe_emalloc 2003-04-30 21:53:53 +00:00
Ilia Alshanetsky
20c2c39f3c Fixed bug #22585 (Do not terminate the script on minor errors). 2003-03-07 14:03:53 +00:00
foobar
3c9155e0cb Renamed OnUpdateInt -> OnUpdateLong to prevent further misunderstandings.
# Intentionally left out any 'alias' for it, this way 3rd party extension
# maintainers will really NOTICE the change.
2003-03-07 05:15:28 +00:00
David Hill
5c90216d2c 64-bit correction to variables passed to zend_parse_parameters
@64-bit correction to variables passed to zend_parse_parameters (Dave)
2003-03-06 23:07:28 +00:00
Wez Furlong
0a18a9d744 A add much more useful select(2) implementation than is provided by
windows sockets.  The winsock implementation will only work with sockets;
our implementation works with sockets and file descriptors.
By association, stream_select() will now operate correctly with files, pipes and sockets.

This change required linking against the winsock2 library.  In terms of
compatibility, only older versions of windows 95 do not have winsock2
installed by default.  It is available as a redistributable file, and is most likely installed by any OS patches (eg: Internet Explorer) applied by the user.

Also, add a win32 compatible pipe test when opening a stream from a pipe.  This test will only work on NT, win2k and XP platforms.  Without this test, interleaved fread() and select() calls would cause the read buffer to be clobbered.  I will be working on a fix for this issue for win9x.
2003-02-16 03:48:49 +00:00
Ilia Alshanetsky
aebb39b014 Changed php_error to php_error_docref.
Thanks to Marcus Börger for writing a script that significantly simplifies
this process.
2003-01-18 21:31:11 +00:00
Ilia Alshanetsky
984c0918ab Removed pointless memory allocation checks. 2003-01-18 20:10:23 +00:00
Sebastian Bergmann
b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Edin Kadribasic
ce2b880a53 Fixed win32 build by including missing stddef.h 2002-11-05 14:18:20 +00:00
Ilia Alshanetsky
4332612812 Fixed a memory leak on ldap_connect() failure. 2002-10-30 18:12:34 +00:00
Anantha Kesari H Y
ad844f0b1b NetWare related additions/modifications 2002-09-05 11:22:20 +00:00
Rasmus Lerdorf
f50df31d7f bool not boolean 2002-08-13 04:44:45 +00:00
Stig Venaas
dddf235671 Made ldap_connect/bind/unbind() use zend_parse_parameters() 2002-08-05 21:14:14 +00:00
Stig Venaas
910e6275d4 Hopefully fixes build with IBM's LDAP library 2002-07-09 20:54:49 +00:00
Derick Rethans
7115041c92 - More error messages cleanup 2002-06-30 11:14:27 +00:00
Derick Rethans
a954dd6ee9 - Remove \n 2002-06-27 06:24:26 +00:00
Derick Rethans
2d1b304781 - Unify error messages 2002-06-26 06:49:25 +00:00
Stig Venaas
58ce28e588 Better not include ldap_parse_result() and ldap_start_tls() at all in
the symbol table when they are not usable. Makes it possible to check
on their usability.
2002-06-22 15:41:39 +00:00
Stig Venaas
c83f5a530d Added test for ldap_start_tls_s() 2002-06-22 11:41:36 +00:00
Markus Fischer
d01f7a8a52 - Fix ZTS build, see #17915. 2002-06-21 22:22:46 +00:00
Stig Venaas
d47d8b99c5 Reworked result resource handling so that result is not freed until all
its result entry resources are freed
@- Fixed resource bug in LDAP extension. (Stig Venaas)
2002-05-04 14:27:48 +00:00
Derick Rethans
e31793414d Fix TSRMLS_CC thingies. 2002-04-23 19:01:31 +00:00
Sebastian Bergmann
90613d2282 Maintain headers. 2002-02-28 08:29:35 +00:00
Markus Fischer
8b2dcb33b7 - Fix protos. 2002-02-11 02:48:49 +00:00
Stig Venaas
2ac2b22c9b Made ldap_modify() an alias for ldap_mod_replace(). The two were identical.
#For more info, see my posting on php-dev Dec 25th.
2002-01-04 20:56:03 +00:00
Stig Venaas
403350e41d unbreak parallel search 2001-12-26 18:40:57 +00:00
Stig Venaas
a05e74cd29 Added check for ldap_parse_reference() (needed for broken Solaris 2.8), and
report more detailed library version info in the info function.
2001-12-25 14:36:06 +00:00
Stig Venaas
ed942af693 Made ldap_set_option work with NULL as link, added option
LDAP_OPT_DEBUG_LEVEL for those that support it, and made sure the rebind
code is currently included for OpenLDAP only.
2001-12-23 16:32:06 +00:00
Sebastian Bergmann
38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
Andi Gutmans
67122717a4 - Nuke REGISTER_MAIN_*. Extension maintainers please make sure I didn't
- change something I wasn't supposed to. It should be fine IMO.
2001-12-03 20:54:23 +00:00
Stig Venaas
80d8e554d3 ldap_first_attribute and ldap_next_attribute has been completely broken
for 6 months!! Fixed (I think), might be a memory leak there...
2001-11-30 23:37:43 +00:00
Stig Venaas
088c7a6044 Adding ldap_set_rebind_proc() for APIs with V3 3 arg variant, need more
testing.
2001-11-29 20:26:20 +00:00
Stig Venaas
ce4c65a60d Making the link resource point to a structure that contains the LDAP
link, rather than point to it directly.
# This makes it much easier to store and retrieve per-connection PHP state.
2001-11-29 20:17:17 +00:00
Stig Venaas
2ea46ef6cc Added ldap_sort() function
@- Added ldap_sort() function. (Stig Venaas)
2001-11-21 20:14:17 +00:00
Stig Venaas
3dd9845e98 Fixed some memory leaks and removed some unnecessary checks due to
ZEND_FETCH_RESOURCE returning on error
2001-11-14 22:05:33 +00:00
Stig Venaas
80ccb3f7f7 Minor changes in ldap_connect(): fixed crash with OpenLDAP 2 libs when
called without args and also use ldap_init() rather than ldap_open();
simplified code a little
2001-11-13 18:05:47 +00:00
Stig Venaas
ca476ecaa4 Removed some old cruft (some commented code and non-used globals), fixed
a proto typo, and make sure ldap_base_dn and ldap_filter are initialized
in php_ldap_do_search()
2001-11-13 17:10:08 +00:00
Stig Venaas
92843788fa Fixed seg fault when using ldap_add (or modify) with value array not
indexed as 0, 1, ... In some cases it didn't give seg fault, but used
previously added value. Now gives warning.
@- Made ldap_add (and modify) give warning with illegal value arrays.
@  Previously seg faulted or added wrong value (Stig Venaas)
2001-11-05 11:50:52 +00:00
Stig Bakken
689252082c * zend_module_entry change: apino, debug and zts are moved first,
see README.EXTENSIONS file for upgrade help.
@Introduced extension version numbers (Stig)
2001-10-11 23:33:59 +00:00
Stig Venaas
de894ef098 Added ldap_start_tls() function
@- Added ldap_start_tls() function (Stig Venaas, patch by kuenne@rentec.com)
2001-10-09 21:14:14 +00:00
Jeroen van Wolffelaar
6cfba2a3ea 2nd phase in back-substitution those macro's
I've got pretty much everything now...
2001-09-25 22:49:04 +00:00
Jeroen van Wolffelaar
c033288573 Back-substitute for Z_* macro's. If it breaks some extension (the script isn't optimal, it parses for example var->zval.value incorrect) please let me know. 2001-09-25 21:58:48 +00:00
Stig Venaas
7d2a912335 Not using _free_ldap_result destructor for le_result_entry, leads to
crashes due to freeing same memory several times in some cases
2001-09-19 19:43:59 +00:00
Derick Rethans
78747bd2df - Don't wrap lines... this is annoying while coding. 2001-09-09 13:29:31 +00:00
Zeev Suraski
f6f6c4d7e6 Whitespace 2001-08-11 16:39:07 +00:00
Zeev Suraski
1159c84ab7 - TSRMLS_FETCH work
- whitespace fixes
2001-08-05 01:43:02 +00:00
Zeev Suraski
aa1772ca72 More TSRMLS_FETCH annihilation 2001-07-31 05:44:11 +00:00
Zeev Suraski
d87cc976e1 Redesigned thread safety mechanism - nua nua 2001-07-28 11:36:37 +00:00
Stig Venaas
eabe8fcf8d Fixed memory leaks in ldap_get_entries() and ldap_get_dn() when using
RFC1823 API
# These leaks have always been there, will fix in PHP3
@- Fixed various memory leaks in the LDAP extension (Stig Venaas)
2001-07-15 11:12:28 +00:00
Stig Venaas
4172edad96 Fixed memory leak in ldap_first_attribute(), ldap_next_attribute(),
ldap_get_attributes(), ldap_get_dn() and ldap_dn2ufn() when using post
RFC 1823 API. Still more leaks to fix.
2001-06-23 13:43:20 +00:00
Stig Venaas
399885cddb Fixed memory leak in ldap_get_entries() when using post RFC 1823 API.
Similar problems for other functions will be fixed
2001-06-20 21:12:55 +00:00
Rasmus Lerdorf
81e2cf03ac Fix folding and clean up some extensions 2001-06-06 13:06:12 +00:00
Rasmus Lerdorf
25c3a3a39d vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
2001-06-05 13:12:10 +00:00
foobar
334ac7fc94 - Cleaned up some whitespace (sorry, I should have committed that before
any other changes)
- Made use of the Zend resource macros
2001-05-31 21:09:30 +00:00
Rasmus Lerdorf
1d115dbe8c ldap_result_entry needs to be initialized - tested
Should probably MFH this once someone else tests.
2001-05-30 15:09:20 +00:00
Stig Bakken
1beda9ee1e * include "config.h" if HAVE_CONFIG_H is defined (for standalone dso build) 2001-05-24 10:07:29 +00:00
Andi Gutmans
eb6ba01d1c - Fix copyright notices with 2001 2001-02-26 06:11:02 +00:00
Stig Venaas
c927c254dd Making parallel search allow different filter for each link 2001-01-17 13:43:39 +00:00
Stig Venaas
d9f52a4176 Fixed memory leaks that could happen in some error situations. Also removed
some unnecessary code in ldap_set_option()
2001-01-13 10:00:27 +00:00
Stig Venaas
2d17c57664 Added parallel search when given array of link identifiers
@- Made ldap_list(), ldap_read() and ldap_search() do parallel search when
@  first parameter is an array of link identifiers (Stig Venaas)
2001-01-12 22:08:26 +00:00
Egon Schmid
40a71cfdc7 Corrected some protos. 2001-01-08 18:31:59 +00:00
Stig Venaas
897f293d13 Added ldap_rename(). Currently requires API with ldap_rename().
@- Added ldap_rename() function (Stig Venaas)
2001-01-08 18:13:08 +00:00
Stig Venaas
0ecaf2eac6 Minor changes to LDAP_OPT constants, and added support for controls to
ldap_set_option.
@- Made ldap_set_option() support controls (Stig Venaas)
2001-01-07 21:18:02 +00:00
Stig Venaas
1b3385cad8 Added LDAPv3 stuff. ldap_search() now treats LDAP_ADMINLIMIT_EXCEEDED like
LDAP_SIZELIMIT_EXCEEDED and returns referral results.
Added new functions ldap_parse_result(), ldap_first_reference(),
ldap_next_reference() and ldap_parse_reference() that among other things
make referrals and search references accessible.
@- Changed ldap_search() and added functions ldap_parse_result(),
@  ldap_first_reference(), ldap_next_reference() and ldap_parse_reference()
@  to cope with LDAPv3 stuff like referrals and references. (Stig Venaas)
2001-01-07 13:03:11 +00:00
Zeev Suraski
aa6d2ac5d0 Heads up people!
Updated the get_current_key() API - the relevant authors, please take
a look at the updated code and make sure it's ok...
2000-12-22 12:57:09 +00:00
foobar
f48c0fbc95 @- Made ldap_get_entries() return an array even if there are no entries
in search result. (Jani)
# This was actually the original behaviour and the correct one.
# I messed it up when I fixed another bug in it a while ago..
# Fixes bug #8054
2000-12-04 17:07:27 +00:00
foobar
dd83069fff Fixed bug: #7768. Some cleaning up too. 2000-11-13 02:02:40 +00:00
foobar
6f398a247d Fixed incorrect logic. And NSLDAP does not have LDAP_OPT_MATCHED_DN. 2000-11-03 22:53:49 +00:00
foobar
ac7e22d3c4 Fix for bug #7416. ldap_set|get_option() are also in NSLDAP SDKs. 2000-10-28 19:22:46 +00:00
Andrei Zmievski
f1dcb32c9f Use zend_register_list_destructors_ex() instead. 2000-10-25 17:44:02 +00:00
Stig Venaas
5741816315 Corrected prototype comments for ldap_get_option and ldap_set_option 2000-10-22 11:25:47 +00:00
Stig Venaas
094d01148a Made ldap_connect() accept URL in host parameter when using OpenLDAP 2.x.
@- Made ldap_connect() accept URL in host parameter when using OpenLDAP
@  2.x. To use SSL, use ldaps://host/ as URL. (Stig Venaas)
2000-10-20 20:22:59 +00:00
Andrei Zmievski
7b4983c8f8 Mega-patch to get better resource information for modules.
* Fixed a bug in zend_rsrc_list_get_rsrc_type()
  * Switched register_list_destructors() to use
    zend_register_list_destructors_ex() instead
  * Updated all relevant modules to provide the resource type name
    to register_list_destructors() call
  * Updated var_dump() to output resource type name instead of number

@- Made resource type names visible, e.g. var_dump() and
@  get_resource_type() display "file" for file resources. (Andrei)
2000-10-20 18:25:16 +00:00
Stig Venaas
2da9a94d38 Added destruction of return value parameter, and using ZVAL_LONG and
ZVAL_STRING to set return value in ldap_get_option.
2000-10-18 07:47:51 +00:00
Stig Venaas
ffbd2367e7 Added ldap_get_option() and ldap_set_option() functions
@- Added ldap_get_option() and ldap_set_option() functions (Stig Venaas)
2000-10-17 16:06:04 +00:00
Stig Venaas
0b59e4b821 Removed some redundant convert_to_*_ex() calls. Edited some whitespace. 2000-10-17 15:51:04 +00:00
Stig Venaas
6910e92132 removed some NSLDAP #if's giving more detailed error reporting 2000-08-31 16:14:35 +00:00
Stig Venaas
0435c2e306 Makes it work with OpenLDAP 2.0 and reduces number of ifdefs 2000-08-26 16:20:37 +00:00
Stig Venaas
4d6f3b40a7 Added Oracle LDAP SDK SSL support 2000-08-20 18:47:14 +00:00
Rui Hirokawa
635532053e fixed for openldap 2.0beta. 2000-08-07 03:18:00 +00:00
foobar
5356c100ee - This should fix bug #5964
# Could someone please check this out..it works as intented for me at least.
# But I don't have any Windoze machines available to test this there.
2000-08-04 17:18:54 +00:00
foobar
a4a0e18ec4 - Added two new functions: ldap_t61_to_8859() and ldap_8859_to_t61().
These functions are available only when using openldap which is compiled
  with STR_TRANSLATION and LDAP_CHARSET_8859 defined in ldap_cdefs.h (Jani)
2000-08-02 13:11:46 +00:00
foobar
7c84d6a082 Fixes bug which caused crash, if result_entry wasn't valid. 2000-07-28 22:39:22 +00:00
foobar
9f25b9c1f7 # Oops..where did those creep in? =( 2000-07-28 21:48:16 +00:00
foobar
40b89f34fb @- Made ldap_add(), ldap_modify(), ldap_mod_add(), ldap_mod_replace()
@  binary-safe. Original patch: Terrence Miao <terrence_miao@email.com> (Jani)
#Thanks go to Terrence for making a patch correcting this bug in php3.0.12...
#A patch, which somehow wasn't included at all in it?-) I wonder why..?
2000-07-28 21:31:02 +00:00
foobar
c8b8281e22 @- Fixed bug in ldap_get_values_len() which makes it NULL-safe. (Jani)
@  Bug-report and fix submitted by Michel Alexeline <alexel@dr15.cnrs.fr>
# Plus I added missing ldap_value_free_len().
2000-07-28 00:09:33 +00:00
Egon Schmid
9bb4011d06 Proto fixed. 2000-07-26 11:28:14 +00:00
foobar
123d745249 @- Added new function: ldap_compare(). (Jani)
# Documentation is coming right after this.
2000-07-26 11:01:44 +00:00
foobar
e5f6dcb9c2 @- Fixed a bug in ldap_get_entries() and ldap_get_attributes. (Jani)
Fixes bugs #5433 and #5603.
2000-07-25 15:34:28 +00:00
foobar
428eb46f78 It's better not touch those ldap->ld_* when they aren't given as parameters.
(Now using -1 the parameters not wanted can be omitted)
# Plus some source-polishing.
2000-07-23 21:32:02 +00:00
foobar
01d5aec3aa Forgot those constants. 2000-07-22 00:34:22 +00:00
foobar
549aec4500 @- Added four additional arguments: attrsonly, sizelimit, timelimit, deref which
@  were missing in ldap_search(), ldap_list() and ldap_read() functions (Jani)
@- Fixed a bug in ldap_search/list/read() which prevented returning the partial
@  results when 'Sizelimit exceeded' error occurred. (Jani Taskinen)

# And nuked some compile time warnings. Took a while to get this commit message
# written..I hope I got it right. =)
2000-07-21 19:00:21 +00:00
Thies C. Arntzen
9eb2c1efb1 @- Fixed a possible crash in the LDAP modify code. (Eric Kilfoil) 2000-06-27 09:28:05 +00:00
Egon Schmid
dd43255b27 More protos. 2000-06-18 19:18:30 +00:00