Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/nslcd/common.h
Commit message (Collapse)AuthorAgeFilesLines
* various typo and other comment fixes (4b01125, b0785de, ↵Arthur de Jong2013-04-281-2/+2
| | | | | | bfdf7cd, 4689d5f, dba048b, ebe5705 and 122c38d from 0.9) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-0.8@1950 ef36b2f9-881f-0410-afb5-c4e39611909c
* only inlude stdint.h if we have itArthur de Jong2012-07-211-0/+2
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1725 ef36b2f9-881f-0410-afb5-c4e39611909c
* add missing includes to ensure all types are defined in ↵Arthur de Jong2012-07-211-0/+2
| | | | | | header git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1724 ef36b2f9-881f-0410-afb5-c4e39611909c
* implement a pam_password_prohibit_message nslcd.conf ↵Arthur de Jong2012-07-081-0/+1
| | | | | | option to deny password change introducing a NSLCD_ACTION_CONFIG_GET request thanks to Ted Cheng git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1715 ef36b2f9-881f-0410-afb5-c4e39611909c
* make whether or not to do case-sensitive filtering ↵Arthur de Jong2012-03-131-0/+6
| | | | | | configurable (patch by Matthew L. Dailey) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1634 ef36b2f9-881f-0410-afb5-c4e39611909c
* add missing include for _POSIX_HOST_NAME_MAX (thanks Mel ↵Arthur de Jong2012-03-101-1/+2
| | | | | | Flynn) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1631 ef36b2f9-881f-0410-afb5-c4e39611909c
* make validation log messages consistentArthur de Jong2011-09-091-3/+4
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1542 ef36b2f9-881f-0410-afb5-c4e39611909c
* implement and use a strtoui() function if uid_t or gid_t ↵Arthur de Jong2011-08-291-0/+13
| | | | | | is of size unsigned int (thanks Jakub Hrozek) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1528 ef36b2f9-881f-0410-afb5-c4e39611909c
* provide strtouid() and strtogid() functions that use ↵Arthur de Jong2011-08-271-0/+18
| | | | | | strtoul() or strtoull() (thanks Jakub Hrozek) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1524 ef36b2f9-881f-0410-afb5-c4e39611909c
* check whether the NSS shadow map queries LDAP before ↵Arthur de Jong2011-08-051-0/+4
| | | | | | returning x as a password has for shadow users git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1487 ef36b2f9-881f-0410-afb5-c4e39611909c
* check shadow properties (similarly to what pam_unix ↵Arthur de Jong2011-04-301-0/+9
| | | | | | does) in the PAM handling code git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1446 ef36b2f9-881f-0410-afb5-c4e39611909c
* support using the objectSid attribute to provide numeric ↵Arthur de Jong2011-04-151-0/+8
| | | | | | user and group ids, based on a patch by Wesley Mason git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1425 ef36b2f9-881f-0410-afb5-c4e39611909c
* put all HOST_NAME_MAX fallbacks in common.h and fall ↵Arthur de Jong2011-03-121-0/+4
| | | | | | back to _POSIX_HOST_NAME_MAX (thanks Peter Bray) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1390 ef36b2f9-881f-0410-afb5-c4e39611909c
* move HOST_NAME_MAX fallback definition to header fileArthur de Jong2011-03-111-0/+5
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1387 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
* implement a fqdn variable that can be used inside ↵Arthur de Jong2011-01-291-0/+5
| | | | | | pam_authz_search filters git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1367 ef36b2f9-881f-0410-afb5-c4e39611909c
* allow attribute mapping with an expression for the ↵Arthur de Jong2010-12-281-1/+2
| | | | | | userPassword attribute for passwd, group and shadow entries and by default map it to the unmatchable password ("*") to avoid accidentally leaking password information git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1346 ef36b2f9-881f-0410-afb5-c4e39611909c
* try to update the shadowLastChange attribute of a user ↵Arthur de Jong2010-12-261-0/+3
| | | | | | on password change (the update is only tried if the attribute is present to begin with) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1345 ef36b2f9-881f-0410-afb5-c4e39611909c
* return correct PAM status code for when LDAP server is ↵Arthur de Jong2010-11-171-1/+1
| | | | | | unavailable (based on a patch by Pierre Gambarotto) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1315 ef36b2f9-881f-0410-afb5-c4e39611909c
* log the request with any logged messagesArthur de Jong2010-11-071-7/+5
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1301 ef36b2f9-881f-0410-afb5-c4e39611909c
* avoid unneeded strdup()s by using a passed buffer to ↵Arthur de Jong2010-11-041-1/+1
| | | | | | lookup_dn2uid() and using strcmp() in dn2uid() to see if the existing cached value is ok git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1297 ef36b2f9-881f-0410-afb5-c4e39611909c
* implement a rootpwmodpw option that allows root users to ↵Arthur de Jong2010-09-051-2/+2
| | | | | | change user passwords without a password prompt git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1206 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
* make logging of buffer checks consistentArthur de Jong2010-05-131-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1104 ef36b2f9-881f-0410-afb5-c4e39611909c
* also have myldap_search() return an LDAP status codeArthur de Jong2010-04-131-2/+2
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1078 ef36b2f9-881f-0410-afb5-c4e39611909c
* make NSLCD_HANDLE_PARAMS() macro simpler and not have ↵Arthur de Jong2009-10-111-5/+5
| | | | | | empty argument git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1005 ef36b2f9-881f-0410-afb5-c4e39611909c
* log reading and writing errors with errno messageArthur de Jong2009-09-271-2/+4
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@995 ef36b2f9-881f-0410-afb5-c4e39611909c
* rename software to nss-pam-ldapdArthur de Jong2009-08-311-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@978 ef36b2f9-881f-0410-afb5-c4e39611909c
* don't return password hashes at all for non-root users, ↵Arthur de Jong2009-08-121-5/+10
| | | | | | based on a patch by Alexander V. Chernikov <melifaro@ipfw.ru> git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@969 ef36b2f9-881f-0410-afb5-c4e39611909c
* import preliminary version of PAM functionality into nslcdArthur de Jong2009-06-031-0/+5
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@923 ef36b2f9-881f-0410-afb5-c4e39611909c
* make lookup_dn2uid() available to other modules and ↵Arthur de Jong2009-06-031-0/+7
| | | | | | split uid2dn() into uid2entry() and uid2dn() (from nss-pam-ldapd branch) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@922 ef36b2f9-881f-0410-afb5-c4e39611909c
* refactor protocol reading and writing macros to the ↵Arthur de Jong2009-05-291-1/+1
| | | | | | 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
* initialise database modules only once after parsing configArthur de Jong2009-05-241-2/+14
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@893 ef36b2f9-881f-0410-afb5-c4e39611909c
* support multiple search bases, partially based on a ↵Arthur de Jong2009-05-241-8/+13
| | | | | | patch by Leigh Wedding <lwedding@bigpond.com> git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@892 ef36b2f9-881f-0410-afb5-c4e39611909c
* combine isvalidusername() and isvalidgroupname() into ↵Arthur de Jong2008-06-131-2/+2
| | | | | | isvalidname() because they are similar enough and we just want to check to see if it is a reasonable name (e.g. not a DN) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@759 ef36b2f9-881f-0410-afb5-c4e39611909c
* add checks for valid user and group names in incoming ↵Arthur de Jong2008-04-201-0/+3
| | | | | | requests and for data returned from LDAP git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@689 ef36b2f9-881f-0410-afb5-c4e39611909c
* return values of dn2uid() and uid2dn() should always be usedArthur de Jong2008-04-061-2/+2
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@673 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix member->group searches by also searching for DN in ↵Arthur de Jong2008-04-051-0/+3
| | | | | | uniqueMember attribute git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@663 ef36b2f9-881f-0410-afb5-c4e39611909c
* implement a dn2uid() function to transform a DN into a ↵Arthur de Jong2008-02-021-1/+4
| | | | | | username (looking inside the DN or doing an LDAP lookup if neede) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@610 ef36b2f9-881f-0410-afb5-c4e39611909c
* immediatly bail out if write entity function failed ↵Arthur de Jong2008-01-021-1/+2
| | | | | | (prevents numerous "error writing to client" messages from filling up the logs) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@551 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix get_userpassword() function descriptionArthur de Jong2007-12-311-2/+2
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@546 ef36b2f9-881f-0410-afb5-c4e39611909c
* have myldap_get_entry() return an LDAP status code that ↵Arthur de Jong2007-12-251-3/+7
| | | | | | can signal errors in the lookup git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@531 ef36b2f9-881f-0410-afb5-c4e39611909c
* remove NSLCD_RESULT_UNAVAIL because it's not needed ↵Arthur de Jong2007-12-251-1/+1
| | | | | | anymore (the connection is broken when an error occurs) and rename NSLCD_RESULT_NOTFOUND into NSLCD_RESULT_END to better match its meaning git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@530 ef36b2f9-881f-0410-afb5-c4e39611909c
* no need for us to flush the buffer since our caller ↵Arthur de Jong2007-12-251-2/+0
| | | | | | closes the stream immediatly (or could otherwise pass the flushing to another thread) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@529 ef36b2f9-881f-0410-afb5-c4e39611909c
* get rid of some old code and rename ldap-nss to myldap ↵Arthur de Jong2007-12-091-1/+1
| | | | | | since there is no more NSS-related code in there git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@489 ef36b2f9-881f-0410-afb5-c4e39611909c
* switch to new LDAP entry parsing code that is much ↵Arthur de Jong2007-12-091-0/+24
| | | | | | simpler and more readable git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@488 ef36b2f9-881f-0410-afb5-c4e39611909c
* first step to use the new myldap interfaceArthur de Jong2007-10-281-0/+38
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@468 ef36b2f9-881f-0410-afb5-c4e39611909c
* remove support for nested groups and use of uniqueMember ↵Arthur de Jong2007-09-151-3/+0
| | | | | | and member attributes as well as memberOf attribute (this removes quite some functionality but helps us in refactoring because the code was one big exception to all the other modules) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@407 ef36b2f9-881f-0410-afb5-c4e39611909c
* add note about free()ing the returned value and add loggingArthur de Jong2007-09-141-0/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@398 ef36b2f9-881f-0410-afb5-c4e39611909c
* move user2dn() from group.c to passwd_username2dn() in ↵Arthur de Jong2007-09-141-2/+1
| | | | | | passwd.c git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@397 ef36b2f9-881f-0410-afb5-c4e39611909c