Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/nslcd/nslcd.c
Commit message (Collapse)AuthorAgeFilesLines
* various typo and other comment fixes (4b01125, b0785de, ↵Arthur de Jong2013-04-281-1/+1
| | | | | | 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
* extra sanity check to ensure not too many file ↵Arthur de Jong2013-02-231-2/+7
| | | | | | descriptors are open (a9aea20f136026d6553295727350c88fe2431e0c from 0.9) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd-0.8@1935 ef36b2f9-881f-0410-afb5-c4e39611909c
* if nslcd creates the state directory, try to set the ↵Arthur de Jong2012-10-141-2/+8
| | | | | | right ownership git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1795 ef36b2f9-881f-0410-afb5-c4e39611909c
* use poll() instead of select() for checking file ↵Arthur de Jong2012-10-121-7/+7
| | | | | | 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
* include an explicit cast to int when printing gid_t ↵Arthur de Jong2012-09-011-2/+2
| | | | | | (fixes r1723) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1744 ef36b2f9-881f-0410-afb5-c4e39611909c
* on startup have the gid option default to the primary ↵Arthur de Jong2012-07-201-9/+20
| | | | | | group of the specified user and load the user's supplementary groups git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1723 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
* get rid of a few compiler warnings on FreeBSDArthur de Jong2012-05-181-0/+3
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1693 ef36b2f9-881f-0410-afb5-c4e39611909c
* provide a compatibility definition of SUN_LEN() for ↵Arthur de Jong2012-05-091-0/+1
| | | | | | systems that lack it git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1686 ef36b2f9-881f-0410-afb5-c4e39611909c
* remove duplicate debug from log messageArthur de Jong2012-05-091-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1685 ef36b2f9-881f-0410-afb5-c4e39611909c
* don't try to close _SC_OPEN_MAX file descriptorArthur de Jong2012-05-041-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1678 ef36b2f9-881f-0410-afb5-c4e39611909c
* update copyright yearsArthur de Jong2012-02-291-2/+2
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1624 ef36b2f9-881f-0410-afb5-c4e39611909c
* clarify error messages and fix typo in commentArthur de Jong2012-01-201-3/+3
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1605 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
* Warn if fd cannot be closed in is_locked()Jakub Hrozek2012-01-091-2/+4
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1592 ef36b2f9-881f-0410-afb5-c4e39611909c
* typo fix in commentArthur de Jong2011-12-281-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1575 ef36b2f9-881f-0410-afb5-c4e39611909c
* properly handle failures to truncate the pid fileArthur de Jong2011-12-101-1/+5
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1568 ef36b2f9-881f-0410-afb5-c4e39611909c
* ensure that uid, gid and pid vars are properly ↵Arthur de Jong2011-12-011-5/+7
| | | | | | initialised and log denied requests git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1558 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix r1429 to properly handle absence of RTLD_NODELETEArthur de Jong2011-04-181-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1430 ef36b2f9-881f-0410-afb5-c4e39611909c
* support systems without RTLD_NODELETEArthur de Jong2011-04-181-1/+7
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1429 ef36b2f9-881f-0410-afb5-c4e39611909c
* no longer indefinitely wait for all worker threads to ↵Arthur de Jong2011-03-251-33/+30
| | | | | | finish before exiting (but wait a few seconds on platforms with pthread_timedjoin_np()) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1414 ef36b2f9-881f-0410-afb5-c4e39611909c
* provide a definition of daemon() for systems that lack itArthur de Jong2011-03-231-2/+0
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1403 ef36b2f9-881f-0410-afb5-c4e39611909c
* small code improvementsArthur de Jong2011-03-191-2/+2
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1400 ef36b2f9-881f-0410-afb5-c4e39611909c
* ensure that session id is only logged while handling a ↵Arthur de Jong2011-03-061-2/+4
| | | | | | connection git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1375 ef36b2f9-881f-0410-afb5-c4e39611909c
* create the directory for the socket and pidfileArthur de Jong2011-02-111-11/+24
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1369 ef36b2f9-881f-0410-afb5-c4e39611909c
* in each worker wake up once in a while to check whether ↵Arthur de Jong2010-12-081-6/+44
| | | | | | any existing LDAP connections should be closed git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1319 ef36b2f9-881f-0410-afb5-c4e39611909c
* close all open file descriptors on startArthur de Jong2010-11-261-0/+8
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1316 ef36b2f9-881f-0410-afb5-c4e39611909c
* move acceptconnection() function body inside the ↵Arthur de Jong2010-11-041-51/+63
| | | | | | worker() so we can more easily break out of the connection handling thread, close the server socket inside the signal handler to cause all threads waiting on accept() to fail and ensure that signals are handled in the main thread by blocking them in the worker threads (r1290 from -solaris branch) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1298 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
* fix log messageArthur de Jong2010-10-161-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1287 ef36b2f9-881f-0410-afb5-c4e39611909c
* implement a rootpwmodpw option that allows root users to ↵Arthur de Jong2010-09-051-3/+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
* allow configuring NSS module's SONAME from configure and ↵Arthur de Jong2010-07-071-1/+1
| | | | | | use this in nslcd to dlopen() the correct library (thanks to Alexander V. Chernikov for the idea) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1161 ef36b2f9-881f-0410-afb5-c4e39611909c
* use RTLD_NODELETE during dlopen() instead of not using ↵Arthur de Jong2010-06-161-3/+4
| | | | | | dlclose() git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1144 ef36b2f9-881f-0410-afb5-c4e39611909c
* implement a global symbol inside the NSS module to allow ↵Arthur de Jong2010-06-141-8/+38
| | | | | | applications to disable NSS lookups over LDAP and use it in nslcd to avoid deadlocks git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1141 ef36b2f9-881f-0410-afb5-c4e39611909c
* fix and remove source code commentsArthur de Jong2010-06-111-3/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1136 ef36b2f9-881f-0410-afb5-c4e39611909c
* patch by Jan Schampera to implement a --check optionArthur de Jong2010-01-281-8/+37
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1062 ef36b2f9-881f-0410-afb5-c4e39611909c
* lock the pidfile at start-up to ensure only one nslcd ↵Arthur de Jong2010-01-231-9/+38
| | | | | | process is running (based on a patch by Jan Schampera <jan.schampera@web.de>) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1053 ef36b2f9-881f-0410-afb5-c4e39611909c
* implement password changing in the PAM module by ↵Arthur de Jong2009-10-071-0/+1
| | | | | | performing an LDAP password modify EXOP request git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1000 ef36b2f9-881f-0410-afb5-c4e39611909c
* rename configfile to /etc/nslcd.conf and make debian ↵Arthur de Jong2009-08-311-1/+1
| | | | | | packaging copy the file to the new name on upgrade git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@980 ef36b2f9-881f-0410-afb5-c4e39611909c
* don't return password hashes at all for non-root users, ↵Arthur de Jong2009-08-121-3/+3
| | | | | | 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
* make error message a little clearerArthur de Jong2009-06-121-1/+1
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@937 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
* according to autoupdate RETSIGTYPE can be considered ↵Arthur de Jong2009-05-091-2/+2
| | | | | | void always git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@872 ef36b2f9-881f-0410-afb5-c4e39611909c
* move debugging initialisation to myldap_set_debuglevel() ↵Arthur de Jong2009-04-301-1/+3
| | | | | | function git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@852 ef36b2f9-881f-0410-afb5-c4e39611909c
* update copyright yearArthur de Jong2009-03-221-2/+2
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@823 ef36b2f9-881f-0410-afb5-c4e39611909c
* clean the environment and set LDAPNOINIT to disable ↵Arthur de Jong2008-12-031-2/+30
| | | | | | parsing of LDAP configfiles (.ldaprc, /etc/ldap/ldap.conf, etc) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@803 ef36b2f9-881f-0410-afb5-c4e39611909c
* give pidfile and socket creation functions more logical ↵Arthur de Jong2008-06-151-4/+4
| | | | | | names git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@763 ef36b2f9-881f-0410-afb5-c4e39611909c
* add uid and gid configuration keywords that set the user ↵Arthur de Jong2008-06-061-10/+8
| | | | | | id and group id of the running nslcd process git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@745 ef36b2f9-881f-0410-afb5-c4e39611909c
* environ is defined in unistd.hArthur de Jong2008-06-061-3/+0
| | | | git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@744 ef36b2f9-881f-0410-afb5-c4e39611909c
* increase write buffer size in nslcd to free up threads ↵Arthur de Jong2008-06-061-2/+2
| | | | | | earlier and increase timeout for nslcd to nss communication to one minute (at both places) git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@743 ef36b2f9-881f-0410-afb5-c4e39611909c