Download as a PDF

Transcript
3
Implementation
• uadevwrite is a binary which takes the path to a syntactically correct pam_auth
configuration file, and a device specification (either an USB serial-number or
a path to a non-USB device) as arguments. uadevwrite will parse the given
configuration file and filters entries according to the supplied device on which
all determined authentication fingerprints will be written to.
• uauthd is a binary which executes daemon-specific code and always runs detached from any console. uauthd initially reads out the main configuration
file and looks for [script]10 hooks defining actions that should be executed
when certain events relevant for authentication are going to happen on the
system. This provides a flexible hook-based interface, which makes automatic
and transparent script-execution upon authentication events easy.
• uaconf.pl is the only program which has not been written in pure C but in
Perl. It acts like an initial configuration wizard for creating a fully-functional
and syntactically correct configuration file. It guides the user through a stepby-step wizard and finally writes the configuration file to the harddisk, as well
as the authentication codes onto the selected device(s). Rescue device support
within uaconf is currently very limited.
3.2.2
libpamauth.so
As this code serves as backend library for all other components, it’s discussed first.
Data structues The C data structure struct t_auth, which holds all information about exactly one user, his/her authentication storage device, rescue device,
initial hashes, one-time-password sequence, PIN and so forth; as well as the structure t_script, containing information about parsed [script] hooks, the events
on which certain scripts are executed, and the association with either an user or a
device.
Moreover, the enumerations enum e_mode and enum e_source, which define the
main operating modes NORMAL and RESCUE, and sources RAW_DEVICE, USBID and
NONE respectively.
10
You may take a look at the Manual section for more precise information on script-definitions
Seite 25