summaryrefslogtreecommitdiffstats
path: root/Doc/lib
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2005-01-23 09:27:24 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2005-01-23 09:27:24 (GMT)
commitc300175547ced0af17857a29462b0f9294e8c31c (patch)
treedd3704d47b76e1714599eefe77d4eec0354dd11b /Doc/lib
parent4d394dfebbcf00e7eec74ee5f4c1b149b3744a91 (diff)
downloadcpython-c300175547ced0af17857a29462b0f9294e8c31c.zip
cpython-c300175547ced0af17857a29462b0f9294e8c31c.tar.gz
cpython-c300175547ced0af17857a29462b0f9294e8c31c.tar.bz2
Patch #579435: Shadow Password Support Module
Diffstat (limited to 'Doc/lib')
-rw-r--r--Doc/lib/lib.tex1
-rw-r--r--Doc/lib/libpwd.tex1
-rw-r--r--Doc/lib/libspwd.tex46
3 files changed, 48 insertions, 0 deletions
diff --git a/Doc/lib/lib.tex b/Doc/lib/lib.tex
index ac6b62d..37ab91d 100644
--- a/Doc/lib/lib.tex
+++ b/Doc/lib/lib.tex
@@ -193,6 +193,7 @@ and how to embed it in other applications.
\input{libunix} % UNIX Specific Services
\input{libposix}
\input{libpwd}
+\input{libspwd}
\input{libgrp}
\input{libcrypt}
\input{libdl}
diff --git a/Doc/lib/libpwd.tex b/Doc/lib/libpwd.tex
index 1e7a1c8..c04b463 100644
--- a/Doc/lib/libpwd.tex
+++ b/Doc/lib/libpwd.tex
@@ -50,4 +50,5 @@ Return a list of all available password database entries, in arbitrary order.
\begin{seealso}
\seemodule{grp}{An interface to the group database, similar to this.}
+ \seemodule{spwd}{An interface to the shadow password database, similar to this.}
\end{seealso}
diff --git a/Doc/lib/libspwd.tex b/Doc/lib/libspwd.tex
new file mode 100644
index 0000000..bce5a8a
--- /dev/null
+++ b/Doc/lib/libspwd.tex
@@ -0,0 +1,46 @@
+\section{\module{spwd} ---
+ The shadow password database}
+
+\declaremodule{builtin}{spwd}
+ \platform{Unix}
+\modulesynopsis{The shadow password database (\function{getspnam()} and friends).}
+
+This module provides access to the \UNIX{} shadow password database.
+It is available on various Unix versions.
+
+You must have enough privileges to access the shadow password database
+(this usually means you have to be root).
+
+Shadow password database entries are reported as a tuple-like object, whose
+attributes correspond to the members of the \code{spwd} structure
+(Attribute field below, see \code{<shadow.h>}):
+
+\begin{tableiii}{r|l|l}{textrm}{Index}{Attribute}{Meaning}
+ \lineiii{0}{\code{sp_nam}}{Login name}
+ \lineiii{1}{\code{sp_pwd}}{Encrypted password}
+ \lineiii{2}{\code{sp_lstchg}}{Date of last change}
+ \lineiii{3}{\code{sp_min}}{Minimal number of days between changes}
+ \lineiii{4}{\code{sp_max}}{Maximum number of days between changes}
+ \lineiii{5}{\code{sp_warn}}{Number of days before password expires to warn user about it}
+ \lineiii{6}{\code{sp_inact}}{Number of days after password expires until account is blocked}
+ \lineiii{7}{\code{sp_expire}}{Number of days since 1970-01-01 until account is disabled}
+ \lineiii{8}{\code{sp_flag}}{Reserved}
+\end{tableiii}
+
+The sp_nam and sp_pwd items are strings, all others are integers.
+\exception{KeyError} is raised if the entry asked for cannot be found.
+
+It defines the following items:
+
+\begin{funcdesc}{getspnam}{name}
+Return the shadow password database entry for the given user name.
+\end{funcdesc}
+
+\begin{funcdesc}{getspall}{}
+Return a list of all available shadow password database entries, in arbitrary order.
+\end{funcdesc}
+
+
+\begin{seealso}
+ \seemodule{pwd}{An interface to the normal password database, similar to this.}
+\end{seealso}