The name of each function consist of various parts:
service of course corresponds to the name of the module this
function is found in.(1) The function part is derived
from the interface function in the C library itself. If the user calls
gethostbyname and the service used is
in the module
is used. You see, what is explained above in not the whole truth. In
fact the NSS modules only contain reentrant versions of the lookup
functions. I.e., if the user would call the
function this also would end in the above function. For all user
interface functions the C library maps this call to a call to the
reentrant function. For reentrant functions this is trivial since the
interface is (nearly) the same. For the non-reentrant version The
library keeps internal buffers which are used to replace the user
I.e., the reentrant functions can have counterparts. No service
module is forced to have functions for all databases and all kinds to
access them. If a function is not available it is simply treated as if
the function would return
(see section Actions in the NSS configuration).
The file name `libnss_files.so.1' would be on a Solaris 2 system `nss_files.so.1'. This is the difference mentioned above. Sun's NSS modules are usable as modules which get indirectly loaded only.
The NSS modules in the GNU C Library are prepared to be used as normal libraries itself. This is not true in the moment, though. But the different organization of the name space in the modules does not make it impossible like it is for Solaris. Now you can see why the modules are still libraries.(2)
Go to the first, previous, next, last section, table of contents.