/
usr
/
share
/
doc
/
pam-devel
/
html
/
/usr/share/doc/pam-devel/html
mkdir
upload
Name
Size
Mode
Actions
adg-author.html
3098
0644
edit
dl
rm
adg-copyright.html
3624
0644
edit
dl
rm
adg-example.html
3676
0644
edit
dl
rm
adg-files.html
2239
0644
edit
dl
rm
adg-glossary.html
3286
0644
edit
dl
rm
adg-interface-by-app-expected.html
62472
0644
edit
dl
rm
adg-interface-of-app-expected.html
8457
0644
edit
dl
rm
adg-interface-programming-notes.html
2614
0644
edit
dl
rm
adg-interface.html
5019
0644
edit
dl
rm
adg-introduction-description.html
3373
0644
edit
dl
rm
adg-introduction-synopsis.html
2683
0644
edit
dl
rm
adg-introduction.html
2064
0644
edit
dl
rm
adg-libpam-functions.html
13449
0644
edit
dl
rm
adg-libpam_misc.html
3421
0644
edit
dl
rm
adg-overview.html
8357
0644
edit
dl
rm
adg-porting.html
4306
0644
edit
dl
rm
adg-security-conv-function.html
2346
0644
edit
dl
rm
adg-security-library-calls.html
3203
0644
edit
dl
rm
adg-security-resources.html
2903
0644
edit
dl
rm
adg-security-service-name.html
4535
0644
edit
dl
rm
adg-security-user-identity.html
5512
0644
edit
dl
rm
adg-security.html
3824
0644
edit
dl
rm
adg-see-also.html
2214
0644
edit
dl
rm
Linux-PAM_ADG.html
8613
0644
edit
dl
rm
Linux-PAM_MWG.html
8803
0644
edit
dl
rm
mwg-author.html
3075
0644
edit
dl
rm
mwg-copyright.html
3603
0644
edit
dl
rm
mwg-example.html
2005
0644
edit
dl
rm
mwg-expected-by-module-item.html
46457
0644
edit
dl
rm
mwg-expected-by-module-other.html
8352
0644
edit
dl
rm
mwg-expected-by-module.html
4117
0644
edit
dl
rm
mwg-expected-of-module-acct.html
6187
0644
edit
dl
rm
mwg-expected-of-module-auth.html
10968
0644
edit
dl
rm
mwg-expected-of-module-chauthtok.html
7977
0644
edit
dl
rm
mwg-expected-of-module-overview.html
6437
0644
edit
dl
rm
mwg-expected-of-module-session.html
7126
0644
edit
dl
rm
mwg-expected-of-module.html
4374
0644
edit
dl
rm
mwg-introduction-description.html
3971
0644
edit
dl
rm
mwg-introduction-synopsis.html
2028
0644
edit
dl
rm
mwg-introduction.html
2032
0644
edit
dl
rm
mwg-see-also.html
2231
0644
edit
dl
rm
mwg-see-options.html
2996
0644
edit
dl
rm
mwg-see-programming-libs.html
3015
0644
edit
dl
rm
mwg-see-programming-sec.html
9141
0644
edit
dl
rm
mwg-see-programming-syslog.html
4741
0644
edit
dl
rm
mwg-see-programming.html
3078
0644
edit
dl
rm
Edit:
/usr/share/doc/pam-devel/html/mwg-expected-of-module-overview.html
(6437B)
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>3.1. Overview</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"><link rel="home" href="Linux-PAM_MWG.html" title="The Linux-PAM Module Writers' Guide"><link rel="up" href="mwg-expected-of-module.html" title="Chapter 3. What is expected of a module"><link rel="prev" href="mwg-expected-of-module.html" title="Chapter 3. What is expected of a module"><link rel="next" href="mwg-expected-of-module-auth.html" title="3.2. Authentication management"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">3.1. Overview</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="mwg-expected-of-module.html">Prev</a> </td><th width="60%" align="center">Chapter 3. What is expected of a module</th><td width="20%" align="right"> <a accesskey="n" href="mwg-expected-of-module-auth.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mwg-expected-of-module-overview"></a>3.1. Overview</h2></div></div></div><p> The six module functions are grouped into four independent management groups. These groups are as follows: <span class="emphasis"><em>authentication</em></span>, <span class="emphasis"><em>account</em></span>, <span class="emphasis"><em>session</em></span> and <span class="emphasis"><em>password</em></span>. To be properly defined, a module must define all functions within at least one of these groups. A single module may contain the necessary functions for <span class="emphasis"><em>all</em></span> four groups. </p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="mwg-expected-of-module-overview-1"></a>3.1.1. Functional independence</h3></div></div></div><p> The independence of the four groups of service a module can offer means that the module should allow for the possibility that any one of these four services may legitimately be called in any order. Thus, the module writer should consider the appropriateness of performing a service without the prior success of some other part of the module. </p><p> As an informative example, consider the possibility that an application applies to change a user's authentication token, without having first requested that <span class="emphasis"><em>Linux-PAM</em></span> authenticate the user. In some cases this may be deemed appropriate: when <span class="command"><strong>root</strong></span> wants to change the authentication token of some lesser user. In other cases it may not be appropriate: when <span class="command"><strong>joe</strong></span> maliciously wants to reset <span class="command"><strong>alice</strong></span>'s password; or when anyone other than the user themself wishes to reset their <span class="emphasis"><em>KERBEROS</em></span> authentication token. A policy for this action should be defined by any reasonable authentication scheme, the module writer should consider this when implementing a given module. </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="mwg-expected-of-module-overview-2"></a>3.1.2. Minimizing administration problems</h3></div></div></div><p> To avoid system administration problems and the poor construction of a <code class="filename">/etc/pam.conf</code> file, the module developer may define all six of the following functions. For those functions that would not be called, the module should return <span class="errorname">PAM_SERVICE_ERR</span> and write an appropriate message to the system log. When this action is deemed inappropriate, the function would simply return <span class="errorname">PAM_IGNORE</span>. </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="mwg-expected-of-module-overview-3"></a>3.1.3. Arguments supplied to the module</h3></div></div></div><p> The <em class="parameter"><code>flags</code></em> argument of each of the following functions can be logically OR'd with <em class="parameter"><code>PAM_SILENT</code></em>, which is used to inform the module to not pass any <span class="emphasis"><em>text</em></span> (errors or warnings) application. </p><p> The <em class="parameter"><code>argc</code></em> and <em class="parameter"><code>argv</code></em> arguments are taken from the line appropriate to this module---that is, with the <span class="emphasis"><em>service_name</em></span> matching that of the application---in the configuration file (see the <span class="emphasis"><em>Linux-PAM</em></span> System Administrators' Guide). Together these two parameters provide the number of arguments and an array of pointers to the individual argument tokens. This will be familiar to C programmers as the ubiquitous method of passing command arguments to the function <code class="function">main()</code>. Note, however, that the first argument (<em class="parameter"><code>argv[0]</code></em>) is a true argument and <span class="emphasis"><em>not</em></span> the name of the module. </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="mwg-expected-of-module.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="mwg-expected-of-module.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="mwg-expected-of-module-auth.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 3. What is expected of a module </td><td width="20%" align="center"><a accesskey="h" href="Linux-PAM_MWG.html">Home</a></td><td width="40%" align="right" valign="top"> 3.2. Authentication management</td></tr></table></div></body></html>
Save
cmd:
run