blob: cc1482db5657195c7a1b3a74cf1becfec5a1bb6f [file] [log] [blame]
Fred Drake7fefba51999-06-27 15:01:08 +00001\section{\module{nis} ---
Fred Drake0d6e6e01999-07-06 15:43:55 +00002 Interface to Sun's NIS (Yellow Pages)}
Fred Drake7fefba51999-06-27 15:01:08 +00003
4\declaremodule{extension}{nis}
5 \platform{UNIX}
6\moduleauthor{Fred Gansevles}{Fred.Gansevles@cs.utwente.nl}
Fred Drake57657bc2000-12-01 15:25:23 +00007\sectionauthor{Moshe Zadka}{moshez@zadka.site.co.il}
Fred Drake91f2f262001-07-06 19:28:48 +00008\modulesynopsis{Interface to Sun's NIS (Yellow Pages) library.}
Fred Drake7fefba51999-06-27 15:01:08 +00009
10The \module{nis} module gives a thin wrapper around the NIS library, useful
11for central administration of several hosts.
12
13Because NIS exists only on \UNIX{} systems, this module is
Fred Drake91f2f262001-07-06 19:28:48 +000014only available for \UNIX.
Fred Drake7fefba51999-06-27 15:01:08 +000015
16The \module{nis} module defines the following functions:
17
Martin v. Löwis57a34e82006-02-04 19:12:37 +000018\begin{funcdesc}{match}{key, mapname[, domain=default_domain]}
Fred Drake7fefba51999-06-27 15:01:08 +000019Return the match for \var{key} in map \var{mapname}, or raise an
20error (\exception{nis.error}) if there is none.
21Both should be strings, \var{key} is 8-bit clean.
Fred Drake91f2f262001-07-06 19:28:48 +000022Return value is an arbitrary array of bytes (may contain \code{NULL}
Fred Drake7fefba51999-06-27 15:01:08 +000023and other joys).
24
Fred Drake91f2f262001-07-06 19:28:48 +000025Note that \var{mapname} is first checked if it is an alias to another
26name.
Martin v. Löwis57a34e82006-02-04 19:12:37 +000027
28\versionchanged[The \var{domain} argument allows to override
29the NIS domain used for the lookup. If unspecified, lookup is in the
30default NIS domain]{2.5}
Fred Drake7fefba51999-06-27 15:01:08 +000031\end{funcdesc}
32
Martin v. Löwis57a34e82006-02-04 19:12:37 +000033\begin{funcdesc}{cat}{mapname[, domain=default_domain]}
Fred Drake7fefba51999-06-27 15:01:08 +000034Return a dictionary mapping \var{key} to \var{value} such that
35\code{match(\var{key}, \var{mapname})==\var{value}}.
Thomas Woutersf8316632000-07-16 19:01:10 +000036Note that both keys and values of the dictionary are arbitrary
Fred Drake7fefba51999-06-27 15:01:08 +000037arrays of bytes.
38
Fred Drake91f2f262001-07-06 19:28:48 +000039Note that \var{mapname} is first checked if it is an alias to another
40name.
Martin v. Löwis57a34e82006-02-04 19:12:37 +000041
42\versionchanged[The \var{domain} argument allows to override
43the NIS domain used for the lookup. If unspecified, lookup is in the
44default NIS domain]{2.5}
Fred Drake7fefba51999-06-27 15:01:08 +000045\end{funcdesc}
46
Martin v. Löwis57a34e82006-02-04 19:12:37 +000047 \begin{funcdesc}{maps}{[domain=default_domain]}
Fred Drake7fefba51999-06-27 15:01:08 +000048Return a list of all valid maps.
Martin v. Löwis57a34e82006-02-04 19:12:37 +000049
50\versionchanged[The \var{domain} argument allows to override
51the NIS domain used for the lookup. If unspecified, lookup is in the
52default NIS domain]{2.5}
Fred Drake7fefba51999-06-27 15:01:08 +000053\end{funcdesc}
54
Martin v. Löwis57a34e82006-02-04 19:12:37 +000055 \begin{funcdesc}{get_default_domain}{}
56Return the system default NIS domain. \versionadded{2.5}
57\end{funcdesc}
Fred Drake7fefba51999-06-27 15:01:08 +000058
59The \module{nis} module defines the following exception:
60
61\begin{excdesc}{error}
62An error raised when a NIS function returns an error code.
63\end{excdesc}