NIS: Providing naming services to legacy clients. -Or- NIS: The Shocking Truth
The Client POV Application asks the C library (libc) for passwd info. The library gets the domain name from the kernel and the RPC server address from ypbind's bindings file. The library issues an RPC request: yp_match(map=“passwd.byname”, key=“jimbo”) The library gets an answer “leeroy:*:1234:5678:Leeroy Jenkins:/home/leeroy:/bin/bash” The library parses the result and hands a structure back to the application.
What's Going On Here? The NIS protocol is about a dozen RPC calls. The NIS data model. Groups (maps) of key/value pairs. Key and data formats are opaque to the server. Map names and key/value formats determined by client convention. Data from maps is parsed by the client. Providing a NIS protocol server which uses a directory server as a data store shouldn't be that hard, right? Right?
Those RPCs in detail (1). YPPROC_XFR Pull fresh data from the master server. YPPROC_CLEAR Clear any caches, close/reopen on-disk databases. YPPROC_ORDER Return map generation. YPPROC_MASTER Return hostname of master for domain.
Those RPCs in detail (2). Do we service a given domain? YPPROC_DOMAIN/YPPROC_DOMAIN_NONACK Do we service a given domain? YPPROC_MATCH Look up one entry in a map using a key. YPPROC_FIRST/YPPROC_NEXT Retrieve first key/value pair, or the pair which follows this key. YPPROC_ALL Dump all key/value pairs for a map. YPPROC_MAPLIST Return list of known maps.
Strategies? New daemon which queries the directory server as needed? Alternate ypserv makefile? Authentication? Server reconnection (daemon)? Search limits, paging? Server as SLAPI module? Unusual lifecycle / privilege model. Potential for starving LDAP clients. Potential “ick” factor. Handling enumeration results consistently... hard?
Status Stuck in drawing-board phase. The “sn” SLAPI plugin... (no real “there” there!)
Wherein I Blow Your Mind The trick is hiding the complexity. This is not a new idea. Proprietary offerings abound. HP/UX SFU NIS is lighter than lightweight. The chicken may be the Tyrannosaurus Rex's closest living relative.