Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/pynslcd/group.py
Commit message (Collapse)AuthorAgeFilesLines
* Improve Python code styleArthur de Jong2019-09-081-11/+12
| | | | | | This also adds a flake8 test that checks code style. Note that this test is not run by default because it requires network access to create the virtualenv with the test software.
* Add nss_uid_offset and nss_gid_offset to pynslcdArthur de Jong2017-06-251-2/+4
|
* Implement disable_enumerationAndrew Elble2015-05-011-0/+4
| | | | | | | | | | If this option is present, functions which cause all user/group entries to be loaded (getpwent(), getgrent()) from the directory will not succeed in doing so. This can dramatically reduce ldap server load in situations where there are a great number of users and/or groups. Applications that depend on being able to sequentially read all users and/or groups may fail to operate correctly. This option is not recommended for most configurations.
* Implement nss_getgrent_skipmembersArthur de Jong2015-04-201-2/+4
| | | | | | | This option allows skipping group member list retrieval to improve performance with very large groups. This option results in inconsistent group membership information being presented that may confuse some applications.
* Support blanking the member attributeArthur de Jong2014-01-051-13/+16
| | | | | | 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.
* Remove unneeded importsArthur de Jong2013-09-151-1/+0
|
* Rearrange Python importsArthur de Jong2013-08-251-1/+1
|
* Have pynslcd handle mapped userPasswordArthur de Jong2013-08-211-2/+7
| | | | | | This fixes an error that could occur when the userPassword was retrieved from LDAP and insufficient privileges were available for reading the attribute.
* Rename isvalidname() to is_valid_name() in pynslcdArthur de Jong2013-08-181-3/+3
|
* Use retrieve_by, group_by and group_columns in the cacheArthur de Jong2013-08-171-7/+11
| | | | | | | | | | 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.
* Give cache tables friendlier namesArthur de Jong2013-08-171-6/+7
| | | | This also defined the tables for netgroup storage.
* Explicitly define tables used for cacheArthur de Jong2013-08-171-0/+2
| | | | | | | 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.
* Move cache table creation to modulesArthur de Jong2013-08-171-1/+15
| | | | | | 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.
* Use cleaner import and get rid of uid2dn function in pynslcdArthur de Jong2013-07-291-5/+5
|
* Handle the nss_initgroups_ignoreusers option in pynslcdArthur de Jong2013-07-291-0/+8
|
* Python style changesArthur de Jong2013-04-121-3/+5
| | | | | | | This tries to conform more closely to PEP8. Imports have been checked and, if used only once, moved closer to the use to avoid potential import loops. This also includes a few other minor changes, like using __main__ for utility scripts and variable renames to avoid name clashes.
* Implement a nss_nested_groups configuration optionArthur de Jong2013-03-241-11/+13
| | | | | | This option can be used in both nslcd and pynslcd to enable recursive group member lookups. By default the functionality is disabled. This also updates the documentation.
* Implement support for nested groups in pynslcdArthur de Jong2013-03-241-10/+43
|
* clean up imports and use ↵Arthur de Jong2013-03-091-2/+4
| | | | ldap.filter.escape_filter_chars() directly
* move Search class to search moduleArthur de Jong2013-03-091-2/+3
|
* switch protocol from host byte order to network byte ↵Arthur de Jong2012-12-161-2/+2
| | | | | | 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
* implement a naive offline cacheArthur de Jong2012-01-291-0/+20
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1615 ef36b2f9-881f-0410-afb5-c4e39611909c
* small simplification in group lookups (member attributes ↵Arthur de Jong2012-01-291-13/+9
| | | | | | are not requested anyway) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1614 ef36b2f9-881f-0410-afb5-c4e39611909c
* split the result handling into a convert() and write() stepArthur de Jong2012-01-291-7/+10
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1613 ef36b2f9-881f-0410-afb5-c4e39611909c
* user the logging framework, handle exceptions properly ↵Arthur de Jong2012-01-061-7/+6
| | | | | | and some cleanups git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1588 ef36b2f9-881f-0410-afb5-c4e39611909c
* support for reading the configuration file (not all ↵Arthur de Jong2011-12-281-1/+1
| | | | | | options are used though) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1581 ef36b2f9-881f-0410-afb5-c4e39611909c
* never request group members for GroupByMemberRequestArthur de Jong2011-12-281-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1578 ef36b2f9-881f-0410-afb5-c4e39611909c
* instead of modifying attmap, modify attribute listArthur de Jong2011-12-281-3/+3
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1577 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix references to attmap (broken in r1571)Arthur de Jong2011-12-281-8/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1576 ef36b2f9-881f-0410-afb5-c4e39611909c
* make logging more consistent and remove test bases from ↵Arthur de Jong2011-12-271-1/+1
| | | | | | shadow and passwd maps git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1574 ef36b2f9-881f-0410-afb5-c4e39611909c
* PEP8 fixesArthur de Jong2011-12-271-6/+4
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1573 ef36b2f9-881f-0410-afb5-c4e39611909c
* define the search separately from the requestArthur de Jong2011-12-121-13/+26
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1571 ef36b2f9-881f-0410-afb5-c4e39611909c
* move check of required attributes and other common tests ↵Arthur de Jong2011-12-121-9/+3
| | | | | | to the Request.handle_entry() method git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1570 ef36b2f9-881f-0410-afb5-c4e39611909c
* replace last traces of groupOfUniqueNamesArthur de Jong2011-08-051-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1488 ef36b2f9-881f-0410-afb5-c4e39611909c
* switch to using the member attribute by default instead ↵Arthur de Jong2011-08-031-6/+6
| | | | | | of uniqueMember git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1484 ef36b2f9-881f-0410-afb5-c4e39611909c
* simplify request handling by passing read parameters ↵Arthur de Jong2011-05-131-19/+21
| | | | | | around in a dict instead of setting object properties (this mainly simplifies search filter building) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1455 ef36b2f9-881f-0410-afb5-c4e39611909c
* implement attribute mapping functionality and do some ↵Arthur de Jong2011-05-011-41/+38
| | | | | | refactoring git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1454 ef36b2f9-881f-0410-afb5-c4e39611909c
* small code improvementsArthur de Jong2011-05-011-2/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1451 ef36b2f9-881f-0410-afb5-c4e39611909c
* put standard library imports before application imports ↵Arthur de Jong2011-04-281-6/+4
| | | | | | and remove some unused imports git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1438 ef36b2f9-881f-0410-afb5-c4e39611909c
* remove duplicate and wrong write() methodArthur de Jong2011-04-281-33/+0
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1437 ef36b2f9-881f-0410-afb5-c4e39611909c
* add an experimental (currently partial) Python ↵Arthur de Jong2010-12-291-0/+174
implementation of nslcd to see if we can get the same features with easier to maintain code git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1347 ef36b2f9-881f-0410-afb5-c4e39611909c