summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-01-05Support blanking the member attributeArthur de Jong
This allows remapping the member attribute to an empty string which removes support for that attribute. This can reduce the number of search operations if the attribute is not used.
2014-01-05Fix typoArthur de Jong
2014-01-05Fix memory leaks related to set_pop()Arthur de Jong
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.
2014-01-04Fix compiler warnings in the myldap testArthur de Jong
2014-01-02Only exit nslcd when daemon is readyArthur de Jong
This removes a race condition between the exit of the initial nslcd process (as started by the init script) and nslcd services being ready.
2014-01-02Remove daemon() replacement functionArthur de Jong
2014-01-02Close daemon pipe file descriptor on fork or execArthur de Jong
This tries to avoid child processes ending up with a copy of the pipe file descriptor that is used to signal readiness of the daemon.
2014-01-02Properly daemonise nslcd and only exit when readyArthur de Jong
This introduces a new daemonize module that provides functions for closing all file descriptors, redirecting stdin/stdout/stderr to /dev/null and a function for backgrounding an application while only exiting the original process after the daemon process has indicated readiness. This is used to exit the original process only after the listening socket has been set up and the worker threads have been started.
2013-12-28Re-organise ldap function testsArthur de Jong
2013-12-21Make dn2uid cache tuneableArthur de Jong
This introduces a new cache configuration option that allows setting positive and negative cache lifetimes for the dn2uid cache.
2013-12-21Add a test for new configuration optionArthur de Jong
2013-12-21Document cache option in manual pageArthur de Jong
2013-12-21Use dn2uid cache optionsArthur de Jong
The configuration values are used in the cache to determine positive and negative hit TTLs. This also allows completely disabling the cache.
2013-12-21Implement a cache configuration optionArthur de Jong
This adds the cache nslcd.conf configuration option to configure the dn2uid cache in nslcd with a positive and negative cache lifetime.
2013-12-21Have positive and negative cache timeoutsArthur de Jong
The positive value determines the time a found entry is valid, the negative timeout determines the lifetime of not found entries.
2013-12-21Support printing children search scopeArthur de Jong
This fixes 2caeef4.
2013-12-18Centralise buffer sizesArthur de Jong
Common buffer sizes are now stored centrally so it can be easily and consistently updated if required. Some buffers remain with locally defined sizes that do not match a global buffer size.
2013-11-25Add a test for pam_get_item() argument typeArthur de Jong
This checks whether pam_get_item() takes a const void ** or void ** item value argument and defines a PAM_ITEM_CONST macro that is const when it should. This avoids some compiler warnings.
2013-10-30Get files ready for 0.9.2 releaseArthur de Jong
2013-10-29Portability fixes to environment testsArthur de Jong
This mostly tries to reduce the influences of the test environment (local users and groups) on the tests. This uses another username (vsefcovic) in the PAM tests instead of the user arthur to avoid clashes with existing users. The PAM tests are skipped if passwd claims that it cannot modify LDAP passwords (for FreeBSD).
2013-10-29Fix a number of compiler warningsArthur de Jong
This includes a number of small fixes for issues that were formerly masked by the incorrect AC_LANG_PROGRAM check.
2013-10-29Add -Werror=implicit if compiler supports itArthur de Jong
2013-10-29Fix usage of AC_LANG_PROGRAMArthur de Jong
Apparently the macro got changed a long time ago to provide a main() definition. This bug caused the extra warning flags to not be added.
2013-10-29Compatibility definitions for {set,get,end}usershell()Arthur de Jong
This provides compatibility definitions for systems that don't have these functions (some Solaris flavours).
2013-10-29Start invalidator after locking pidfileArthur de Jong
This causes the pidfile to be written as the first thing after daemonising nslcd to minimise the race between service script completion and pidfile being locked.
2013-10-27Update documentationArthur de Jong
2013-10-27Specify m4 directory in configure scriptArthur de Jong
2013-10-25Also run invalidators on initial connectArthur de Jong
This also invalidates the caches configured with reconnect_invalidate on the first successful search. This should handle the case more gracefully where caches were filled with negative hits before nslcd was running.
2013-10-25Distribute setup_slapd.sh and associated filesArthur de Jong
2013-10-22Improve portability of ldap testArthur de Jong
This supports old ldapsearch commands that don't support the -x and -H options and ldapsearch commands that don't exit with a failure code if nothing is found. This also switches the test_myldap test to use the testenv check for the LDAP server.
2013-10-22Handle other responses in test_pamcmdsArthur de Jong
This extends test_pamcmds to handle other pam/su/passwd errors and responses (as seen on CentOS 5). Also switch to stronger password when changing the test user's password to avoid problems with password strength checks.
2013-10-22Make script to check test environmentArthur de Jong
This changes the in_testenv.sh script into testenv.sh which has more checks and a few functions to configure the test environment.
2013-10-22Remove unnecessary attributes from test.ldifArthur de Jong
2013-10-22Update tests READMEArthur de Jong
This refreshes the documentation of the tests, especially the test environment.
2013-10-22Provide a script for setting up slapdArthur de Jong
The setup_slapd.sh script can be used to set up and start a slapd instance in a single (temporary) directory. The slapd instance is configured and loaded with test data for use in the test environment.
2013-10-22Fix sortgroup functionArthur de Jong
This fixes an issue with the sortgroup function which failed to handle a group line with only two colons correctly. Such group entries have been seen in the wild on FreeBSD. Also, comment lines in group files are now ignored (also seen on FreeBSD).
2013-10-14Use djb2 hash in dict moduleArthur de Jong
This slightly modifies the string hashing function to use the djb2 hash. This hash is supposed to be reasonably fast and have reasonably few collisions.
2013-10-07Increase NSS_LDAP_CONFIG_MAX_BASES to 31Arthur de Jong
This allows more search bases which may be useful in some environments.
2013-09-15Also support poll() returning EAGAINArthur de Jong
2013-09-15Add more python module checks to configureArthur de Jong
2013-09-15Make missing Python modules a waringArthur de Jong
This avoids having to have all modules installed in the build environment. A Python version is still required during build.
2013-09-15Remove unneeded importsArthur de Jong
2013-09-15Cleanups and fixes related to automake upgradeArthur de Jong
This removes a few legacy workarounds and fixes for older versions of automake. This also removes adding specific DEBUG flags for tests since subdir objects are handled differently now.
2013-09-13Initialise msg to avoid potential NULL pointer dereferenceArthur de Jong
The NULL pointer dereference in the PAM module should not occur due to the relationship with the rc value that is handled alongside it. This change mostly silences the compiler and protects from future changes.
2013-09-13Add configure test for {set,get,end}usershell() availabilityArthur de Jong
2013-09-08Upgrade to automake 1.14Arthur de Jong
2013-09-08Use larger nslcd send buffersArthur de Jong
By using bigger write buffers in nslcd we reduce the number of writes in nslcd and consequently the number of reads in the NSS and PAM modules for bigger responses. This reduces the number of system calls that are made during a request and brings a small performance improvement that is mainly measurable in the NSS module. A measurement showed 30-80% reduction in the number of system calls in the NSS module and around 10% reduction in CPU usage (CPU time, only small reduction in wallclock time). Thanks John Sullivan for pointing this out.
2013-09-08Add configure check to see whether to install manual pagesArthur de Jong
This also reworks the manual page generation check in the configure script and avoids build errors if no tool for generating manual pages is present when working on a Git checkout.
2013-09-04Reformat LDIF file to follow OpenLDAP formatArthur de Jong
This fixes a wrapping problem. Thanks to Paul Boven for pointing this out.
2013-09-02Fix permissions of test configurationArthur de Jong
This sets the permissions on the nslcd-test.conf file while running the tests to ensure that the permission checks for the bindpwn and rootpwmodpw options do not fail the test.