Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* fix the description of the tio_time_remaining() functionArthur de Jong2013-03-091-2/+3
|
* update the trimming expressions code to follow the new ↵Arthur de Jong2013-03-031-44/+26
| | | | coding style
* allow trimming expressions with ${foo#bar} syntax in nslcdThorsten Glaser2013-03-031-0/+62
|
* restructure timeout calculation in tio to reduce the ↵Arthur de Jong2013-01-181-41/+30
| | | | | | number of times gettimeofday() is called git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1923 ef36b2f9-881f-0410-afb5-c4e39611909c
* log hex values when debugging the protocolArthur de Jong2013-01-051-3/+3
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1896 ef36b2f9-881f-0410-afb5-c4e39611909c
* update C coding style to a more commonly used styleArthur de Jong2012-12-2210-575/+601
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1873 ef36b2f9-881f-0410-afb5-c4e39611909c
* switch protocol from host byte order to network byte ↵Arthur de Jong2012-12-161-20/+26
| | | | | | 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
* update microseconds when setting deadline, not seconds ↵Arthur de Jong2012-12-081-1/+1
| | | | | | (thanks Julien Cristau) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1848 ef36b2f9-881f-0410-afb5-c4e39611909c
* make test even more verbose and set number of writes ↵Arthur de Jong2012-12-061-1/+1
| | | | | | back at 10000 to avoid issues with systems with large buffers git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1846 ef36b2f9-881f-0410-afb5-c4e39611909c
* set FD_CLOEXEC in NSS and PAM modules to ensure that ↵Arthur de Jong2012-11-111-0/+6
| | | | | | nslcd file descriptor is not leaked to child processes git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1821 ef36b2f9-881f-0410-afb5-c4e39611909c
* allow attribute options in attribute mapping expressionsArthur de Jong2012-10-191-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1803 ef36b2f9-881f-0410-afb5-c4e39611909c
* use poll() instead of select() for checking file ↵Arthur de Jong2012-10-123-102/+50
| | | | | | descriptor activity to also correctly work if more than FD_SETSIZE files are already open git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1783 ef36b2f9-881f-0410-afb5-c4e39611909c
* check if the file descriptor can be stored in the ↵Arthur de Jong2012-10-121-0/+15
| | | | | | select() file descriptor set git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1781 ef36b2f9-881f-0410-afb5-c4e39611909c
* provide a compatibility definition of SUN_LEN() for ↵Arthur de Jong2012-05-091-1/+2
| | | | | | systems that lack it git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1686 ef36b2f9-881f-0410-afb5-c4e39611909c
* split the functionality to read everything from the ↵Arthur de Jong2012-04-262-12/+28
| | | | | | 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
* read any remaining available data from the stream when ↵Arthur de Jong2012-03-142-4/+35
| | | | | | 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
* ensure that we don't try to read more than SSIZE_MAX bytesArthur de Jong2012-03-141-2/+9
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1636 ef36b2f9-881f-0410-afb5-c4e39611909c
* pass the correct size of named socket address (fixes ↵Arthur de Jong2012-01-171-1/+1
| | | | | | FreeBSD issue, fixes r1295) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1596 ef36b2f9-881f-0410-afb5-c4e39611909c
* handle expressions where the expander function returns ↵Arthur de Jong2011-06-051-0/+4
| | | | | | NULL (handle it as an empty string) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1471 ef36b2f9-881f-0410-afb5-c4e39611909c
* switch variable expander function type name because _t ↵Arthur de Jong2011-05-132-7/+7
| | | | | | suffix is reserved git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1458 ef36b2f9-881f-0410-afb5-c4e39611909c
* tv_usec in struct timeval must be lower than 1000000 ↵Arthur de Jong2011-03-311-1/+1
| | | | | | (patch by SATOH Fumiyasu) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1421 ef36b2f9-881f-0410-afb5-c4e39611909c
* small code improvementsArthur de Jong2011-03-191-1/+2
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1400 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix a problem in the timeout paramater that was being ↵Arthur de Jong2011-03-141-1/+1
| | | | | | passed to select() and could contain too many µsec (fixes Solaris runtime issue) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1393 ef36b2f9-881f-0410-afb5-c4e39611909c
* update copyright headers to add missing yearsArthur de Jong2011-03-101-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1384 ef36b2f9-881f-0410-afb5-c4e39611909c
* return connection reset when connection was closed by ↵Arthur de Jong2010-12-261-1/+6
| | | | | | the other end git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1344 ef36b2f9-881f-0410-afb5-c4e39611909c
* pass the actual size of the address family and the path ↵Arthur de Jong2010-11-041-1/+1
| | | | | | length to bind() and connect() for named sockets git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1295 ef36b2f9-881f-0410-afb5-c4e39611909c
* implement dict_getany() and set_pop() functions to be ↵Arthur de Jong2010-10-154-1/+35
| | | | | | able to pick and remove entries git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1279 ef36b2f9-881f-0410-afb5-c4e39611909c
* make DICTs and SETs case-sensitiveArthur de Jong2010-10-153-16/+14
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1278 ef36b2f9-881f-0410-afb5-c4e39611909c
* also don't expand variables in rest of ${var:+rest} ↵Arthur de Jong2010-08-141-3/+12
| | | | | | expressions if var is not set or empty git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1169 ef36b2f9-881f-0410-afb5-c4e39611909c
* do not expand variables in rest of ${var:-rest} ↵Arthur de Jong2010-08-141-5/+18
| | | | | | expressions if var is not blank or empty git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1168 ef36b2f9-881f-0410-afb5-c4e39611909c
* make include guard names consistent throughout the ↵Arthur de Jong2010-06-145-15/+15
| | | | | | 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
* remove commented out memberOf and ipNetmaskNumber ↵Arthur de Jong2010-06-121-1/+0
| | | | | | attributes and small cleanups git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1138 ef36b2f9-881f-0410-afb5-c4e39611909c
* make logging of buffer checks consistentArthur de Jong2010-05-131-2/+4
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1104 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix typoArthur de Jong2010-02-271-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1068 ef36b2f9-881f-0410-afb5-c4e39611909c
* implement attribute mapping using shell-like expressionsArthur de Jong2009-12-283-2/+252
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1041 ef36b2f9-881f-0410-afb5-c4e39611909c
* WRITE_STRINGLIST(): properly handle the case where the ↵Arthur de Jong2009-12-281-9/+17
| | | | | | list is null (result of change in r1028) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1037 ef36b2f9-881f-0410-afb5-c4e39611909c
* change dict and set API to perform loops with a list of ↵Arthur de Jong2009-12-134-60/+59
| | | | | | strings instead of loop_first() and loop_next() functions git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1028 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix the case where the string passed to WRITE_STRING() ↵Arthur de Jong2009-10-071-3/+3
| | | | | | is an expression git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@999 ef36b2f9-881f-0410-afb5-c4e39611909c
* rename software to nss-pam-ldapdArthur de Jong2009-08-316-6/+6
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@978 ef36b2f9-881f-0410-afb5-c4e39611909c
* remove unneeded EXTRA_DISTArthur de Jong2009-05-291-2/+0
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@905 ef36b2f9-881f-0410-afb5-c4e39611909c
* refactor protocol reading and writing macros to the ↵Arthur de Jong2009-05-293-1/+442
| | | | | | common directory, use more logical names and in the PAM module no longer use NSS status codes (import of r887 from nss-pam-ldapd) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@904 ef36b2f9-881f-0410-afb5-c4e39611909c
* restore the old writing code which masks SIGPIPE on ↵Arthur de Jong2008-06-121-0/+21
| | | | | | platforms that can't use send() git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@758 ef36b2f9-881f-0410-afb5-c4e39611909c
* miscellaneous portability improvementsArthur de Jong2008-06-061-1/+3
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@742 ef36b2f9-881f-0410-afb5-c4e39611909c
* use send() with a flag to ignore SIGPIPE instead of ↵Arthur de Jong2008-05-171-15/+3
| | | | | | write() so we don't have to muck with signal handlers git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@740 ef36b2f9-881f-0410-afb5-c4e39611909c
* add sanity checks to sleep calls to never sleep too long ↵Arthur de Jong2008-05-161-4/+14
| | | | | | (problems could occur when the clock moves backwards) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@738 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix problem where first item in the hashtable could be ↵Arthur de Jong2008-04-231-1/+1
| | | | | | returned twice while looping git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@694 ef36b2f9-881f-0410-afb5-c4e39611909c
* allocate room for key string just after entry to save on ↵Arthur de Jong2008-04-211-72/+12
| | | | | | calls to malloc() and make it simpler git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@691 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix wrapping and indenting of commentsArthur de Jong2008-04-191-19/+18
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@684 ef36b2f9-881f-0410-afb5-c4e39611909c
* implement a set that uses the dict module as back-endArthur de Jong2008-04-193-2/+132
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@681 ef36b2f9-881f-0410-afb5-c4e39611909c
* implement new dict module that uses a hashtable which is ↵Arthur de Jong2008-04-191-92/+252
| | | | | | around 40 times faster for large (around 2000) entries but with around 40% more memory used git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@680 ef36b2f9-881f-0410-afb5-c4e39611909c