annotate src/lib.rs @ 1:b195a14058bb

initial commit
author Jesse Hallett <jesse@galois.com>
date Thu, 05 Mar 2015 16:25:10 -0800
parents
children e69e2966ae0d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
1 #![feature(core)]
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
2 #![feature(libc)]
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
3 #![feature(std_misc)]
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
4
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
5 //! Interface to the pluggable authentication module framework (PAM).
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
6 //!
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
7 //! The goal of this library is to provide a type-safe API that can be used to
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
8 //! interact with PAM. The library is incomplete - currently it supports
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
9 //! a subset of functions for use in a pam authentication module. A pam module
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
10 //! is a shared library that is invoked to authenticate a user, or to perform
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
11 //! other functions.
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
12 //!
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
13 //! For general information on writing pam modules, see
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
14 //! [The Linux-PAM Module Writers' Guide][module-guide]
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
15 //!
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
16 //! [module-guide]: http://www.linux-pam.org/Linux-PAM-html/Linux-PAM_MWG.html
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
17 //!
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
18 //! A typical authentication module will define an external function called
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
19 //! `pam_sm_authenticate()`, which will use functions in this library to
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
20 //! interrogate the program that requested authentication for more information,
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
21 //! and to render a result. For a working example that uses this library, see
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
22 //! [tozny-pam][].
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
23 //!
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
24 //! [tozny-pam]: https://github.com/tozny/tozny-pam
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
25 //!
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
26 //! Note that constants that are normally read from pam header files are
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
27 //! hard-coded in the `constants` module. The values there are taken from
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
28 //! a Linux system. That means that it might take some work to get this library
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
29 //! to work on other platforms.
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
30
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
31 extern crate libc;
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
32
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
33 pub mod conv;
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
34 pub mod constants;
b195a14058bb initial commit
Jesse Hallett <jesse@galois.com>
parents:
diff changeset
35 pub mod module;