If you are familiar with writing or porting network applications, you will notice that most NIS maps listed above correspond to library functions in the C-library. For instance, to obtain passwd information, you generally use the getpwnam(3) and getpwuid(3) functions which return the account information associated with the given user name or numerical user id, respectively. Under normal circumstances, these functions will perform the requested lookup on the standard file, such as /etc/passwd.
A NIS-aware implementation of these functions, however, will modify this behavior, and place an RPC call to have the NIS server look up the user name or id. This happens completely transparent to the application. The function may either ``append'' the NIS map to or ``replace'' the original file with it. Of course, this does not refer to a real modification of the file, it only means that it appears to the application as if the file had been replaced or appended to.
For traditional NIS implementations, there used to be certain conventions as to which maps replaced, and which were appended to the original information. Some, like the passwd maps, required kludgy modifications of the passwd file which, when done wrong, would open up security holes. To avoid these pitfalls, NYS uses a general configuration scheme that determines whether a particular set of client functions uses the original files, NIS, or NIS+, and in which order. It will be described in a later section of this chapter.
Thu Mar 7 23:22:06 EST 1996