Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/nslcd/myldap.c
Commit message (Collapse)AuthorAgeFilesLines
* Implement function for resetting reconnect timesArthur de Jong2013-08-211-0/+22
| | | | | | | | | | This implemens a myldap_immediate_reconnect() function that resets the reconnect timer to retry failing connections to the LDAP server upon the next search. This can be used to cut the reconnect_sleeptime and reconnect_retrytime sleeping periodss short if we have some indication that the LDAP server is available again.
* Rename nscd_invalidate option to reconnect_invalidateArthur de Jong2013-07-261-2/+2
| | | | | This also renames the internal nscd module to invalidator for both nslcd and pynslcd. The new invalidator module is now no longer nscd-specific.
* spelling fixesArthur de Jong2013-03-241-1/+1
|
* start the nscd invalidator and invalidate the nscd cache ↵Arthur de Jong2013-03-091-0/+4
| | | | after reconnecting to the LDAP server after failure
* return the password policy bind information via PAMArthur de Jong2013-03-031-0/+11
|
* request and parse password policy controls when doing ↵Arthur de Jong2013-03-031-6/+206
| | | | user authentication in nslcd
* pass the session along to the do_bind() functionArthur de Jong2013-03-031-8/+8
|
* have myldap_get_ranged_values() return a list of values ↵Arthur de Jong2013-01-121-19/+13
| | | | | | instead of a set git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1912 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix memory leak in myldap_get_values_len() when using ↵Arthur de Jong2013-01-121-0/+6
| | | | | | ranged attributes (very unlikely to occur) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1910 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix a problem in memory handling in ↵Arthur de Jong2013-01-121-2/+4
| | | | | | myldap_get_values_len() if malloc() would fail git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1909 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix typo in commentArthur de Jong2013-01-101-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1906 ef36b2f9-881f-0410-afb5-c4e39611909c
* update FIXMEsArthur de Jong2013-01-051-1/+0
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1901 ef36b2f9-881f-0410-afb5-c4e39611909c
* inline most is_valid_...() functionsArthur de Jong2013-01-051-27/+11
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1898 ef36b2f9-881f-0410-afb5-c4e39611909c
* log and return a diagnostic message instead of just the ↵Arthur de Jong2013-01-011-0/+26
| | | | | | LDAP error on password change failure git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1895 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix setting restart option log message (fixes r1889)Arthur de Jong2013-01-011-2/+2
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1892 ef36b2f9-881f-0410-afb5-c4e39611909c
* remove undocumented restart configuration optionArthur de Jong2012-12-301-4/+2
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1889 ef36b2f9-881f-0410-afb5-c4e39611909c
* reorganise and rename configuration options to be in ↵Arthur de Jong2012-12-301-6/+6
| | | | | | line with manual page git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1888 ef36b2f9-881f-0410-afb5-c4e39611909c
* remove the ldc_ prefix from struct ldap_config fieldsArthur de Jong2012-12-301-82/+82
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1887 ef36b2f9-881f-0410-afb5-c4e39611909c
* update C coding style to a more commonly used styleArthur de Jong2012-12-221-721/+756
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1873 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix logic error (use && instead of & for logical and)Arthur de Jong2012-12-201-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1868 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