1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
.\" <!-- $Id: auth_getoption.sgml,v 1.1 2004/10/21 00:10:49 mrsam Exp $ -->
.\" <!-- Copyright 2004 Double Precision, Inc. See COPYING for -->
.\" <!-- distribution information. -->
.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <steve@ggi-project.org>.
.TH "AUTH_GETOPTION" "3" "15 July 2005" "Double Precision, Inc." ""
.SH NAME
auth_getoption \- Search an option string
.SH SYNOPSIS
.nf
#include <courierauth.h>
.fi
.sp
\fB
.sp
char *value=auth_getoption (const char *\fIoptions\fB, const char *\fIkeyword\fB);
\fR
.SH "DESCRIPTION"
.PP
This is a convenience function for parsing account options, as received
by the callback function invoked by
\fBauth_generic\fR(3),
\fBauth_login\fR(3),
\fBauth_getuserinfo\fR(3),
and
\fBauth_passwd\fR(3)\&.
.PP
\fIoptions\fR is the
\fBoptions\fR field from
authinfo (which can be NULL).
As described in
\fBauth_generic\fR(3)
(and the others), it is a comma-separated list of
``\fIkeyword\fR=\fIvalue\fR''
pairs.
.PP
\fBauth_getoption\fR searches
\fIoptions\fR for a
\fIkeyword\fR\&.
.SH "RETURNS"
.PP
If
\fIoptions\fR does not have the
\fIkeyword\fR,
\fBauth_getoption\fR returns NULL with
errno set to ENOENT\&.
Otherwise
\fBauth_getoption\fR allocates a buffer for
\fIvalue\fR, and returns it.
It is the caller's responsibility to
\fBfree\fR(3)
the returned buffer.
.PP
\fBauth_getoption\fR returns NULL with
errno set to ENOMEM if it cannot
allocate a buffer.
.SH "SEE ALSO"
.PP
\fBauthlib\fR(3),
\fBauth_generic\fR(3),
\fBauth_login\fR(3),
\fBauth_getuserinfo\fR(3)\&.
|