summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-09-02Add a test for tio timeout calculationsArthur de Jong
This test checks whether the proposed remaining time to sleep is reasonable.
2013-09-02Add a test for clock_gettime() supported clocksArthur de Jong
This probes the system for available clocks to see if they can be reliably used to get a monotonic-like timer (the test doesn't verify the monotonic part, just usability).
2013-09-02Use clock_gettime() instead of gettimeofday()Arthur de Jong
This avoids problems with system clock changes (though there are some safeguards in place to avoid waiting too long on clock changes). Thanks to John Sullivan for pointing this out. We can't easily use CLOCK_MONOTONIC_RAW or CLOCK_MONOTONIC_COARSE even on platforms that define the clock because we can get runtime errors. CLOCK_MONOTONIC seems to work on all tested platforms that provide it.
2013-09-02Small protability fixArthur de Jong
2013-09-01Improve robustness of test_manpagesArthur de Jong
2013-08-31Use normal timeout handling in tio_skipall()Arthur de Jong
Use the same mechanism in tio_skipall() as in tio_read(), except use a different timeout value.
2013-08-31Refactor tio_wait()Arthur de Jong
This changes the function to accept a file descriptor, an event and timeout parameter directly instead of a confusing flag.
2013-08-31Fix buffer overflow on interupted readArthur de Jong
The tio_read() function will read past its buffer and return garbadge to the calling function if the call to read() was interrupted by a signal. The likelyhood of read() being interupted is low because previously a call to poll() has determined that data is available to be read. Thanks to John Sullivan for pointing this out. See: https://bugzilla.redhat.com/show_bug.cgi?id=1003011
2013-08-30In nslcd, log EPIPE only on debug levelArthur de Jong
See: https://bugzilla.redhat.com/show_bug.cgi?id=1003011
2013-08-30Use a timeout when skipping remaining result dataArthur de Jong
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
2013-08-28Increase password buffer sizeBersl
With the smaller buffers some password hashes would be truncated.
2013-08-28Fix for common spelling mistakeArthur de Jong
2013-08-25Get files ready for 0.9.1 releaseArthur de Jong
2013-08-25Have a nicer way of generating the ChangeLogArthur de Jong
This adds the commit id, improves the line wrapping and also gets rid of the external dependency.
2013-08-25Handle failure of getpeercred more gracefullyArthur de Jong
2013-08-25Only run pynslcd tests if it is enabledArthur de Jong
2013-08-25Add configure test for Python modulesArthur de Jong
This uses the AX_PYTHON_MODULE test to check for availability of used Python modules. All third-party modules and modules that are not a builtin for Python 2.5 are tested. This also splits the tests for the utils and pynslcd.
2013-08-25Rearrange Python importsArthur de Jong
2013-08-23Ignore SIGUSR2 for future compatibilityArthur de Jong
2013-08-23Add a test for the manual pagesArthur de Jong
This replaces e0491d2 to run xmlto from the man directory. This handles the case more gracefully if xmlto is not available.
2013-08-23Update files from latest automakeArthur de Jong
2013-08-21Have pynslcd handle mapped userPasswordArthur de Jong
This fixes an error that could occur when the userPassword was retrieved from LDAP and insufficient privileges were available for reading the attribute.
2013-08-21Retry LDAP servers quickly after receiving SIGUSR1Arthur de Jong
When nslcd receives the SIGUSR1 signal it will retry connecting to unavailable LDAP servers sooner. This signal can for example be sent when (re)stablishing a network connection.
2013-08-21Handle SIGUSR1 by resetting the retry timerArthur de Jong
This implements and documents handling of the SIGUSR1 signal in nslcd to reset the reconnect_sleeptime and reconnect_retrytime timers to re-check availability of the LDAP server.
2013-08-21Implement function for resetting reconnect timesArthur de Jong
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.
2013-08-21Return partial shadow information to non-root usersArthur de Jong
This also returns everything except the password hash from the shadow database to non-root users (nothing was returned before). This allows non-root users to do PAM authentication in some configurations. On some systems there is a setgid executable that is allowed to read /etc/shadow for authentication by e.g. screensavers. Returning no shadow information will cause pam_unix to deny authorisation in common configurations. See: http://bugs.debian.org/706913
2013-08-20Add cast to int when logging configuration summaryArthur de Jong
2013-08-18Small fix in NEW_AUTHTOK_REQD handlingArthur de Jong
There is a potential memory leak if the old password is saved multiple times. Furthermore, PAM_NEW_AUTHTOK_REQD is only allowed as a result of the authorisation phase, not the authentication phase so there is no use in checking.
2013-08-18Fix rootpwmodpw handling in pynslcdArthur de Jong
2013-08-18Fix not logging passwords in pynslcd (7108b1f)Arthur de Jong
2013-08-18Update files from test environmentArthur de Jong
2013-08-18Improve error and help output of getent commandArthur de Jong
2013-08-18Run pylint as a testArthur de Jong
This runs a somewhat limited pylint run against the source files. It should at least catch some issues.
2013-08-18Rename isvalidname() to is_valid_name() in pynslcdArthur de Jong
2013-08-18Run xmlto on manual pages as part of the testsArthur de Jong
2013-08-18Do not log passwords in pynslcdArthur de Jong
2013-08-18Implement an option to run in the foregroundArthur de Jong
This introduces a -n, --nofork option that skips the deamonising step on start-up. This may be required for running nslcd from upstart. See: https://bugs.launchpad.net/bugs/806761
2013-08-18Document -n, --nofork optionArthur de Jong
2013-08-18-n switch for pynslcdArthur de Jong
2013-08-18-n switch for nslcd (prevents process from forking)Caleb Callaway
2013-08-17Improvements to pynslcd caching functionalityArthur de Jong
This fixes most of the existing caching functionality. Cache expiry, negative hits and entries going away remain to be implemented.
2013-08-17Implement tests for caching functionalityArthur de Jong
2013-08-17Use retrieve_by, group_by and group_columns in the cacheArthur de Jong
This removes custom retrieve() functions and Query classes from the database modules and uses retrieve_sql retrieve_by, group_by and group_columns to make a custom retrieval query. In the cache module this completely replaces how the query grouping is done. The Query class is now only used inside the cache and the CnAliasedQuery, RowGrouper and related classed have been removed.
2013-08-17Make Cache a context managerArthur de Jong
2013-08-17Give cache tables friendlier namesArthur de Jong
This also defined the tables for netgroup storage.
2013-08-17Explicitly define tables used for cacheArthur de Jong
This introduces the tables property in the Cache object that is used to define the used tables. This also fixes the storing of mulit-valued attributes in the cache.
2013-08-17Move cache table creation to modulesArthur de Jong
This also moves the creation of a SQLite database connection to a _get_connection() function to ensure the cache is only created when the caches are instantiated.
2013-07-30Fix missing part of d659e83Arthur de Jong
2013-07-29Use cleaner import and get rid of uid2dn function in pynslcdArthur de Jong
2013-07-29Handle the nss_min_uid option in pynslcdArthur de Jong