Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/nss
Commit message (Collapse)AuthorAgeFilesLines
* Various spelling fixesArthur de Jong2019-09-173-7/+7
|
* Add FreeBSD netgroup supportHWLin2018-08-291-0/+106
| | | | Closes: https://github.com/arthurdejong/nss-pam-ldapd/pull/29
* Avoid some warnings on FreeBSDArthur de Jong2016-08-141-33/+36
| | | | | This adds casts to and from void * for the function pointers that are passed around.
* Provide innetgr function on SolarisArthur de Jong2015-05-091-6/+63
| | | | | | | | This implements a function in the Solaris version of the NSS module to check if a specifc netgroup triplet is part of a netgroup. This also avoids a compiler warning and includes improvements and testing by Mark R Bannister.
* Use correct PIC arg for non-GCC compilersTim Rice2015-03-231-1/+1
|
* Fix for networks lookup under SolarisArthur de Jong2015-03-221-1/+1
| | | | This fixes a byte order issue when nscd is running.
* Various small fixes when using --with-module-nameArthur de Jong2015-03-221-1/+1
| | | | | | | This updates the test framework to support --with-module-name, ensures that exports.map is rebuilt when configure is re-ran, fixes parsing of nsswitch.conf (to determine what to return for passwd lookups) and fixes the check for _nss_ldap_version.
* Also support platforms without TLSArthur de Jong2015-03-221-0/+7
| | | | | | | This disables the use of thread-local storage in the NSS module when it is not available in libc. This results in the get*ent() functions not being thread-safe. However, on most platforms they are not expected to be thread-safe anyway.
* Allow configuration of NSS and PAM namesArthur de Jong2015-01-1916-177/+181
| | | | This introduces the --with-module-name configure option to allow building of NSS and PAM modules with different namespaces than ldap.
* Fix uninitialised variableMark R Bannister2015-01-191-1/+1
| | | | | This fixes a bug in the NSS library when encountering IPv6 addresses in the hosts map.
* Return correct port number on SolarisArthur de Jong2014-06-061-2/+2
| | | | | | This is a small fix for when using nscd (which still does not seem to work completely). The port is stored in network byte order but should be printed in host byte order.
* Use right h_errnop for retrying with larger bufferNalin Dahyabhai2014-03-022-2/+2
| | | | | | | The libc nsswitch code expects h_errno to be set to NETDB_INTERNAL when it needs to try again with a larger buffer. Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com>
* Fix crash when retrieving large networks entriesLukas Slebodnik2014-03-022-4/+0
| | | | | | | | | | | | | If NSS_STATUS_TRYAGAIN is returned from read_one_hostent or read_one_netent then fp will be closed and function tio_skipall will be called with NULL pointer. It could happend in functions: _nss_ldap_getnetbyname_r _nss_ldap_getnetbyaddr_r _nss_ldap_gethostbyname2_r _nss_ldap_gethostbyaddr_r Fixes r548 (aka afd5d9b).
* Fix memory leaks related to set_pop()Arthur de Jong2014-01-051-2/+4
| | | | | | | | | | | | | Some pieces of code did not properly free() the value returned by set_pop(). The leak in group code was related to the introduction of nested group functionality in 41ba574 (merged in 3daa68d) so should only be present in releases 0.9.0 forward. The leak in the netgroup code only ended up in the Solaris version of the NSS module and was introduced in 4ea9ad1 (merged in 5c8779d). This leak is present in all releases from 0.8.0 forward.
* Fix a number of compiler warningsArthur de Jong2013-10-299-14/+16
| | | | | This includes a number of small fixes for issues that were formerly masked by the incorrect AC_LANG_PROGRAM check.
* Use a timeout when skipping remaining result dataArthur de Jong2013-08-301-3/+7
| | | | | | | | When the NSS modules closes the connection and skips any remaining result data, wait for up to 500 msec to read any available data. See: https://bugzilla.redhat.com/show_bug.cgi?id=1003011
* NSS: Return TRYAGAIN on zero-length bufferJakub Hrozek2013-03-191-1/+6
| | | | | | One of our customers was running into a situation where glibc provided a zero buffer, which is a condition that is retriable and the nss module should return NSS_STATUS_TRYAGAIN not NSS_STATUS_UNAVAIL.
* fix the text representation of shadow information for ↵Arthur de Jong2013-03-111-7/+7
| | | | nscd on Solaris
* add missing include statement for NULL definitionArthur de Jong2013-02-271-0/+2
|
* define and export an _nss_ldap_version symbolArthur de Jong2013-02-234-1/+15
|
* use the AX_TLS macro to find correct thread-local ↵Arthur de Jong2013-01-1811-22/+22
| | | | | | storage class compiler directive git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1921 ef36b2f9-881f-0410-afb5-c4e39611909c
* merge NSS_BYNAME and NSS_BYINT32 into NSS_BYGEN and ↵Arthur de Jong2012-12-2311-111/+102
| | | | | | rename to NSS_GETONE git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1876 ef36b2f9-881f-0410-afb5-c4e39611909c
* adapt Solaris netgroup lookup codeArthur de Jong2012-12-231-81/+83
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1875 ef36b2f9-881f-0410-afb5-c4e39611909c
* update the netgroup by name request to have one result ↵Arthur de Jong2012-12-231-22/+46
| | | | | | entry per netgroup with multiple rows within one result git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1874 ef36b2f9-881f-0410-afb5-c4e39611909c
* update C coding style to a more commonly used styleArthur de Jong2012-12-2217-934/+955
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1873 ef36b2f9-881f-0410-afb5-c4e39611909c
* also no longer use NSS_BYINT32() in Solaris (fixes r1864)Arthur de Jong2012-12-163-9/+9
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1867 ef36b2f9-881f-0410-afb5-c4e39611909c
* switch protocol from host byte order to network byte ↵Arthur de Jong2012-12-166-27/+23
| | | | | | order and switch use of uid_t and gid_t in the protocol to int32 git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1864 ef36b2f9-881f-0410-afb5-c4e39611909c
* properly initialise passwd.pw_class on FreeBSD to empty ↵Arthur de Jong2012-11-181-0/+4
| | | | | | string (was set to NULL due to the memset which was introduced in r1767) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1833 ef36b2f9-881f-0410-afb5-c4e39611909c
* refactor the read_result() functions into a common macro ↵Arthur de Jong2012-10-2811-319/+125
| | | | | | and move all the Solaris-specific definitions to solnss.h git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1812 ef36b2f9-881f-0410-afb5-c4e39611909c
* combine read_hostent_erronempty() and ↵Arthur de Jong2012-10-281-67/+31
| | | | | | read_hostent_nextonempty() into a read_hostent() with a retry parameter git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1811 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix typo (thanks Ted C. Cheng)Arthur de Jong2012-10-281-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1810 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix buffer size checking in group by member NSS function ↵Arthur de Jong2012-10-261-1/+9
| | | | | | on Solaris git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1809 ef36b2f9-881f-0410-afb5-c4e39611909c
* introduce ent2str() functions for each database (except ↵Arthur de Jong2012-10-2610-364/+416
| | | | | | ether and netgroup) and make buffer handling consistent (for Solaris) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1808 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix a problem on Solaris (fixes r1793)Arthur de Jong2012-10-211-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1805 ef36b2f9-881f-0410-afb5-c4e39611909c
* do not clear the netgroup struct because it contains ↵Arthur de Jong2012-10-141-1/+0
| | | | | | information for others as well (fixes r1767) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1796 ef36b2f9-881f-0410-afb5-c4e39611909c
* include missing definition (fixes r1793)Arthur de Jong2012-10-131-0/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1794 ef36b2f9-881f-0410-afb5-c4e39611909c
* do proper range checking and replace READ_RESULT macro ↵Arthur de Jong2012-10-131-30/+28
| | | | | | with read_result function (Solaris) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1793 ef36b2f9-881f-0410-afb5-c4e39611909c
* return correct error for buffer too small (Solaris)Arthur de Jong2012-10-131-1/+4
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1792 ef36b2f9-881f-0410-afb5-c4e39611909c
* in ether handling only write to output values and return ↵Arthur de Jong2012-10-131-6/+7
| | | | | | correct error for buffer too small git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1791 ef36b2f9-881f-0410-afb5-c4e39611909c
* on Solaris initialise the output valuesArthur de Jong2012-10-131-2/+15
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1790 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix code indentationArthur de Jong2012-10-131-2/+2
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1789 ef36b2f9-881f-0410-afb5-c4e39611909c
* clear the *ent structs before writing fields to avoid ↵Arthur de Jong2012-09-1511-1/+12
| | | | | | problems with extra fields (fixes password field weirdness on Solaris 10) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1767 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix host name lookups for Solaris (tested with Solaris 10)Arthur de Jong2012-09-141-75/+52
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1766 ef36b2f9-881f-0410-afb5-c4e39611909c
* use the standard constructor and destructor eventhough ↵Arthur de Jong2012-09-141-13/+2
| | | | | | be->fp isn't used git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1765 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix ethernet lookups for Solaris (tested with Solaris 10)Arthur de Jong2012-09-141-39/+39
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1764 ef36b2f9-881f-0410-afb5-c4e39611909c
* a few fixes in the Solaris group lookupsArthur de Jong2012-09-031-4/+3
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1749 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix indenting of codeArthur de Jong2012-09-032-3/+3
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1748 ef36b2f9-881f-0410-afb5-c4e39611909c
* on Solaris store the errno value in NSS_ARGS(args)->erangeArthur de Jong2012-09-0310-47/+44
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1747 ef36b2f9-881f-0410-afb5-c4e39611909c
* get rid of a few compiler warnings on FreeBSDArthur de Jong2012-05-181-5/+3
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1693 ef36b2f9-881f-0410-afb5-c4e39611909c
* split the functionality to read everything from the ↵Arthur de Jong2012-04-261-2/+2
| | | | | | stream into a separate function and don't assume we use non-blocking IO (fix r1637) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1659 ef36b2f9-881f-0410-afb5-c4e39611909c