Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/nss/common.h
Commit message (Collapse)AuthorAgeFilesLines
* return NSS_STATUS_TRYAGAIN on zero-length (but not-NULL) ↵Arthur de Jong2013-04-281-1/+6
| | | | | | buffer (thanks Jakub Hrozek) (f21efd6 from 0.9) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-0.8@1944 ef36b2f9-881f-0410-afb5-c4e39611909c
* refactor the read_result() functions into a common macro ↵Arthur de Jong2012-10-281-43/+4
| | | | | | 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
* 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
* fix indenting of codeArthur de Jong2012-09-031-2/+2
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1748 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
* put both tio_skip() and tio_close() within if (fixes ↵Arthur de Jong2012-03-161-1/+5
| | | | | | r1637) and clarify documentation of one part of the code git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1638 ef36b2f9-881f-0410-afb5-c4e39611909c
* read any remaining available data from the stream when ↵Arthur de Jong2012-03-141-2/+4
| | | | | | closing the connection in a normal way to prevent Broken pipe messages in nslcd git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1637 ef36b2f9-881f-0410-afb5-c4e39611909c
* small code improvementsArthur de Jong2011-03-191-2/+2
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1400 ef36b2f9-881f-0410-afb5-c4e39611909c
* move LDAP_BE() definitionArthur de Jong2010-12-171-3/+0
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-solaris@1335 ef36b2f9-881f-0410-afb5-c4e39611909c
* remove debugging left-oversArthur de Jong2010-12-161-3/+0
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-solaris@1334 ef36b2f9-881f-0410-afb5-c4e39611909c
* switch to a common back-end with a common constructor ↵Arthur de Jong2010-12-161-0/+20
| | | | | | and destructor and put file pointer shared between {set,get,end}ent() calls in there git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-solaris@1333 ef36b2f9-881f-0410-afb5-c4e39611909c
* remove redundant backslashArthur de Jong2010-10-281-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-solaris@1289 ef36b2f9-881f-0410-afb5-c4e39611909c
* switch to using SETs to follow the netgroupsArthur de Jong2010-10-151-12/+0
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-solaris@1281 ef36b2f9-881f-0410-afb5-c4e39611909c
* generate Solaris NSS functions using same macros that ↵Arthur de Jong2010-10-101-37/+59
| | | | | | are used for Glibc, splitting functionality to make a string representation into a single function per NSS map git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-solaris@1258 ef36b2f9-881f-0410-afb5-c4e39611909c
* first attempt to split Solaris and Glibc code more and ↵Arthur de Jong2010-10-031-18/+15
| | | | | | determine NSS flavour in configure script git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-solaris@1236 ef36b2f9-881f-0410-afb5-c4e39611909c
* import Solaris support developed by Ted C. Cheng of ↵Arthur de Jong2010-09-301-0/+14
| | | | | | Symas Corporation merged against SVN head (parts remain to be cleaned up) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-solaris@1232 ef36b2f9-881f-0410-afb5-c4e39611909c
* switch to using nss_status_t throughout the code and ↵Arthur de Jong2010-09-241-2/+2
| | | | | | provide compatibility code to use whatever nss_status type is used on the system git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1214 ef36b2f9-881f-0410-afb5-c4e39611909c
* have more compatibility code for NSS module and move ↵Arthur de Jong2010-06-171-1/+1
| | | | | | compatibility code to compat directory git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1146 ef36b2f9-881f-0410-afb5-c4e39611909c
* implement a global symbol inside the NSS module to allow ↵Arthur de Jong2010-06-141-1/+9
| | | | | | applications to disable NSS lookups over LDAP and use it in nslcd to avoid deadlocks git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1141 ef36b2f9-881f-0410-afb5-c4e39611909c
* make include guard names consistent throughout the ↵Arthur de Jong2010-06-141-3/+3
| | | | | | source and avoid conflicts with system headers git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1140 ef36b2f9-881f-0410-afb5-c4e39611909c
* don't pass an empty parameter to a macroArthur de Jong2009-10-081-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1002 ef36b2f9-881f-0410-afb5-c4e39611909c
* refactor protocol reading and writing macros to the ↵Arthur de Jong2009-05-211-64/+11
| | | | | | common directory, use more logical names and in the PAM module no longer use NSS status codes git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@887 ef36b2f9-881f-0410-afb5-c4e39611909c
* merge r885 from trunkArthur de Jong2009-05-161-5/+12
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@886 ef36b2f9-881f-0410-afb5-c4e39611909c
* merge r882 from trunkArthur de Jong2009-05-091-6/+25
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@883 ef36b2f9-881f-0410-afb5-c4e39611909c
* merge r834 from trunkArthur de Jong2009-04-191-2/+2
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@836 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix comment of return value of NSS_STATUS_TRYAGAINArthur de Jong2008-05-011-4/+2
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@714 ef36b2f9-881f-0410-afb5-c4e39611909c
* do not set errno (and h_errno) if we got the last entry ↵Arthur de Jong2008-02-011-1/+0
| | | | | | from get*ent() (this apparently is needed by coreutils' id and groups commands) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@601 ef36b2f9-881f-0410-afb5-c4e39611909c
* remove the nslcd2nss() function because it's not needed ↵Arthur de Jong2008-02-011-5/+1
| | | | | | with the current protocol git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@597 ef36b2f9-881f-0410-afb5-c4e39611909c
* fail with a permanent error if resetting the stream ↵Arthur de Jong2008-02-011-0/+3
| | | | | | failed to prevent indefinite retries git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@596 ef36b2f9-881f-0410-afb5-c4e39611909c
* only start the NSLCD_ACTION_*_ALL requests with the ↵Arthur de Jong2008-01-031-15/+11
| | | | | | first call to getent() instead of with setent() to avoid unneeded requests if compat is used (except with netgroups) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@556 ef36b2f9-881f-0410-afb5-c4e39611909c
* use the new tio_mark()/tio_reset() functions to support ↵Arthur de Jong2008-01-011-7/+16
| | | | | | retries of the getent() functions when NSS_STATUS_TRYAGAIN would be returned git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@548 ef36b2f9-881f-0410-afb5-c4e39611909c
* implement our own stdio-like library that handles IO ↵Arthur de Jong2007-06-091-11/+12
| | | | | | with a simple configurable timeout mechanism with buffering git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@272 ef36b2f9-881f-0410-afb5-c4e39611909c
* code improvements by making type casts explicit, ↵Arthur de Jong2007-03-041-13/+12
| | | | | | flagging ignored return values, renames and flagging of parameters and some miscelanious improvements (thanks to gcc warnings, splint, rats and flawfinder) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@265 ef36b2f9-881f-0410-afb5-c4e39611909c
* add gcc attributes to some functions and parametersArthur de Jong2007-02-171-2/+5
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@250 ef36b2f9-881f-0410-afb5-c4e39611909c
* ensure that all NSS functions can be generated by the ↵Arthur de Jong2007-01-171-4/+4
| | | | | | marcos in common.h and spell out the read_..() function for every type git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@227 ef36b2f9-881f-0410-afb5-c4e39611909c
* change license from GNU Library General Public License ↵Arthur de Jong2007-01-091-7/+7
| | | | | | v.2 to GNU Lesser General Public License v.2.1 with permission from Luke Howard git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@215 ef36b2f9-881f-0410-afb5-c4e39611909c
* remove trailing spacesArthur de Jong2006-12-171-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@172 ef36b2f9-881f-0410-afb5-c4e39611909c
* get rid of nslcd-client.{c,h} and move it to ↵Arthur de Jong2006-11-271-0/+39
| | | | | | nss/common.{c,h}, this ensures that all code that is needed for the nss part is in the nss directory git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@127 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix bug: the readfn() function was executed twiceArthur de Jong2006-11-191-1/+0
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@100 ef36b2f9-881f-0410-afb5-c4e39611909c
* do some refactoring in the generated code and add some ↵Arthur de Jong2006-11-171-17/+55
| | | | | | documentation on generated code in comments in common.h git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@96 ef36b2f9-881f-0410-afb5-c4e39611909c
* switch to a simpler and more compact framework to ↵Arthur de Jong2006-11-161-3/+37
| | | | | | generate methods (one reader function to deserialize a struct from the stream and auto-generated functions) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@92 ef36b2f9-881f-0410-afb5-c4e39611909c
* just close the stream in case of problems instead of ↵Arthur de Jong2006-11-141-1/+1
| | | | | | calling endent() git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@87 ef36b2f9-881f-0410-afb5-c4e39611909c
* make loop macros common, create macros for expanding ↵Arthur de Jong2006-11-031-0/+37
| | | | | | {set,get,end}ent() functions and implement {set,get,end}aliasent git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@62 ef36b2f9-881f-0410-afb5-c4e39611909c
* always set *errnop correctlyArthur de Jong2006-11-011-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@52 ef36b2f9-881f-0410-afb5-c4e39611909c
* also set file pointer to NULL when closing a stream to ↵Arthur de Jong2006-11-011-2/+5
| | | | | | properly handle reuse of stream git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@43 ef36b2f9-881f-0410-afb5-c4e39611909c
* make code consistent by adding headers, removing ↵Arthur de Jong2006-10-311-0/+26
| | | | | | trailing whitespace and proper ifdefs for header files git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@37 ef36b2f9-881f-0410-afb5-c4e39611909c
* clear up protocol macros while implementing getpwuid() ↵Arthur de Jong2006-10-311-44/+24
| | | | | | and {set,get,end}pwent() functions (last not yet on NSS side) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@34 ef36b2f9-881f-0410-afb5-c4e39611909c
* return read data in struct and fix some marcosArthur de Jong2006-10-301-5/+12
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@28 ef36b2f9-881f-0410-afb5-c4e39611909c
* add some basic minimal NSS code that can be generated ↵Arthur de Jong2006-10-251-0/+44
from macros git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@24 ef36b2f9-881f-0410-afb5-c4e39611909c