~ubuntu-branches/ubuntu/precise/nss-pam-ldapd/precise-security

« back to all changes in this revision

Viewing changes to HACKING

  • Committer: Package Import Robot
  • Author(s): Arthur de Jong
  • Date: 2011-09-04 21:00:00 UTC
  • mfrom: (14.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20110904210000-pe3u91iga88vtr16
Tags: 0.8.4
* Upload to unstable
* switch to using the member attribute by default instead of
  uniqueMember (backwards incompatible change)
* only return "x" as a password hash when the object has the shadowAccount
  objectClass and nsswitch.conf is configured to do shadow lookups using
  LDAP (this avoids some problems with pam_unix)
* fix problem with partial attribute name matches in DN (thanks Timothy
  White)
* fix a problem with objectSid mappings with recent versions of OpenLDAP
  (patch by Wesley Mason)
* set the socket timeout in a connection callback to avoid timeout
  issues during the SSL handshake (patch by Stefan Völkel)
* check for unknown variables in pam_authz_search
* only check password expiration when authenticating, only check account
  expiration when doing authorisation
* make buffer sizes consistent and grow all buffers holding string
  representations of numbers to be able to hold 64-bit numbers
* update AX_PTHREAD from autoconf-archive
* support querying DNS SRV records from a different domain than the current
  one (based on a patch by James M. Leddy)
* fix a problem with uninitialised memory while parsing the tls_ciphers
  option (closes: #638872) (but doesn't work yet due to #640384)
* implement bounds checking of numeric values read from LDAP (patch by
  Jakub Hrozek)
* correctly support large uid and gid values from LDAP (patch by Jakub
  Hrozek)
* improvements to the configure script (patch by Jakub Hrozek)
* switch to dh for debian/rules and bump debhelper compatibility to 8
* build Debian packages with multiarch support
* ship shlibs (but still no symbol files) for libnss-ldapd since that was
  the easiest way to support multiarch
* fix output in init script when restarting nslcd (closes: #637132)
* correctly handle leading and trailing spaces in preseeded debconf uri
  option (patch by Andreas B. Mundt) (closes: #637863)
* support spaces around database names in /etc/nsswitch.conf while
  configuring package (closes: #640185)
* updated Russian debconf translation by Yuri Kozlov (closes: #637751)
* updated French debconf translation by Christian Perrier (closes: #637756)
* added Slovak debconf translation by Slavko (closes: #637759)
* updated Danish debconf translation by Joe Hansen (closes :#637763)
* updated Brazilian Portuguese debconf translation by Denis Doria
* updated Portuguese debconf translation by Américo Monteiro
* updated Japanese debconf translation by Kenshi Muto (closes: #638195)
* updated Czech debconf translation by Miroslav Kure (closes: #639026)
* updated German debconf translation by Chris Leick (closes: #639107)
* updated Spanish debconf translation by Francisco Javier Cuadrado
  (closes: #639236)
* updated Dutch debconf translation by Arthur de Jong with help from Paul
  Gevers and Jeroen Schot

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
==========
92
92
 
93
93
The NSS module is implemented in the nss directory. The functions are split
94
 
into files according to the database they support. Functions look like:
 
94
into files according to the database they support. The files support multiple
 
95
NSS implementations.
 
96
 
 
97
The NSS interface is specific to the C library that is used. The original
 
98
implementation was for the GNU C Library but now also includes an
 
99
implementation for Solaris' C Library and has some support for FreeBSD.
 
100
 
 
101
GNU C Library notes
 
102
-------------------
 
103
 
 
104
Function definitions for glibc look like:
95
105
 
96
106
_nss_ldap_FUNCTION_r(...)
97
107
  This function opens the connection to the nslcd (with a time-out), builds
99
109
  waiting for an answer (again with a time-out)
100
110
 
101
111
The complete list of exported functions can be found in exports.linux and
102
 
prototypes.h. The NSS interface seems to be fairly libc-specific and is
103
 
currently tuned towards GNU Libc, although FreeBSD has a port based on this
104
 
code.
 
112
prototypes.h.
105
113
 
106
114
Currently a number of macros are used to build most of the function bodies for
107
115
these functions. Part of this is defined in the common/nslcd-prot.h file and
108
116
the NSS-specific stuff is in nss/common.h.
109
117
 
 
118
For memory management, the general mechanism that is expected to be used is
 
119
to return NSS_STATUS_TRYAGAIN and set errno to ERANGE. This causes glibc to
 
120
retry the request with a larger buffer.
 
121
 
110
122
Some useful links:
111
123
http://www.gnu.org/software/libc/manual/html_node/index.html
112
124
 
 
125
Solaris C Library notes
 
126
-----------------------
 
127
 
 
128
The Solaris C library uses a different mechanism. For each map a back-end
 
129
object is allocated per thread which is used to do queries. The object is
 
130
created with a constructor (e.g. _nss_ldap_passwd_constr()) that returns a
 
131
back-end that contains a list of function pointer to lookup methods and a
 
132
destructor.
 
133
 
 
134
A buffer is passed with every request but a local buffer that is stored in the
 
135
back-end can presumably also be created.
 
136
 
 
137
Earlier versions of Solaris expected the NSS functions to return the binary
 
138
representation of the lookups (e.g. struct passwd) but later versions expect a
 
139
string representation of the data to be returned (just like a single line out
 
140
of /etc/passwd was read).
 
141
 
 
142
Source and documentation pointers for Solaris NSS:
 
143
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/nsswitch/
 
144
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/head/nss_common.h
 
145
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/head/nss_dbdefs.h
 
146
 
 
147
FreeBSD C Libarary notes
 
148
------------------------
 
149
 
 
150
The FreeBSD C library seems to have support for exposing GNU C Library NSS
 
151
module functions through a wrapper function. This makes it very easy to
 
152
implement NSS support on FreeBSD.
 
153
 
 
154
Pointers for more documentation on this is welcome. Some information is
 
155
available here:
 
156
http://nixdoc.net/man-pages/FreeBSD/man3/nsdispatch.3.html
 
157
ftp://ftp8.tw.freebsd.org/pub/branches/-current/src/include/nss.h
 
158
 
113
159
 
114
160
PAM MODULE
115
161
==========