Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/nslcd/myldap.c
Commit message (Collapse)AuthorAgeFilesLines
* various typo and other comment fixes (4b01125, b0785de, ↵Arthur de Jong2013-04-281-4/+4
| | | | | | bfdf7cd, 4689d5f, dba048b, ebe5705 and 122c38d from 0.9) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-0.8@1950 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix memory leak in myldap_get_values_len() when using ↵Arthur de Jong2013-02-231-0/+6
| | | | | | ranged attributes (very unlikely to occur) (r1910 from 0.9) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-0.8@1933 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix a problem in memory handling in ↵Arthur de Jong2013-02-231-2/+4
| | | | | | myldap_get_values_len() if malloc() would fail (r1909 from 0.9) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-0.8@1932 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix logic error (use && instead of & for logical and) ↵Arthur de Jong2012-12-201-1/+1
| | | | | | (r1868 from trunk) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-0.8@1869 ef36b2f9-881f-0410-afb5-c4e39611909c
* to only set LDAP_OPT_X_SASL_NOCANON if the ↵Arthur de Jong2012-11-131-2/+5
| | | | | | sasl_canonicalize option is explicitly set in the configuration file git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1824 ef36b2f9-881f-0410-afb5-c4e39611909c
* log connection message before clearing error indicators ↵Arthur de Jong2012-11-111-3/+3
| | | | | | to not hide these log messages in most configurations (fixes r1095) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1814 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix logic error when falling back to getting ranged ↵Arthur de Jong2012-09-161-1/+4
| | | | | | attribute values for possibly binary attributes (thanks scan-build) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1770 ef36b2f9-881f-0410-afb5-c4e39611909c
* swap values and buf assignment to avoid compiler ↵Arthur de Jong2012-09-161-3/+3
| | | | | | alignment warnings git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1769 ef36b2f9-881f-0410-afb5-c4e39611909c
* provide an alternative do_rebind() for Netscape LDAPArthur de Jong2012-09-011-0/+29
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1745 ef36b2f9-881f-0410-afb5-c4e39611909c
* remove variable definition that was introduced in r1626 ↵Arthur de Jong2012-08-141-1/+0
| | | | | | but should have been removed in r1714 git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1734 ef36b2f9-881f-0410-afb5-c4e39611909c
* introduce a sasl_canonicalize option that will now, by ↵Arthur de Jong2012-08-141-0/+4
| | | | | | default, disable reverse host name lookups in OpenLDAP git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1733 ef36b2f9-881f-0410-afb5-c4e39611909c
* remove duplicate getting of LDAP_OPT_DIAGNOSTIC_MESSAGE ↵Arthur de Jong2012-07-081-5/+0
| | | | | | (should have been part of r1639) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1714 ef36b2f9-881f-0410-afb5-c4e39611909c
* get rid of a few compiler warnings on FreeBSDArthur de Jong2012-05-181-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1693 ef36b2f9-881f-0410-afb5-c4e39611909c
* always try to log the ldap error, the diagnostic message ↵Arthur de Jong2012-03-161-42/+68
| | | | | | and errno if available in a consistent format git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1639 ef36b2f9-881f-0410-afb5-c4e39611909c
* remove extra newline from log messageArthur de Jong2012-03-051-4/+4
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1627 ef36b2f9-881f-0410-afb5-c4e39611909c
* provide more detailed logging information for ↵Arthur de Jong2012-03-051-3/+11
| | | | | | ldap_start_tls_s() failures (based on a patch by Mel Flynn) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1626 ef36b2f9-881f-0410-afb5-c4e39611909c
* log the first 10 search results in debug mode to make ↵Arthur de Jong2012-02-291-1/+16
| | | | | | debugging easier (patch by Matthijs Kooijman) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1625 ef36b2f9-881f-0410-afb5-c4e39611909c
* Warn if ldap_set_option() fails for LDAP_OPT_ERROR_NUMJakub Hrozek2012-01-091-4/+8
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1593 ef36b2f9-881f-0410-afb5-c4e39611909c
* Fix a typo in disconnect logicJakub Hrozek2011-12-091-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1560 ef36b2f9-881f-0410-afb5-c4e39611909c
* move LDAP_DEPRECATED and LDAP_REFERRALS to configure.ac ↵Arthur de Jong2011-08-301-6/+0
| | | | | | to ensure that tests from configure see the same API git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1529 ef36b2f9-881f-0410-afb5-c4e39611909c
* pass a statically allocated callback structure to ↵Arthur de Jong2011-08-271-1/+2
| | | | | | OpenLDAP because it doesn't make it's own copy (thanks Jakub Hrozek) (fixes a problem in r1490) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1522 ef36b2f9-881f-0410-afb5-c4e39611909c
* set the socket timeout in a connection callback to avoid ↵Arthur de Jong2011-08-071-27/+75
| | | | | | timeout issues during the SSL handshake (based on a patch by Stefan Völkel) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1490 ef36b2f9-881f-0410-afb5-c4e39611909c
* implementation of myldap_get_values_len() to use ↵Arthur de Jong2011-08-051-1/+104
| | | | | | ldap_get_values_len() instead of ldap_get_values() to fix some problems with binary data in returned attribute values (patch by Wesley Mason) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1485 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix r1468Arthur de Jong2011-06-051-2/+2
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1470 ef36b2f9-881f-0410-afb5-c4e39611909c
* simplify and correct find_rdn_value() to handle ↵Arthur de Jong2011-06-051-4/+3
| | | | | | splitting attribute and value correctly git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1468 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix problem with partial attribute name matches in DN ↵Arthur de Jong2011-05-211-0/+1
| | | | | | (e.g. uid vs. uidNumber) (thanks to Timothy White for the fix) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1464 ef36b2f9-881f-0410-afb5-c4e39611909c
* report correct reported error from ldap_abandon()Arthur de Jong2011-04-221-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1431 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix problem with endless loop on incorrect passwordArthur de Jong2011-03-111-4/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1388 ef36b2f9-881f-0410-afb5-c4e39611909c
* include definition of rc in all code paths because it's ↵Arthur de Jong2011-01-011-3/+1
| | | | | | used most of the time git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1362 ef36b2f9-881f-0410-afb5-c4e39611909c
* try to update the shadowLastChange attribute of a user ↵Arthur de Jong2010-12-261-0/+12
| | | | | | on password change (the update is only tried if the attribute is present to begin with) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1345 ef36b2f9-881f-0410-afb5-c4e39611909c
* pass the ld to do_bind() instead of the session to use ↵Arthur de Jong2010-12-121-14/+18
| | | | | | the correct ld from do_rebind() git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1328 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix commentArthur de Jong2010-12-121-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1325 ef36b2f9-881f-0410-afb5-c4e39611909c
* in each worker wake up once in a while to check whether ↵Arthur de Jong2010-12-081-6/+5
| | | | | | any existing LDAP connections should be closed git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1319 ef36b2f9-881f-0410-afb5-c4e39611909c
* call myldap_session_check() before adding a new search ↵Arthur de Jong2010-11-031-2/+2
| | | | | | to the session so the connection actually gets closed on timeout (the connection isn't closed when there are active searches) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1294 ef36b2f9-881f-0410-afb5-c4e39611909c
* set a longer socket timout for the normal connection ↵Arthur de Jong2010-10-151-19/+23
| | | | | | (just in case mostly) and a short one to use when shutting down the connection (also see http://www.openldap.org/its/index.cgi?selectid=6673) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1276 ef36b2f9-881f-0410-afb5-c4e39611909c
* simplify SASL includesArthur de Jong2010-10-141-3/+3
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1271 ef36b2f9-881f-0410-afb5-c4e39611909c
* set timeout options on LDAP socket to avoid problems ↵Arthur de Jong2010-10-121-0/+11
| | | | | | when the LDAP library hangs on a read() (e.g. at ldap_unbind()) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1264 ef36b2f9-881f-0410-afb5-c4e39611909c
* make use of UNUSED() consistent throughout the codeArthur de Jong2010-10-101-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1256 ef36b2f9-881f-0410-afb5-c4e39611909c
* remove variables which are no longer necessary due to r1220Arthur de Jong2010-09-271-2/+0
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1221 ef36b2f9-881f-0410-afb5-c4e39611909c
* remove disabling keepalives since we handle SIGPIPE anywayArthur de Jong2010-09-271-6/+0
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1220 ef36b2f9-881f-0410-afb5-c4e39611909c
* remove ugly empty lineArthur de Jong2010-09-261-1/+0
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1219 ef36b2f9-881f-0410-afb5-c4e39611909c
* add some more error cases which should trigger a disconnectArthur de Jong2010-09-231-1/+3
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1208 ef36b2f9-881f-0410-afb5-c4e39611909c
* handle errors from ldap_result() consistently and also ↵Arthur de Jong2010-09-201-32/+35
| | | | | | retry in case it times out git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1207 ef36b2f9-881f-0410-afb5-c4e39611909c
* add logging to SASL interaction functionArthur de Jong2010-06-191-0/+12
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1154 ef36b2f9-881f-0410-afb5-c4e39611909c
* improve debug logging of SASL bind callsArthur de Jong2010-06-191-4/+14
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1153 ef36b2f9-881f-0410-afb5-c4e39611909c
* make SASL binding code a little earier to readArthur de Jong2010-06-181-16/+12
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1149 ef36b2f9-881f-0410-afb5-c4e39611909c
* remove the use_sasl option and instead rely on sasl_mech ↵Arthur de Jong2010-06-181-1/+1
| | | | | | being specified git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1148 ef36b2f9-881f-0410-afb5-c4e39611909c
* only log "connected to LDAP server" if the previous ↵Arthur de Jong2010-05-091-2/+3
| | | | | | connect failed or we are failing over to a different server git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1095 ef36b2f9-881f-0410-afb5-c4e39611909c
* rename reconnect_maxsleeptime option to reconnect_retrytimeArthur de Jong2010-05-091-4/+4
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1094 ef36b2f9-881f-0410-afb5-c4e39611909c
* don't log errno if it is not set (make error less confusing)Arthur de Jong2010-05-091-6/+9
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1093 ef36b2f9-881f-0410-afb5-c4e39611909c