Imported Debian patch 0.66.1-1
[hcoop/debian/courier-authlib.git] / auth_login.html
index b3af3e5..36c55fb 100644 (file)
@@ -1,19 +1,19 @@
 <?xml version="1.0"?>
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>auth_login</title><link rel="stylesheet" href="style.css" type="text/css"/><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"/><link rel="start" href="#auth-login" title="auth_login"/><link xmlns="" rel="stylesheet" type="text/css" href="manpage.css"/><meta xmlns="" name="MSSmartTagsPreventParsing" content="TRUE"/><link xmlns="" rel="icon" href="icon.gif" type="image/gif"/><!--
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>auth_login</title><link rel="stylesheet" type="text/css" href="style.css"/><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"/><link rel="home" href="#auth-login" title="auth_login"/><link xmlns="" rel="stylesheet" type="text/css" href="manpage.css"/><meta xmlns="" name="MSSmartTagsPreventParsing" content="TRUE"/><link xmlns="" rel="icon" href="icon.gif" type="image/gif"/><!--
 
-Copyright 1998 - 2007 Double Precision, Inc.  See COPYING for distribution
+Copyright 1998 - 2009 Double Precision, Inc.  See COPYING for distribution
 information.
 
---></head><body><div class="refentry" lang="en" xml:lang="en"><a id="auth-login" shape="rect"> </a><div class="titlepage"/><div class="refnamediv"><h2>Name</h2><p>auth_login — Validate a userid and password</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="literallayout"><p><br clear="none"/>
+--></head><body><div class="refentry"><a id="auth-login" shape="rect"> </a><div class="titlepage"/><div class="refnamediv"><h2>Name</h2><p>auth_login — Validate a userid and password</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="literallayout"><p><br clear="none"/>
 #include &lt;courierauth.h&gt;<br clear="none"/>
-</p></div><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"><tr><td rowspan="1" colspan="1"><code class="funcdef">int rc=<b class="fsfunc">auth_login</b>(</code></td><td rowspan="1" colspan="1">const char * </td><td rowspan="1" colspan="1"><var class="pdparam">service</var>, </td></tr><tr><td rowspan="1" colspan="1"> </td><td rowspan="1" colspan="1">const char * </td><td rowspan="1" colspan="1"><var class="pdparam">userid</var>, </td></tr><tr><td rowspan="1" colspan="1"> </td><td rowspan="1" colspan="1">const char * </td><td rowspan="1" colspan="1"><var class="pdparam">password</var>, </td></tr><tr><td rowspan="1" colspan="1"> </td><td rowspan="1" colspan="1">int  </td><td rowspan="1" colspan="1"><var class="pdparam">(*callback_func)</var><code>(</code>struct authinfo *, void *<code>)</code>, </td></tr><tr><td rowspan="1" colspan="1"> </td><td rowspan="1" colspan="1">void * </td><td rowspan="1" colspan="1"><var class="pdparam">callback_arg</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="id318862" shape="rect"> </a><h2>DESCRIPTION</h2><p>
+</p></div><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td rowspan="1" colspan="1"><code class="funcdef">int rc=<strong>auth_login</strong>(</code></td><td rowspan="1" colspan="1">const char *<var class="pdparam">service</var>, </td></tr><tr><td rowspan="1" colspan="1"> </td><td rowspan="1" colspan="1">const char *<var class="pdparam">userid</var>, </td></tr><tr><td rowspan="1" colspan="1"> </td><td rowspan="1" colspan="1">const char *<var class="pdparam">password</var>, </td></tr><tr><td rowspan="1" colspan="1"> </td><td rowspan="1" colspan="1">int <var class="pdparam">(*callback_func)</var><code>(</code>struct authinfo *, void *<code>)</code>, </td></tr><tr><td rowspan="1" colspan="1"> </td><td rowspan="1" colspan="1">void *<var class="pdparam">callback_arg</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a id="idm247882989472" shape="rect"> </a><h2>DESCRIPTION</h2><p>
 <code class="function">auth_login</code> verifies whether
 <em class="replaceable"><code>userid</code></em> exists, and whether it's
 <em class="replaceable"><code>password</code></em> is correct.
 <em class="parameter"><code>service</code></em> specifies which so-called "service" is
-being authenticated; like “<span class="quote">imap</span>” or “<span class="quote">pop3</span>”.
+being authenticated; like <span class="quote">“<span class="quote">imap</span>”</span> or <span class="quote">“<span class="quote">pop3</span>”</span>.
 <em class="parameter"><code>service</code></em> may or may not be used by the Courier
-authentication library's configured back-end module.</p></div><div class="refsect1" lang="en" xml:lang="en"><a id="id284618" shape="rect"> </a><h2>RETURNS</h2><p>
+authentication library's configured back-end module.</p></div><div class="refsect1"><a id="idm247885295344" shape="rect"> </a><h2>RETURNS</h2><p>
 <code class="function">callback_func</code> will be invoked if
 <code class="function">auth_login</code>
 succeeds, and <code class="function">callback_func</code>'s return value becomes
@@ -26,7 +26,7 @@ return value indicates that this request was processed, but it failed.</p><p>
 The second argument to <code class="function">callback_func</code> will be
 <code class="function">callback_arg</code>, which is not interpreted by this
 function in any way.
-The first argument will be a pointer to the following structure:</p><div class="blockquote"><blockquote class="blockquote"><div class="example"><a id="id283673" shape="rect"> </a><p class="title"><b>Example 1. struct authinfo</b></p><div class="example-contents"><pre class="programlisting" xml:space="preserve">
+The first argument will be a pointer to the following structure:</p><div class="blockquote"><blockquote class="blockquote"><div class="example"><a id="idm247886847920" shape="rect"> </a><p class="title"><strong>Example 1. struct authinfo</strong></p><div class="example-contents"><pre class="programlisting" xml:space="preserve">
 struct authinfo {
        const char *sysusername;
        const uid_t *sysuserid;
@@ -44,7 +44,7 @@ struct authinfo {
 
        } ;
 </pre></div></div><br class="example-break" clear="none"/></blockquote></div><p>
-Description of the above fields:</p><div class="variablelist"><dl><dt><span class="term">address</span></dt><dd><p>
+Description of the above fields:</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">address</span></dt><dd><p>
 The authenticated login ID.</p></dd><dt><span class="term">sysusername</span></dt><dd><p>
 The authenticated account's userid and groupid can be looked up in the
 password file using <code class="literal">address</code>.
@@ -68,62 +68,67 @@ if no quota is set).</p></dd><dt><span class="term">passwd</span></dt><dd><p>
 The account's encrypted password, if available.
 If the account has a cleartext password defined, this field
 can be set to <code class="literal">NULL</code>.
-The encrypted password can take several formats:</p><div class="itemizedlist"><ul type="disc"><li><p>
+The encrypted password can take several formats:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
 A traditional triple-DES crypted password, or a MD5+salt-hashed password,
-as used in Linux.</p></li><li><p>
-“<span class="quote">{MD5}</span>” followed by a base64-encoded MD5 hash
-of the password.</p></li><li><p>
-“<span class="quote">{SHA}</span>” followed by a base64-encoded SHA1 hash
+as used in Linux.</p></li><li class="listitem"><p>
+<span class="quote">“<span class="quote">{MD5}</span>”</span> followed by a base64-encoded MD5 hash
+of the password.</p></li><li class="listitem"><p>
+<span class="quote">“<span class="quote">{SHA}</span>”</span> followed by a base64-encoded SHA1 hash
 of the password.</p></li></ul></div></dd><dt><span class="term">clearpasswd</span></dt><dd><p>
 The account's cleartext password, if available.
 If the account has an encrypted password defined, this field
 can be set to <code class="literal">NULL</code>.</p></dd><dt><span class="term">options</span></dt><dd><p>
 A comma-separated list of miscellaneous account options.
-See below for more information.</p></dd></dl></div><div class="refsect2" lang="en" xml:lang="en"><a id="id328470" shape="rect"> </a><h3>Account options</h3><p>
+See below for more information.</p></dd></dl></div><div class="refsect2"><a id="idm247881555248" shape="rect"> </a><h3>Account options</h3><p>
 Depending on the configuration of the Courier authentication library,
 accounts may have individual options associated with them.
 If the authentication library configuration does not implement account
-options, the option string will be <code class="literal">NULL</code>.
+options, the option string will be a <code class="literal">NULL</code> value.
 Otherwise it will be a comma-separated list of
-“<span class="quote"><em class="replaceable"><code>option</code></em>=<em class="replaceable"><code>value</code></em></span>”
+<span class="quote">“<span class="quote"><em class="replaceable"><code>option</code></em>=<em class="replaceable"><code>value</code></em></span>”</span>
 settings.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
-This is the account option implementation
-that's used by Courier, Courier-IMAP, and
+The application is responsible for actually implementing the
+options.
+For example,
+sn authentication request for service <span class="quote">“<span class="quote">imap</span>”</span>, for example,
+will succeed provided that the userid and the password are valid,
+even if <span class="quote">“<span class="quote">disableimap=1</span>”</span> is set.
+The application's <code class="function">callback_func</code> should check for this
+condition, and return a negative return code.</p></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
+The following list of account options is a combined list of implemented
+options supported by Courier, Courier-IMAP, and
 SqWebMail packages. Some of the following information is obviously
 not applicable for a particular package.
 The inapplicable bits should be obvious.</p></div><p>
 The following options are recognized by the various Courier
-packages:</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
-The application is responsible for enforcing all the “<span class="quote">disabled</span>”
-option.
-An authentication request for service “<span class="quote">imap</span>”, for example,
-will succeed provided that the userid and the password are valid,
-even if “<span class="quote">disableimap=1</span>” is set.
-The application's <code class="function">callback_func</code> should check for this
-condition, and return a negative return code.</p></div><div class="variablelist"><dl><dt><span class="term"><code class="literal">disableimap=</code><em class="replaceable"><code>n</code></em></span></dt><dd><p>
+packages:</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="literal">disableimap=</code><em class="replaceable"><code>n</code></em></span></dt><dd><p>
 If "n" is 1, IMAP access to this account should be disabled.</p></dd><dt><span class="term"><code class="literal">disablepop3=</code><em class="replaceable"><code>n</code></em></span></dt><dd><p>
-If "n" is 1, POP3 access to this account should be disabled.</p></dd><dt><span class="term"><code class="literal">disablewebmail=</code><em class="replaceable"><code>n</code></em></span></dt><dd><p>
+If "n" is 1, POP3 access to this account should be disabled.</p></dd><dt><span class="term"><code class="literal">disableinsecureimap=</code><em class="replaceable"><code>n</code></em></span></dt><dd><p>
+If "n" is 1, unencrypted IMAP access to this account should be disabled.</p></dd><dt><span class="term"><code class="literal">disableinsecurepop3=</code><em class="replaceable"><code>n</code></em></span></dt><dd><p>
+If "n" is 1, unencrypted POP3 access to this account should be disabled.</p></dd><dt><span class="term"><code class="literal">disablewebmail=</code><em class="replaceable"><code>n</code></em></span></dt><dd><p>
 If "n" is 1, webmail access to this account should be disabled.</p></dd><dt><span class="term"><code class="literal">disableshared=</code><em class="replaceable"><code>n</code></em></span></dt><dd><p>
 If "n" is 1, this account should not have access to shared folders or be able
 to share its own folders with other people.</p></dd><dt><span class="term"><code class="literal">group=</code><em class="replaceable"><code>name</code></em></span></dt><dd><p>
-This account is a member of access group
+This option is used by Courier-IMAP in calculating access control lists.
+This option places the account as a member of access group
 <em class="replaceable"><code>name</code></em>.
 Instead of granting access rights on individual mail folders to individual
 accounts, the access rights can be granted to an access group
-“<span class="quote">name</span>”, and all members of this group get the specified access
+<span class="quote">“<span class="quote">name</span>”</span>, and all members of this group get the specified access
 rights.</p><p>
-The access group name “<span class="quote">administrators</span>” is a reserved group.
+The access group name <span class="quote">“<span class="quote">administrators</span>”</span> is a reserved group.
 All accounts in the <code class="literal">administrators</code> group automatically
 receive all rights to all accessible folders.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
 This option may be specified multiple times to specify that the account
 belongs to multiple account groups.</p></div></dd><dt><span class="term"><code class="literal">sharedgroup=</code><em class="replaceable"><code>name</code></em></span></dt><dd><p>
+Another option used by Courier-IMAP.
 Append "name" to the name of the top level virtual shared folder
 index file. This setting restricts which virtual shared folders this
 account could possibly access (and that's on top of whatever else the
 access control lists say). See the virtual shared folder documentation
 for more information.</p><p>
 For technical reasons, group names may not include comma, tab, "/" or "|"
-characters.</p></dd></dl></div></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="id328921" shape="rect"> </a><h2>SEE ALSO</h2><p>
+characters.</p></dd></dl></div></div></div><div class="refsect1"><a id="idm247881468832" shape="rect"> </a><h2>SEE ALSO</h2><p>
 <a class="ulink" href="authlib.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">authlib</span>(3)</span></a>,
  
 <a class="ulink" href="auth_generic.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">auth_generic</span>(3)</span></a>,