<!-- Copyright 2004 Double Precision, Inc. See COPYING for -->
<!-- distribution information. -->
Title: auth_getoption
Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
Date: 10/28/2020
Manual: Double Precision, Inc.
Source: Double Precision, Inc.
Language: English
* Define some portability stuff
-----------------------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://bugs.debian.org/507673
http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------------------------------------
* set default formatting
-----------------------------------------------------------------
disable hyphenation
disable justification (adjust text to left margin only)
-----------------------------------------------------------------
* MAIN CONTENT STARTS HERE *
-----------------------------------------------------------------
#include <courierauth.h>
\w'char *value=auth_getoption('u "char *value=auth_getoption(const char *" "options" ", const char *" "keyword" ");"
This is a convenience function for parsing account options, as received by the callback function invoked by \m[blue]auth_generic_meta(3)\m[]\s-2\u[1]\d\s+2, \m[blue]auth_login_meta(3)\m[]\s-2\u[2]\d\s+2, \m[blue]auth_getuserinfo_meta(3)\m[]\s-2\u[3]\d\s+2, and \m[blue]auth_passwd(3)\m[]\s-2\u[4]\d\s+2.
options is the options field from authinfo (which can be NULL). As described in \m[blue]auth_generic_meta(3)\m[]\s-2\u[1]\d\s+2 (and the others), it is a comma-separated list of "keyword=value" pairs.
auth_getoption searches options for a keyword.
If options does not have the keyword, auth_getoption returns NULL with errno set to ENOENT. Otherwise auth_getoption allocates a buffer for value, and returns it. It is the caller\*(Aqs responsibility to free(3) the returned buffer.
auth_getoption returns NULL with errno set to ENOMEM if it cannot allocate a buffer.
\m[blue]authlib(3)\m[]\s-2\u[5]\d\s+2, \m[blue]auth_generic_meta(3)\m[]\s-2\u[1]\d\s+2, \m[blue]auth_login_meta(3)\m[]\s-2\u[2]\d\s+2, \m[blue]auth_getuserinfo_meta(3)\m[]\s-2\u[3]\d\s+2.
\%http://www.courier-mta.org/authlib/auth_generic.html
\%http://www.courier-mta.org/authlib/auth_login.html
\%http://www.courier-mta.org/authlib/auth_passwd.html
\%http://www.courier-mta.org/authlib/authlib.html