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" href=
"style.css" type=
"text/css"/><meta name=
"generator" content=
"DocBook XSL Stylesheets V1.72.0"/><link rel=
"start" 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"/><!--
4 Copyright 1998 - 2007 Double Precision, Inc. See COPYING for distribution
7 --></head><body><div class=
"refentry" lang=
"en" xml:
lang=
"en"><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"/>
8 #include
<courierauth.h
><br clear=
"none"/>
9 </p></div><div class=
"funcsynopsis"><table border=
"0" summary=
"Function synopsis" cellspacing=
"0" cellpadding=
"0"><tr><td rowspan=
"1" colspan=
"1"><code class=
"funcdef"><b class=
"fsfunc">auth_enumerate
</b>(
</code></td><td rowspan=
"1" colspan=
"1">int
</td><td rowspan=
"1" colspan=
"1"><var class=
"pdparam">(*callback_func)
</var><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 *
</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=
"id282219" shape=
"rect"> </a><h2>DESCRIPTION
</h2><p>
10 <code class=
"function">auth_enumerate
</code> enumerates all of the available accounts.
11 <code class=
"function">auth_enumerate
</code> repeatedly calls
12 <code class=
"function">callback_func
</code>, once for each account.
13 <code class=
"function">callback_func
</code> receives the following arguments:
</p><div class=
"itemizedlist"><ul type=
"disc"><li><p>
14 Account name.
</p></li><li><p>
15 Account's numeric userid.
</p></li><li><p>
16 Account's numeric groupid.
</p></li><li><p>
17 Account's home directory.
</p></li><li><p>
18 Account's mailbox (if defined, may be
<code class=
"literal">NULL
</code>, which
19 indicates the default mailbox location).
</p></li><li><p>
20 Account's options string (if defined, may be
<code class=
"literal">NULL
</code>)
</p></li><li><p>
21 <em class=
"parameter"><code>callback_arg
</code></em>, verbatim.
</p></li></ul></div><p>
22 After invoking
<code class=
"function">callback_func
</code> for the last account,
23 <code class=
"function">auth_enumerate
</code> invokes
<code class=
"function">callback_func
</code>
24 one more time with all parameters set to
<code class=
"literal">NULL
</code> or
0.
</p><p>
25 If
<code class=
"function">auth_enumerate
</code> encounters an error it will terminate
26 without calling
<code class=
"function">callback_func
</code> with all
27 <code class=
"literal">NULL
</code> or
0 parameters.
28 This can be used to determine whether a partial list of accounts was
29 received.
</p><div class=
"note" style=
"margin-left: 0.5in; margin-right: 0.5in;"><h3 class=
"title">Note
</h3><p>
30 Some back-end Courier authentication modules do not implement account
31 enumeration, so this function may not be available in all
32 configurations.
</p></div></div><div class=
"refsect1" lang=
"en" xml:
lang=
"en"><a id=
"id282573" shape=
"rect"> </a><h2>SEE ALSO
</h2><p>
33 <a href=
"authlib.html" target=
"_top" shape=
"rect"><span class=
"citerefentry"><span class=
"refentrytitle">authlib
</span>(
3)
</span></a>,
35 <a href=
"auth_generic.html" target=
"_top" shape=
"rect"><span class=
"citerefentry"><span class=
"refentrytitle">auth_generic
</span>(
3)
</span></a>,
37 <a href=
"auth_login.html" target=
"_top" shape=
"rect"><span class=
"citerefentry"><span class=
"refentrytitle">auth_login
</span>(
3)
</span></a>,
39 <a href=
"auth_getuserinfo.html" target=
"_top" shape=
"rect"><span class=
"citerefentry"><span class=
"refentrytitle">auth_getuserinfo
</span>(
3)
</span></a>,
41 <a 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>