.\"
.\"
.\"
.\" Title: auth_enumerate
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.72.0
.\" Date: 07/21/2007
.\" Manual: Double Precision, Inc.
.\" Source: Double Precision, Inc.
.\"
.TH "AUTH_ENUMERATE" "3" "07/21/2007" "Double Precision, Inc." "Double Precision, Inc."
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
auth_enumerate \- Obtain list of accounts
.SH "SYNOPSIS"
.sp
.RS 4
.nf
#include
.fi
.RE
.HP 15
.BI "auth_enumerate(int\ " "(*callback_func)" "\ (const\ char\ *,\ uid_t,\ gid_t,\ const\ char\ *,\ const\ char\ *,\ const\ char\ *,\ void\ *), void\ *" "callback_arg" ");"
.SH "DESCRIPTION"
.PP
\fBauth_enumerate\fR
enumerates all of the available accounts.
\fBauth_enumerate\fR
repeatedly calls
\fBcallback_func\fR, once for each account.
\fBcallback_func\fR
receives the following arguments:
.RS 4
\h'-04'\(bu\h'+03'Account name.
.RE
.RS 4
\h'-04'\(bu\h'+03'Account's numeric userid.
.RE
.RS 4
\h'-04'\(bu\h'+03'Account's numeric groupid.
.RE
.RS 4
\h'-04'\(bu\h'+03'Account's home directory.
.RE
.RS 4
\h'-04'\(bu\h'+03'Account's mailbox (if defined, may be
NULL, which indicates the default mailbox location).
.RE
.RS 4
\h'-04'\(bu\h'+03'Account's options string (if defined, may be
NULL)
.RE
.RS 4
\h'-04'\(bu\h'+03'
\fIcallback_arg\fR, verbatim.
.RE
.PP
After invoking
\fBcallback_func\fR
for the last account,
\fBauth_enumerate\fR
invokes
\fBcallback_func\fR
one more time with all parameters set to
NULL
or 0.
.PP
If
\fBauth_enumerate\fR
encounters an error it will terminate without calling
\fBcallback_func\fR
with all
NULL
or 0 parameters. This can be used to determine whether a partial list of accounts was received.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
\fBNote\fR
.PP
Some back\-end Courier authentication modules do not implement account enumeration, so this function may not be available in all configurations.
.SH "SEE ALSO"
.PP
\fI\fBauthlib\fR(3)\fR\&[1],
\fI\fBauth_generic\fR(3)\fR\&[2],
\fI\fBauth_login\fR(3)\fR\&[3],
\fI\fBauth_getuserinfo\fR(3)\fR\&[4],
\fI\fBauth_passwd\fR(3)\fR\&[5].
.SH "REFERENCES"
.IP " 1." 4
\fBauthlib\fR(3)
.RS 4
\%authlib.html
.RE
.IP " 2." 4
\fBauth_generic\fR(3)
.RS 4
\%auth_generic.html
.RE
.IP " 3." 4
\fBauth_login\fR(3)
.RS 4
\%auth_login.html
.RE
.IP " 4." 4
\fBauth_getuserinfo\fR(3)
.RS 4
\%auth_getuserinfo.html
.RE
.IP " 5." 4
\fBauth_passwd\fR(3)
.RS 4
\%auth_passwd.html
.RE