晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
Server : Apache System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64 User : rainic ( 1014) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /proc/thread-self/root/usr/share/doc/pam-devel/html/ |
Upload File : |
<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>