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