Imported Upstream version 0.66.1
[hcoop/debian/courier-authlib.git] / auth_enumerate.html
CommitLineData
d9898ee8 1<?xml version="1.0"?>
b0322a85 2<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>auth_enumerate</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-enumerate" title="auth_enumerate"/><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"/><!--
d9898ee8 3
b0322a85 4Copyright 1998 - 2009 Double Precision, Inc. See COPYING for distribution
d9898ee8 5information.
6
b0322a85 7--></head><body><div class="refentry"><a id="auth-enumerate" shape="rect"> </a><div class="titlepage"/><div class="refnamediv"><h2>Name</h2><p>auth_enumerate — Obtain list of accounts</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="literallayout"><p><br clear="none"/>
d9898ee8 8#include &lt;courierauth.h&gt;<br clear="none"/>
b0322a85
CE
9</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"><strong>auth_enumerate</strong>(</code></td><td rowspan="1" colspan="1">int <var class="pdparam">(*callback_func)</var>
10 <code>(</code>const char *, uid_t, gid_t, const char *, const char *, const char *, 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="idm247870751728" shape="rect"> </a><h2>DESCRIPTION</h2><p>
d9898ee8 11<code class="function">auth_enumerate</code> enumerates all of the available accounts.
12<code class="function">auth_enumerate</code> repeatedly calls
13<code class="function">callback_func</code>, once for each account.
b0322a85
CE
14<code class="function">callback_func</code> receives the following arguments:</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
15Account name.</p></li><li class="listitem"><p>
16Account's numeric userid.</p></li><li class="listitem"><p>
17Account's numeric groupid.</p></li><li class="listitem"><p>
18Account's home directory.</p></li><li class="listitem"><p>
d9898ee8 19Account's mailbox (if defined, may be <code class="literal">NULL</code>, which
b0322a85
CE
20indicates the default mailbox location).</p></li><li class="listitem"><p>
21Account's options string (if defined, may be <code class="literal">NULL</code>)</p></li><li class="listitem"><p>
d9898ee8 22<em class="parameter"><code>callback_arg</code></em>, verbatim.</p></li></ul></div><p>
23After invoking <code class="function">callback_func</code> for the last account,
24<code class="function">auth_enumerate</code> invokes <code class="function">callback_func</code>
25one more time with all parameters set to <code class="literal">NULL</code> or 0.</p><p>
26If <code class="function">auth_enumerate</code> encounters an error it will terminate
27without calling <code class="function">callback_func</code> with all
28<code class="literal">NULL</code> or 0 parameters.
29This can be used to determine whether a partial list of accounts was
30received.</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
31Some back-end Courier authentication modules do not implement account
32enumeration, so this function may not be available in all
b0322a85 33configurations.</p></div></div><div class="refsect1"><a id="idm247867946192" shape="rect"> </a><h2>SEE ALSO</h2><p>
8d138742 34<a class="ulink" href="authlib.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">authlib</span>(3)</span></a>,
d9898ee8 35
8d138742 36<a class="ulink" href="auth_generic.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">auth_generic</span>(3)</span></a>,
d9898ee8 37
8d138742 38<a class="ulink" href="auth_login.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">auth_login</span>(3)</span></a>,
d9898ee8 39
8d138742 40<a class="ulink" href="auth_getuserinfo.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">auth_getuserinfo</span>(3)</span></a>,
d9898ee8 41
8d138742 42<a class="ulink" href="auth_passwd.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">auth_passwd</span>(3)</span></a>.</p></div></div></body></html>