Files
sics/doc/programmer/passwd.tex

21 lines
1.3 KiB
TeX

\subsection{The Password Database}
This is just a simple password database. It keeps for each user an
record containing username, password and an integer code. The code
is meant to encode the users rights within the system. On
initialisation the information is read from a file. Currently there
is no encryption in this. Rely on the filesytem protection mechanisms
for protecting passwords. Though SICS will have only a limited number
of different user levels, the password class is designed to cope with
more and stores its data in a linked list. Currently user names and
passwords are entered into the database through the SicsUser
initialization command.
The interface:\begin{itemize}
\item {\bf int InitPasswd(char *filename) } reads user data from the file specified. Returns True on success, false else.
\item {\bf void AddUser(char *name, char *passwd, int iCode) }, adds a new user to the database.
\item {\bf int IsValidUser(char *name, char *passwd) }, checks a users authorisation information. Returns a negative value if the user is invalid, the users rights code if he is valid.
\item {\bf void KillPasswd(void) }, deletes the password data structures, when it is no longer needed. Omission of this call will result in wasted memory.
\end{itemize}